[Xfce4-commits] <thunar:master> Only show the eject context menu action when the volume is present.
Jannis Pohlmann
noreply at xfce.org
Mon Jan 10 22:32:01 CET 2011
Updating branch refs/heads/master
to f026e09735b1d9f14c34b7437f080c6f37c530b9 (commit)
from d9284878d881328fa78725280f0c1f30500553f8 (commit)
commit f026e09735b1d9f14c34b7437f080c6f37c530b9
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Mon Jan 10 22:30:01 2011 +0100
Only show the eject context menu action when the volume is present.
NEWS | 2 ++
thunar/thunar-shortcuts-view.c | 6 +++---
thunar/thunar-tree-view.c | 6 +++---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/NEWS b/NEWS
index d42d5e5..6d0bd61 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
1.1.x
=====
- Properly try alternative names when creating links (bug #6867).
+- Only show the "Eject Volume" context menu action when the volume is
+ present.
1.1.6
=====
diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index 8ef7cdd..17e712d 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -1,7 +1,7 @@
/* vi:set et ai sw=2 sts=2 ts=2: */
/*-
* Copyright (c) 2005-2007 Benedikt Meurer <benny at xfce.org>
- * Copyright (c) 2009-2010 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -854,8 +854,8 @@ thunar_shortcuts_view_context_menu (ThunarShortcutsView *view,
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
- /* check if the volume is ejectable */
- if (thunar_g_volume_is_removable (volume))
+ /* check if the volume is present and can be ejected */
+ if (thunar_g_volume_is_present (volume) && thunar_g_volume_is_removable (volume))
{
/* append the "Eject Volume" menu action */
item = gtk_image_menu_item_new_with_mnemonic (_("E_ject Volume"));
diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index 532385f..76d66f8 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -1,7 +1,7 @@
/* vi:set et ai sw=2 sts=2 ts=2: */
/*-
* Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>
- * Copyright (c) 2009-2010 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -1124,8 +1124,8 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
- /* check if the volume is ejectable */
- if (thunar_g_volume_is_removable (volume))
+ /* check if the volume is present and can be ejected */
+ if (thunar_g_volume_is_present (volume) && thunar_g_volume_is_removable (volume))
{
/* append the "Eject Volume" menu action */
item = gtk_image_menu_item_new_with_mnemonic (_("E_ject Volume"));
More information about the Xfce4-commits
mailing list