Mercurial > geeqie.yaz
diff src/layout_util.c @ 82:a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
* image.c, typedefs.h: Add ALTER_DESATURATE alteration type.
* img-view.c, layout_image.c, layout_util.c, menu.c: Allow to grayscale
the display of current image with [Shift]+[G] kyboard shortcut and
'adjust' submenu item.
* pixbuf_util.[ch] (pixbuf_desaturate_rect): Implement grayscale
function.
author | gqview |
---|---|
date | Thu, 19 Oct 2006 19:27:20 +0000 |
parents | 6281cc38e5ca |
children | ba3c39002a24 |
line wrap: on
line diff
--- a/src/layout_util.c Thu Oct 19 13:38:52 2006 +0000 +++ b/src/layout_util.c Thu Oct 19 19:27:20 2006 +0000 @@ -383,6 +383,13 @@ layout_image_alter(lw, ALTER_FLIP); } +static void layout_menu_alter_desaturate_cb(GtkAction *action, gpointer data) +{ + LayoutWindow *lw = data; + + layout_image_alter(lw, ALTER_DESATURATE); +} + static void layout_menu_info_cb(GtkAction *action, gpointer data) { LayoutWindow *lw = data; @@ -776,6 +783,7 @@ { "Rotate180", NULL, N_("Rotate 1_80"), "<shift>R", NULL, CB(layout_menu_alter_180_cb) }, { "Mirror", NULL, N_("_Mirror"), "<shift>M", NULL, CB(layout_menu_alter_mirror_cb) }, { "Flip", NULL, N_("_Flip"), "<shift>F", NULL, CB(layout_menu_alter_flip_cb) }, + { "Grayscale", NULL, N_("_Grayscale"), "<shift>G", NULL, CB(layout_menu_alter_desaturate_cb) }, { "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) }, @@ -857,6 +865,7 @@ " <menuitem action='Rotate180'/>" " <menuitem action='Mirror'/>" " <menuitem action='Flip'/>" +" <menuitem action='Grayscale'/>" " </menu>" " <menuitem action='Properties'/>" " <separator/>"