Mercurial > geeqie
comparison src/layout_util.c @ 1665:9a081164e6e3
improved overlay menu
- indicate overlay and histogram state in toggle and radio entries in
the menu
- all entries have visible effect in all modes
author | nadvornik |
---|---|
date | Sat, 27 Jun 2009 15:47:50 +0000 |
parents | 349ebc02b8e2 |
children | fa942b3f0ef5 |
comparison
equal
deleted
inserted
replaced
1664:c7415c58435b | 1665:9a081164e6e3 |
---|---|
25 #include "dupe.h" | 25 #include "dupe.h" |
26 #include "editors.h" | 26 #include "editors.h" |
27 #include "filedata.h" | 27 #include "filedata.h" |
28 #include "history_list.h" | 28 #include "history_list.h" |
29 #include "image-overlay.h" | 29 #include "image-overlay.h" |
30 #include "histogram.h" | |
30 #include "img-view.h" | 31 #include "img-view.h" |
31 #include "layout_image.h" | 32 #include "layout_image.h" |
32 #include "logwindow.h" | 33 #include "logwindow.h" |
33 #include "misc.h" | 34 #include "misc.h" |
34 #include "pan-view.h" | 35 #include "pan-view.h" |
52 | 53 |
53 #define MENU_EDIT_ACTION_OFFSET 16 | 54 #define MENU_EDIT_ACTION_OFFSET 16 |
54 | 55 |
55 static gboolean layout_bar_enabled(LayoutWindow *lw); | 56 static gboolean layout_bar_enabled(LayoutWindow *lw); |
56 static gboolean layout_bar_sort_enabled(LayoutWindow *lw); | 57 static gboolean layout_bar_sort_enabled(LayoutWindow *lw); |
58 static void layout_util_sync_views(LayoutWindow *lw); | |
57 | 59 |
58 /* | 60 /* |
59 *----------------------------------------------------------------------------- | 61 *----------------------------------------------------------------------------- |
60 * keyboard handler | 62 * keyboard handler |
61 *----------------------------------------------------------------------------- | 63 *----------------------------------------------------------------------------- |
645 #if 0 | 647 #if 0 |
646 interrupt_thumbs(); | 648 interrupt_thumbs(); |
647 #endif | 649 #endif |
648 } | 650 } |
649 | 651 |
650 static void layout_menu_overlay_cb(GtkAction *action, gpointer data) | 652 static void layout_menu_overlay_toggle_cb(GtkAction *action, gpointer data) |
651 { | 653 { |
652 LayoutWindow *lw = data; | 654 LayoutWindow *lw = data; |
653 | 655 |
654 image_osd_toggle(lw->image); | 656 image_osd_toggle(lw->image); |
655 } | 657 layout_util_sync_views(lw); |
656 | 658 } |
657 static void layout_menu_histogram_chan_cb(GtkAction *action, gpointer data) | 659 |
658 { | 660 |
659 LayoutWindow *lw = data; | 661 static void layout_menu_overlay_cb(GtkToggleAction *action, gpointer data) |
660 | 662 { |
661 image_osd_histogram_chan_toggle(lw->image); | 663 LayoutWindow *lw = data; |
662 } | 664 GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram")); |
663 | 665 |
664 static void layout_menu_histogram_log_cb(GtkAction *action, gpointer data) | 666 if (gtk_toggle_action_get_active(action)) |
665 { | 667 { |
666 LayoutWindow *lw = data; | 668 OsdShowFlags flags = image_osd_get(lw->image); |
667 | 669 |
668 image_osd_histogram_log_toggle(lw->image); | 670 if (flags | OSD_SHOW_INFO | OSD_SHOW_STATUS != flags) |
671 image_osd_set(lw->image, flags | OSD_SHOW_INFO | OSD_SHOW_STATUS); | |
672 } | |
673 else | |
674 { | |
675 image_osd_set(lw->image, OSD_SHOW_NOTHING); | |
676 gtk_toggle_action_set_active(histogram_action, FALSE); /* this calls layout_menu_histogram_cb */ | |
677 } | |
678 } | |
679 | |
680 static void layout_menu_histogram_cb(GtkToggleAction *action, gpointer data) | |
681 { | |
682 LayoutWindow *lw = data; | |
683 GtkToggleAction *overlay_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageOverlay")); | |
684 | |
685 if (gtk_toggle_action_get_active(action)) | |
686 { | |
687 image_osd_set(lw->image, OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_HISTOGRAM); | |
688 gtk_toggle_action_set_active(overlay_action, TRUE); /* this calls layout_menu_overlay_cb */ | |
689 } | |
690 else | |
691 { | |
692 OsdShowFlags flags = image_osd_get(lw->image); | |
693 if (flags & OSD_SHOW_HISTOGRAM) | |
694 image_osd_set(lw->image, flags & ~OSD_SHOW_HISTOGRAM); | |
695 } | |
696 } | |
697 | |
698 static void layout_menu_histogram_toggle_channel_cb(GtkAction *action, gpointer data) | |
699 { | |
700 LayoutWindow *lw = data; | |
701 | |
702 image_osd_histogram_toggle_channel(lw->image); | |
703 layout_util_sync_views(lw); | |
704 } | |
705 | |
706 static void layout_menu_histogram_toggle_mode_cb(GtkAction *action, gpointer data) | |
707 { | |
708 LayoutWindow *lw = data; | |
709 | |
710 image_osd_histogram_toggle_mode(lw->image); | |
711 layout_util_sync_views(lw); | |
712 } | |
713 | |
714 static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) | |
715 { | |
716 LayoutWindow *lw = data; | |
717 gint channel = gtk_radio_action_get_current_value(action); | |
718 GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram")); | |
719 | |
720 if (channel < 0 || channel >= HCHAN_COUNT) return; | |
721 | |
722 gtk_toggle_action_set_active(histogram_action, TRUE); /* this calls layout_menu_histogram_cb */ | |
723 image_osd_histogram_set_channel(lw->image, channel); | |
724 } | |
725 | |
726 static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) | |
727 { | |
728 LayoutWindow *lw = data; | |
729 gint mode = gtk_radio_action_get_current_value(action); | |
730 GtkToggleAction *histogram_action = GTK_TOGGLE_ACTION(gtk_action_group_get_action(lw->action_group, "ImageHistogram")); | |
731 | |
732 if (mode < 0 || mode > 1) return; | |
733 | |
734 gtk_toggle_action_set_active(histogram_action, TRUE); /* this calls layout_menu_histogram_cb */ | |
735 image_osd_histogram_set_mode(lw->image, mode); | |
669 } | 736 } |
670 | 737 |
671 static void layout_menu_refresh_cb(GtkAction *action, gpointer data) | 738 static void layout_menu_refresh_cb(GtkAction *action, gpointer data) |
672 { | 739 { |
673 LayoutWindow *lw = data; | 740 LayoutWindow *lw = data; |
1227 { "DirMenu", NULL, N_("_View Directory as"), NULL, NULL, NULL }, | 1294 { "DirMenu", NULL, N_("_View Directory as"), NULL, NULL, NULL }, |
1228 { "ZoomMenu", NULL, N_("_Zoom"), NULL, NULL, NULL }, | 1295 { "ZoomMenu", NULL, N_("_Zoom"), NULL, NULL, NULL }, |
1229 { "ColorMenu", NULL, N_("Color _Management"), NULL, NULL, NULL }, | 1296 { "ColorMenu", NULL, N_("Color _Management"), NULL, NULL, NULL }, |
1230 { "ConnectZoomMenu", NULL, N_("_Connected Zoom"), NULL, NULL, NULL }, | 1297 { "ConnectZoomMenu", NULL, N_("_Connected Zoom"), NULL, NULL, NULL }, |
1231 { "SplitMenu", NULL, N_("_Split"), NULL, NULL, NULL }, | 1298 { "SplitMenu", NULL, N_("_Split"), NULL, NULL, NULL }, |
1299 { "OverlayMenu", NULL, N_("_Image Overlay"), NULL, NULL, NULL }, | |
1232 { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL }, | 1300 { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL }, |
1233 | 1301 |
1234 { "FirstImage", GTK_STOCK_GOTO_TOP, N_("_First Image"), "Home", N_("First Image"), CB(layout_menu_image_first_cb) }, | 1302 { "FirstImage", GTK_STOCK_GOTO_TOP, N_("_First Image"), "Home", N_("First Image"), CB(layout_menu_image_first_cb) }, |
1235 { "PrevImage", GTK_STOCK_GO_UP, N_("_Previous Image"), "BackSpace", N_("Previous Image"), CB(layout_menu_image_prev_cb) }, | 1303 { "PrevImage", GTK_STOCK_GO_UP, N_("_Previous Image"), "BackSpace", N_("Previous Image"), CB(layout_menu_image_prev_cb) }, |
1236 { "PrevImageAlt1", GTK_STOCK_GO_UP, N_("_Previous Image"), "Page_Up", N_("Previous Image"), CB(layout_menu_image_prev_cb) }, | 1304 { "PrevImageAlt1", GTK_STOCK_GO_UP, N_("_Previous Image"), "Page_Up", N_("Previous Image"), CB(layout_menu_image_prev_cb) }, |
1313 { "FullScreen", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, | 1381 { "FullScreen", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, |
1314 { "FullScreenAlt1", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "V", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, | 1382 { "FullScreenAlt1", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "V", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, |
1315 { "FullScreenAlt2", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F11", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, | 1383 { "FullScreenAlt2", GTK_STOCK_FULLSCREEN, N_("F_ull screen"), "F11", N_("Full screen"), CB(layout_menu_fullscreen_cb) }, |
1316 { "Escape", GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"), "Escape", N_("Leave full screen"), CB(layout_menu_escape_cb) }, | 1384 { "Escape", GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"), "Escape", N_("Leave full screen"), CB(layout_menu_escape_cb) }, |
1317 { "EscapeAlt1", GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"), "Q", N_("Leave full screen"), CB(layout_menu_escape_cb) }, | 1385 { "EscapeAlt1", GTK_STOCK_LEAVE_FULLSCREEN,N_("_Leave full screen"), "Q", N_("Leave full screen"), CB(layout_menu_escape_cb) }, |
1318 { "ImageOverlay", NULL, N_("_Image Overlay"), "I", N_("Image Overlay"), CB(layout_menu_overlay_cb) }, | 1386 { "ImageOverlayCycle",NULL, N_("_Cycle through overlay modes"), "I", N_("Cycle through Overlay modes"), CB(layout_menu_overlay_toggle_cb) }, |
1319 { "HistogramChan", NULL, N_("Histogram _channels"), "K", N_("Histogram channels"), CB(layout_menu_histogram_chan_cb) }, | 1387 { "HistogramChanCycle",NULL, N_("Cycle through histogram _channels"),"K", N_("Cycle through histogram channels"), CB(layout_menu_histogram_toggle_channel_cb) }, |
1320 { "HistogramLog", NULL, N_("Histogram _log mode"), "J", N_("Histogram log mode"), CB(layout_menu_histogram_log_cb) }, | 1388 { "HistogramModeCycle",NULL, N_("Cycle through histogram _modes"), "J", N_("Cycle through histogram modes"), CB(layout_menu_histogram_toggle_mode_cb) }, |
1321 { "HideTools", NULL, N_("_Hide file list"), "<control>H", N_("Hide file list"), CB(layout_menu_hide_cb) }, | 1389 { "HideTools", NULL, N_("_Hide file list"), "<control>H", N_("Hide file list"), CB(layout_menu_hide_cb) }, |
1322 { "SlideShowPause", GTK_STOCK_MEDIA_PAUSE, N_("_Pause slideshow"), "P", N_("Pause slideshow"), CB(layout_menu_slideshow_pause_cb) }, | 1390 { "SlideShowPause", GTK_STOCK_MEDIA_PAUSE, N_("_Pause slideshow"), "P", N_("Pause slideshow"), CB(layout_menu_slideshow_pause_cb) }, |
1323 { "Refresh", GTK_STOCK_REFRESH, N_("_Refresh"), "R", N_("Refresh"), CB(layout_menu_refresh_cb) }, | 1391 { "Refresh", GTK_STOCK_REFRESH, N_("_Refresh"), "R", N_("Refresh"), CB(layout_menu_refresh_cb) }, |
1324 { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("Contents"), CB(layout_menu_help_cb) }, | 1392 { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("Contents"), CB(layout_menu_help_cb) }, |
1325 { "HelpShortcuts", NULL, N_("_Keyboard shortcuts"), NULL, N_("Keyboard shortcuts"), CB(layout_menu_help_keys_cb) }, | 1393 { "HelpShortcuts", NULL, N_("_Keyboard shortcuts"), NULL, N_("Keyboard shortcuts"), CB(layout_menu_help_keys_cb) }, |
1340 { "SBarSort", NULL, N_("Sort _manager"), "<shift>S", N_("Sort manager"), CB(layout_menu_bar_sort_cb), FALSE }, | 1408 { "SBarSort", NULL, N_("Sort _manager"), "<shift>S", N_("Sort manager"), CB(layout_menu_bar_sort_cb), FALSE }, |
1341 { "SlideShow", GTK_STOCK_MEDIA_PLAY, N_("Toggle _slideshow"), "S", N_("Toggle slideshow"), CB(layout_menu_slideshow_cb), FALSE }, | 1409 { "SlideShow", GTK_STOCK_MEDIA_PLAY, N_("Toggle _slideshow"), "S", N_("Toggle slideshow"), CB(layout_menu_slideshow_cb), FALSE }, |
1342 { "UseColorProfiles", GTK_STOCK_SELECT_COLOR, N_("Use _color profiles"), NULL, N_("Use color profiles"), CB(layout_color_menu_enable_cb), FALSE}, | 1410 { "UseColorProfiles", GTK_STOCK_SELECT_COLOR, N_("Use _color profiles"), NULL, N_("Use color profiles"), CB(layout_color_menu_enable_cb), FALSE}, |
1343 { "UseImageProfile", NULL, N_("Use profile from _image"), NULL, N_("Use profile from image"), CB(layout_color_menu_use_image_cb), FALSE}, | 1411 { "UseImageProfile", NULL, N_("Use profile from _image"), NULL, N_("Use profile from image"), CB(layout_color_menu_use_image_cb), FALSE}, |
1344 { "Grayscale", NULL, N_("Toggle _grayscale"), "<shift>G", N_("Toggle grayscale"), CB(layout_menu_alter_desaturate_cb), FALSE}, | 1412 { "Grayscale", NULL, N_("Toggle _grayscale"), "<shift>G", N_("Toggle grayscale"), CB(layout_menu_alter_desaturate_cb), FALSE}, |
1413 { "ImageOverlay", NULL, N_("_Image Overlay"), NULL, N_("Image Overlay"), CB(layout_menu_overlay_cb), FALSE }, | |
1414 { "ImageHistogram", NULL, N_("_Show Histogram"), NULL, N_("Show Histogram"), CB(layout_menu_histogram_cb), FALSE }, | |
1345 }; | 1415 }; |
1346 | 1416 |
1347 static GtkRadioActionEntry menu_radio_entries[] = { | 1417 static GtkRadioActionEntry menu_radio_entries[] = { |
1348 { "ViewList", NULL, N_("View Images as _List"), "<control>L", N_("View Images as List"), 0 }, | 1418 { "ViewList", NULL, N_("View Images as _List"), "<control>L", N_("View Images as List"), 0 }, |
1349 { "ViewIcons", NULL, N_("View Images as I_cons"), "<control>I", N_("View Images as Icons"), 1 } | 1419 { "ViewIcons", NULL, N_("View Images as I_cons"), "<control>I", N_("View Images as Icons"), 1 } |
1361 { "ColorProfile1", NULL, N_("Input _1: AdobeRGB compatible"), NULL, N_("Input 1: AdobeRGB compatible"), COLOR_PROFILE_ADOBERGB }, | 1431 { "ColorProfile1", NULL, N_("Input _1: AdobeRGB compatible"), NULL, N_("Input 1: AdobeRGB compatible"), COLOR_PROFILE_ADOBERGB }, |
1362 { "ColorProfile2", NULL, N_("Input _2"), NULL, N_("Input 2"), COLOR_PROFILE_FILE }, | 1432 { "ColorProfile2", NULL, N_("Input _2"), NULL, N_("Input 2"), COLOR_PROFILE_FILE }, |
1363 { "ColorProfile3", NULL, N_("Input _3"), NULL, N_("Input 3"), COLOR_PROFILE_FILE + 1 }, | 1433 { "ColorProfile3", NULL, N_("Input _3"), NULL, N_("Input 3"), COLOR_PROFILE_FILE + 1 }, |
1364 { "ColorProfile4", NULL, N_("Input _4"), NULL, N_("Input 4"), COLOR_PROFILE_FILE + 2 }, | 1434 { "ColorProfile4", NULL, N_("Input _4"), NULL, N_("Input 4"), COLOR_PROFILE_FILE + 2 }, |
1365 { "ColorProfile5", NULL, N_("Input _5"), NULL, N_("Input 5"), COLOR_PROFILE_FILE + 3 } | 1435 { "ColorProfile5", NULL, N_("Input _5"), NULL, N_("Input 5"), COLOR_PROFILE_FILE + 3 } |
1436 }; | |
1437 | |
1438 static GtkRadioActionEntry menu_histogram_channel[] = { | |
1439 { "HistogramChanR", NULL, N_("Histogram on _Red"), NULL, N_("Histogram on Red"), HCHAN_R }, | |
1440 { "HistogramChanG", NULL, N_("Histogram on _Green"), NULL, N_("Histogram on Green"), HCHAN_G }, | |
1441 { "HistogramChanB", NULL, N_("Histogram on _Blue"), NULL, N_("Histogram on Blue"), HCHAN_B }, | |
1442 { "HistogramChanRGB", NULL, N_("Histogram on RGB"), NULL, N_("Histogram on RGB"), HCHAN_RGB }, | |
1443 { "HistogramChanV", NULL, N_("Histogram on Value"), NULL, N_("Histogram on Value"), HCHAN_MAX } | |
1444 }; | |
1445 | |
1446 static GtkRadioActionEntry menu_histogram_mode[] = { | |
1447 { "HistogramModeLin", NULL, N_("Li_near Histogram"), NULL, N_("Linear Histogram"), 0 }, | |
1448 { "HistogramModeLog", NULL, N_("Lo_g Histogram"), NULL, N_("Log Histogram"), 1 }, | |
1366 }; | 1449 }; |
1367 | 1450 |
1368 #undef CB | 1451 #undef CB |
1369 | 1452 |
1370 static const gchar *menu_ui_description = | 1453 static const gchar *menu_ui_description = |
1507 " <menuitem action='FolderList'/>" | 1590 " <menuitem action='FolderList'/>" |
1508 " <menuitem action='FolderTree'/>" | 1591 " <menuitem action='FolderTree'/>" |
1509 " </menu>" | 1592 " </menu>" |
1510 " <placeholder name='DirSection'/>" | 1593 " <placeholder name='DirSection'/>" |
1511 " <separator/>" | 1594 " <separator/>" |
1512 " <menuitem action='ImageOverlay'/>" | 1595 " <menu action='OverlayMenu'>" |
1513 " <menuitem action='HistogramChan'/>" | 1596 " <menuitem action='ImageOverlay'/>" |
1514 " <menuitem action='HistogramLog'/>" | 1597 " <menuitem action='ImageHistogram'/>" |
1598 " <menuitem action='ImageOverlayCycle'/>" | |
1599 " <separator/>" | |
1600 " <menuitem action='HistogramChanR'/>" | |
1601 " <menuitem action='HistogramChanG'/>" | |
1602 " <menuitem action='HistogramChanB'/>" | |
1603 " <menuitem action='HistogramChanRGB'/>" | |
1604 " <menuitem action='HistogramChanV'/>" | |
1605 " <menuitem action='HistogramChanCycle'/>" | |
1606 " <separator/>" | |
1607 " <menuitem action='HistogramModeLin'/>" | |
1608 " <menuitem action='HistogramModeLog'/>" | |
1609 " <menuitem action='HistogramModeCycle'/>" | |
1610 " </menu>" | |
1515 " <menuitem action='FullScreen'/>" | 1611 " <menuitem action='FullScreen'/>" |
1516 " <placeholder name='OverlaySection'/>" | 1612 " <placeholder name='OverlaySection'/>" |
1517 " <separator/>" | 1613 " <separator/>" |
1518 " <menuitem action='FloatTools'/>" | 1614 " <menuitem action='FloatTools'/>" |
1519 " <menuitem action='HideTools'/>" | 1615 " <menuitem action='HideTools'/>" |
1830 menu_view_dir_radio_entries, VIEW_DIR_TYPES_COUNT, | 1926 menu_view_dir_radio_entries, VIEW_DIR_TYPES_COUNT, |
1831 0, G_CALLBACK(layout_menu_view_dir_as_cb), lw); | 1927 0, G_CALLBACK(layout_menu_view_dir_as_cb), lw); |
1832 gtk_action_group_add_radio_actions(lw->action_group, | 1928 gtk_action_group_add_radio_actions(lw->action_group, |
1833 menu_color_radio_entries, COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS, | 1929 menu_color_radio_entries, COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS, |
1834 0, G_CALLBACK(layout_color_menu_input_cb), lw); | 1930 0, G_CALLBACK(layout_color_menu_input_cb), lw); |
1931 gtk_action_group_add_radio_actions(lw->action_group, | |
1932 menu_histogram_channel, G_N_ELEMENTS(menu_histogram_channel), | |
1933 0, G_CALLBACK(layout_menu_histogram_channel_cb), lw); | |
1934 gtk_action_group_add_radio_actions(lw->action_group, | |
1935 menu_histogram_mode, G_N_ELEMENTS(menu_histogram_mode), | |
1936 0, G_CALLBACK(layout_menu_histogram_mode_cb), lw); | |
1835 | 1937 |
1836 | 1938 |
1837 lw->ui_manager = gtk_ui_manager_new(); | 1939 lw->ui_manager = gtk_ui_manager_new(); |
1838 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); | 1940 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); |
1839 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); | 1941 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); |
2161 } | 2263 } |
2162 | 2264 |
2163 static void layout_util_sync_views(LayoutWindow *lw) | 2265 static void layout_util_sync_views(LayoutWindow *lw) |
2164 { | 2266 { |
2165 GtkAction *action; | 2267 GtkAction *action; |
2268 OsdShowFlags osd_flags = image_osd_get(lw->image); | |
2166 | 2269 |
2167 if (!lw->action_group) return; | 2270 if (!lw->action_group) return; |
2168 | 2271 |
2169 action = gtk_action_group_get_action(lw->action_group, "FolderTree"); | 2272 action = gtk_action_group_get_action(lw->action_group, "FolderTree"); |
2170 radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->options.dir_view_type); | 2273 radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->options.dir_view_type); |
2193 action = gtk_action_group_get_action(lw->action_group, "ShowMarks"); | 2296 action = gtk_action_group_get_action(lw->action_group, "ShowMarks"); |
2194 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_marks); | 2297 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.show_marks); |
2195 | 2298 |
2196 action = gtk_action_group_get_action(lw->action_group, "SlideShow"); | 2299 action = gtk_action_group_get_action(lw->action_group, "SlideShow"); |
2197 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_image_slideshow_active(lw)); | 2300 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), layout_image_slideshow_active(lw)); |
2301 | |
2302 action = gtk_action_group_get_action(lw->action_group, "ImageOverlay"); | |
2303 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), osd_flags != OSD_SHOW_NOTHING); | |
2304 | |
2305 action = gtk_action_group_get_action(lw->action_group, "ImageHistogram"); | |
2306 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), osd_flags & OSD_SHOW_HISTOGRAM); | |
2307 | |
2308 action = gtk_action_group_get_action(lw->action_group, "HistogramChanR"); | |
2309 radio_action_set_current_value(GTK_RADIO_ACTION(action), image_osd_histogram_get_channel(lw->image)); | |
2310 | |
2311 action = gtk_action_group_get_action(lw->action_group, "HistogramModeLin"); | |
2312 radio_action_set_current_value(GTK_RADIO_ACTION(action), image_osd_histogram_get_mode(lw->image)); | |
2198 | 2313 |
2199 layout_util_sync_color(lw); | 2314 layout_util_sync_color(lw); |
2200 } | 2315 } |
2201 | 2316 |
2202 void layout_util_sync_thumb(LayoutWindow *lw) | 2317 void layout_util_sync_thumb(LayoutWindow *lw) |