gnome-utils r7930 - in trunk/baobab: . src



Author: marzocca
Date: Sun May 11 14:55:03 2008
New Revision: 7930
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=7930&view=rev

Log:
fixed trash logic

Modified:
   trunk/baobab/ChangeLog
   trunk/baobab/src/baobab-utils.c
   trunk/baobab/src/baobab-utils.h

Modified: trunk/baobab/src/baobab-utils.c
==============================================================================
--- trunk/baobab/src/baobab-utils.c	(original)
+++ trunk/baobab/src/baobab-utils.c	Sun May 11 14:55:03 2008
@@ -316,7 +316,7 @@
 }
 
 void
-popupmenu_list (GtkTreePath *path, GdkEventButton *event, gboolean is_trash)
+popupmenu_list (GtkTreePath *path, GdkEventButton *event, gboolean can_trash)
 {
 	GtkWidget *pmenu, *open, *trash, *sep, *graph_map, *remove;
 	gchar *path_to_string;
@@ -345,29 +345,13 @@
 	gtk_container_add (GTK_CONTAINER (pmenu), open);
 	gtk_container_add (GTK_CONTAINER (pmenu), graph_map);
 	
-	if (baobab.is_local) {
-		gtk_container_add (GTK_CONTAINER (pmenu), sep);
-
-		if (is_trash) {
-			remove = gtk_image_menu_item_new_with_mnemonic(_("_Remove from Trash"));
-			image = gtk_image_new_from_stock ("gtk-undelete", GTK_ICON_SIZE_MENU);
-			gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove), image);
-
-			g_signal_connect (remove, "activate",
-					  G_CALLBACK (trash_dir_cb), NULL);
-
-			gtk_container_add (GTK_CONTAINER (pmenu), remove);
-		}
-		else {
+	if (baobab.is_local && can_trash) {
 			trash = gtk_image_menu_item_new_with_mnemonic(_("Mo_ve to Trash"));
 			image = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU);
 			gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (trash), image);
-
 			g_signal_connect (trash, "activate",
 					  G_CALLBACK (trash_dir_cb), NULL);
-
 			gtk_container_add (GTK_CONTAINER (pmenu), trash);
-		}
 	}
 
 	gtk_widget_show_all (pmenu);

Modified: trunk/baobab/src/baobab-utils.h
==============================================================================
--- trunk/baobab/src/baobab-utils.h	(original)
+++ trunk/baobab/src/baobab-utils.h	Sun May 11 14:55:03 2008
@@ -36,7 +36,7 @@
 void message (gchar *, gchar *, GtkMessageType, GtkWidget *);
 gint messageyesno (gchar *primary_msg, gchar *secondary_msg, GtkMessageType type, gchar * ok_button, GtkWidget *parent);
 gboolean baobab_check_dir (GFile *);
-void popupmenu_list (GtkTreePath *path, GdkEventButton *event, gboolean is_trash);
+void popupmenu_list (GtkTreePath *path, GdkEventButton *event, gboolean can_trash);
 void open_nautilus (GtkMenuItem *, gpointer );
 void set_label_scan (baobab_fs *);
 void show_label (void);



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