gnome-about HIG patch



Here's a patch to make everyone's favourite dialog HIG compliant. It
sets the border spacing to 12, removes the gratuitious separators and
changes the OK button to a Close button.

May I commit or has libgnomeui not been branched yet? Should things like
this be discussed here or gnome-devel?

iain
-- 
Index: gnome-about.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-about.c,v
retrieving revision 1.112
diff -U2 -r1.112 gnome-about.c
--- gnome-about.c	8 Nov 2002 04:31:11 -0000	1.112
+++ gnome-about.c	14 Mar 2003 19:06:35 -0000
@@ -194,10 +194,11 @@
 	dialog = gtk_dialog_new_with_buttons (_("Credits"),
 					      GTK_WINDOW (about),
-					      GTK_DIALOG_DESTROY_WITH_PARENT,
-					      GTK_STOCK_OK, GTK_RESPONSE_OK,
+					      GTK_DIALOG_DESTROY_WITH_PARENT |
+					      GTK_DIALOG_NO_SEPARATOR,
+					      GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
 					      NULL);
 	about->_priv->credits_dialog = dialog;
 	gtk_window_set_default_size (GTK_WINDOW (dialog), 360, 260);
-	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
 	g_signal_connect (dialog, "response",
 			  G_CALLBACK (gtk_widget_destroy), dialog);
@@ -207,5 +208,5 @@
 
 	notebook = gtk_notebook_new ();
-	gtk_container_set_border_width (GTK_CONTAINER (notebook), 8);
+	gtk_container_set_border_width (GTK_CONTAINER (notebook), 12);
 	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, TRUE, TRUE, 0);
 
@@ -277,7 +278,9 @@
 	priv->documenters = NULL;
 
+	gtk_dialog_set_has_separator (GTK_DIALOG (about), FALSE);
+
 	/* Widgets */
-	vbox = gtk_vbox_new (FALSE, 8);
-	gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+	vbox = gtk_vbox_new (FALSE, 12);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
 
 	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (about)->vbox), vbox, TRUE, TRUE, 0);
@@ -303,7 +306,7 @@
 	gtk_widget_show_all (vbox);
 	
-	/* Add the OK button */
-	gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_OK, GTK_RESPONSE_OK);
-	gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_OK);
+	/* Add the close button */
+	gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+	gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CLOSE);
 
 	/* Add the credits button */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]