[ekiga] GUI: More stock replaced by theme icons.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] GUI: More stock replaced by theme icons.
- Date: Sun, 23 Sep 2012 13:38:16 +0000 (UTC)
commit 8e8d79986ee725a050706e90ead6dc3a5fe5f02f
Author: Damien Sandras <dsandras beip be>
Date: Sun Sep 23 14:42:38 2012 +0200
GUI: More stock replaced by theme icons.
lib/engine/gui/gtk-core/codecsbox.cpp | 4 +-
lib/engine/gui/gtk-core/menu-builder-gtk.cpp | 2 +-
lib/engine/gui/gtk-frontend/preferences-window.cpp | 23 +++++++------------
3 files changed, 12 insertions(+), 17 deletions(-)
---
diff --git a/lib/engine/gui/gtk-core/codecsbox.cpp b/lib/engine/gui/gtk-core/codecsbox.cpp
index 16de1a2..f3eef30 100644
--- a/lib/engine/gui/gtk-core/codecsbox.cpp
+++ b/lib/engine/gui/gtk-core/codecsbox.cpp
@@ -446,7 +446,7 @@ codecs_box_init (CodecsBox *self)
gtk_container_add (GTK_CONTAINER (alignment), buttons_vbox);
- image = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name ("go-up", GTK_ICON_SIZE_MENU);
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_tooltip_text (button, _("Move selected codec priority upwards"));
@@ -456,7 +456,7 @@ codecs_box_init (CodecsBox *self)
G_CALLBACK (codec_moved_cb),
(gpointer) self);
- image = gtk_image_new_from_stock (GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_MENU);
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_tooltip_text (button, _("Move selected codec priority downwards"));
diff --git a/lib/engine/gui/gtk-core/menu-builder-gtk.cpp b/lib/engine/gui/gtk-core/menu-builder-gtk.cpp
index aa6db33..9f14278 100644
--- a/lib/engine/gui/gtk-core/menu-builder-gtk.cpp
+++ b/lib/engine/gui/gtk-core/menu-builder-gtk.cpp
@@ -146,7 +146,7 @@ MenuBuilderGtk::add_ghost (const std::string icon,
last_was_separator = false;
item = gtk_image_menu_item_new_with_mnemonic (label.c_str ());
- image = gtk_image_new_from_stock (icon.c_str (), GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name (icon.c_str (), GTK_ICON_SIZE_MENU);
if (image)
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
diff --git a/lib/engine/gui/gtk-frontend/preferences-window.cpp b/lib/engine/gui/gtk-frontend/preferences-window.cpp
index 3042ce3..2d556ad 100644
--- a/lib/engine/gui/gtk-frontend/preferences-window.cpp
+++ b/lib/engine/gui/gtk-frontend/preferences-window.cpp
@@ -126,16 +126,15 @@ static void gm_prefs_window_sound_events_list_build (GtkWidget *prefs_window);
* BEHAVIOR : Adds an update button connected to the given callback to
* the given GtkBox.
* PRE : A valid pointer to the container widget where to attach
- * the button, followed by a stock ID, a label, the callback, a
- * tooltip and the alignment.
+ * the button, followed by a label, the callback, a
+ * tooltip and the alignment.
*/
static void gm_pw_add_update_button (GtkWidget *box,
- const char *stock_id,
- const char *label,
- GCallback func,
- const gchar *tooltip,
- gfloat valign,
- gpointer data);
+ const char *label,
+ GCallback func,
+ const gchar *tooltip,
+ gfloat valign,
+ gpointer data);
/* DESCRIPTION : /
@@ -421,7 +420,6 @@ gm_prefs_window_sound_events_list_build (GtkWidget *prefs_window)
static void
gm_pw_add_update_button (GtkWidget *box,
- const char *stock_id,
const char *label,
GCallback func,
const gchar *tooltip,
@@ -429,13 +427,10 @@ gm_pw_add_update_button (GtkWidget *box,
gpointer data)
{
GtkWidget* alignment = NULL;
- GtkWidget* image = NULL;
GtkWidget* button = NULL;
/* Update Button */
button = gtk_button_new_with_mnemonic (label);
- image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (button), image);
gtk_widget_set_tooltip_text (button, tooltip);
alignment = gtk_alignment_new (1, valign, 0, 0);
@@ -767,7 +762,7 @@ gm_pw_init_audio_devices_page (GtkWidget *prefs_window,
g_free (array);
/* That button will refresh the device list */
- gm_pw_add_update_button (container, GTK_STOCK_REFRESH, _("_Detect devices"), G_CALLBACK (refresh_devices_list_cb), _("Click here to refresh the device list"), 1, prefs_window);
+ gm_pw_add_update_button (container, _("_Detect devices"), G_CALLBACK (refresh_devices_list_cb), _("Click here to refresh the device list"), 1, prefs_window);
}
@@ -910,7 +905,7 @@ gm_pw_init_video_devices_page (GtkWidget *prefs_window,
gnome_prefs_int_option_menu_new (subsection, _("Format:"), video_format, VIDEO_DEVICES_KEY "format", _("Select the format for video cameras (does not apply to most USB cameras)"), 2);
/* That button will refresh the device list */
- gm_pw_add_update_button (container, GTK_STOCK_REFRESH, _("_Detect devices"), G_CALLBACK (refresh_devices_list_cb), _("Click here to refresh the device list"), 1, prefs_window);
+ gm_pw_add_update_button (container, _("_Detect devices"), G_CALLBACK (refresh_devices_list_cb), _("Click here to refresh the device list"), 1, prefs_window);
for (i=0; i< NB_VIDEO_SIZES; i++)
g_free (video_size[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]