Mercurial > geeqie
diff src/layout.c @ 289:6a7298988a7a
Simplify and unify gtk_window creation with the help of
the new window_new() function, that wraps gtk_window_new()
call.
Subclass, title and icon are set in the same call.
author | zas_ |
---|---|
date | Wed, 09 Apr 2008 16:37:54 +0000 |
parents | d1f74154463e |
children | b16b9b8979e5 |
line wrap: on
line diff
--- a/src/layout.c Wed Apr 09 13:53:01 2008 +0000 +++ b/src/layout.c Wed Apr 09 16:37:54 2008 +0000 @@ -1317,7 +1317,7 @@ GdkGeometry geometry; GdkWindowHints hints; - lw->tools = gtk_window_new(GTK_WINDOW_TOPLEVEL); + lw->tools = window_new(GTK_WINDOW_TOPLEVEL, "tools", PIXBUF_INLINE_ICON_TOOLS, NULL, _("Tools")); g_signal_connect(G_OBJECT(lw->tools), "delete_event", G_CALLBACK(layout_tools_delete_cb), lw); layout_keyboard_init(lw, lw->tools); @@ -1340,16 +1340,8 @@ gtk_window_set_resizable(GTK_WINDOW(lw->tools), TRUE); - { - gchar *title = g_strdup_printf("%s - %s", _("Tools"), GQ_APPNAME); - gtk_window_set_title(GTK_WINDOW(lw->tools), title); - g_free(title); - } - gtk_window_set_wmclass(GTK_WINDOW(lw->tools), "tools", GQ_WMCLASS); gtk_container_set_border_width(GTK_CONTAINER(lw->tools), 0); - - window_set_icon(lw->tools, PIXBUF_INLINE_ICON_TOOLS, NULL); - + new_window = TRUE; } else @@ -1930,15 +1922,10 @@ /* window */ - lw->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + lw->window = window_new(GTK_WINDOW_TOPLEVEL, GQ_WMCLASS, NULL, NULL, NULL); gtk_window_set_resizable(GTK_WINDOW(lw->window), TRUE); - - gtk_window_set_title(GTK_WINDOW(lw->window), GQ_APPNAME); - gtk_window_set_wmclass(GTK_WINDOW(lw->window), GQ_WMCLASS, GQ_WMCLASS); gtk_container_set_border_width(GTK_CONTAINER(lw->window), 0); - window_set_icon(lw->window, NULL, NULL); - if (save_window_positions) { hint_mask = GDK_HINT_USER_POS;