diff options
author | infirit <[email protected]> | 2014-11-26 22:13:12 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-26 22:13:12 +0100 |
commit | faaee1e86bc0e751693bc2297893bffe127e3c3c (patch) | |
tree | ca5e5729e6f206fd6c64b58a1e97296aaeddee36 /charpick/properties.c | |
parent | 0856e14a2863e5cc355306f898096507f46dfec3 (diff) | |
download | mate-applets-faaee1e86bc0e751693bc2297893bffe127e3c3c.tar.bz2 mate-applets-faaee1e86bc0e751693bc2297893bffe127e3c3c.tar.xz |
charpick: Do not use GtkStock
Diffstat (limited to 'charpick/properties.c')
-rw-r--r-- | charpick/properties.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/charpick/properties.c b/charpick/properties.c index 22104235..057a3080 100644 --- a/charpick/properties.c +++ b/charpick/properties.c @@ -13,34 +13,11 @@ #include <atk/atkrelation.h> #include <gtk/gtk.h> -#define CHARPICK_STOCK_EDIT "charpick-stock-edit" - #if GTK_CHECK_VERSION (3, 0, 0) #define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) #define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) #endif -void -register_stock_for_edit (void) -{ - static gboolean registered = FALSE; - if (!registered) - { - GtkIconFactory *factory; - GtkIconSet *icons; - - static const GtkStockItem edit_item [] = { - { CHARPICK_STOCK_EDIT, N_("_Edit"), 0, 0, GETTEXT_PACKAGE }, - }; - icons = gtk_icon_factory_lookup_default (GTK_STOCK_PREFERENCES); - factory = gtk_icon_factory_new (); - gtk_icon_factory_add (factory, CHARPICK_STOCK_EDIT, icons); - gtk_icon_factory_add_default (factory); - gtk_stock_add_static (edit_item, 1); - registered = TRUE; - } -} - #if 0 static void set_atk_relation (GtkWidget *label, GtkWidget *widget) @@ -97,9 +74,8 @@ add_edit_dialog_create (charpick_data *curr_data, gchar *string, gchar *title) GtkWidget *label; dialog = gtk_dialog_new_with_buttons (_(title), GTK_WINDOW (curr_data->propwindow), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (curr_data->propwindow)); @@ -470,14 +446,14 @@ static void default_chars_frame_create(charpick_data *curr_data) vbox2 = gtk_vbox_new (FALSE, 6); gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0); - button = gtk_button_new_from_stock (GTK_STOCK_ADD); + button = gtk_button_new_with_mnemonic (_("_Add")); gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (add_palette), curr_data); set_access_namedesc (button, _("Add button"), _("Click to add a new palette")); - button = gtk_button_new_from_stock (CHARPICK_STOCK_EDIT); + button = gtk_button_new_with_mnemonic (_("_Edit")); gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (edit_palette), curr_data); @@ -485,7 +461,7 @@ static void default_chars_frame_create(charpick_data *curr_data) set_access_namedesc (button, _("Edit button"), _("Click to edit the selected palette")); - button = gtk_button_new_from_stock (GTK_STOCK_DELETE); + button = gtk_button_new_with_mnemonic (_("_Delete")); gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (delete_palette), curr_data); @@ -545,8 +521,8 @@ show_preferences_dialog (GtkAction *action, curr_data->propwindow = gtk_dialog_new_with_buttons (_("Character Palette Preferences"), NULL, GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, - GTK_STOCK_HELP, GTK_RESPONSE_HELP, + _("_Close"), GTK_RESPONSE_CLOSE, + _("_Help"), GTK_RESPONSE_HELP, NULL); gtk_window_set_screen (GTK_WINDOW (curr_data->propwindow), gtk_widget_get_screen (curr_data->applet)); |