annotate gtk/gtkdocklet-x11.c @ 15355:db11d9e416ac

[gaim-migrate @ 18147] when auto-growing a conversation entry to fit text without scrollbars, reset to the default size once the message is sent committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 17 Jan 2007 09:47:55 +0000
parents 7ac8259f355d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /*
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * System tray icon (aka docklet) plugin for Gaim
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 * Copyright (C) 2002-3 Robert McQueen <robot101@debian.org>
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com>
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 * Inspired by a similar plugin by:
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * John (J5) Palmieri <johnp@martianrock.com>
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 *
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * modify it under the terms of the GNU General Public License as
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * published by the Free Software Foundation; either version 2 of the
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * License, or (at your option) any later version.
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 *
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * General Public License for more details.
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 *
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 * 02111-1307, USA.
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 */
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 #include "internal.h"
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 #include "gtkgaim.h"
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 #include "debug.h"
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 #include "gaimstock.h"
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 #include "gtkdialogs.h"
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 #include "eggtrayicon.h"
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 #include "gtkdocklet.h"
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 #define EMBED_TIMEOUT 5000
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 /* globals */
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 static EggTrayIcon *docklet = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 static GtkWidget *image = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 static GtkTooltips *tooltips = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 static GdkPixbuf *blank_icon = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 static int embed_timeout = 0;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 /* protos */
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 static void docklet_x11_create(void);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 static gboolean
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 docklet_x11_create_cb()
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50 docklet_x11_create();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 return FALSE; /* for when we're called by the glib idle handler */
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 docklet_x11_embedded_cb(GtkWidget *widget, void *data)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 {
14751
510da3975938 [gaim-migrate @ 17508]
Sean Egan <seanegan@gmail.com>
parents: 14681
diff changeset
58 gaim_debug(GAIM_DEBUG_INFO, "docklet", "embedded\n");
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 g_source_remove(embed_timeout);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 embed_timeout = 0;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 gaim_gtk_docklet_embedded();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 docklet_x11_destroyed_cb(GtkWidget *widget, void *data)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 {
14751
510da3975938 [gaim-migrate @ 17508]
Sean Egan <seanegan@gmail.com>
parents: 14681
diff changeset
68 gaim_debug(GAIM_DEBUG_INFO, "docklet", "destroyed\n");
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 gaim_gtk_docklet_remove();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 g_object_unref(G_OBJECT(docklet));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 docklet = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 g_idle_add(docklet_x11_create_cb, NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 docklet_x11_clicked_cb(GtkWidget *button, GdkEventButton *event, void *data)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 {
15048
7ac8259f355d [gaim-migrate @ 17831]
Sean Egan <seanegan@gmail.com>
parents: 14966
diff changeset
81 if (event->type != GDK_BUTTON_RELEASE)
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 return;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 gaim_gtk_docklet_clicked(event->button);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 docklet_x11_update_icon(DockletStatus icon)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 const gchar *icon_name = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 g_return_if_fail(image != NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 switch (icon) {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 case DOCKLET_STATUS_OFFLINE:
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 icon_name = GAIM_STOCK_ICON_OFFLINE;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 break;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98 case DOCKLET_STATUS_CONNECTING:
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 icon_name = GAIM_STOCK_ICON_CONNECT;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100 break;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101 case DOCKLET_STATUS_ONLINE:
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 icon_name = GAIM_STOCK_ICON_ONLINE;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103 break;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104 case DOCKLET_STATUS_ONLINE_PENDING:
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 icon_name = GAIM_STOCK_ICON_ONLINE_MSG;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106 break;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 case DOCKLET_STATUS_AWAY:
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 icon_name = GAIM_STOCK_ICON_AWAY;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 break;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
110 case DOCKLET_STATUS_AWAY_PENDING:
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 icon_name = GAIM_STOCK_ICON_AWAY_MSG;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 break;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 if(icon_name)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 gtk_image_set_from_stock(GTK_IMAGE(image), icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 #if 0
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 GdkPixbuf *p;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 GdkBitmap *mask = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122 p = gtk_widget_render_icon(GTK_WIDGET(image), icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 if (p && (gdk_pixbuf_get_colorspace(p) == GDK_COLORSPACE_RGB) && (gdk_pixbuf_get_bits_per_sample(p) == 8)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 && (gdk_pixbuf_get_has_alpha(p)) && (gdk_pixbuf_get_n_channels(p) == 4)) {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126 int len = gdk_pixbuf_get_width(p) * gdk_pixbuf_get_height(p);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127 guchar *data = gdk_pixbuf_get_pixels(p);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 guchar *bitmap = g_malloc((len / 8) + 1);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 int i;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
130
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 for (i = 0; i < len; i++)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 if (data[i*4 + 3] > 55)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133 bitmap[i/8] |= 1 << i % 8;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 else
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 bitmap[i/8] &= ~(1 << i % 8);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 mask = gdk_bitmap_create_from_data(GDK_DRAWABLE(GTK_WIDGET(image)->window), bitmap, gdk_pixbuf_get_width(p), gdk_pixbuf_get_height(p));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 g_free(bitmap);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141 if (mask)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 gdk_window_shape_combine_mask(image->window, mask, 0, 0);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 g_object_unref(G_OBJECT(p));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145 #endif
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149 docklet_x11_blank_icon()
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 if (!blank_icon) {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 gint width, height;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
153
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154 gtk_icon_size_lookup(GTK_ICON_SIZE_LARGE_TOOLBAR, &width, &height);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 blank_icon = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
156 gdk_pixbuf_fill(blank_icon, 0);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159 gtk_image_set_from_pixbuf(GTK_IMAGE(image), blank_icon);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
161
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
162 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 docklet_x11_set_tooltip(gchar *tooltip)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
164 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
165 if (!tooltips)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
166 tooltips = gtk_tooltips_new();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
167
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
168 /* image->parent is a GtkEventBox */
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
169 if (tooltip) {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170 gtk_tooltips_enable(tooltips);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
171 gtk_tooltips_set_tip(tooltips, image->parent, tooltip, NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
172 } else {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
173 gtk_tooltips_set_tip(tooltips, image->parent, "", NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
174 gtk_tooltips_disable(tooltips);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
175 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
176 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
177
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
178 #if GTK_CHECK_VERSION(2,2,0)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
179 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
180 docklet_x11_position_menu(GtkMenu *menu, int *x, int *y, gboolean *push_in,
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
181 gpointer user_data)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
182 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
183 GtkWidget *widget = GTK_WIDGET(docklet);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
184 GtkRequisition req;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
185 gint menu_xpos, menu_ypos;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
186
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
187 gtk_widget_size_request(GTK_WIDGET(menu), &req);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
188 gdk_window_get_origin(widget->window, &menu_xpos, &menu_ypos);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
189
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
190 menu_xpos += widget->allocation.x;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
191 menu_ypos += widget->allocation.y;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
192
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
193 if (menu_ypos > gdk_screen_get_height(gtk_widget_get_screen(widget)) / 2)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
194 menu_ypos -= req.height;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
195 else
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
196 menu_ypos += widget->allocation.height;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
197
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
198 *x = menu_xpos;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
199 *y = menu_ypos;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
200
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
201 *push_in = TRUE;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
202 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
203 #endif
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
204
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
205 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
206 docklet_x11_destroy()
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
207 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
208 g_return_if_fail(docklet != NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
209
14873
3a23706f9f4b [gaim-migrate @ 17642]
Sean Egan <seanegan@gmail.com>
parents: 14751
diff changeset
210 if (embed_timeout)
3a23706f9f4b [gaim-migrate @ 17642]
Sean Egan <seanegan@gmail.com>
parents: 14751
diff changeset
211 g_source_remove(embed_timeout);
3a23706f9f4b [gaim-migrate @ 17642]
Sean Egan <seanegan@gmail.com>
parents: 14751
diff changeset
212
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
213 gaim_gtk_docklet_remove();
14873
3a23706f9f4b [gaim-migrate @ 17642]
Sean Egan <seanegan@gmail.com>
parents: 14751
diff changeset
214
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
215 g_signal_handlers_disconnect_by_func(G_OBJECT(docklet), G_CALLBACK(docklet_x11_destroyed_cb), NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
216 gtk_widget_destroy(GTK_WIDGET(docklet));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
217
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
218 g_object_unref(G_OBJECT(docklet));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
219 docklet = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
220
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
221 if (blank_icon)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
222 g_object_unref(G_OBJECT(blank_icon));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
223 blank_icon = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
224
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
225 image = NULL;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
226
14751
510da3975938 [gaim-migrate @ 17508]
Sean Egan <seanegan@gmail.com>
parents: 14681
diff changeset
227 gaim_debug(GAIM_DEBUG_INFO, "docklet", "destroyed\n");
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
228 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
229
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
230 static gboolean
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
231 docklet_x11_embed_timeout_cb()
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
232 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
233 /* The docklet was not embedded within the timeout.
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
234 * Remove it as a visibility manager, but leave the plugin
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
235 * loaded so that it can embed automatically if/when a notification
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
236 * area becomes available.
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
237 */
14751
510da3975938 [gaim-migrate @ 17508]
Sean Egan <seanegan@gmail.com>
parents: 14681
diff changeset
238 gaim_debug_info("docklet", "failed to embed within timeout\n");
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
239 gaim_gtk_docklet_remove();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
240
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
241 return FALSE;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
242 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
243
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
244 static void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
245 docklet_x11_create()
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
246 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
247 GtkWidget *box;
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
248
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
249 if (docklet) {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
250 /* if this is being called when a tray icon exists, it's because
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
251 something messed up. try destroying it before we proceed,
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
252 although docklet_refcount may be all hosed. hopefully won't happen. */
14751
510da3975938 [gaim-migrate @ 17508]
Sean Egan <seanegan@gmail.com>
parents: 14681
diff changeset
253 gaim_debug(GAIM_DEBUG_WARNING, "docklet", "trying to create icon but it already exists?\n");
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
254 docklet_x11_destroy();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
255 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
256
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
257 docklet = egg_tray_icon_new("Gaim");
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
258 box = gtk_event_box_new();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
259 image = gtk_image_new();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
260
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
261 g_signal_connect(G_OBJECT(docklet), "embedded", G_CALLBACK(docklet_x11_embedded_cb), NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
262 g_signal_connect(G_OBJECT(docklet), "destroy", G_CALLBACK(docklet_x11_destroyed_cb), NULL);
15048
7ac8259f355d [gaim-migrate @ 17831]
Sean Egan <seanegan@gmail.com>
parents: 14966
diff changeset
263 g_signal_connect(G_OBJECT(box), "button-release-event", G_CALLBACK(docklet_x11_clicked_cb), NULL);
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
264
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
265 gtk_container_add(GTK_CONTAINER(box), image);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
266 gtk_container_add(GTK_CONTAINER(docklet), box);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
267
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
268 if (!gtk_check_version(2,4,0))
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
269 g_object_set(G_OBJECT(box), "visible-window", FALSE, NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
270
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
271 gtk_widget_show_all(GTK_WIDGET(docklet));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
272
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
273 /* ref the docklet before we bandy it about the place */
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
274 g_object_ref(G_OBJECT(docklet));
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
275
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
276 /* This is a hack to avoid a race condition between the docklet getting
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
277 * embedded in the notification area and the gtkblist restoring its
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
278 * previous visibility state. If the docklet does not get embedded within
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
279 * the timeout, it will be removed as a visibility manager until it does
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
280 * get embedded. Ideally, we would only call docklet_embedded() when the
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
281 * icon was actually embedded.
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
282 */
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
283 gaim_gtk_docklet_embedded();
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
284 embed_timeout = g_timeout_add(EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
285
14751
510da3975938 [gaim-migrate @ 17508]
Sean Egan <seanegan@gmail.com>
parents: 14681
diff changeset
286 gaim_debug(GAIM_DEBUG_INFO, "docklet", "created\n");
14681
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
287 }
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
288
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
289 static struct docklet_ui_ops ui_ops =
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
290 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
291 docklet_x11_create,
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
292 docklet_x11_destroy,
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
293 docklet_x11_update_icon,
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
294 docklet_x11_blank_icon,
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
295 docklet_x11_set_tooltip,
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
296 #if GTK_CHECK_VERSION(2,2,0)
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
297 docklet_x11_position_menu
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
298 #else
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
299 NULL
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
300 #endif
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
301 };
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
302
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
303 void
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
304 docklet_ui_init()
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
305 {
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
306 gaim_gtk_docklet_set_ui_ops(&ui_ops);
2c1781ea074c [gaim-migrate @ 17433]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
307 }