Skip to content

Commit

Permalink
Make vf_pop_menu_toggle_view_type_cb() independent of FILEVIEW_LIST/F…
Browse files Browse the repository at this point in the history
…ILEVIEW_ICON real values.
  • Loading branch information
Laurent Monin committed May 11, 2008
1 parent c2147d9 commit 98e4659
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/view_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,17 @@ void vf_pop_menu_toggle_view_type_cb(GtkWidget *widget, gpointer data)
{
ViewFile *vf = data;

if (vf->layout) layout_views_set(vf->layout, vf->layout->dir_view_type, !vf->layout->file_view_type);
if (!vf->layout) return;

switch(vf->layout->file_view_type)
{
case FILEVIEW_LIST:
layout_views_set(vf->layout, vf->layout->dir_view_type, FILEVIEW_ICON);
break;
case FILEVIEW_ICON:
layout_views_set(vf->layout, vf->layout->dir_view_type, FILEVIEW_LIST);
break;
}
}


Expand Down

0 comments on commit 98e4659

Please sign in to comment.