Commit bc804fad authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Handle background changes. This doesn't change the color of the buttons

2001-12-14  Alex Larsson  <alexl@redhat.com>

	* gen_util/tasklist.c (applet_change_background):
	Handle background changes. This doesn't change the color of the
	buttons right now, since we would need the whole style for that.
	But it does handle the part of the tasklist that is empty when
	all the buttons fit on the tasklist.
parent 8e1f19b9
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/tasklist.c (applet_change_background):
Handle background changes. This doesn't change the color of the
buttons right now, since we would need the whole style for that.
But it does handle the part of the tasklist that is empty when
all the buttons fit on the tasklist.
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/clock.c:
......
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/tasklist.c (applet_change_background):
Handle background changes. This doesn't change the color of the
buttons right now, since we would need the whole style for that.
But it does handle the part of the tasklist that is empty when
all the buttons fit on the tasklist.
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/clock.c:
......
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/tasklist.c (applet_change_background):
Handle background changes. This doesn't change the color of the
buttons right now, since we would need the whole style for that.
But it does handle the part of the tasklist that is empty when
all the buttons fit on the tasklist.
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/clock.c:
......
......@@ -81,6 +81,27 @@ applet_change_orient (PanelApplet *applet,
tasklist_update (tasklist);
}
static void
applet_change_background (PanelApplet *applet,
PanelAppletBackgroundType type,
GdkColor *color,
const gchar *pixmap,
TasklistData *tasklist)
{
if (type == PANEL_NO_BACKGROUND) {
GtkRcStyle *rc_style = gtk_rc_style_new ();
gtk_widget_modify_style (tasklist->applet, rc_style);
}
else if (type == PANEL_COLOR_BACKGROUND) {
gtk_widget_modify_bg (tasklist->applet,
GTK_STATE_NORMAL,
color);
} else { /* pixmap */
/* FIXME: Handle this when the panel support works again */
}
}
static void
applet_change_pixel_size (PanelApplet *applet,
......@@ -159,6 +180,10 @@ make_tasklist_applet(void)
"change_size",
G_CALLBACK (applet_change_pixel_size),
tasklist);
g_signal_connect (G_OBJECT (tasklist->applet),
"change_background",
G_CALLBACK (applet_change_background),
tasklist);
panel_applet_setup_menu (PANEL_APPLET (tasklist->applet), tasklist_menu_xml, tasklist_menu_verbs, tasklist);
......
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/tasklist.c (applet_change_background):
Handle background changes. This doesn't change the color of the
buttons right now, since we would need the whole style for that.
But it does handle the part of the tasklist that is empty when
all the buttons fit on the tasklist.
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/clock.c:
......
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/tasklist.c (applet_change_background):
Handle background changes. This doesn't change the color of the
buttons right now, since we would need the whole style for that.
But it does handle the part of the tasklist that is empty when
all the buttons fit on the tasklist.
2001-12-14 Alex Larsson <alexl@redhat.com>
* gen_util/clock.c:
......
......@@ -81,6 +81,27 @@ applet_change_orient (PanelApplet *applet,
tasklist_update (tasklist);
}
static void
applet_change_background (PanelApplet *applet,
PanelAppletBackgroundType type,
GdkColor *color,
const gchar *pixmap,
TasklistData *tasklist)
{
if (type == PANEL_NO_BACKGROUND) {
GtkRcStyle *rc_style = gtk_rc_style_new ();
gtk_widget_modify_style (tasklist->applet, rc_style);
}
else if (type == PANEL_COLOR_BACKGROUND) {
gtk_widget_modify_bg (tasklist->applet,
GTK_STATE_NORMAL,
color);
} else { /* pixmap */
/* FIXME: Handle this when the panel support works again */
}
}
static void
applet_change_pixel_size (PanelApplet *applet,
......@@ -159,6 +180,10 @@ make_tasklist_applet(void)
"change_size",
G_CALLBACK (applet_change_pixel_size),
tasklist);
g_signal_connect (G_OBJECT (tasklist->applet),
"change_background",
G_CALLBACK (applet_change_background),
tasklist);
panel_applet_setup_menu (PANEL_APPLET (tasklist->applet), tasklist_menu_xml, tasklist_menu_verbs, tasklist);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment