mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-25 18:52:22 -05:00
Fix urlgrabber right click selection.
This commit is contained in:
parent
52ce55341b
commit
b4496216db
@ -49,13 +49,22 @@ url_treeview_url_clicked_cb (GtkWidget *view, GdkEventButton *event,
|
|||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gchar *url;
|
gchar *url;
|
||||||
|
GtkTreeSelection *sel;
|
||||||
|
GtkTreePath *path;
|
||||||
|
GtkTreeView *tree = GTK_TREE_VIEW (view);
|
||||||
|
|
||||||
if (!event ||
|
if (!event || !gtk_tree_view_get_path_at_pos (tree, event->x, event->y, &path, 0, 0, 0))
|
||||||
!gtkutil_treeview_get_selected (GTK_TREE_VIEW (view), &iter,
|
return FALSE;
|
||||||
|
|
||||||
|
/* select what they right-clicked on */
|
||||||
|
sel = gtk_tree_view_get_selection (tree);
|
||||||
|
gtk_tree_selection_unselect_all (sel);
|
||||||
|
gtk_tree_selection_select_path (sel, path);
|
||||||
|
gtk_tree_path_free (path);
|
||||||
|
|
||||||
|
if (!gtkutil_treeview_get_selected (GTK_TREE_VIEW (view), &iter,
|
||||||
URL_COLUMN, &url, -1))
|
URL_COLUMN, &url, -1))
|
||||||
{
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
switch (event->button)
|
switch (event->button)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user