[eog] Unite copy to clipboard functions in a single menu entry



commit 031908baeeac94a398e44e53253ee8454f834242
Author: Felix Riemann <friemann gnome org>
Date:   Fri Dec 31 18:30:12 2010 +0100

    Unite copy to clipboard functions in a single menu entry
    
    Also assign a shortcut and icon to it.

 data/eog-ui.xml  |    3 ---
 src/eog-window.c |   38 ++------------------------------------
 2 files changed, 2 insertions(+), 39 deletions(-)
---
diff --git a/data/eog-ui.xml b/data/eog-ui.xml
index 9d43fc9..07441b4 100644
--- a/data/eog-ui.xml
+++ b/data/eog-ui.xml
@@ -23,7 +23,6 @@
       <menuitem action="EditUndo"/>
       <separator/>
       <menuitem action="EditCopyImage"/>
-      <menuitem action="EditCopyPath"/>
       <separator/>
       <menuitem action="EditFlipHorizontal"/>
       <menuitem action="EditFlipVertical"/>
@@ -117,7 +116,6 @@
     <menuitem action="ImagePrint"/>
     <separator/>
     <menuitem action="EditCopyImage"/>
-    <menuitem action="EditCopyPath"/>
     <separator/>
     <menuitem action="EditMoveToTrash"/>
     <separator/>
@@ -136,7 +134,6 @@
     <menuitem action="ImagePrint"/>
     <separator/>
     <menuitem action="EditCopyImage"/>
-    <menuitem action="EditCopyPath"/>
     <separator/>
     <menuitem action="EditMoveToTrash"/>
     <separator/>
diff --git a/src/eog-window.c b/src/eog-window.c
index ea97609..fc86a71 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -3296,37 +3296,6 @@ move_to_trash_real (EogImage *image, GError **error)
 }
 
 static void
-eog_window_cmd_copy_path (GtkAction *action, gpointer user_data)
-{
-	EogWindow *window;
-	EogWindowPrivate *priv;
-	EogImage *image;
-	GFile *file;
-	char *filename = NULL;
-	GtkClipboard *clipboard;
-
-	g_return_if_fail (EOG_IS_WINDOW (user_data));
-
-	window = EOG_WINDOW (user_data);
-	priv = window->priv;
-
-	image = eog_thumb_view_get_first_selected_image (EOG_THUMB_VIEW (priv->thumbview));
-
-	g_return_if_fail (EOG_IS_IMAGE (image));
-
-	file = eog_image_get_file (image);
-
-	filename = g_file_get_path (file);
-
-	clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
-	gtk_clipboard_set_text (clipboard, filename, -1);
-
-	g_object_unref (file);
-	g_free (filename);
-
-}
-
-static void
 eog_window_cmd_copy_image (GtkAction *action, gpointer user_data)
 {
 	GtkClipboard *clipboard;
@@ -3739,11 +3708,8 @@ static const GtkActionEntry action_entries_image[] = {
 	{ "EditMoveToTrash", "user-trash", N_("Move to _Trash"), NULL,
 	  N_("Move the selected image to the trash folder"),
 	  G_CALLBACK (eog_window_cmd_move_to_trash) },
-	{ "EditCopyPath", NULL, N_("Copy _Path"), NULL,
-	  N_("Copy the image file path to the clipboard"),
-	  G_CALLBACK (eog_window_cmd_copy_path) },
-	{ "EditCopyImage", NULL, N_("Copy _Image"), NULL,
-	  N_("Copy the image to the clipboard"),
+	{ "EditCopyImage", "edit-copy", N_("_Copy"), "<control>C",
+	  N_("Copy the selected image to the clipboard"),
 	  G_CALLBACK (eog_window_cmd_copy_image) },
 	{ "ViewZoomIn", GTK_STOCK_ZOOM_IN, N_("_Zoom In"), "<control>plus",
 	  N_("Enlarge the image"),



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