treeview: Avoid popup-menu
This commit is contained in:
@@ -5234,12 +5234,6 @@ gtk_tree_view_search_key_cancels_search (guint keyval)
|
||||
|| keyval == GDK_KEY_ISO_Left_Tab;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
no_popup (void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_tree_view_key_controller_key_pressed (GtkEventControllerKey *key,
|
||||
guint keyval,
|
||||
@@ -5426,18 +5420,9 @@ gtk_tree_view_forward_controller_key_pressed (GtkEventControllerKey *key,
|
||||
}
|
||||
else
|
||||
{
|
||||
gulong popup_menu_id;
|
||||
|
||||
popup_menu_id = g_signal_connect (tree_view->priv->search_entry,
|
||||
"popup-menu", G_CALLBACK (no_popup),
|
||||
NULL);
|
||||
|
||||
/* Because we keep the focus on the treeview, we need to forward the
|
||||
* key events to the entry, when it is visible. */
|
||||
gtk_event_controller_key_forward (key, search_window);
|
||||
|
||||
g_signal_handler_disconnect (tree_view->priv->search_entry,
|
||||
popup_menu_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user