summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2000-07-06 21:46:58 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2000-07-06 21:46:58 +0000
commit3cc4d73954489d161ea604a77c0620754064b644 (patch)
tree1d28e1289968e50c8dd0ae901f73a318a1b8ebf2
parent67d85d6f3aaee4759bbe8d1284f90829afb7f7b8 (diff)
downloadnautilus-3cc4d73954489d161ea604a77c0620754064b644.tar.gz
fixed long-standing bug where the sidebar tabs would display the wrong
fixed long-standing bug where the sidebar tabs would display the wrong view by decrementing the appropriate index when a view is removed; gave sidebar views more room and solved the variable height problem by hiding the sidebar title when a sidebar view is displayed; reduced slop on splitter to avoid accidental toggling; and some new images from Susan.
-rw-r--r--ChangeLog22
-rw-r--r--icons/backgrounds.pngbin7164 -> 3596 bytes
-rw-r--r--icons/colors.pngbin263 -> 1007 bytes
-rw-r--r--icons/emblems.pngbin2985 -> 4764 bytes
-rw-r--r--libnautilus-extensions/nautilus-horizontal-splitter.c4
-rw-r--r--libnautilus-private/nautilus-horizontal-splitter.c4
-rw-r--r--src/nautilus-information-panel.c11
-rw-r--r--src/nautilus-sidebar-tabs.c12
-rw-r--r--src/nautilus-sidebar.c11
9 files changed, 51 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 710a1d59f..38f066bbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2000-07-06 Andy Hertzfeld <andy@eazel.com>
+
+ * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_remove_view):
+ fixed long-standing bug where sidebar tabs would invoke the
+ wrong views, by decrementing subsequent indexes when a panel is
+ removed.
+ * src/nautilus-sidebar.c: (nautilus_sidebar_initialize),
+ (nautilus_sidebar_activate_panel),
+ (nautilus_sidebar_deactivate_panel),
+ (nautilus_sidebar_update_buttons):
+ fixed problem of sidebar views changing their position as you
+ navigate, and also gave them more space, by hiding the title
+ info when a sidebar view is showing, allowing them to take up
+ the entire space of the sidebar.
+ * libnautilus-extensions/nautilus-horizontal-splitter.c:
+ reduced the slop threshold and time threshold for toggling the
+ sidebar so it doesn't happen accidentally
+ * icons/backgrounds.png:
+ * icons/colors.png:
+ * icons/emblems.png:
+ new images from Susan
+
2000-07-06 Michael Engber <engber@eazel.com>
* src/nautilus-zoom-control.c: (nautilus_zoom_control_destroy):
diff --git a/icons/backgrounds.png b/icons/backgrounds.png
index 0ee65e56c..3280411e2 100644
--- a/icons/backgrounds.png
+++ b/icons/backgrounds.png
Binary files differ
diff --git a/icons/colors.png b/icons/colors.png
index 29ff34e59..6ab2f1e6f 100644
--- a/icons/colors.png
+++ b/icons/colors.png
Binary files differ
diff --git a/icons/emblems.png b/icons/emblems.png
index d80759f0a..1e7a49878 100644
--- a/icons/emblems.png
+++ b/icons/emblems.png
Binary files differ
diff --git a/libnautilus-extensions/nautilus-horizontal-splitter.c b/libnautilus-extensions/nautilus-horizontal-splitter.c
index 290bab5de..437b1cb8a 100644
--- a/libnautilus-extensions/nautilus-horizontal-splitter.c
+++ b/libnautilus-extensions/nautilus-horizontal-splitter.c
@@ -38,8 +38,8 @@ struct NautilusHorizontalSplitterDetails {
#define BAR_WIDTH 7
#define CLOSED_THRESHOLD 4
#define NOMINAL_SIZE 148
-#define SPLITTER_CLICK_SLOP 3
-#define SPLITTER_CLICK_TIMEOUT 1500
+#define SPLITTER_CLICK_SLOP 1
+#define SPLITTER_CLICK_TIMEOUT 400
/* NautilusHorizontalSplitterClass methods */
static void nautilus_horizontal_splitter_initialize_class (NautilusHorizontalSplitterClass *horizontal_splitter_class);
diff --git a/libnautilus-private/nautilus-horizontal-splitter.c b/libnautilus-private/nautilus-horizontal-splitter.c
index 290bab5de..437b1cb8a 100644
--- a/libnautilus-private/nautilus-horizontal-splitter.c
+++ b/libnautilus-private/nautilus-horizontal-splitter.c
@@ -38,8 +38,8 @@ struct NautilusHorizontalSplitterDetails {
#define BAR_WIDTH 7
#define CLOSED_THRESHOLD 4
#define NOMINAL_SIZE 148
-#define SPLITTER_CLICK_SLOP 3
-#define SPLITTER_CLICK_TIMEOUT 1500
+#define SPLITTER_CLICK_SLOP 1
+#define SPLITTER_CLICK_TIMEOUT 400
/* NautilusHorizontalSplitterClass methods */
static void nautilus_horizontal_splitter_initialize_class (NautilusHorizontalSplitterClass *horizontal_splitter_class);
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index 83089480c..fbd82e14e 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -230,7 +230,7 @@ nautilus_sidebar_initialize (GtkObject *object)
GTK_WIDGET (sidebar->details->title),
FALSE, FALSE, GNOME_PAD);
- /* first, allocate the index tabs */
+ /* allocate the index tabs */
sidebar->details->sidebar_tabs = NAUTILUS_SIDEBAR_TABS (nautilus_sidebar_tabs_new ());
sidebar->details->selected_index = -1;
@@ -825,7 +825,8 @@ nautilus_sidebar_activate_panel (NautilusSidebar *sidebar, int which_view)
g_free (title);
/* hide the buttons, since they look confusing when partially overlapped */
- gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box_centerer));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->title));
gtk_notebook_set_page (notebook, which_view);
}
@@ -839,7 +840,8 @@ nautilus_sidebar_deactivate_panel(NautilusSidebar *sidebar)
gtk_widget_hide (GTK_WIDGET (sidebar->details->title_tab));
}
- gtk_widget_show (GTK_WIDGET (sidebar->details->button_box));
+ gtk_widget_show (GTK_WIDGET (sidebar->details->button_box_centerer));
+ gtk_widget_show (GTK_WIDGET (sidebar->details->title));
sidebar->details->selected_index = -1;
nautilus_sidebar_tabs_select_tab (sidebar->details->sidebar_tabs, -1);
}
@@ -1251,7 +1253,8 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
/* Hide button box if a sidebar panel is showing. */
if (sidebar->details->selected_index != -1) {
- gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box_centerer));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->title));
}
}
}
diff --git a/src/nautilus-sidebar-tabs.c b/src/nautilus-sidebar-tabs.c
index 1ab487db2..fba13a368 100644
--- a/src/nautilus-sidebar-tabs.c
+++ b/src/nautilus-sidebar-tabs.c
@@ -776,8 +776,10 @@ nautilus_sidebar_tabs_get_title_from_index (NautilusSidebarTabs *sidebar_tabs, i
void
nautilus_sidebar_tabs_remove_view (NautilusSidebarTabs *sidebar_tabs, const char *name)
{
+ GList *next_tab;
TabItem *tab_item;
-
+ int old_page_number;
+
g_return_if_fail (NAUTILUS_IS_SIDEBAR_TABS (sidebar_tabs));
g_return_if_fail (name != NULL);
@@ -792,8 +794,16 @@ nautilus_sidebar_tabs_remove_view (NautilusSidebarTabs *sidebar_tabs, const char
/* Remove the item from the list */
sidebar_tabs->details->tab_items = g_list_remove (sidebar_tabs->details->tab_items, tab_item);
+ old_page_number = tab_item->notebook_page;
tab_item_destroy (tab_item);
+ /* decrement all page numbers greater than the one we're removing */
+ for (next_tab = sidebar_tabs->details->tab_items; next_tab != NULL; next_tab = next_tab->next) {
+ TabItem *item = next_tab->data;
+ if (item->notebook_page >= old_page_number)
+ item->notebook_page -= 1;
+ }
+
sidebar_tabs->details->tab_count -= 1;
recalculate_size (sidebar_tabs);
diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c
index 83089480c..fbd82e14e 100644
--- a/src/nautilus-sidebar.c
+++ b/src/nautilus-sidebar.c
@@ -230,7 +230,7 @@ nautilus_sidebar_initialize (GtkObject *object)
GTK_WIDGET (sidebar->details->title),
FALSE, FALSE, GNOME_PAD);
- /* first, allocate the index tabs */
+ /* allocate the index tabs */
sidebar->details->sidebar_tabs = NAUTILUS_SIDEBAR_TABS (nautilus_sidebar_tabs_new ());
sidebar->details->selected_index = -1;
@@ -825,7 +825,8 @@ nautilus_sidebar_activate_panel (NautilusSidebar *sidebar, int which_view)
g_free (title);
/* hide the buttons, since they look confusing when partially overlapped */
- gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box_centerer));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->title));
gtk_notebook_set_page (notebook, which_view);
}
@@ -839,7 +840,8 @@ nautilus_sidebar_deactivate_panel(NautilusSidebar *sidebar)
gtk_widget_hide (GTK_WIDGET (sidebar->details->title_tab));
}
- gtk_widget_show (GTK_WIDGET (sidebar->details->button_box));
+ gtk_widget_show (GTK_WIDGET (sidebar->details->button_box_centerer));
+ gtk_widget_show (GTK_WIDGET (sidebar->details->title));
sidebar->details->selected_index = -1;
nautilus_sidebar_tabs_select_tab (sidebar->details->sidebar_tabs, -1);
}
@@ -1251,7 +1253,8 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
/* Hide button box if a sidebar panel is showing. */
if (sidebar->details->selected_index != -1) {
- gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box_centerer));
+ gtk_widget_hide (GTK_WIDGET (sidebar->details->title));
}
}
}