Mercurial > geeqie
diff src/layout_util.c @ 556:fe675761d091
Replace Layout icon_view field by more generic file_view_type.
Replace option layout.view_as_icons by layout.file_view_type.
| author | zas_ |
|---|---|
| date | Sat, 03 May 2008 11:34:13 +0000 |
| parents | 0717bcc4f2b7 |
| children | fd51eac09ead |
line wrap: on
line diff
--- a/src/layout_util.c Sat May 03 10:31:37 2008 +0000 +++ b/src/layout_util.c Sat May 03 11:34:13 2008 +0000 @@ -514,7 +514,7 @@ if (lw->full_screen) layout_image_full_screen_stop(lw); - layout_views_set(lw, lw->dir_view_type, (gtk_radio_action_get_current_value(action) == 1)); + layout_views_set(lw, lw->dir_view_type, (gtk_radio_action_get_current_value(action) == 1) ? FILEVIEW_ICON : FILEVIEW_LIST); } static void layout_menu_view_dir_as_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data) @@ -523,7 +523,7 @@ if (lw->full_screen) layout_image_full_screen_stop(lw); - layout_views_set(lw, (DirViewType) gtk_radio_action_get_current_value(action), lw->icon_view); + layout_views_set(lw, (DirViewType) gtk_radio_action_get_current_value(action), lw->file_view_type); } static void layout_menu_view_in_new_window_cb(GtkAction *action, gpointer data) @@ -1581,7 +1581,7 @@ radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->dir_view_type); action = gtk_action_group_get_action(lw->action_group, "ViewIcons"); - gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->icon_view); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->file_view_type); action = gtk_action_group_get_action(lw->action_group, "FloatTools"); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->tools_float); @@ -1613,10 +1613,10 @@ action = gtk_action_group_get_action(lw->action_group, "Thumbnails"); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), lw->thumbs_enabled); - g_object_set(action, "sensitive", !lw->icon_view, NULL); + g_object_set(action, "sensitive", (lw->file_view_type == FILEVIEW_LIST), NULL); gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(lw->thumb_button), lw->thumbs_enabled); - gtk_widget_set_sensitive(lw->thumb_button, !lw->icon_view); + gtk_widget_set_sensitive(lw->thumb_button, (lw->file_view_type == FILEVIEW_LIST)); } void layout_util_sync(LayoutWindow *lw)
