From 51a5f23ffc2d390f706905a7700fb84f59e085e9 Mon Sep 17 00:00:00 2001 From: Ramiro Estrugo Date: Sat, 31 Mar 2001 05:03:02 +0000 Subject: Changed from Mike Fleming to hide the proxy authentication preferences * libnautilus-extensions/nautilus-global-preferences.c: Changed from Mike Fleming to hide the proxy authentication preferences when the "Use Proxy" preference is FALSE. * libnautilus-extensions/nautilus-preferences-group.c: (nautilus_preferences_group_add_item): Change the item packing parameters so that items will be sized to their natural sizes. Otherwise they fill the avaialable space and screw up the usage of control preferences to properly hide items and have everything update accordingly. * libnautilus-extensions/nautilus-preferences-pane.c: (preferences_pane_control_preference_changed_callback): Force a queue resize when the pane is updated so that empty space resulting from controlled preferences items being hidden will go away. --- ChangeLog | 19 +++++++++++++++++++ libnautilus-extensions/nautilus-global-preferences.c | 15 +++++++++------ libnautilus-extensions/nautilus-preferences-group.c | 4 ++-- libnautilus-extensions/nautilus-preferences-pane.c | 2 ++ libnautilus-private/nautilus-global-preferences.c | 15 +++++++++------ libnautilus-private/nautilus-preferences-group.c | 4 ++-- libnautilus-private/nautilus-preferences-pane.c | 2 ++ 7 files changed, 45 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f22bae73..9f0b124d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2001-03-30 Ramiro Estrugo + + * libnautilus-extensions/nautilus-global-preferences.c: + Changed from Mike Fleming to hide the proxy authentication + preferences when the "Use Proxy" preference is FALSE. + + * libnautilus-extensions/nautilus-preferences-group.c: + (nautilus_preferences_group_add_item): + Change the item packing parameters so that items will be sized to + their natural sizes. Otherwise they fill the avaialable space and + screw up the usage of control preferences to properly hide items + and have everything update accordingly. + + * libnautilus-extensions/nautilus-preferences-pane.c: + (preferences_pane_control_preference_changed_callback): + Force a queue resize when the pane is updated so that empty space + resulting from controlled preferences items being hidden will go + away. + 2001-03-30 Ramiro Estrugo * libnautilus-extensions/nautilus-enumeration.h: diff --git a/libnautilus-extensions/nautilus-global-preferences.c b/libnautilus-extensions/nautilus-global-preferences.c index 1cfbfafeb..6c45ce274 100644 --- a/libnautilus-extensions/nautilus-global-preferences.c +++ b/libnautilus-extensions/nautilus-global-preferences.c @@ -838,22 +838,25 @@ static PreferenceDialogItem navigation_items[] = { NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH, N_("Proxy requires a username and password:"), NAUTILUS_PREFERENCE_ITEM_BOOLEAN, - NULL, - 0 + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, + NAUTILUS_PREFERENCE_ITEM_SHOW, + NULL }, { N_("HTTP Proxy Settings"), NAUTILUS_PREFERENCES_HTTP_PROXY_AUTH_USERNAME, N_("Username:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, - NULL, - 0 + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, + NAUTILUS_PREFERENCE_ITEM_SHOW, + NULL }, { N_("HTTP Proxy Settings"), NAUTILUS_PREFERENCES_HTTP_USE_AUTH_PASSWORD, N_("Password:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, - NULL, - 0 + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, + NAUTILUS_PREFERENCE_ITEM_SHOW, + NULL }, { N_("Built-in Bookmarks"), NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, diff --git a/libnautilus-extensions/nautilus-preferences-group.c b/libnautilus-extensions/nautilus-preferences-group.c index 89cbd2954..8ea5c0d87 100644 --- a/libnautilus-extensions/nautilus-preferences-group.c +++ b/libnautilus-extensions/nautilus-preferences-group.c @@ -256,8 +256,8 @@ nautilus_preferences_group_add_item (NautilusPreferencesGroup *group, gtk_box_pack_start (GTK_BOX (group->details->content_box), item, - TRUE, - TRUE, + FALSE, + FALSE, 0); gtk_widget_show (item); diff --git a/libnautilus-extensions/nautilus-preferences-pane.c b/libnautilus-extensions/nautilus-preferences-pane.c index 92d90eb54..676c75369 100644 --- a/libnautilus-extensions/nautilus-preferences-pane.c +++ b/libnautilus-extensions/nautilus-preferences-pane.c @@ -249,6 +249,8 @@ preferences_pane_control_preference_changed_callback (gpointer callback_data) g_return_if_fail (NAUTILUS_IS_PREFERENCES_PANE (callback_data)); nautilus_preferences_pane_update (NAUTILUS_PREFERENCES_PANE (callback_data)); + + gtk_widget_queue_resize (GTK_WIDGET (callback_data)); } void diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c index 1cfbfafeb..6c45ce274 100644 --- a/libnautilus-private/nautilus-global-preferences.c +++ b/libnautilus-private/nautilus-global-preferences.c @@ -838,22 +838,25 @@ static PreferenceDialogItem navigation_items[] = { NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH, N_("Proxy requires a username and password:"), NAUTILUS_PREFERENCE_ITEM_BOOLEAN, - NULL, - 0 + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, + NAUTILUS_PREFERENCE_ITEM_SHOW, + NULL }, { N_("HTTP Proxy Settings"), NAUTILUS_PREFERENCES_HTTP_PROXY_AUTH_USERNAME, N_("Username:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, - NULL, - 0 + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, + NAUTILUS_PREFERENCE_ITEM_SHOW, + NULL }, { N_("HTTP Proxy Settings"), NAUTILUS_PREFERENCES_HTTP_USE_AUTH_PASSWORD, N_("Password:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, - NULL, - 0 + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, + NAUTILUS_PREFERENCE_ITEM_SHOW, + NULL }, { N_("Built-in Bookmarks"), NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, diff --git a/libnautilus-private/nautilus-preferences-group.c b/libnautilus-private/nautilus-preferences-group.c index 89cbd2954..8ea5c0d87 100644 --- a/libnautilus-private/nautilus-preferences-group.c +++ b/libnautilus-private/nautilus-preferences-group.c @@ -256,8 +256,8 @@ nautilus_preferences_group_add_item (NautilusPreferencesGroup *group, gtk_box_pack_start (GTK_BOX (group->details->content_box), item, - TRUE, - TRUE, + FALSE, + FALSE, 0); gtk_widget_show (item); diff --git a/libnautilus-private/nautilus-preferences-pane.c b/libnautilus-private/nautilus-preferences-pane.c index 92d90eb54..676c75369 100644 --- a/libnautilus-private/nautilus-preferences-pane.c +++ b/libnautilus-private/nautilus-preferences-pane.c @@ -249,6 +249,8 @@ preferences_pane_control_preference_changed_callback (gpointer callback_data) g_return_if_fail (NAUTILUS_IS_PREFERENCES_PANE (callback_data)); nautilus_preferences_pane_update (NAUTILUS_PREFERENCES_PANE (callback_data)); + + gtk_widget_queue_resize (GTK_WIDGET (callback_data)); } void -- cgit v1.2.1