diff options
author | Christian Neumair <cneumair@gnome.org> | 2008-07-19 12:39:07 +0000 |
---|---|---|
committer | Christian Neumair <cneumair@src.gnome.org> | 2008-07-19 12:39:07 +0000 |
commit | df30c29fd52c79948b3ef11356ad25b7e3f64565 (patch) | |
tree | 9c3b91e8e6b2e06975f2e0f77ad28dae02654821 | |
parent | 82887543d718e332791dc8df79c9b4e1e8620db4 (diff) | |
download | nautilus-df30c29fd52c79948b3ef11356ad25b7e3f64565.tar.gz |
Only align eject icons with ejectable rows, instead of aligning them with
2008-07-19 Christian Neumair <cneumair@gnome.org>
* src/nautilus-places-sidebar.c (add_place),
(nautilus_places_sidebar_init):
Only align eject icons with ejectable rows, instead of aligning them
with all icons above the seperator.
svn path=/trunk/; revision=14374
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/nautilus-places-sidebar.c | 43 |
2 files changed, 20 insertions, 30 deletions
@@ -1,5 +1,12 @@ 2008-07-19 Christian Neumair <cneumair@gnome.org> + * src/nautilus-places-sidebar.c (add_place), + (nautilus_places_sidebar_init): + Only align eject icons with ejectable rows, instead of aligning them + with all icons above the seperator. + +2008-07-19 Christian Neumair <cneumair@gnome.org> + * libnautilus-private/nautilus-file-operations.c (mount_callback_data_notify), (volume_mount_cb), (nautilus_file_operations_mount_volume), diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c index 4f467c87c..1f34cd7cd 100644 --- a/src/nautilus-places-sidebar.c +++ b/src/nautilus-places-sidebar.c @@ -116,29 +116,9 @@ enum { PLACES_SIDEBAR_COLUMN_ICON, PLACES_SIDEBAR_COLUMN_INDEX, PLACES_SIDEBAR_COLUMN_EJECT, - - /* the rows for all items above - * the separator use different - * cell renderers from those below - * the separator. - * - * This is required because an eject button - * is added for mounted volumes, which requires - * a non-gridded layout: - * - * [ volume name ...space... [button] ] - * - * while below the separator, we just use - * - * [ bookmark name ] - * - * If we used the same cell renderers for - * the volume name and the bookmark name, - * the button would be aligned both to - * the volume names and to the bookmark names. - */ - PLACES_SIDEBAR_COLUMN_ABOVE_SEPARATOR, - PLACES_SIDEBAR_COLUMN_BELOW_SEPARATOR, + PLACES_SIDEBAR_COLUMN_NO_EJECT, + PLACES_SIDEBAR_COLUMN_BOOKMARK, + PLACES_SIDEBAR_COLUMN_NO_BOOKMARK, PLACES_SIDEBAR_COLUMN_COUNT }; @@ -260,8 +240,9 @@ add_place (NautilusPlacesSidebar *sidebar, PLACES_SIDEBAR_COLUMN_ROW_TYPE, place_type, PLACES_SIDEBAR_COLUMN_INDEX, index, PLACES_SIDEBAR_COLUMN_EJECT, (show_unmount || show_eject), - PLACES_SIDEBAR_COLUMN_ABOVE_SEPARATOR, (show_unmount || show_eject), - PLACES_SIDEBAR_COLUMN_BELOW_SEPARATOR, !(show_unmount || show_eject), + PLACES_SIDEBAR_COLUMN_NO_EJECT, !(show_unmount || show_eject), + PLACES_SIDEBAR_COLUMN_BOOKMARK, place_type != PLACES_BOOKMARK, + PLACES_SIDEBAR_COLUMN_NO_BOOKMARK, place_type == PLACES_BOOKMARK, -1); if (pixbuf != NULL) { @@ -2178,10 +2159,10 @@ nautilus_places_sidebar_init (NautilusPlacesSidebar *sidebar) cell = gtk_cell_renderer_text_new (); - gtk_tree_view_column_pack_start (col, cell, TRUE); + gtk_tree_view_column_pack_start (col, cell, FALSE); gtk_tree_view_column_set_attributes (col, cell, "text", PLACES_SIDEBAR_COLUMN_NAME, - "visible", PLACES_SIDEBAR_COLUMN_ABOVE_SEPARATOR, + "visible", PLACES_SIDEBAR_COLUMN_EJECT, NULL); @@ -2194,17 +2175,18 @@ nautilus_places_sidebar_init (NautilusPlacesSidebar *sidebar) "xalign", 1.0, "xpad", EJECT_BUTTON_XPAD, NULL); - gtk_tree_view_column_pack_end (col, cell, TRUE); + gtk_tree_view_column_pack_start (col, cell, TRUE); gtk_tree_view_column_set_attributes (col, cell, "visible", PLACES_SIDEBAR_COLUMN_EJECT, NULL); cell = gtk_cell_renderer_text_new (); gtk_tree_view_column_pack_end (col, cell, FALSE); - g_object_set (G_OBJECT (cell), "editable", FALSE, "editable-set", TRUE, NULL); + g_object_set (G_OBJECT (cell), "editable", FALSE, NULL); gtk_tree_view_column_set_attributes (col, cell, "text", PLACES_SIDEBAR_COLUMN_NAME, - "visible", PLACES_SIDEBAR_COLUMN_BELOW_SEPARATOR, + "visible", PLACES_SIDEBAR_COLUMN_NO_EJECT, + "editable-set", PLACES_SIDEBAR_COLUMN_BOOKMARK, NULL); g_signal_connect (cell, "edited", @@ -2232,6 +2214,7 @@ nautilus_places_sidebar_init (NautilusPlacesSidebar *sidebar) G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN ); sidebar->filter_model = nautilus_shortcuts_model_filter_new (sidebar, |