annotate plugins/ticker/ticker.c @ 5815:c900fc823a21

[gaim-migrate @ 6245] Added the buttons to the dialog. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 08 Jun 2003 22:37:04 +0000
parents eeba9205dd0f
children 059d95c67cda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /* GTK - The GIMP Toolkit
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 * This library is free software; you can redistribute it and/or
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 * modify it under the terms of the GNU Library General Public
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 * License as published by the Free Software Foundation; either
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * version 2 of the License, or (at your option) any later version.
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 *
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * This library is distributed in the hope that it will be useful,
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * Library General Public License for more details.
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 *
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * You should have received a copy of the GNU Library General Public
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * License along with this library; if not, write to the
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * Boston, MA 02111-1307, USA.
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 */
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 /*
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 * ticker.c -- Syd Logan, Summer 2000
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 * pluginized- Sean Egan, Summer 2002
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 */
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 #include <gtk/gtk.h>
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 #include "gtkticker.h"
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 #include <string.h>
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 #include <stdlib.h>
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 #include "gaim.h"
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
31 #include "prpl.h"
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
32 #include "gtkplugin.h"
5234
890b29f00b68 [gaim-migrate @ 5604]
Nathan Walp <nwalp@pidgin.im>
parents: 5205
diff changeset
33 #include "blist.h"
890b29f00b68 [gaim-migrate @ 5604]
Nathan Walp <nwalp@pidgin.im>
parents: 5205
diff changeset
34 #include "gtkblist.h"
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3551
diff changeset
35 #ifdef _WIN32
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3551
diff changeset
36 #include "win32dep.h"
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3551
diff changeset
37 #endif
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
39 #define TICKER_PLUGIN_ID "gtk-ticker"
3867
43e396e94095 [gaim-migrate @ 4019]
Rob Flynn <gaim@robflynn.com>
parents: 3700
diff changeset
40
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 static GtkWidget *tickerwindow = NULL;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 static GtkWidget *ticker;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 typedef struct {
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
45 struct buddy *buddy;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 GtkWidget *ebox;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 GtkWidget *label;
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
48 GtkWidget *icon;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 } TickerData;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
51 GList *tickerbuds = NULL;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52
5172
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
53 static gboolean buddy_ticker_destroy_window(GtkWidget *window,
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
54 GdkEventAny *event, gpointer data) {
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
55 if(window)
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
56 gtk_widget_hide(window);
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
57
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
58 return TRUE; /* don't actually destroy the window */
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
61 static void buddy_ticker_create_window() {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
62 if(tickerwindow) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
63 gtk_widget_show(tickerwindow);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
64 return;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
65 }
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
67 tickerwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
5286
f82c251c8300 [gaim-migrate @ 5658]
Luke Schierer <lschiere@pidgin.im>
parents: 5234
diff changeset
68 gtk_window_set_default_size(GTK_WINDOW(tickerwindow), 500, -1);
5172
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
69 g_signal_connect(G_OBJECT(tickerwindow), "delete_event",
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
70 G_CALLBACK (buddy_ticker_destroy_window), NULL);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
71 gtk_window_set_title (GTK_WINDOW(tickerwindow), _("Buddy Ticker"));
4850
b5508e864987 [gaim-migrate @ 5175]
Mark Doliner <mark@kingant.net>
parents: 4770
diff changeset
72 gtk_window_set_role (GTK_WINDOW(tickerwindow), "ticker");
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73
4850
b5508e864987 [gaim-migrate @ 5175]
Mark Doliner <mark@kingant.net>
parents: 4770
diff changeset
74 ticker = gtk_ticker_new();
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
75 gtk_ticker_set_spacing(GTK_TICKER(ticker), 20);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
76 gtk_container_add(GTK_CONTAINER(tickerwindow), ticker);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
77 gtk_ticker_set_interval(GTK_TICKER(ticker), 500);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
78 gtk_ticker_set_scootch(GTK_TICKER(ticker), 10);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
79 gtk_ticker_start_scroll(GTK_TICKER(ticker));
5286
f82c251c8300 [gaim-migrate @ 5658]
Luke Schierer <lschiere@pidgin.im>
parents: 5234
diff changeset
80 gtk_widget_set_size_request(ticker, 1, -1);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
82 gtk_widget_show_all(tickerwindow);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
85 static gboolean buddy_click_cb(GtkWidget *widget, GdkEventButton *event, gpointer user_data) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
86 struct buddy *b = user_data;
4850
b5508e864987 [gaim-migrate @ 5175]
Mark Doliner <mark@kingant.net>
parents: 4770
diff changeset
87
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
88 gaim_conversation_new(GAIM_CONV_IM, b->account, b->name);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 return TRUE;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
92 static TickerData *buddy_ticker_find_buddy(struct buddy *b) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
93 GList *tb;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
94 for(tb = tickerbuds; tb; tb = tb->next) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
95 TickerData *td = tb->data;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
96 if(td->buddy == b)
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
97 return td;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
98 }
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
99 return NULL;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
100 }
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
101
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
102 static void buddy_ticker_set_pixmap(struct buddy *b) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
103 TickerData *td = buddy_ticker_find_buddy(b);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
104 GdkPixbuf *pixbuf;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
106 if(!td)
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 return;
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
108
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
109 if(!td->icon)
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
110 td->icon = gtk_image_new();
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111
5234
890b29f00b68 [gaim-migrate @ 5604]
Nathan Walp <nwalp@pidgin.im>
parents: 5205
diff changeset
112 pixbuf = gaim_gtk_blist_get_status_icon((GaimBlistNode*)b,
890b29f00b68 [gaim-migrate @ 5604]
Nathan Walp <nwalp@pidgin.im>
parents: 5205
diff changeset
113 GAIM_STATUS_ICON_SMALL);
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
114 gtk_image_set_from_pixbuf(GTK_IMAGE(td->icon), pixbuf);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
115 g_object_unref(G_OBJECT(pixbuf));
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
116 }
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
117
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
118 static void buddy_ticker_add_buddy(struct buddy *b) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
119 GtkWidget *hbox;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
120 TickerData *td;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
121
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
122 buddy_ticker_create_window();
5172
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
123
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 if (!ticker)
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 return;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
127 if(buddy_ticker_find_buddy(b))
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 return;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
130 td = g_new0(TickerData, 1);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
131 td->buddy = b;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
132 tickerbuds = g_list_append(tickerbuds, td);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
134 td->ebox = gtk_event_box_new();
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
135 gtk_ticker_add(GTK_TICKER(ticker), td->ebox);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
136 hbox = gtk_hbox_new(FALSE, 0);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
137 gtk_container_add(GTK_CONTAINER(td->ebox), hbox);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
138 buddy_ticker_set_pixmap(b);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
139 gtk_box_pack_start(GTK_BOX(hbox), td->icon, FALSE, FALSE, 5);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
141 g_signal_connect(G_OBJECT(td->ebox), "button-press-event",
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
142 G_CALLBACK(buddy_click_cb), b);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
144 td->label = gtk_label_new(gaim_get_buddy_alias(b));
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
145 gtk_box_pack_start(GTK_BOX(hbox), td->label, FALSE, FALSE, 5);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
146
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
147 gtk_widget_show_all(td->ebox);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
148 gtk_widget_show(tickerwindow);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
151 static void buddy_ticker_remove_buddy(struct buddy *b) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
152 TickerData *td = buddy_ticker_find_buddy(b);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
153
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
154 if (!td)
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
155 return;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
156
5172
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
157 /* pop up the ticker window again */
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
158 buddy_ticker_create_window();
2d84fe476406 [gaim-migrate @ 5536]
Nathan Walp <nwalp@pidgin.im>
parents: 5170
diff changeset
159
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
160 gtk_ticker_remove(GTK_TICKER(ticker), td->ebox);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
161 tickerbuds = g_list_remove(tickerbuds, td);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
162 g_free(td);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
164
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
165 static void buddy_ticker_show()
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
166 {
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
167 struct gaim_buddy_list *list = gaim_get_blist();
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
168 GaimBlistNode *gnode, *bnode;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
169 struct buddy *b;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
171 if(!list)
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
172 return;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
173
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
174 for(gnode = list->root; gnode; gnode = gnode->next) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
175 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
176 continue;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
177 for(bnode = gnode->child; bnode; bnode = bnode->next) {
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
178 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode))
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
179 continue;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
180 b = (struct buddy *)bnode;
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
181 if(GAIM_BUDDY_IS_ONLINE(b))
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
182 buddy_ticker_add_buddy(b);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
183 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
184 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
185 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
186
5587
1c55b1540e18 [gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents: 5286
diff changeset
187 void signon_cb(GaimConnection *gc, char *who) {
4850
b5508e864987 [gaim-migrate @ 5175]
Mark Doliner <mark@kingant.net>
parents: 4770
diff changeset
188 struct buddy *b = gaim_find_buddy(gc->account, who);
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
189 if(buddy_ticker_find_buddy(b))
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
190 buddy_ticker_set_pixmap(b);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
191 else
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
192 buddy_ticker_add_buddy(b);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
193 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
194
5587
1c55b1540e18 [gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents: 5286
diff changeset
195 void signoff_cb(GaimConnection *gc) {
5607
eeba9205dd0f [gaim-migrate @ 6011]
Nathan Walp <nwalp@pidgin.im>
parents: 5587
diff changeset
196 if (!gaim_connections_get_all()) {
5185
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
197 while(tickerbuds) {
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
198 g_free(tickerbuds->data);
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
199 tickerbuds = g_list_delete_link(tickerbuds, tickerbuds);
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
200 }
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
201 gtk_widget_destroy(tickerwindow);
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
202 tickerwindow = NULL;
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
203 ticker = NULL;
5185
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
204 } else {
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
205 GList *t = tickerbuds;
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
206 while(t) {
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
207 TickerData *td = t->data;
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
208 t = t->next;
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
209 if(td->buddy->account == gc->account) {
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
210 g_free(td);
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
211 tickerbuds = g_list_remove(tickerbuds, td);
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
212 }
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
213 }
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
214 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
215 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
216
5587
1c55b1540e18 [gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents: 5286
diff changeset
217 void buddy_signoff_cb(GaimConnection *gc, char *who) {
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
218 struct buddy *b = gaim_find_buddy(gc->account, who);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
219
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
220 buddy_ticker_remove_buddy(b);
5185
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
221 if(!tickerbuds)
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
222 gtk_widget_hide(tickerwindow);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
223 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
224
5587
1c55b1540e18 [gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents: 5286
diff changeset
225 void away_cb(GaimConnection *gc, char *who) {
4850
b5508e864987 [gaim-migrate @ 5175]
Mark Doliner <mark@kingant.net>
parents: 4770
diff changeset
226 struct buddy *b = gaim_find_buddy(gc->account, who);
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
227 if(buddy_ticker_find_buddy(b))
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
228 buddy_ticker_set_pixmap(b);
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
229 else
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
230 buddy_ticker_add_buddy(b);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
231 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
232
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3551
diff changeset
233 /*
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3551
diff changeset
234 * EXPORTED FUNCTIONS
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3551
diff changeset
235 */
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3551
diff changeset
236
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
237 static gboolean
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
238 plugin_load(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
239 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
240 gaim_signal_connect(plugin, event_buddy_signon, signon_cb, NULL);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
241 gaim_signal_connect(plugin, event_signoff, signoff_cb, NULL);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
242 gaim_signal_connect(plugin, event_buddy_signoff, buddy_signoff_cb, NULL);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
243 gaim_signal_connect(plugin, event_buddy_away, away_cb, NULL);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
244 gaim_signal_connect(plugin, event_buddy_back, away_cb, NULL);
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
245
5607
eeba9205dd0f [gaim-migrate @ 6011]
Nathan Walp <nwalp@pidgin.im>
parents: 5587
diff changeset
246 if (gaim_connections_get_all())
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
247 buddy_ticker_show();
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
248
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
249 return TRUE;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
250 }
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
251
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
252 static gboolean
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
253 plugin_unload(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
254 {
5185
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
255 while(tickerbuds) {
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
256 g_free(tickerbuds->data);
5186
a107115a13ae [gaim-migrate @ 5550]
Nathan Walp <nwalp@pidgin.im>
parents: 5185
diff changeset
257 tickerbuds = g_list_delete_link(tickerbuds, tickerbuds);
5185
dec87634bcb1 [gaim-migrate @ 5549]
Nathan Walp <nwalp@pidgin.im>
parents: 5181
diff changeset
258 }
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
259
5181
82b3d72d2128 [gaim-migrate @ 5545]
Nathan Walp <nwalp@pidgin.im>
parents: 5172
diff changeset
260 gtk_widget_destroy(tickerwindow);
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
261
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
262 return TRUE;
3391
412d1035d666 [gaim-migrate @ 3410]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
263 }
5170
13ffa9ae4282 [gaim-migrate @ 5534]
Nathan Walp <nwalp@pidgin.im>
parents: 5068
diff changeset
264
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
265 static GaimGtkPluginUiInfo ui_info =
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
266 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
267 NULL /**< get_config_frame */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
268 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
269
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
270 static GaimPluginInfo info =
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
271 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
272 2, /**< api_version */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
273 GAIM_PLUGIN_STANDARD, /**< type */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
274 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
275 0, /**< flags */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
276 NULL, /**< dependencies */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
277 GAIM_PRIORITY_DEFAULT, /**< priority */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
278
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
279 TICKER_PLUGIN_ID, /**< id */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
280 N_("Buddy Ticker"), /**< name */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
281 VERSION, /**< version */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
282 /** summary */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
283 N_("A horizontal scrolling version of the buddy list."),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
284 /** description */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
285 N_("A horizontal scrolling version of the buddy list."),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
286 "Syd Logan", /**< author */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
287 WEBSITE, /**< homepage */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
288
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
289 plugin_load, /**< load */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
290 plugin_unload, /**< unload */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
291 NULL, /**< destroy */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
292
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
293 &ui_info, /**< ui_info */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
294 NULL /**< extra_info */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
295 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
296
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
297 static void
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
298 __init_plugin(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
299 {
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3475
diff changeset
300 }
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
301
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5186
diff changeset
302 GAIM_INIT_PLUGIN(ticker, __init_plugin, info);