annotate src/applet.c @ 3388:83314a9985ef

[gaim-migrate @ 3407] Here it is. Added gettext 0.11.x support! It should work fine, but please let me know if anything is broken in 0.10.x or 0.11.x (in my tests, it all worked fine) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 08 Aug 2002 18:11:17 +0000
parents 56df4d1dcad5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 /**************************************************************
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 ** GaimGnomeAppletMgr
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 ** Author - Quinticent (John Palmieri: johnp@martianrock.com)
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 ** Purpose - Takes over the task of managing the GNOME applet
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 ** code and provides a centralized codebase for
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 ** GNOME integration for Gaim.
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 ** gaim
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 ** Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 ** This program is free software; you can redistribute it and/or modify
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 ** it under the terms of the GNU General Public License as published by
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 ** the Free Software Foundation; either version 2 of the License, or
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 ** (at your option) any later version.
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 ** This program is distributed in the hope that it will be useful,
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 ** GNU General Public License for more details.
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 ** You should have received a copy of the GNU General Public License
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 ** along with this program; if not, write to the Free Software
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 */
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 #ifdef HAVE_CONFIG_H
2090
b66aca8e8dce [gaim-migrate @ 2100]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1815
diff changeset
31 #include <config.h>
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 #endif
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 #ifdef USE_APPLET
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 #include <string.h>
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
35 #include <gdk-pixbuf/gdk-pixbuf.h>
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
36 #include <libart_lgpl/art_affine.h>
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
37 #include <libart_lgpl/art_rgb_affine.h>
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
38 #include <libart_lgpl/art_rgb_rgba_affine.h>
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 #include "gaim.h"
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 #include "applet.h"
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
41 #include "pixmaps/aimicon.xpm"
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43 static int connecting = 0;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 gboolean applet_buddy_show = FALSE;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47 GtkWidget *applet;
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
48 static GtkWidget *icon;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
50 static GtkAllocation *get_applet_pos(gboolean);
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
51 static gint sizehint = 48;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52
2629
b74421e92d55 [gaim-migrate @ 2642]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2567
diff changeset
53 static PanelBackType backtype = PANEL_BACK_NONE;
b74421e92d55 [gaim-migrate @ 2642]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2567
diff changeset
54 static GdkColor *backcolor = NULL;
b74421e92d55 [gaim-migrate @ 2642]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2567
diff changeset
55 static char *backfile = NULL;
b74421e92d55 [gaim-migrate @ 2642]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2567
diff changeset
56
b74421e92d55 [gaim-migrate @ 2642]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2567
diff changeset
57
b74421e92d55 [gaim-migrate @ 2642]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2567
diff changeset
58
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
59 static GdkPixmap *get_applet_icon(const char *name)
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60 {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
61 GdkPixmap *cache;
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
62 GdkGC *gc;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63 char *path;
2843
87d11d2a7d59 [gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2731
diff changeset
64 GdkPixbuf *pb, *scale = NULL;
2629
b74421e92d55 [gaim-migrate @ 2642]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2567
diff changeset
65 guchar *dst;
3187
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
66 int w, h, rowstride;
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
67 double affine[6];
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
68
2567
f0e8cf09d8a3 [gaim-migrate @ 2580]
Rob Flynn <gaim@robflynn.com>
parents: 2549
diff changeset
69 if (!applet)
f0e8cf09d8a3 [gaim-migrate @ 2580]
Rob Flynn <gaim@robflynn.com>
parents: 2549
diff changeset
70 return NULL;
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
71 cache = gdk_pixmap_new(applet->window, sizehint, sizehint,
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
72 gtk_widget_get_visual(applet)->depth);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
73 gc = gdk_gc_new(cache);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
74 gdk_gc_copy(gc, applet->style->bg_gc[GTK_WIDGET_STATE(applet)]);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
75 path = gnome_pixmap_file(name);
3256
a7c241854218 [gaim-migrate @ 3274]
Sean Egan <seanegan@gmail.com>
parents: 3187
diff changeset
76 if (path) {
2843
87d11d2a7d59 [gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2731
diff changeset
77 scale = gdk_pixbuf_new_from_file(path);
3256
a7c241854218 [gaim-migrate @ 3274]
Sean Egan <seanegan@gmail.com>
parents: 3187
diff changeset
78 g_free(path);
a7c241854218 [gaim-migrate @ 3274]
Sean Egan <seanegan@gmail.com>
parents: 3187
diff changeset
79 }
2486
cf3218cd9f94 [gaim-migrate @ 2499]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2484
diff changeset
80 if (!scale)
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
81 return NULL;
2486
cf3218cd9f94 [gaim-migrate @ 2499]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2484
diff changeset
82 pb = gdk_pixbuf_scale_simple(scale, sizehint, sizehint, GDK_INTERP_HYPER);
2729
e70908d3e0c8 [gaim-migrate @ 2742]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2716
diff changeset
83 gdk_pixbuf_unref(scale);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
84
3256
a7c241854218 [gaim-migrate @ 3274]
Sean Egan <seanegan@gmail.com>
parents: 3187
diff changeset
85 applet_widget_get_rgb_bg(APPLET_WIDGET(applet), &dst, &w, &h, &rowstride);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
86
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
87 art_affine_identity(affine);
3187
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
88 art_rgb_rgba_affine(dst, 0, 0, w, h, rowstride,
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
89 gdk_pixbuf_get_pixels(pb), gdk_pixbuf_get_width(pb),
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
90 gdk_pixbuf_get_height(pb), gdk_pixbuf_get_rowstride(pb),
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
91 affine, ART_FILTER_NEAREST, NULL);
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
92 gdk_pixbuf_unref(pb);
3187
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
93 gdk_draw_rgb_image(cache, gc, 0, 0, w, h,
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
94 GDK_RGB_DITHER_NORMAL, dst, rowstride);
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
95 g_free(dst);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
96
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
97 gdk_gc_unref(gc);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
98 return cache;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
101 static gboolean update_applet()
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
102 {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
103 char buf[BUF_LONG];
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104 GSList *c = connections;
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
105 GdkPixmap *newpix;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
106
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107 if (connecting) {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
108 newpix = get_applet_icon(GAIM_GNOME_CONNECT_ICON);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
109 applet_set_tooltips(_("Attempting to sign on...."));
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
110 } else if (!connections) {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
111 newpix = get_applet_icon(GAIM_GNOME_OFFLINE_ICON);
1815
f15d449b3167 [gaim-migrate @ 1825]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1689
diff changeset
112 applet_set_tooltips(_("Offline. Click to bring up login box."));
2468
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
113 } else if (awaymessage) {
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
114 int dsr = 0;
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
115
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
116 if ((away_options & OPT_AWAY_QUEUE) && message_queue) {
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
117 GSList *m = message_queue;
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
118 while (m) {
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
119 struct queued_message *qm = m->data;
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
120 if (qm->flags & WFLAG_RECV)
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
121 dsr++;
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
122 m = m->next;
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
123 }
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
124 }
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
125
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
126 if (dsr) {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
127 newpix = get_applet_icon(GAIM_GNOME_MSG_PENDING_ICON);
2468
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
128 g_snprintf(buf, sizeof(buf), _("Away: %d pending."), dsr);
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
129 } else {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
130 newpix = get_applet_icon(GAIM_GNOME_AWAY_ICON);
2468
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
131 g_snprintf(buf, sizeof(buf), _("Away."));
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
132 }
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
133
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
134 applet_set_tooltips(buf);
16e8b83b10a2 [gaim-migrate @ 2481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2372
diff changeset
135 } else {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
136 newpix = get_applet_icon(GAIM_GNOME_ONLINE_ICON);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
137 g_snprintf(buf, sizeof buf, "Online: ");
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
138 while (c) {
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
139 strcat(buf, ((struct gaim_connection *)c->data)->username);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
140 c = g_slist_next(c);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
141 if (c)
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
142 strcat(buf, ", ");
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
143 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
144 applet_set_tooltips(buf);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
145 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
146
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
147 if (newpix) {
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
148 gtk_pixmap_set(GTK_PIXMAP(icon), newpix, NULL);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
149 gdk_pixmap_unref(newpix);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
150 }
3187
01279615a5fe [gaim-migrate @ 3204]
Sean Egan <seanegan@gmail.com>
parents: 3063
diff changeset
151
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
152 return TRUE;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
153 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
154
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
155 #ifdef HAVE_PANEL_PIXEL_SIZE
3286
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
156
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
157 static gint applet_update_pixel_size(gpointer data)
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
158 {
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
159 update_applet();
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
160 return FALSE;
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
161 }
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
162
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
163 static void applet_change_pixel_size(GtkWidget *w, int size, gpointer data)
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
164 {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
165 sizehint = size;
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
166 gtk_widget_set_usize(icon, sizehint, sizehint);
3286
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
167 /* we need to wait for the mainloop to finish updating the
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
168 background pixel size, otherwise we'll end up getting the
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
169 wrong background size when loading and drawing the new
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
170 icon */
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
171 gtk_timeout_add(100, applet_update_pixel_size,
51e55584b71e [gaim-migrate @ 3304]
Sean Egan <seanegan@gmail.com>
parents: 3256
diff changeset
172 NULL);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
173 }
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
174 #endif
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
175
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
176 extern GtkWidget *mainwindow;
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
177 void applet_show_login(AppletWidget *widget, gpointer data)
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
178 {
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
179 show_login();
2314
64b4c69c1c5e [gaim-migrate @ 2324]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
180 if (blist_options & OPT_BLIST_NEAR_APPLET) {
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
181 GtkAllocation *a = get_applet_pos(FALSE);
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
182 gtk_widget_set_uposition(mainwindow, a->x, a->y);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
183 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
184 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
185
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
186 void applet_do_signon(AppletWidget *widget, gpointer data)
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
187 {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
188 applet_show_login(NULL, 0);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
189 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
190
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
191 void insert_applet_away()
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
192 {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
193 GSList *awy = away_messages;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
194 struct away_message *a;
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
195 char *awayname;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
196
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
197 applet_widget_register_callback_dir(APPLET_WIDGET(applet), "away/", _("Away"));
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
198 applet_widget_register_callback(APPLET_WIDGET(applet),
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
199 "away/new",
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
200 _("New Away Message"),
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
201 (AppletCallbackFunc)create_away_mess, NULL);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
202
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
203 while (awy) {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
204 a = (struct away_message *)awy->data;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
205
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
206 awayname = g_malloc(sizeof *awayname * (6 + strlen(a->name)));
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
207 awayname[0] = '\0';
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
208 strcat(awayname, "away/");
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
209 strcat(awayname, a->name);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
210 applet_widget_register_callback(APPLET_WIDGET(applet),
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
211 awayname,
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
212 a->name, (AppletCallbackFunc)do_away_message, a);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
213
2731
e9e624d8803e [gaim-migrate @ 2744]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2729
diff changeset
214 awy = awy->next;
1421
13a34fb4abb0 [gaim-migrate @ 1431]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1420
diff changeset
215 g_free(awayname);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
216 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
217 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
218
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
219 void remove_applet_away()
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
220 {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
221 GSList *awy = away_messages;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
222 struct away_message *a;
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
223 char *awayname;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
224
1591
5c74d8b6cb57 [gaim-migrate @ 1601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1456
diff changeset
225 if (!applet)
5c74d8b6cb57 [gaim-migrate @ 1601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1456
diff changeset
226 return;
5c74d8b6cb57 [gaim-migrate @ 1601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1456
diff changeset
227
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
228 applet_widget_unregister_callback(APPLET_WIDGET(applet), "away/new");
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
229
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
230 while (awy) {
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
231 a = (struct away_message *)awy->data;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
232
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
233 awayname = g_malloc(sizeof *awayname * (6 + strlen(a->name)));
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
234 awayname[0] = '\0';
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
235 strcat(awayname, "away/");
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
236 strcat(awayname, a->name);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
237 applet_widget_unregister_callback(APPLET_WIDGET(applet), awayname);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
238
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
239 awy = g_slist_next(awy);
2492
1a25e4869e7d [gaim-migrate @ 2505]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2489
diff changeset
240 g_free(awayname);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
241 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
242 applet_widget_unregister_callback_dir(APPLET_WIDGET(applet), "away/");
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
243 applet_widget_unregister_callback(APPLET_WIDGET(applet), "away");
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
244 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
245
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
246 static GtkAllocation *get_applet_pos(gboolean for_blist)
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
247 {
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
248 gint x, y, pad;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
249 GtkRequisition buddy_req, applet_req;
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
250 GtkAllocation *result = g_new0(GtkAllocation, 1);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
251 GNOME_Panel_OrientType orient = applet_widget_get_panel_orient(APPLET_WIDGET(applet));
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
252 pad = 5;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
253
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
254 gdk_window_get_position(gtk_widget_get_parent_window(icon), &x, &y);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
255 if (for_blist) {
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
256 if (blist_options & OPT_BLIST_SAVED_WINDOWS) {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
257 buddy_req.width = blist_pos.width;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
258 buddy_req.height = blist_pos.height;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
259 } else {
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
260 buddy_req = blist->requisition;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
261 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
262 } else {
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
263 buddy_req = mainwindow->requisition;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
264 }
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
265 applet_req = icon->requisition;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
266
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
267 switch (orient) {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
268 case ORIENT_UP:
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
269 result->x = x;
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
270 result->y = y - (buddy_req.height + pad);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
271 break;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
272 case ORIENT_DOWN:
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
273 result->x = x;
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
274 result->y = y + applet_req.height + pad;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
275 break;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
276 case ORIENT_LEFT:
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
277 result->x = x - (buddy_req.width + pad);
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
278 result->y = y;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
279 break;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
280 case ORIENT_RIGHT:
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
281 result->x = x + applet_req.width + pad;
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
282 result->y = y;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
283 break;
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
284 }
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
285
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
286 if (result->x < 0)
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
287 result->x = 0;
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
288 if (result->y < 0)
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
289 result->y = 0;
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
290 if (result->x > gdk_screen_width() - buddy_req.width)
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
291 result->x = gdk_screen_width() - buddy_req.width;
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
292 if (result->y > gdk_screen_height() - buddy_req.height)
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
293 result->y = gdk_screen_height() - buddy_req.height;
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
294
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
295 return result;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
296 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
297
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
298 void createOnlinePopup()
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
299 {
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
300 GtkAllocation *al;
3063
22c84cbcd5a6 [gaim-migrate @ 3077]
Sean Egan <seanegan@gmail.com>
parents: 2985
diff changeset
301 if (!blist)
22c84cbcd5a6 [gaim-migrate @ 3077]
Sean Egan <seanegan@gmail.com>
parents: 2985
diff changeset
302 return;
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
303 al = get_applet_pos(TRUE);
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
304 if (blist_options & OPT_BLIST_NEAR_APPLET)
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
305 gtk_widget_set_uposition(blist, al->x, al->y);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
306 else if (blist_options & OPT_BLIST_SAVED_WINDOWS)
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
307 gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff,
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
308 blist_pos.y - blist_pos.yoff);
3063
22c84cbcd5a6 [gaim-migrate @ 3077]
Sean Egan <seanegan@gmail.com>
parents: 2985
diff changeset
309 gtk_widget_show(blist);
2549
7c64b3ad0c3d [gaim-migrate @ 2562]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2534
diff changeset
310 g_free(al);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
311 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
312
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
313 void AppletClicked(GtkWidget *sender, GdkEventButton *ev, gpointer data)
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
314 {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
315 if (!ev || ev->button != 1 || ev->type != GDK_BUTTON_PRESS)
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
316 return;
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
317
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
318 if (applet_buddy_show) {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
319 applet_buddy_show = FALSE;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
320 if (!connections && mainwindow)
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
321 gtk_widget_hide(mainwindow);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
322 else
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
323 gtk_widget_hide(blist);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
324 } else {
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
325 applet_buddy_show = TRUE;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
326 if (!connections)
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
327 applet_show_login(APPLET_WIDGET(applet), NULL);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
328 else
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
329 createOnlinePopup();
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
330 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
331 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
332
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
333
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
334 /***************************************************************
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
335 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
336 ** Initialize GNOME stuff
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
337 **
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
338 ****************************************************************/
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
339
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
340 gint init_applet_mgr(int argc, char *argv[])
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
341 {
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
342 GdkPixmap *pm;
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
343
2534
2bc6ee172103 [gaim-migrate @ 2547]
Rob Flynn <gaim@robflynn.com>
parents: 2497
diff changeset
344 applet_widget_init("Gaim", VERSION, argc, argv, NULL, 0, NULL);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
345
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
346 applet = applet_widget_new("gaim_applet");
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
347 if (!applet)
2534
2bc6ee172103 [gaim-migrate @ 2547]
Rob Flynn <gaim@robflynn.com>
parents: 2497
diff changeset
348 g_error(_("Can't create Gaim applet!"));
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
349 gtk_widget_set_events(applet, gtk_widget_get_events(applet) | GDK_BUTTON_PRESS_MASK);
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
350 gtk_widget_realize(applet);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
351
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
352 pm = get_applet_icon(GAIM_GNOME_OFFLINE_ICON);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
353 if (!pm)
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
354 pm = gdk_pixmap_create_from_xpm_d(applet->window, NULL,
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
355 &applet->style->bg[GTK_WIDGET_STATE(applet)], aimicon_xpm);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
356 icon = gtk_pixmap_new(pm, NULL);
2716
48274976c79b [gaim-migrate @ 2729]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2629
diff changeset
357 #ifdef HAVE_PANEL_PIXEL_SIZE
48274976c79b [gaim-migrate @ 2729]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2629
diff changeset
358 gtk_widget_set_usize(icon, 5, 5);
48274976c79b [gaim-migrate @ 2729]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2629
diff changeset
359 #else
48274976c79b [gaim-migrate @ 2729]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2629
diff changeset
360 gtk_widget_set_usize(icon, 48, 48);
48274976c79b [gaim-migrate @ 2729]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2629
diff changeset
361 #endif
2484
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
362 gdk_pixmap_unref(pm);
a4647b25dbf1 [gaim-migrate @ 2497]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2468
diff changeset
363 applet_widget_add(APPLET_WIDGET(applet), icon);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
364
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
365 applet_widget_register_stock_callback(APPLET_WIDGET(applet),
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
366 "about",
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
367 GNOME_STOCK_MENU_ABOUT,
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
368 _("About..."), (AppletCallbackFunc)show_about, NULL);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
369
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
370 gtk_signal_connect(GTK_OBJECT(applet), "button_press_event", GTK_SIGNAL_FUNC(AppletClicked),
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
371 NULL);
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
373 gtk_signal_connect(GTK_OBJECT(applet), "destroy", GTK_SIGNAL_FUNC(do_quit), NULL);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
374
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
375 #ifdef HAVE_PANEL_PIXEL_SIZE
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
376 gtk_signal_connect(GTK_OBJECT(applet), "change_pixel_size",
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
377 GTK_SIGNAL_FUNC(applet_change_pixel_size), NULL);
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
378 #endif
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
379
3296
56df4d1dcad5 [gaim-migrate @ 3314]
Sean Egan <seanegan@gmail.com>
parents: 3286
diff changeset
380 applet_widget_send_draw(APPLET_WIDGET(applet), TRUE);
3256
a7c241854218 [gaim-migrate @ 3274]
Sean Egan <seanegan@gmail.com>
parents: 3187
diff changeset
381 gtk_signal_connect(GTK_OBJECT(applet), "do-draw", GTK_SIGNAL_FUNC(update_applet), NULL);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
382 gtk_widget_show(icon);
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
383 gtk_widget_show(applet);
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
384 return 0;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
385 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
386
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
387 void set_user_state(enum gaim_user_states state)
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
388 {
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
389 if (state == signing_on)
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
390 connecting++;
2985
32c78c57b351 [gaim-migrate @ 2998]
Rob Flynn <gaim@robflynn.com>
parents: 2843
diff changeset
391 else if ((state == offline || state == away || state == online) && connecting > 0)
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
392 connecting--;
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
393 update_applet();
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
394 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
395
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
396 void applet_set_tooltips(char *msg)
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
397 {
1591
5c74d8b6cb57 [gaim-migrate @ 1601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1456
diff changeset
398 if (!applet)
5c74d8b6cb57 [gaim-migrate @ 1601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1456
diff changeset
399 return;
1261
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
400 applet_widget_set_tooltip(APPLET_WIDGET(applet), msg);
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
401 }
07f0bb41bbe1 [gaim-migrate @ 1271]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
402
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2314
diff changeset
403 #endif /*USE_APPLET */