tButtons in dialogs now have a slightly more GTK-consistent "look" - i.e. they do not expand, and are right-aligned. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 86699cdb297c2f193e9e5184094aa36047015d73
(DIR) parent 09ebc2bf56dce5010d88ee14e481373fca630c38
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Mon, 25 Mar 2002 16:58:36 +0000
Buttons in dialogs now have a slightly more GTK-consistent "look" - i.e.
tthey do not expand, and are right-aligned.
Diffstat:
M src/gui_client/gtk_client.h | 1 +
M src/gui_client/newgamedia.c | 26 +++++++++++++-------------
2 files changed, 14 insertions(+), 13 deletions(-)
---
(DIR) diff --git a/src/gui_client/gtk_client.h b/src/gui_client/gtk_client.h
t@@ -39,5 +39,6 @@ gboolean GtkLoop(int *argc, char **argv[], gboolean ReturnOnFail);
#endif
void GuiStartGame(void);
+GtkWidget *my_hbbox_new(void);
#endif
(DIR) diff --git a/src/gui_client/newgamedia.c b/src/gui_client/newgamedia.c
t@@ -575,20 +575,20 @@ void NewGameDialog(Player *play)
gtk_box_pack_start(GTK_BOX(vbox2), scrollwin, TRUE, TRUE, 0);
- hbbox = gtk_hbutton_box_new();
+ hbbox = my_hbbox_new();
button = gtk_button_new_with_label("");
/* Button to update metaserver information */
SetAccelerator(button, _("_Update"), button, "clicked", accel_group, TRUE);
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(UpdateMetaServerList), NULL);
- gtk_box_pack_start(GTK_BOX(hbbox), button, TRUE, TRUE, 0);
+ gtk_box_pack_start_defaults(GTK_BOX(hbbox), button);
button = gtk_button_new_with_label("");
SetAccelerator(button, _("_Connect"), button, "clicked", accel_group, TRUE);
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(MetaServerConnect), NULL);
- gtk_box_pack_start(GTK_BOX(hbbox), button, TRUE, TRUE, 0);
+ gtk_box_pack_start_defaults(GTK_BOX(hbbox), button);
gtk_box_pack_start(GTK_BOX(vbox2), hbbox, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(frame), vbox2);
t@@ -722,18 +722,18 @@ void AuthDialog(HttpConnection *conn, gboolean proxy, gchar *realm,
hsep = gtk_hseparator_new();
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0);
- hbbox = gtk_hbutton_box_new();
+ hbbox = my_hbbox_new();
- button = gtk_button_new_with_label(_("OK"));
+ button = gtk_button_new_from_stock(GTK_STOCK_OK);
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(OKAuthDialog), (gpointer)window);
- gtk_box_pack_start(GTK_BOX(hbbox), button, TRUE, TRUE, 0);
+ gtk_box_pack_start_defaults(GTK_BOX(hbbox), button);
- button = gtk_button_new_with_label(_("Cancel"));
+ button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
(gpointer)window);
- gtk_box_pack_start(GTK_BOX(hbbox), button, TRUE, TRUE, 0);
+ gtk_box_pack_start_defaults(GTK_BOX(hbbox), button);
gtk_box_pack_start(GTK_BOX(vbox), hbbox, TRUE, TRUE, 0);
t@@ -826,18 +826,18 @@ static void RealSocksAuthDialog(NetworkBuffer *netbuf, gboolean meta,
hsep = gtk_hseparator_new();
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0);
- hbbox = gtk_hbutton_box_new();
+ hbbox = my_hbbox_new();
- button = gtk_button_new_with_label(_("OK"));
+ button = gtk_button_new_from_stock(GTK_STOCK_OK);
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(OKSocksAuth), (gpointer)window);
- gtk_box_pack_start(GTK_BOX(hbbox), button, TRUE, TRUE, 0);
+ gtk_box_pack_start_defaults(GTK_BOX(hbbox), button);
- button = gtk_button_new_with_label(_("Cancel"));
+ button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
(gpointer)window);
- gtk_box_pack_start(GTK_BOX(hbbox), button, TRUE, TRUE, 0);
+ gtk_box_pack_start_defaults(GTK_BOX(hbbox), button);
gtk_box_pack_start(GTK_BOX(vbox), hbbox, TRUE, TRUE, 0);