diff src/ui_utildlg.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 9995c5fb202a
children 4b2d7f9af171
line wrap: on
line diff
--- a/src/ui_utildlg.c	Wed Apr 09 13:53:01 2008 +0000
+++ b/src/ui_utildlg.c	Wed Apr 09 16:37:54 2008 +0000
@@ -217,9 +217,9 @@
 	gd->data = data;
 	gd->cancel_cb = cancel_cb;
 
-	gd->dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gd->dialog = window_new(GTK_WINDOW_TOPLEVEL, wmsubclass, NULL, NULL, title);
 	gtk_window_set_type_hint(GTK_WINDOW(gd->dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
-	gtk_window_set_wmclass(GTK_WINDOW(gd->dialog), wmsubclass, wmclass);
+
 	if (parent)
 		{
 		GtkWindow *window = NULL;
@@ -245,7 +245,6 @@
 			 G_CALLBACK(generic_dialog_key_press_cb), gd);
 
 	gtk_window_set_resizable(GTK_WINDOW(gd->dialog), TRUE);
-	gtk_window_set_title(GTK_WINDOW (gd->dialog), title);
 	gtk_container_set_border_width(GTK_CONTAINER(gd->dialog), PREF_PAD_BORDER);
 
 	vbox = gtk_vbox_new(FALSE, PREF_PAD_BUTTON_SPACE);