[Xfce4-commits] <midori:master> Revert "Don't load icons for throbber unless rendering"
Christian Dywan
noreply at xfce.org
Sat Dec 15 21:10:01 CET 2012
Updating branch refs/heads/master
to ff6ebc430b9208940682acf6850743e10faa484c (commit)
from 072da11e13c1a690020dddb80cb2c464b6247f64 (commit)
commit ff6ebc430b9208940682acf6850743e10faa484c
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Dec 9 14:05:03 2012 +0100
Revert "Don't load icons for throbber unless rendering"
This reverts commit 94b733b5dedcb64f759e7d449f06a518a534aac0.
katze/katze-throbber.c | 42 ++++++++++++------------------------------
1 files changed, 12 insertions(+), 30 deletions(-)
diff --git a/katze/katze-throbber.c b/katze/katze-throbber.c
index 92646ed..0f9f616 100644
--- a/katze/katze-throbber.c
+++ b/katze/katze-throbber.c
@@ -424,13 +424,10 @@ katze_throbber_set_icon_name (KatzeThrobber* throbber,
{
g_return_if_fail (KATZE_IS_THROBBER (throbber));
- if (!g_strcmp0 (throbber->icon_name, icon_name))
- return;
-
katze_assign (throbber->icon_name, g_strdup (icon_name));
if (icon_name)
- katze_object_assign (throbber->pixbuf, NULL);
+ icon_theme_changed (throbber);
g_object_notify (G_OBJECT (throbber), "icon-name");
}
@@ -524,8 +521,10 @@ katze_throbber_set_static_icon_name (KatzeThrobber* throbber,
if (icon_name)
{
katze_assign (throbber->static_stock_id, NULL);
- katze_object_assign (throbber->static_pixbuf, NULL);
+ icon_theme_changed (throbber);
+
+ g_object_notify (G_OBJECT (throbber), "static-pixbuf");
g_object_notify (G_OBJECT (throbber), "static-stock-id");
}
@@ -595,10 +594,13 @@ katze_throbber_set_static_stock_id (KatzeThrobber* throbber,
g_return_if_fail (gtk_stock_lookup (stock_id, &stock_item));
g_object_notify (G_OBJECT (throbber), "static-icon-name");
+ g_object_notify (G_OBJECT (throbber), "static-pixbuf");
}
katze_assign (throbber->static_stock_id, g_strdup (stock_id));
- katze_object_assign (throbber->static_pixbuf, NULL);
+
+ if (stock_id)
+ icon_theme_changed (throbber);
g_object_notify (G_OBJECT (throbber), "static-stock-id");
g_object_thaw_notify (G_OBJECT (throbber));
@@ -726,6 +728,8 @@ static void
katze_throbber_realize (GtkWidget* widget)
{
(*GTK_WIDGET_CLASS (katze_throbber_parent_class)->realize) (widget);
+
+ icon_theme_changed (KATZE_THROBBER (widget));
}
static void
@@ -815,45 +819,23 @@ static void
katze_throbber_style_set (GtkWidget* widget,
GtkStyle* prev_style)
{
- KatzeThrobber* throbber = KATZE_THROBBER (widget);
-
if (GTK_WIDGET_CLASS (katze_throbber_parent_class)->style_set)
GTK_WIDGET_CLASS (katze_throbber_parent_class)->style_set (widget,
prev_style);
- if (throbber->pixbuf)
- {
- katze_object_assign (throbber->pixbuf, NULL);
- g_object_notify (G_OBJECT (throbber), "pixbuf");
- }
- if (throbber->static_pixbuf)
- {
- katze_object_assign (throbber->static_pixbuf, NULL);
- g_object_notify (G_OBJECT (throbber), "static-pixbuf");
- }
+ icon_theme_changed (KATZE_THROBBER (widget));
}
static void
katze_throbber_screen_changed (GtkWidget* widget,
GdkScreen* prev_screen)
{
- KatzeThrobber* throbber = KATZE_THROBBER (widget);
-
if (GTK_WIDGET_CLASS (katze_throbber_parent_class)->screen_changed)
GTK_WIDGET_CLASS (katze_throbber_parent_class)->screen_changed (
widget,
prev_screen);
- if (throbber->pixbuf)
- {
- katze_object_assign (throbber->pixbuf, NULL);
- g_object_notify (G_OBJECT (throbber), "pixbuf");
- }
- if (throbber->static_pixbuf)
- {
- katze_object_assign (throbber->static_pixbuf, NULL);
- g_object_notify (G_OBJECT (throbber), "static-pixbuf");
- }
+ icon_theme_changed (KATZE_THROBBER (widget));
}
static void
More information about the Xfce4-commits
mailing list