ImageSplitMode mode;
layout_exit_fullscreen(lw);
- mode = gtk_radio_action_get_current_value(action);
+ mode = static_cast<ImageSplitMode>(gtk_radio_action_get_current_value(action));
layout_split_change(lw, mode);
}
OsdShowFlags flags = image_osd_get(lw->image);
if ((flags | OSD_SHOW_INFO | OSD_SHOW_STATUS) != flags)
- image_osd_set(lw->image, flags | OSD_SHOW_INFO | OSD_SHOW_STATUS);
+ image_osd_set(lw->image, static_cast<OsdShowFlags>(flags | OSD_SHOW_INFO | OSD_SHOW_STATUS));
}
else
{
if (gtk_toggle_action_get_active(action))
{
- image_osd_set(lw->image, OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_HISTOGRAM);
+ image_osd_set(lw->image, static_cast<OsdShowFlags>(OSD_SHOW_INFO | OSD_SHOW_STATUS | OSD_SHOW_HISTOGRAM));
layout_util_sync_views(lw); /* show the overlay state, default channel and mode in the menu */
}
else
{
OsdShowFlags flags = image_osd_get(lw->image);
if (flags & OSD_SHOW_HISTOGRAM)
- image_osd_set(lw->image, flags & ~OSD_SHOW_HISTOGRAM);
+ image_osd_set(lw->image, static_cast<OsdShowFlags>(flags & ~OSD_SHOW_HISTOGRAM));
}
}
GError *error = NULL;
GIOChannel *channel;
char **pre_key, **post_key;
- char *key_name, *converted_line;
+ const char *key_name;
+ char *converted_line;
int keymap_index;
guint index;
key_name = " ";
for (index=0; index < array->len-2; index=index+2)
{
- if (!(g_ascii_strcasecmp(g_ptr_array_index(array,index+1), post_key[0])))
+ if (!(g_ascii_strcasecmp(static_cast<const gchar *>(g_ptr_array_index(array,index+1)), post_key[0])))
{
- key_name = g_ptr_array_index(array,index+0);
+ key_name = static_cast<const gchar *>(g_ptr_array_index(array,index+0));
break;
}
}
static gint layout_window_menu_list_sort_cb(gconstpointer a, gconstpointer b)
{
- const WindowNames *wna = a;
- const WindowNames *wnb = b;
+ const WindowNames *wna = static_cast<const WindowNames *>(a);
+ const WindowNames *wnb = static_cast<const WindowNames *>(b);
return g_strcmp0((gchar *)wna->name, (gchar *)wnb->name);
}
static GtkRadioActionEntry menu_split_radio_entries[] = {
{ "SplitHorizontal", NULL, N_("_Horizontal"), "E", N_("Split panes horizontal."), SPLIT_HOR },
{ "SplitVertical", NULL, N_("_Vertical"), "U", N_("Split panes vertical"), SPLIT_VERT },
+ { "SplitTriple", NULL, N_("_Triple"), NULL, N_("Split panes triple"), SPLIT_TRIPLE },
{ "SplitQuad", NULL, N_("_Quad"), NULL, N_("Split panes quad"), SPLIT_QUAD },
{ "SplitSingle", NULL, N_("_Single"), "Y", N_("Single pane"), SPLIT_NONE }
};
" <menu action='SplitMenu'>"
" <menuitem action='SplitHorizontal'/>"
" <menuitem action='SplitVertical'/>"
+" <menuitem action='SplitTriple'/>"
" <menuitem action='SplitQuad'/>"
" <menuitem action='SplitSingle'/>"
" <separator/>"
DEBUG_1("%s layout_actions_setup: add toolbar", get_exec_time());
for (i = 0; i < TOOLBAR_COUNT; i++)
{
- layout_toolbar_clear(lw, i);
- layout_toolbar_add_default(lw, i);
+ layout_toolbar_clear(lw, static_cast<ToolbarType>(i));
+ layout_toolbar_add_default(lw, static_cast<ToolbarType>(i));
}
DEBUG_1("%s layout_actions_setup: marks", get_exec_time());
{
DEBUG_1("%s layout_editors_reload_idle_cb: get_desktop_files", get_exec_time());
layout_editors_desktop_files = editor_get_desktop_files();
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
- editor_read_desktop_file(layout_editors_desktop_files->data);
+ editor_read_desktop_file(static_cast<const gchar *>(layout_editors_desktop_files->data));
g_free(layout_editors_desktop_files->data);
layout_editors_desktop_files = g_list_delete_link(layout_editors_desktop_files, layout_editors_desktop_files);
DEBUG_1("%s layout_editors_reload_idle_cb: setup_editors done", get_exec_time());
layout_editors_reload_idle_id = -1;
- return FALSE;
+ return G_SOURCE_REMOVE;
}
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
void layout_editors_reload_start(void)