nautilus r14374 - in trunk: . src



Author: cneumair
Date: Sat Jul 19 12:39:07 2008
New Revision: 14374
URL: http://svn.gnome.org/viewvc/nautilus?rev=14374&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/src/nautilus-places-sidebar.c

Modified: trunk/src/nautilus-places-sidebar.c
==============================================================================
--- trunk/src/nautilus-places-sidebar.c	(original)
+++ trunk/src/nautilus-places-sidebar.c	Sat Jul 19 12:39:07 2008
@@ -116,29 +116,9 @@
 	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 @@
 			    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 @@
 
 	
 	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 @@
 		      "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 @@
 					     G_TYPE_INT,
 					     G_TYPE_BOOLEAN,
 					     G_TYPE_BOOLEAN,
+					     G_TYPE_BOOLEAN,
 					     G_TYPE_BOOLEAN
 					     );
 	sidebar->filter_model = nautilus_shortcuts_model_filter_new (sidebar,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]