gnome-applets r11170 - in trunk/cpufreq: . src
- From: carlosgc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-applets r11170 - in trunk/cpufreq: . src
- Date: Wed, 31 Dec 2008 09:42:11 +0000 (UTC)
Author: carlosgc
Date: Wed Dec 31 09:42:11 2008
New Revision: 11170
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11170&view=rev
Log:
2008-12-31 Carlos Garcia Campos <carlosgc gnome org>
* src/cpufreq-applet.c: (cpufreq_applet_init): Remove
change_background callback since it's already implemented by
libpanel-applet.
Modified:
trunk/cpufreq/ChangeLog
trunk/cpufreq/src/cpufreq-applet.c
Modified: trunk/cpufreq/src/cpufreq-applet.c
==============================================================================
--- trunk/cpufreq/src/cpufreq-applet.c (original)
+++ trunk/cpufreq/src/cpufreq-applet.c Wed Dec 31 09:42:11 2008
@@ -109,11 +109,6 @@
GtkRequisition *requisition);
static void cpufreq_applet_change_orient (PanelApplet *pa,
PanelAppletOrient orient);
-static void cpufreq_applet_change_background (PanelApplet *pa,
- PanelAppletBackgroundType type,
- GdkColor *color,
- GdkPixmap *pixmap);
-
static gboolean cpufreq_applet_factory (CPUFreqApplet *applet,
const gchar *iid,
gpointer gdata);
@@ -196,6 +191,7 @@
applet->need_refresh = TRUE;
panel_applet_set_flags (PANEL_APPLET (applet), PANEL_APPLET_EXPAND_MINOR);
+ panel_applet_set_background_widget (PANEL_APPLET (applet), GTK_WIDGET (applet));
applet->size = panel_applet_get_size (PANEL_APPLET (applet));
applet->orient = panel_applet_get_orient (PANEL_APPLET (applet));
@@ -230,7 +226,6 @@
widget_class->key_press_event = cpufreq_applet_key_press;
applet_class->change_orient = cpufreq_applet_change_orient;
- applet_class->change_background = cpufreq_applet_change_background;
}
static void
@@ -560,45 +555,6 @@
}
static void
-cpufreq_applet_change_background (PanelApplet *pa,
- PanelAppletBackgroundType type,
- GdkColor *color, GdkPixmap *pixmap)
-{
- CPUFreqApplet *applet;
- /* Taken from TrashApplet */
- GtkRcStyle *rc_style;
- GtkStyle *style;
-
- applet = CPUFREQ_APPLET (pa);
-
- /* reset style */
- gtk_widget_set_style (GTK_WIDGET (applet), NULL);
- rc_style = gtk_rc_style_new ();
- gtk_widget_modify_style (GTK_WIDGET (applet), rc_style);
- gtk_rc_style_unref (rc_style);
-
- switch (type) {
- case PANEL_PIXMAP_BACKGROUND:
- style = gtk_style_copy (GTK_WIDGET (applet)->style);
- if (style->bg_pixmap[GTK_STATE_NORMAL])
- g_object_unref (
- style->bg_pixmap[GTK_STATE_NORMAL]);
- style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref (
- pixmap);
- gtk_widget_set_style (GTK_WIDGET (applet), style);
- g_object_unref (style);
- break;
- case PANEL_COLOR_BACKGROUND:
- gtk_widget_modify_bg (GTK_WIDGET (applet),
- GTK_STATE_NORMAL, color);
- break;
- case PANEL_NO_BACKGROUND:
- default:
- break;
- }
-}
-
-static void
cpufreq_applet_preferences_cb (BonoboUIComponent *uic,
CPUFreqApplet *applet,
const gchar *cname)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]