forked from AuroraMiddleware/gtk
Make transparent tray icons work. (#320034, based on a patch by Dan
2006-06-19 Matthias Clasen <mclasen@redhat.com> Make transparent tray icons work. (#320034, based on a patch by Dan Winship) * gtk/gtktrayicon-x11.c (gtk_tray_icon_init): Make trayicons app-paintable and non-double buffered. * gtk/gtkrc.c (_gtk_rc_init): Give tray icons a parent-relative background in the default style.
This commit is contained in:
parent
e13ccaa957
commit
219aa66d5d
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2006-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Make transparent tray icons work. (#320034, based on a
|
||||||
|
patch by Dan Winship)
|
||||||
|
|
||||||
|
* gtk/gtktrayicon-x11.c (gtk_tray_icon_init): Make trayicons
|
||||||
|
app-paintable and non-double buffered.
|
||||||
|
|
||||||
|
* gtk/gtkrc.c (_gtk_rc_init): Give tray icons a parent-relative
|
||||||
|
background in the default style.
|
||||||
|
|
||||||
2006-06-19 Matthias Clasen <mclasen@redhat.com>
|
2006-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/updateiconcache.c: Marks strings for translation. (#314278,
|
* gtk/updateiconcache.c: Marks strings for translation. (#314278,
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2006-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Make transparent tray icons work. (#320034, based on a
|
||||||
|
patch by Dan Winship)
|
||||||
|
|
||||||
|
* gtk/gtktrayicon-x11.c (gtk_tray_icon_init): Make trayicons
|
||||||
|
app-paintable and non-double buffered.
|
||||||
|
|
||||||
|
* gtk/gtkrc.c (_gtk_rc_init): Give tray icons a parent-relative
|
||||||
|
background in the default style.
|
||||||
|
|
||||||
2006-06-19 Matthias Clasen <mclasen@redhat.com>
|
2006-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/updateiconcache.c: Marks strings for translation. (#314278,
|
* gtk/updateiconcache.c: Marks strings for translation. (#314278,
|
||||||
|
@ -810,7 +810,12 @@ _gtk_rc_init (void)
|
|||||||
" text[PRELIGHT] = \"#ffffff\"\n"
|
" text[PRELIGHT] = \"#ffffff\"\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
"style \"gtk-default-tray-icon-style\" {\n"
|
||||||
|
" bg_pixmap[NORMAL] = \"<parent>\"\n"
|
||||||
|
"}\n"
|
||||||
|
"\n"
|
||||||
"class \"GtkProgressBar\" style : gtk \"gtk-default-progress-bar-style\"\n"
|
"class \"GtkProgressBar\" style : gtk \"gtk-default-progress-bar-style\"\n"
|
||||||
|
"class \"GtkTrayIcon\" style : gtk \"gtk-default-tray-icon-style\"\n"
|
||||||
"widget \"gtk-tooltips*\" style : gtk \"gtk-default-tooltips-style\"\n"
|
"widget \"gtk-tooltips*\" style : gtk \"gtk-default-tooltips-style\"\n"
|
||||||
"widget_class \"*<GtkMenuItem>*\" style : gtk \"gtk-default-menu-item-style\"\n"
|
"widget_class \"*<GtkMenuItem>*\" style : gtk \"gtk-default-menu-item-style\"\n"
|
||||||
"widget_class \"*<GtkMenuBar>*<GtkMenuItem>\" style : gtk \"gtk-default-menu-bar-item-style\"\n"
|
"widget_class \"*<GtkMenuBar>*<GtkMenuItem>\" style : gtk \"gtk-default-menu-bar-item-style\"\n"
|
||||||
|
@ -69,6 +69,8 @@ static void gtk_tray_icon_realize (GtkWidget *widget);
|
|||||||
static void gtk_tray_icon_unrealize (GtkWidget *widget);
|
static void gtk_tray_icon_unrealize (GtkWidget *widget);
|
||||||
static gboolean gtk_tray_icon_delete (GtkWidget *widget,
|
static gboolean gtk_tray_icon_delete (GtkWidget *widget,
|
||||||
GdkEventAny *event);
|
GdkEventAny *event);
|
||||||
|
static gboolean gtk_tray_icon_expose (GtkWidget *widget,
|
||||||
|
GdkEventExpose *event);
|
||||||
|
|
||||||
static void gtk_tray_icon_update_manager_window (GtkTrayIcon *icon,
|
static void gtk_tray_icon_update_manager_window (GtkTrayIcon *icon,
|
||||||
gboolean dock_if_realized);
|
gboolean dock_if_realized);
|
||||||
@ -87,6 +89,7 @@ gtk_tray_icon_class_init (GtkTrayIconClass *class)
|
|||||||
widget_class->realize = gtk_tray_icon_realize;
|
widget_class->realize = gtk_tray_icon_realize;
|
||||||
widget_class->unrealize = gtk_tray_icon_unrealize;
|
widget_class->unrealize = gtk_tray_icon_unrealize;
|
||||||
widget_class->delete_event = gtk_tray_icon_delete;
|
widget_class->delete_event = gtk_tray_icon_delete;
|
||||||
|
widget_class->expose_event = gtk_tray_icon_expose;
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_ORIENTATION,
|
PROP_ORIENTATION,
|
||||||
@ -108,7 +111,9 @@ gtk_tray_icon_init (GtkTrayIcon *icon)
|
|||||||
|
|
||||||
icon->priv->stamp = 1;
|
icon->priv->stamp = 1;
|
||||||
icon->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
icon->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||||
|
|
||||||
|
gtk_widget_set_app_paintable (GTK_WIDGET (icon), TRUE);
|
||||||
|
gtk_widget_set_double_buffered (GTK_WIDGET (icon), FALSE);
|
||||||
gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
|
gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,6 +136,19 @@ gtk_tray_icon_get_property (GObject *object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gtk_tray_icon_expose (GtkWidget *widget,
|
||||||
|
GdkEventExpose *event)
|
||||||
|
{
|
||||||
|
gdk_window_clear_area (widget->window, event->area.x, event->area.y,
|
||||||
|
event->area.width, event->area.height);
|
||||||
|
|
||||||
|
if (GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->expose_event)
|
||||||
|
return GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->expose_event (widget, event);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_tray_icon_get_orientation_property (GtkTrayIcon *icon)
|
gtk_tray_icon_get_orientation_property (GtkTrayIcon *icon)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user