Commit 99e702d4 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Don't show eject if not mounted.

2009-04-13  Alexander Larsson  <alexl@redhat.com>

	* src/nautilus-places-sidebar.c:
	(add_place):
	Don't show eject if not mounted.



svn path=/trunk/; revision=15181
parent cb087ce4
2009-04-13 Alexander Larsson <alexl@redhat.com>
* src/nautilus-places-sidebar.c:
(add_place):
Don't show eject if not mounted.
2009-04-13 Alexander Larsson <alexl@redhat.com>
* NEWS:
......
......@@ -218,6 +218,7 @@ add_place (NautilusPlacesSidebar *sidebar,
NautilusIconInfo *icon_info;
int icon_size;
gboolean show_eject, show_unmount;
gboolean show_eject_button;
icon_size = nautilus_get_icon_size_for_stock_size (GTK_ICON_SIZE_MENU);
icon_info = nautilus_icon_info_lookup (icon, icon_size);
......@@ -231,6 +232,12 @@ add_place (NautilusPlacesSidebar *sidebar,
g_assert (place_type != PLACES_BOOKMARK);
}
if (mount == NULL) {
show_eject_button = FALSE;
} else {
show_eject_button = (show_unmount || show_eject);
}
gtk_list_store_append (sidebar->store, &iter);
gtk_list_store_set (sidebar->store, &iter,
PLACES_SIDEBAR_COLUMN_ICON, pixbuf,
......@@ -241,8 +248,8 @@ add_place (NautilusPlacesSidebar *sidebar,
PLACES_SIDEBAR_COLUMN_MOUNT, mount,
PLACES_SIDEBAR_COLUMN_ROW_TYPE, place_type,
PLACES_SIDEBAR_COLUMN_INDEX, index,
PLACES_SIDEBAR_COLUMN_EJECT, (show_unmount || show_eject),
PLACES_SIDEBAR_COLUMN_NO_EJECT, !(show_unmount || show_eject),
PLACES_SIDEBAR_COLUMN_EJECT, show_eject_button,
PLACES_SIDEBAR_COLUMN_NO_EJECT, !show_eject_button,
PLACES_SIDEBAR_COLUMN_BOOKMARK, place_type != PLACES_BOOKMARK,
PLACES_SIDEBAR_COLUMN_NO_BOOKMARK, place_type == PLACES_BOOKMARK,
-1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment