Mercurial > geeqie
comparison src/layout_util.c @ 1668:8ebc26a4383f
use radio buttons for file and dir mode in popup menu
author | nadvornik |
---|---|
date | Sat, 27 Jun 2009 20:47:17 +0000 |
parents | 0806ccdfe06b |
children | daab013a0dcf |
comparison
equal
deleted
inserted
replaced
1667:0806ccdfe06b | 1668:8ebc26a4383f |
---|---|
609 static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) | 609 static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
610 { | 610 { |
611 LayoutWindow *lw = data; | 611 LayoutWindow *lw = data; |
612 | 612 |
613 layout_exit_fullscreen(lw); | 613 layout_exit_fullscreen(lw); |
614 layout_views_set(lw, lw->options.dir_view_type, (gtk_radio_action_get_current_value(action) == 1) ? FILEVIEW_ICON : FILEVIEW_LIST); | 614 layout_views_set(lw, lw->options.dir_view_type, (FileViewType) gtk_radio_action_get_current_value(action)); |
615 } | 615 } |
616 | 616 |
617 static void layout_menu_view_dir_as_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) | 617 static void layout_menu_view_dir_as_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) |
618 { | 618 { |
619 LayoutWindow *lw = data; | 619 LayoutWindow *lw = data; |
1413 { "ImageOverlay", NULL, N_("_Image Overlay"), NULL, N_("Image Overlay"), CB(layout_menu_overlay_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 }, | 1414 { "ImageHistogram", NULL, N_("_Show Histogram"), NULL, N_("Show Histogram"), CB(layout_menu_histogram_cb), FALSE }, |
1415 }; | 1415 }; |
1416 | 1416 |
1417 static GtkRadioActionEntry menu_radio_entries[] = { | 1417 static GtkRadioActionEntry menu_radio_entries[] = { |
1418 { "ViewList", NULL, N_("Image _List"), "<control>L", N_("View Images as List"), 0 }, | 1418 { "ViewList", NULL, N_("Image _List"), "<control>L", N_("View Images as List"), FILEVIEW_LIST }, |
1419 { "ViewIcons", NULL, N_("I_cons"), "<control>I", N_("View Images as Icons"), 1 } | 1419 { "ViewIcons", NULL, N_("I_cons"), "<control>I", N_("View Images as Icons"), FILEVIEW_ICON } |
1420 }; | 1420 }; |
1421 | 1421 |
1422 static GtkRadioActionEntry menu_view_dir_radio_entries[] = { | 1422 static GtkRadioActionEntry menu_view_dir_radio_entries[] = { |
1423 { "FolderList", NULL, N_("Folder _List"), "<meta>L", N_("View Folders as List"), DIRVIEW_LIST }, | 1423 { "FolderList", NULL, N_("Folder _List"), "<meta>L", N_("View Folders as List"), DIRVIEW_LIST }, |
1424 { "FolderTree", NULL, N_("Folder _Tree"), "<control>T", N_("View Folders as Tree"), DIRVIEW_TREE }, | 1424 { "FolderTree", NULL, N_("Folder _Tree"), "<control>T", N_("View Folders as Tree"), DIRVIEW_TREE }, |
2282 | 2282 |
2283 action = gtk_action_group_get_action(lw->action_group, "SplitSingle"); | 2283 action = gtk_action_group_get_action(lw->action_group, "SplitSingle"); |
2284 radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->split_mode); | 2284 radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->split_mode); |
2285 | 2285 |
2286 action = gtk_action_group_get_action(lw->action_group, "ViewIcons"); | 2286 action = gtk_action_group_get_action(lw->action_group, "ViewIcons"); |
2287 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.file_view_type); | 2287 radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->options.file_view_type); |
2288 | 2288 |
2289 action = gtk_action_group_get_action(lw->action_group, "FloatTools"); | 2289 action = gtk_action_group_get_action(lw->action_group, "FloatTools"); |
2290 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.tools_float); | 2290 gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->options.tools_float); |
2291 | 2291 |
2292 action = gtk_action_group_get_action(lw->action_group, "SBar"); | 2292 action = gtk_action_group_get_action(lw->action_group, "SBar"); |