diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2000-10-26 21:21:05 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2000-10-26 21:21:05 +0000 |
commit | 46c53fcda82b7518f17e143756387fc46710eb4b (patch) | |
tree | 0b0a196d216911928e59c52d291e773177eff69c /src | |
parent | fc0ee93f44790ee8845eba473a6ed7ac00b45e39 (diff) | |
download | nautilus-46c53fcda82b7518f17e143756387fc46710eb4b.tar.gz |
fixed bug 2814, move "built-in bookmarks" checkbox from the edit bookmarks
fixed bug 2814, move "built-in bookmarks" checkbox from the
edit bookmarks window to preferences/navigation.
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_create_dialog), (global_preferences_register):
added a checkbox to control the "hide built-in bookmarks" preference
* libnautilus-extensions/nautilus-global-preferences.h:
renamed preference path so the built-in bookmarks preference can
be in the preferences window
* src/nautilus-bookmarks-window.c: (create_bookmarks_window),
(repopulate):
removed the built-in bookmarks checkbox from the edit bookmarks
window
Diffstat (limited to 'src')
-rw-r--r-- | src/nautilus-bookmarks-window.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c index 896f3c905..ddbf33132 100644 --- a/src/nautilus-bookmarks-window.c +++ b/src/nautilus-bookmarks-window.c @@ -45,7 +45,6 @@ static GtkWidget *bookmark_list_widget = NULL; /* awkward name to distinguis static GtkWidget *name_field = NULL; static int name_field_changed_signalID; static GtkWidget *remove_button = NULL; -static GtkWidget *show_static_checkbox = NULL; static gboolean text_changed = FALSE; static GtkWidget *uri_field = NULL; static int uri_field_changed_signalID; @@ -82,9 +81,6 @@ static gboolean on_window_delete_event (GtkWidget *, gpointer user_data); static void repopulate (void); -static void update_built_in_bookmarks_checkbox_to_match_preference (gpointer user_data); -static void update_built_in_bookmarks_preference_to_match_checkbox (gpointer user_data); - #define BOOKMARK_LIST_COLUMN_ICON 0 #define BOOKMARK_LIST_COLUMN_NAME 1 #define BOOKMARK_LIST_COLUMN_COUNT 2 @@ -193,19 +189,6 @@ create_bookmarks_window (NautilusBookmarkList *list, GtkObject *undo_manager_sou gtk_widget_show (remove_button); gtk_box_pack_start (GTK_BOX (hbox2), remove_button, TRUE, FALSE, 0); - show_static_checkbox = gtk_check_button_new_with_label (_("Include built-in bookmarks in menu")); - gtk_widget_show (show_static_checkbox); - gtk_box_pack_end (GTK_BOX (right_side), show_static_checkbox, FALSE, FALSE, 0); - - update_built_in_bookmarks_checkbox_to_match_preference (GTK_CHECK_BUTTON (show_static_checkbox)); - nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, - update_built_in_bookmarks_checkbox_to_match_preference, - show_static_checkbox); - - gtk_signal_connect (GTK_OBJECT (show_static_checkbox), "toggled", - update_built_in_bookmarks_preference_to_match_checkbox, - show_static_checkbox); - bookmark_list_changed_signalID = gtk_signal_connect (GTK_OBJECT(bookmarks), "contents_changed", GTK_SIGNAL_FUNC(on_bookmark_list_changed), @@ -631,39 +614,3 @@ repopulate (void) gtk_clist_thaw (GTK_CLIST (bookmark_list_widget)); } - -static void -synch_built_in_bookmarks_preference_and_checkbox (GtkCheckButton *checkbox, gboolean trust_checkbox) -{ - gboolean preference_setting, checkbox_setting; - - g_assert (GTK_IS_CHECK_BUTTON (checkbox)); - - preference_setting = !nautilus_preferences_get_boolean - (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, FALSE); - - checkbox_setting = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)); - - if (preference_setting == checkbox_setting) { - return; - } - - if (trust_checkbox) { - nautilus_preferences_set_boolean - (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, !checkbox_setting); - } else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), preference_setting); - } -} - -static void -update_built_in_bookmarks_preference_to_match_checkbox (gpointer user_data) -{ - synch_built_in_bookmarks_preference_and_checkbox (user_data, TRUE); -} - -static void -update_built_in_bookmarks_checkbox_to_match_preference (gpointer user_data) -{ - synch_built_in_bookmarks_preference_and_checkbox (user_data, FALSE); -} |