Re: patch to add missing stock labels
- From: Owen Taylor <otaylor redhat com>
- To: Sven Neumann <sven gimp org>
- Cc: gtk-devel-list gnome org
- Subject: Re: patch to add missing stock labels
- Date: Fri, 8 Feb 2002 11:53:14 -0500 (EST)
Sven Neumann <sven gimp org> writes:
> Hi,
>
> here's a small patch that adds stock labels (with stock icons)
> to some GTK+ dialogs that are missing it. OK to commit?
Looks fine.
> I'd also like to add dialog icons to the fileselection
> New/Delete/Rename dialogs. Would you accept such a change?
What do you mean by "dialog icons"?
Owen
> Index: gtk/gtkfilesel.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkfilesel.c,v
> retrieving revision 1.98
> diff -u -p -r1.98 gtkfilesel.c
> --- gtk/gtkfilesel.c 2002/02/01 17:41:47 1.98
> +++ gtk/gtkfilesel.c 2002/02/08 14:51:38
> @@ -1363,7 +1363,7 @@ gtk_file_selection_create_dir (GtkWidget
> gtk_widget_show (fs->fileop_entry);
>
> /* buttons */
> - button = gtk_button_new_with_label (_("Cancel"));
> + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
> gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
> (GtkSignalFunc) gtk_widget_destroy,
> (gpointer) dialog);
> @@ -1492,7 +1492,7 @@ gtk_file_selection_delete_file (GtkWidge
> g_free (buf);
>
> /* buttons */
> - button = gtk_button_new_with_label (_("Cancel"));
> + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
> gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
> (GtkSignalFunc) gtk_widget_destroy,
> (gpointer) dialog);
> @@ -1502,7 +1502,7 @@ gtk_file_selection_delete_file (GtkWidge
> gtk_widget_grab_default (button);
> gtk_widget_show (button);
>
> - button = gtk_button_new_with_label (_("Delete"));
> + button = gtk_button_new_from_stock (GTK_STOCK_DELETE);
> gtk_signal_connect (GTK_OBJECT (button), "clicked",
> (GtkSignalFunc) gtk_file_selection_delete_file_confirmed,
> (gpointer) fs);
> @@ -1650,7 +1650,7 @@ gtk_file_selection_rename_file (GtkWidge
> 0, strlen (fs->fileop_file));
>
> /* buttons */
> - button = gtk_button_new_with_label (_("Cancel"));
> + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
> gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
> (GtkSignalFunc) gtk_widget_destroy,
> (gpointer) dialog);
> Index: gtk/gtkgamma.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkgamma.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 gtkgamma.c
> --- gtk/gtkgamma.c 2002/01/29 20:53:17 1.25
> +++ gtk/gtkgamma.c 2002/02/08 14:51:38
> @@ -39,6 +39,7 @@
> #include "gtkpixmap.h"
> #include "gtkradiobutton.h"
> #include "gtksignal.h"
> +#include "gtkstock.h"
> #include "gtktable.h"
> #include "gtkvbox.h"
> #include "gtkwindow.h"
> @@ -416,13 +417,13 @@ button_clicked_callback (GtkWidget *w, g
> /* fill in action area: */
> hbox = GTK_DIALOG (c->gamma_dialog)->action_area;
>
> - button = gtk_button_new_with_label (_("Cancel"));
> + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
> gtk_signal_connect (GTK_OBJECT (button), "clicked",
> (GtkSignalFunc) gamma_cancel_callback, c);
> gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
> gtk_widget_show (button);
>
> - button = gtk_button_new_with_label (_("OK"));
> + button = gtk_button_new_from_stock (GTK_STOCK_OK);
> GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
> gtk_signal_connect (GTK_OBJECT (button), "clicked",
> (GtkSignalFunc) gamma_ok_callback, c);
> Index: gtk/gtkinputdialog.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkinputdialog.c,v
> retrieving revision 1.31
> diff -u -p -r1.31 gtkinputdialog.c
> --- gtk/gtkinputdialog.c 2002/02/02 04:26:48 1.31
> +++ gtk/gtkinputdialog.c 2002/02/08 14:51:39
> @@ -51,6 +51,7 @@
> #include "gtkoptionmenu.h"
> #include "gtkscrolledwindow.h"
> #include "gtksignal.h"
> +#include "gtkstock.h"
> #include "gtktable.h"
> #include "gtkvbox.h"
>
> @@ -327,7 +328,7 @@ gtk_input_dialog_init (GtkInputDialog *i
>
> /* We create the save button in any case, so that clients can
> connect to it, without paying attention to whether it exits */
> - inputd->save_button = gtk_button_new_with_label (_("Save"));
> + inputd->save_button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
> GTK_WIDGET_SET_FLAGS (inputd->save_button, GTK_CAN_DEFAULT);
> gtk_box_pack_start (GTK_BOX (GTK_DIALOG(inputd)->action_area),
> inputd->save_button, TRUE, TRUE, 0);
> @@ -336,7 +337,7 @@ gtk_input_dialog_init (GtkInputDialog *i
> if (g_list_length(device_info) <= 1) /* only core device */
> gtk_widget_set_sensitive(inputd->save_button, FALSE);
>
> - inputd->close_button = gtk_button_new_with_label (_("Close"));
> + inputd->close_button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
> GTK_WIDGET_SET_FLAGS (inputd->close_button, GTK_CAN_DEFAULT);
> gtk_box_pack_start (GTK_BOX (GTK_DIALOG(inputd)->action_area),
> inputd->close_button, TRUE, TRUE, 0);
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]