diff src/layout_util.c @ 601:93c6dc4c537b

Add a way to invert the current selection. An item labeled "Invert selection" was added to the Select submenu in the main menu.
author zas_
date Wed, 07 May 2008 22:48:30 +0000
parents 905688aa2317
children e34c1002e553
line wrap: on
line diff
--- a/src/layout_util.c	Tue May 06 23:58:08 2008 +0000
+++ b/src/layout_util.c	Wed May 07 22:48:30 2008 +0000
@@ -717,6 +717,13 @@
 	layout_select_none(lw);
 }
 
+static void layout_menu_invert_selection_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_select_invert(lw);
+}
+
 static void layout_menu_marks_cb(GtkToggleAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
@@ -1095,6 +1102,8 @@
   { "Properties",GTK_STOCK_PROPERTIES,	N_("_Properties"),	"<control>P",	NULL,	CB(layout_menu_info_cb) },
   { "SelectAll",	NULL,		N_("Select _all"),	"<control>A",	NULL,	CB(layout_menu_select_all_cb) },
   { "SelectNone",	NULL,		N_("Select _none"), "<control><shift>A",NULL,	CB(layout_menu_unselect_all_cb) },
+  { "SelectInvert",	NULL,		N_("_Invert Selection"), "<control><shift>I",	NULL,	CB(layout_menu_invert_selection_cb) },
+
   { "Preferences",GTK_STOCK_PREFERENCES,N_("P_references..."),	"<control>O",	NULL,	CB(layout_menu_config_cb) },
   { "Maintenance",	NULL,		N_("_Thumbnail maintenance..."),NULL,	NULL,	CB(layout_menu_remove_thumb_cb) },
   { "Wallpaper",	NULL,		N_("Set as _wallpaper"),NULL,		NULL,	CB(layout_menu_wallpaper_cb) },
@@ -1200,6 +1209,7 @@
 "    <menu action='SelectMenu'>"
 "      <menuitem action='SelectAll'/>"
 "      <menuitem action='SelectNone'/>"
+"      <menuitem action='SelectInvert'/>"
 "      <separator/>"
 "      <menuitem action='ShowMarks'/>"
 "      <separator/>"