Fri, 31 Jan 2014 20:02:40 +0530
Move changes from soc.2013.gobjectification.gtkdoc to this branch
| 15231 | 1 | /* |
| 2 | * Markerline - Draw a line to indicate new messages in a conversation. | |
| 3 | * Copyright (C) 2006 | |
| 4 | * | |
| 5 | * This program is free software; you can redistribute it and/or | |
| 6 | * modify it under the terms of the GNU General Public License as | |
| 7 | * published by the Free Software Foundation; either version 2 of the | |
| 8 | * License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This program is distributed in the hope that it will be useful, but | |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU General Public License | |
| 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 | 19 | */ |
| 20 | #include "internal.h" | |
| 21 | ||
| 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 | 27 | #define PLUGIN_AUTHOR "Sadrul H Chowdhury <sadrul@users.sourceforge.net>" |
| 28 | ||
| 29 | /* System headers */ | |
| 30 | #include <gdk/gdk.h> | |
| 31 | #include <glib.h> | |
| 32 | #include <gtk/gtk.h> | |
| 33 | ||
| 15884 | 34 | /* Purple headers */ |
| 15231 | 35 | #include <gtkconv.h> |
| 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 | 38 | #include <version.h> |
| 39 | ||
| 40 | #define PREF_PREFIX "/plugins/gtk/" PLUGIN_ID | |
| 41 | #define PREF_IMS PREF_PREFIX "/ims" | |
| 42 | #define PREF_CHATS PREF_PREFIX "/chats" | |
| 43 | ||
| 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 | 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 | |
| 15231 | 49 | g_return_if_fail(gtkconv != NULL); |
| 50 | ||
|
32773
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
51 | conv = gtkconv->active_conv; |
| 15231 | 52 | |
|
34660
68c776e3436e
Refactored pidgin plugins to use the GObject conversation API
Ankit Vani <a@nevitus.org>
parents:
32773
diff
changeset
|
53 | if ((PURPLE_IS_CHAT_CONVERSATION(conv) && !purple_prefs_get_bool(PREF_CHATS)) || |
|
68c776e3436e
Refactored pidgin plugins to use the GObject conversation API
Ankit Vani <a@nevitus.org>
parents:
32773
diff
changeset
|
54 | (PURPLE_IS_IM_CONVERSATION(conv) && !purple_prefs_get_bool(PREF_IMS))) |
| 15231 | 55 | return; |
| 56 | ||
|
32773
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
57 | 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
|
58 | "var mhr = document.getElementById(\"markerhr\");" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
59 | "if (!mhr) {" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
60 | "mhr = document.createElement(\"hr\");" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
61 | "mhr.setAttribute(\"id\", \"markerhr\");" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
62 | "mhr.setAttribute(\"color\", \"#ff0000\");" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
63 | "mhr.setAttribute(\"size\", \"1\");" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
64 | "}" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
65 | "document.getElementById(\"Chat\").appendChild(mhr);"); |
| 15231 | 66 | } |
| 67 | ||
| 68 | static gboolean | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
69 | focus_removed(GtkWidget *widget, GdkEventVisibility *event, PidginWindow *win) |
| 15231 | 70 | { |
| 15884 | 71 | PurpleConversation *conv; |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
72 | PidginConversation *gtkconv; |
| 15231 | 73 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
74 | conv = pidgin_conv_window_get_active_conversation(win); |
| 15231 | 75 | g_return_val_if_fail(conv != NULL, FALSE); |
| 76 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
77 | gtkconv = PIDGIN_CONVERSATION(conv); |
| 15231 | 78 | update_marker_for_gtkconv(gtkconv); |
| 79 | ||
| 80 | return FALSE; | |
| 81 | } | |
| 82 | ||
| 83 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
84 | page_switched(GtkWidget *widget, GtkWidget *page, gint num, PidginWindow *win) |
| 15231 | 85 | { |
| 86 | focus_removed(NULL, NULL, win); | |
| 87 | } | |
| 88 | ||
| 89 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
90 | detach_from_gtkconv(PidginConversation *gtkconv, gpointer null) |
| 15231 | 91 | { |
|
32773
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
92 | 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
|
93 | "var mhr = document.getElementById(\"markerhr\");" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
94 | "if (mhr) mhr.parentNode.removeChild(mhr);"); |
| 15231 | 95 | } |
| 96 | ||
| 97 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
98 | detach_from_pidgin_window(PidginWindow *win, gpointer null) |
| 15231 | 99 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
100 | g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)detach_from_gtkconv, NULL); |
| 15231 | 101 | g_signal_handlers_disconnect_by_func(G_OBJECT(win->notebook), page_switched, win); |
| 102 | g_signal_handlers_disconnect_by_func(G_OBJECT(win->window), focus_removed, win); | |
| 103 | } | |
| 104 | ||
| 105 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
106 | attach_to_gtkconv(PidginConversation *gtkconv, gpointer null) |
| 15231 | 107 | { |
| 108 | detach_from_gtkconv(gtkconv, NULL); | |
|
32773
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
109 | update_marker_for_gtkconv(gtkconv); |
| 15231 | 110 | } |
| 111 | ||
| 112 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
113 | attach_to_pidgin_window(PidginWindow *win, gpointer null) |
| 15231 | 114 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
115 | g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)attach_to_gtkconv, NULL); |
| 15231 | 116 | |
| 117 | g_signal_connect(G_OBJECT(win->window), "focus_out_event", | |
| 118 | G_CALLBACK(focus_removed), win); | |
| 119 | ||
| 120 | g_signal_connect(G_OBJECT(win->notebook), "switch_page", | |
| 121 | G_CALLBACK(page_switched), win); | |
| 122 | } | |
| 123 | ||
| 124 | 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
|
125 | detach_from_all_windows(void) |
| 15231 | 126 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
127 | g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)detach_from_pidgin_window, NULL); |
| 15231 | 128 | } |
| 129 | ||
| 130 | 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
|
131 | attach_to_all_windows(void) |
| 15231 | 132 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
133 | g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)attach_to_pidgin_window, NULL); |
| 15231 | 134 | } |
| 135 | ||
| 136 | 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
|
137 | conv_created(PidginConversation *gtkconv, gpointer null) |
| 15231 | 138 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
139 | PidginWindow *win; |
| 15231 | 140 | |
|
24604
6d8cec169c3f
Use a more appropriate signal for the markerline plugin. Fixes #7518.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22809
diff
changeset
|
141 | 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
|
142 | if (!win) |
| 15231 | 143 | return; |
| 144 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
145 | detach_from_pidgin_window(win, NULL); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
146 | attach_to_pidgin_window(win, NULL); |
| 15231 | 147 | } |
| 148 | ||
|
22809
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
149 | 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
|
150 | 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
|
151 | { |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
152 | 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
|
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 | 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
|
155 | return; |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
156 | |
|
32773
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
157 | 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
|
158 | "var mhr = document.getElementById(\"markerhr\");" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
159 | "if (mhr) {" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
160 | "window.scroll(0, mhr.offsetTop);" |
|
6700409ec3a3
JS-ify the markerline plugin.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
161 | "}"); |
|
22809
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
162 | } |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
163 | |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
164 | 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
|
165 | 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
|
166 | { |
|
34660
68c776e3436e
Refactored pidgin plugins to use the GObject conversation API
Ankit Vani <a@nevitus.org>
parents:
32773
diff
changeset
|
167 | gboolean enabled = ((PURPLE_IS_IM_CONVERSATION(conv) && purple_prefs_get_bool(PREF_IMS)) || |
|
68c776e3436e
Refactored pidgin plugins to use the GObject conversation API
Ankit Vani <a@nevitus.org>
parents:
32773
diff
changeset
|
168 | (PURPLE_IS_CHAT_CONVERSATION(conv) && purple_prefs_get_bool(PREF_CHATS))); |
|
22809
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
169 | 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
|
170 | 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
|
171 | *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
|
172 | } |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
173 | |
| 15231 | 174 | static gboolean |
| 15884 | 175 | plugin_load(PurplePlugin *plugin) |
| 15231 | 176 | { |
| 177 | attach_to_all_windows(); | |
| 178 | ||
|
24604
6d8cec169c3f
Use a more appropriate signal for the markerline plugin. Fixes #7518.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22809
diff
changeset
|
179 | purple_signal_connect(pidgin_conversations_get_handle(), "conversation-displayed", |
| 15884 | 180 | plugin, PURPLE_CALLBACK(conv_created), NULL); |
| 15231 | 181 | |
|
22809
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
182 | 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
|
183 | plugin, PURPLE_CALLBACK(conv_menu_cb), NULL); |
| 15231 | 184 | return TRUE; |
| 185 | } | |
| 186 | ||
| 187 | static gboolean | |
| 15884 | 188 | plugin_unload(PurplePlugin *plugin) |
| 15231 | 189 | { |
| 190 | detach_from_all_windows(); | |
| 191 | ||
| 192 | return TRUE; | |
| 193 | } | |
| 194 | ||
| 15884 | 195 | static PurplePluginPrefFrame * |
| 196 | get_plugin_pref_frame(PurplePlugin *plugin) | |
| 15231 | 197 | { |
| 15884 | 198 | PurplePluginPrefFrame *frame; |
| 199 | PurplePluginPref *pref; | |
| 15231 | 200 | |
| 15884 | 201 | frame = purple_plugin_pref_frame_new(); |
| 15231 | 202 | |
| 15884 | 203 | pref = purple_plugin_pref_new_with_label(_("Draw Markerline in ")); |
| 204 | purple_plugin_pref_frame_add(frame, pref); | |
| 15231 | 205 | |
| 15884 | 206 | pref = purple_plugin_pref_new_with_name_and_label(PREF_IMS, |
| 15231 | 207 | _("_IM windows")); |
| 15884 | 208 | purple_plugin_pref_frame_add(frame, pref); |
| 15231 | 209 | |
| 15884 | 210 | pref = purple_plugin_pref_new_with_name_and_label(PREF_CHATS, |
| 15231 | 211 | _("C_hat windows")); |
| 15884 | 212 | purple_plugin_pref_frame_add(frame, pref); |
| 15231 | 213 | |
| 214 | return frame; | |
| 215 | } | |
| 216 | ||
| 15884 | 217 | static PurplePluginUiInfo prefs_info = { |
| 15231 | 218 | get_plugin_pref_frame, |
|
34479
7d4651f1035e
Plugins API: add an option to provide plugin configuration using Request API
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34477
diff
changeset
|
219 | 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
|
220 | |
|
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
|
221 | /* 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
|
222 | 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
|
223 | 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
|
224 | 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
|
225 | NULL |
| 15231 | 226 | }; |
| 227 | ||
| 15884 | 228 | static PurplePluginInfo info = { |
| 229 | PURPLE_PLUGIN_MAGIC, /* Magic */ | |
| 230 | PURPLE_MAJOR_VERSION, /* Purple Major Version */ | |
| 231 | PURPLE_MINOR_VERSION, /* Purple Minor Version */ | |
| 232 | PURPLE_PLUGIN_STANDARD, /* plugin type */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
233 | PIDGIN_PLUGIN_TYPE, /* ui requirement */ |
| 15231 | 234 | 0, /* flags */ |
| 235 | NULL, /* dependencies */ | |
| 15884 | 236 | PURPLE_PRIORITY_DEFAULT, /* priority */ |
| 15231 | 237 | |
| 238 | PLUGIN_ID, /* plugin id */ | |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
239 | PLUGIN_NAME, /* name */ |
|
20288
5ca925a094e2
applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
240 | DISPLAY_VERSION, /* version */ |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
241 | PLUGIN_SUMMARY, /* summary */ |
|
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
242 | PLUGIN_DESCRIPTION, /* description */ |
| 15231 | 243 | PLUGIN_AUTHOR, /* author */ |
| 15884 | 244 | PURPLE_WEBSITE, /* website */ |
| 15231 | 245 | |
| 246 | plugin_load, /* load */ | |
| 247 | plugin_unload, /* unload */ | |
| 248 | NULL, /* destroy */ | |
| 249 | ||
| 250 | NULL, /* ui_info */ | |
| 251 | NULL, /* extra_info */ | |
| 252 | &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
|
253 | 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
|
254 | |
|
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
|
255 | /* 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
|
256 | 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
|
257 | 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
|
258 | 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
|
259 | NULL |
| 15231 | 260 | }; |
| 261 | ||
| 262 | static void | |
| 15884 | 263 | init_plugin(PurplePlugin *plugin) |
| 15231 | 264 | { |
| 15884 | 265 | purple_prefs_add_none(PREF_PREFIX); |
| 266 | purple_prefs_add_bool(PREF_IMS, FALSE); | |
| 267 | purple_prefs_add_bool(PREF_CHATS, TRUE); | |
| 15231 | 268 | } |
| 269 | ||
| 15884 | 270 | PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info) |