diff src/ui_help.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 d907d608745f
children ddabc4873a3f
line wrap: on
line diff
--- a/src/ui_help.c	Wed Apr 09 13:53:01 2008 +0000
+++ b/src/ui_help.c	Wed Apr 09 16:37:54 2008 +0000
@@ -20,6 +20,7 @@
 
 #include <gtk/gtk.h>
 
+#include "main.h"
 #include "ui_help.h"
 
 #include "ui_fileops.h"
@@ -198,17 +199,13 @@
 
 	/* window */
 
-	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	window = window_new(GTK_WINDOW_TOPLEVEL, subclass, NULL, NULL, title);
 	gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
 #if 0
 	gtk_container_set_border_width(GTK_CONTAINER(window), PREF_PAD_BORDER);
 #endif
-	gtk_window_set_wmclass(GTK_WINDOW(window), subclass, wmclass);
-
 	gtk_window_set_default_size(GTK_WINDOW(window), HELP_WINDOW_WIDTH, HELP_WINDOW_HEIGHT);
 
-	gtk_window_set_title(GTK_WINDOW(window), title);
-
 	g_signal_connect(G_OBJECT(window), "delete_event",
 			 G_CALLBACK(help_window_delete_cb), NULL);