pidgin/plugins/markerline.c

Wed, 04 Jan 2012 02:45:36 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Wed, 04 Jan 2012 02:45:36 +0000
branch
cpw.qulogic.gtk3-required
changeset 33127
02a3db370988
parent 32773
6700409ec3a3
parent 32427
62ca9d966c38
permissions
-rw-r--r--

propagate from branch 'im.pidgin.pidgin' (head 8b3b9ddcd0bd7144422bace37a221553a5fc68b2)
to branch 'im.pidgin.cpw.qulogic.gtk3-required' (head 0aeb9b1c7aca98ed08e445ba119428438edece41)

15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Markerline - Draw a line to indicate new messages in a conversation.
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) 2006
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * modify it under the terms of the GNU General Public License as
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * published by the Free Software Foundation; either version 2 of the
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * License, or (at your option) any later version.
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 *
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful, but
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * General Public License for more details.
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 *
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16749
diff changeset
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16749
diff changeset
18 * 02111-1301, USA.
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 #include "internal.h"
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 #define PLUGIN_ID "gtk-plugin_pack-markerline"
15418
bf287f742a5a [gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents: 15231
diff changeset
23 #define PLUGIN_NAME N_("Markerline")
25633
feee0c7e503f Fix some more mis-identified plugins, like 3b3526a0...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 24604
diff changeset
24 #define PLUGIN_STATIC_NAME Markerline
15418
bf287f742a5a [gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents: 15231
diff changeset
25 #define PLUGIN_SUMMARY N_("Draw a line to indicate new messages in a conversation.")
bf287f742a5a [gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents: 15231
diff changeset
26 #define PLUGIN_DESCRIPTION N_("Draw a line to indicate new messages in a conversation.")
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #define PLUGIN_AUTHOR "Sadrul H Chowdhury <sadrul@users.sourceforge.net>"
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 /* System headers */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <gdk/gdk.h>
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib.h>
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #include <gtk/gtk.h>
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
34 /* Purple headers */
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 #include <gtkconv.h>
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 #include <gtkplugin.h>
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
37 #include <gtkwebview.h>
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 #include <version.h>
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #define PREF_PREFIX "/plugins/gtk/" PLUGIN_ID
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 #define PREF_IMS PREF_PREFIX "/ims"
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 #define PREF_CHATS PREF_PREFIX "/chats"
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 static void
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
45 update_marker_for_gtkconv(PidginConversation *gtkconv)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 {
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
47 PurpleConversation *conv;
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
48 PurpleConversationType type;
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
49
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 g_return_if_fail(gtkconv != NULL);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
52 conv = gtkconv->active_conv;
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
53 type = purple_conversation_get_type(conv);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
55 if ((type == PURPLE_CONV_TYPE_CHAT && !purple_prefs_get_bool(PREF_CHATS)) ||
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
56 (type == PURPLE_CONV_TYPE_IM && !purple_prefs_get_bool(PREF_IMS)))
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 return;
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
59 gtk_webview_safe_execute_script(GTK_WEBVIEW(gtkconv->webview),
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
60 "var mhr = document.getElementById(\"markerhr\");"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
61 "if (!mhr) {"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
62 "mhr = document.createElement(\"hr\");"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
63 "mhr.setAttribute(\"id\", \"markerhr\");"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
64 "mhr.setAttribute(\"color\", \"#ff0000\");"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
65 "mhr.setAttribute(\"size\", \"1\");"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
66 "}"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
67 "document.getElementById(\"Chat\").appendChild(mhr);");
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 static gboolean
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
71 focus_removed(GtkWidget *widget, GdkEventVisibility *event, PidginWindow *win)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
73 PurpleConversation *conv;
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
74 PidginConversation *gtkconv;
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
76 conv = pidgin_conv_window_get_active_conversation(win);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 g_return_val_if_fail(conv != NULL, FALSE);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
79 gtkconv = PIDGIN_CONVERSATION(conv);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 update_marker_for_gtkconv(gtkconv);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 return FALSE;
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 static void
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
86 page_switched(GtkWidget *widget, GtkWidget *page, gint num, PidginWindow *win)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 {
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 focus_removed(NULL, NULL, win);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 static void
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
92 detach_from_gtkconv(PidginConversation *gtkconv, gpointer null)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 {
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
94 gtk_webview_safe_execute_script(GTK_WEBVIEW(gtkconv->webview),
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
95 "var mhr = document.getElementById(\"markerhr\");"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
96 "if (mhr) mhr.parentNode.removeChild(mhr);");
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 static void
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
100 detach_from_pidgin_window(PidginWindow *win, gpointer null)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 {
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
102 g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)detach_from_gtkconv, NULL);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 g_signal_handlers_disconnect_by_func(G_OBJECT(win->notebook), page_switched, win);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 g_signal_handlers_disconnect_by_func(G_OBJECT(win->window), focus_removed, win);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 static void
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
108 attach_to_gtkconv(PidginConversation *gtkconv, gpointer null)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 {
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 detach_from_gtkconv(gtkconv, NULL);
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
111 update_marker_for_gtkconv(gtkconv);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 static void
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
115 attach_to_pidgin_window(PidginWindow *win, gpointer null)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 {
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
117 g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)attach_to_gtkconv, NULL);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 g_signal_connect(G_OBJECT(win->window), "focus_out_event",
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 G_CALLBACK(focus_removed), win);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 g_signal_connect(G_OBJECT(win->notebook), "switch_page",
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 G_CALLBACK(page_switched), win);
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 static void
22104
56970903b8e9 Probe for -Wstrict-prototypes to get some more warnings. I then cleaned up
Richard Laager <rlaager@pidgin.im>
parents: 20288
diff changeset
127 detach_from_all_windows(void)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 {
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
129 g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)detach_from_pidgin_window, NULL);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 static void
22104
56970903b8e9 Probe for -Wstrict-prototypes to get some more warnings. I then cleaned up
Richard Laager <rlaager@pidgin.im>
parents: 20288
diff changeset
133 attach_to_all_windows(void)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 {
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
135 g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)attach_to_pidgin_window, NULL);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 static void
24604
6d8cec169c3f Use a more appropriate signal for the markerline plugin. Fixes #7518.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22809
diff changeset
139 conv_created(PidginConversation *gtkconv, gpointer null)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 {
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
141 PidginWindow *win;
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142
24604
6d8cec169c3f Use a more appropriate signal for the markerline plugin. Fixes #7518.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22809
diff changeset
143 win = pidgin_conv_get_window(gtkconv);
6d8cec169c3f Use a more appropriate signal for the markerline plugin. Fixes #7518.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22809
diff changeset
144 if (!win)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 return;
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
147 detach_from_pidgin_window(win, NULL);
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
148 attach_to_pidgin_window(win, NULL);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150
22809
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
151 static void
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
152 jump_to_markerline(PurpleConversation *conv, gpointer null)
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
153 {
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
154 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
155
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
156 if (!gtkconv)
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
157 return;
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
158
32773
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
159 gtk_webview_safe_execute_script(GTK_WEBVIEW(gtkconv->webview),
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
160 "var mhr = document.getElementById(\"markerhr\");"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
161 "if (mhr) {"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
162 "window.scroll(0, mhr.offsetTop);"
6700409ec3a3 JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31294
diff changeset
163 "}");
22809
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
164 }
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
165
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
166 static void
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
167 conv_menu_cb(PurpleConversation *conv, GList **list)
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
168 {
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
169 PurpleConversationType type = purple_conversation_get_type(conv);
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
170 gboolean enabled = ((type == PURPLE_CONV_TYPE_IM && purple_prefs_get_bool(PREF_IMS)) ||
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
171 (type == PURPLE_CONV_TYPE_CHAT && purple_prefs_get_bool(PREF_CHATS)));
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
172 PurpleMenuAction *action = purple_menu_action_new(_("Jump to markerline"),
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
173 enabled ? PURPLE_CALLBACK(jump_to_markerline) : NULL, NULL, NULL);
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
174 *list = g_list_append(*list, action);
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
175 }
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
176
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 static gboolean
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
178 plugin_load(PurplePlugin *plugin)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 {
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180 attach_to_all_windows();
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181
24604
6d8cec169c3f Use a more appropriate signal for the markerline plugin. Fixes #7518.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22809
diff changeset
182 purple_signal_connect(pidgin_conversations_get_handle(), "conversation-displayed",
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
183 plugin, PURPLE_CALLBACK(conv_created), NULL);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184
22809
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
185 purple_signal_connect(purple_conversations_get_handle(), "conversation-extended-menu",
c2b010c50376 Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22104
diff changeset
186 plugin, PURPLE_CALLBACK(conv_menu_cb), NULL);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 return TRUE;
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 static gboolean
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
191 plugin_unload(PurplePlugin *plugin)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 {
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 detach_from_all_windows();
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 return TRUE;
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
198 static PurplePluginPrefFrame *
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
199 get_plugin_pref_frame(PurplePlugin *plugin)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
201 PurplePluginPrefFrame *frame;
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
202 PurplePluginPref *pref;
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
204 frame = purple_plugin_pref_frame_new();
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
205
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
206 pref = purple_plugin_pref_new_with_label(_("Draw Markerline in "));
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
207 purple_plugin_pref_frame_add(frame, pref);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
209 pref = purple_plugin_pref_new_with_name_and_label(PREF_IMS,
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210 _("_IM windows"));
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
211 purple_plugin_pref_frame_add(frame, pref);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
213 pref = purple_plugin_pref_new_with_name_and_label(PREF_CHATS,
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
214 _("C_hat windows"));
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
215 purple_plugin_pref_frame_add(frame, pref);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
216
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
217 return frame;
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
218 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
219
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
220 static PurplePluginUiInfo prefs_info = {
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
221 get_plugin_pref_frame,
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 0,
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
223 NULL,
16749
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
224
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
225 /* padding */
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
226 NULL,
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
227 NULL,
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
228 NULL,
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
229 NULL
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 };
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
231
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
232 static PurplePluginInfo info = {
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
233 PURPLE_PLUGIN_MAGIC, /* Magic */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
234 PURPLE_MAJOR_VERSION, /* Purple Major Version */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
235 PURPLE_MINOR_VERSION, /* Purple Minor Version */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
236 PURPLE_PLUGIN_STANDARD, /* plugin type */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
237 PIDGIN_PLUGIN_TYPE, /* ui requirement */
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
238 0, /* flags */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239 NULL, /* dependencies */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
240 PURPLE_PRIORITY_DEFAULT, /* priority */
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 PLUGIN_ID, /* plugin id */
15418
bf287f742a5a [gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents: 15231
diff changeset
243 PLUGIN_NAME, /* name */
20288
5ca925a094e2 applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
244 DISPLAY_VERSION, /* version */
15418
bf287f742a5a [gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents: 15231
diff changeset
245 PLUGIN_SUMMARY, /* summary */
bf287f742a5a [gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents: 15231
diff changeset
246 PLUGIN_DESCRIPTION, /* description */
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247 PLUGIN_AUTHOR, /* author */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
248 PURPLE_WEBSITE, /* website */
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
249
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
250 plugin_load, /* load */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251 plugin_unload, /* unload */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
252 NULL, /* destroy */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
253
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
254 NULL, /* ui_info */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
255 NULL, /* extra_info */
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 &prefs_info, /* prefs_info */
16749
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
257 NULL, /* actions */
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
258
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
259 /* padding */
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
260 NULL,
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
261 NULL,
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
262 NULL,
14a3fdc0aed7 Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
263 NULL
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
264 };
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
265
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
266 static void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
267 init_plugin(PurplePlugin *plugin)
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
268 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
269 purple_prefs_add_none(PREF_PREFIX);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
270 purple_prefs_add_bool(PREF_IMS, FALSE);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
271 purple_prefs_add_bool(PREF_CHATS, TRUE);
15231
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
272 }
f13829d20a13 [gaim-migrate @ 17955]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
273
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15563
diff changeset
274 PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info)

mercurial