[Xfce4-commits] [apps/xfce4-dict] 15/43: Replace more occurrences of GtkStock by GtkImage
noreply at xfce.org
noreply at xfce.org
Tue Nov 1 00:31:28 CET 2016
This is an automated email from the git hooks/post-receive script.
andre pushed a commit to branch master
in repository apps/xfce4-dict.
commit aff0f77fe5870e9fa10cd0f54596eb00db7a8e88
Author: Andre Miranda <andre42m at gmail.com>
Date: Wed Jul 20 23:01:41 2016 -0300
Replace more occurrences of GtkStock by GtkImage
---
lib/gui.c | 17 +++++++++++------
lib/prefs.c | 2 +-
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/lib/gui.c b/lib/gui.c
index b1b97b9..1bf69e7 100644
--- a/lib/gui.c
+++ b/lib/gui.c
@@ -597,7 +597,9 @@ static void update_search_button(DictData *dd, GtkWidget *box)
if (button == NULL)
{
- button = gtk_button_new_from_stock(GTK_STOCK_FIND);
+ button = gtk_button_new_with_mnemonic (_("F_ind"));
+ gtk_button_set_image(GTK_BUTTON(button),
+ gtk_image_new_from_icon_name("gtk-find", GTK_ICON_SIZE_BUTTON));
gtk_widget_show(button);
gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0);
g_signal_connect(button, "clicked", G_CALLBACK(entry_button_clicked_cb), dd);
@@ -781,9 +783,9 @@ void dict_gui_create_main_window(DictData *dd)
g_signal_connect(dd->main_combo, "changed", G_CALLBACK(combo_changed_cb), dd);
dd->main_entry = gtk_bin_get_child(GTK_BIN(dd->main_combo));
- gtk_entry_set_text(GTK_ENTRY(dd->main_entry), _("Search term"));
- gtk_entry_set_icon_from_stock(GTK_ENTRY(dd->main_entry), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
- gtk_entry_set_icon_from_stock(GTK_ENTRY(dd->main_entry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR);
+ gtk_entry_set_placeholder_text(GTK_ENTRY(dd->main_entry), _("Search term"));
+ gtk_entry_set_icon_from_icon_name(GTK_ENTRY(dd->main_entry), GTK_ENTRY_ICON_PRIMARY, "gtk-find");
+ gtk_entry_set_icon_from_icon_name(GTK_ENTRY(dd->main_entry), GTK_ENTRY_ICON_SECONDARY, "gtk-clear");
g_signal_connect(dd->main_entry, "changed", G_CALLBACK(entry_changed_cb), dd);
g_signal_connect(dd->main_entry, "activate", G_CALLBACK(entry_activate_cb), dd);
g_signal_connect(dd->main_entry, "icon-release", G_CALLBACK(entry_icon_release_cb), dd);
@@ -813,8 +815,11 @@ void dict_gui_create_main_window(DictData *dd)
gtk_widget_show(sep);
gtk_box_pack_start(GTK_BOX(entry_box), sep, FALSE, FALSE, 2);
- dd->close_button = gtk_button_new_from_stock(
- (dd->is_plugin) ? GTK_STOCK_CLOSE : GTK_STOCK_QUIT);
+ dd->close_button = gtk_button_new_with_mnemonic ((dd->is_plugin) ?
+ _("_Close") : _("_Quit"));
+ gtk_button_set_image(GTK_BUTTON(dd->close_button),
+ gtk_image_new_from_icon_name((dd->is_plugin) ?
+ "gtk-close" : "gtk-quit", GTK_ICON_SIZE_BUTTON));
gtk_widget_show(dd->close_button);
gtk_box_pack_end(GTK_BOX(entry_box), dd->close_button, FALSE, FALSE, 0);
diff --git a/lib/prefs.c b/lib/prefs.c
index 25c7cb3..6f2bfeb 100644
--- a/lib/prefs.c
+++ b/lib/prefs.c
@@ -265,7 +265,7 @@ GtkWidget *dict_prefs_dialog_show(GtkWidget *parent, DictData *dd)
dialog = xfce_titled_dialog_new_with_buttons(
_("Dictionary"), GTK_WINDOW(parent),
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
- GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
+ "gtk-close", GTK_RESPONSE_OK,
NULL);
gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list