From ebb32ff1146cc21da2db6119590ebd11a428b11b Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Wed, 15 Feb 2017 19:51:29 -0800 Subject: [PATCH] filebrowser: Set the combobox insensitive when the bookmarks are showing The combo doesn't show anything useful when treeview is showing the bookmarks so just set it insensitive. --- plugins/filebrowser/xed-file-browser-widget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/filebrowser/xed-file-browser-widget.c b/plugins/filebrowser/xed-file-browser-widget.c index bed7544..f9376c2 100644 --- a/plugins/filebrowser/xed-file-browser-widget.c +++ b/plugins/filebrowser/xed-file-browser-widget.c @@ -1660,7 +1660,6 @@ xed_file_browser_widget_new (const gchar *data_dir) XedFileBrowserWidget *obj = g_object_new (XED_TYPE_FILE_BROWSER_WIDGET, NULL); create_toolbar (obj, data_dir); - // create_combo (obj); create_tree (obj); create_filter (obj); @@ -1677,6 +1676,8 @@ xed_file_browser_widget_show_bookmarks (XedFileBrowserWidget *obj) combo_set_active_by_id (obj, BOOKMARKS_ID); g_signal_handlers_unblock_by_func (obj->priv->combo, on_combo_changed, obj); + gtk_widget_set_sensitive (GTK_WIDGET (obj->priv->combo), FALSE); + check_current_item (obj, FALSE); xed_file_browser_view_set_model (obj->priv->treeview, GTK_TREE_MODEL (obj->priv->bookmarks_store)); @@ -1688,6 +1689,8 @@ show_files_real (XedFileBrowserWidget *obj, { xed_file_browser_view_set_model (obj->priv->treeview, GTK_TREE_MODEL (obj->priv->file_store)); + gtk_widget_set_sensitive (GTK_WIDGET (obj->priv->combo), TRUE); + if (do_root_changed) { on_virtual_root_changed (obj->priv->file_store, NULL, obj);