Sun, 09 Nov 2008 20:55:10 +0000
Added menu items to buddy list context menu to start voice and video sessions
After discussing the matter with Maiku, we decided to have two choises.
"Audio call" which will show up if audio sessions is possible with a buddy and
the other item is either "Audio/Video" or "Video" depending on if the buddy
supports both at the same time or not
| 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") |
| 15231 | 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 <gtkimhtml.h> | |
| 37 | #include <gtkplugin.h> | |
| 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 int | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
45 | imhtml_expose_cb(GtkWidget *widget, GdkEventExpose *event, PidginConversation *gtkconv) |
| 15231 | 46 | { |
| 47 | int y, last_y, offset; | |
| 48 | GdkRectangle visible_rect; | |
| 49 | GtkTextIter iter; | |
| 50 | GdkRectangle buf; | |
| 51 | int pad; | |
| 15884 | 52 | PurpleConversation *conv = gtkconv->active_conv; |
| 53 | PurpleConversationType type = purple_conversation_get_type(conv); | |
| 15231 | 54 | |
| 15884 | 55 | if ((type == PURPLE_CONV_TYPE_CHAT && !purple_prefs_get_bool(PREF_CHATS)) || |
| 56 | (type == PURPLE_CONV_TYPE_IM && !purple_prefs_get_bool(PREF_IMS))) | |
| 15231 | 57 | return FALSE; |
| 58 | ||
| 59 | gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(widget), &visible_rect); | |
| 60 | ||
| 61 | offset = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "markerline")); | |
| 62 | if (offset) | |
| 63 | { | |
| 64 | gtk_text_buffer_get_iter_at_offset(gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget)), | |
| 65 | &iter, offset); | |
| 66 | ||
| 67 | gtk_text_view_get_iter_location(GTK_TEXT_VIEW(widget), &iter, &buf); | |
| 68 | last_y = buf.y + buf.height; | |
| 69 | pad = (gtk_text_view_get_pixels_below_lines(GTK_TEXT_VIEW(widget)) + | |
| 70 | gtk_text_view_get_pixels_above_lines(GTK_TEXT_VIEW(widget))) / 2; | |
| 71 | last_y += pad; | |
| 72 | } | |
| 73 | else | |
| 74 | last_y = 0; | |
| 75 | ||
| 76 | gtk_text_view_buffer_to_window_coords(GTK_TEXT_VIEW(widget), GTK_TEXT_WINDOW_TEXT, | |
| 77 | 0, last_y, 0, &y); | |
| 78 | ||
| 79 | if (y >= event->area.y) | |
| 80 | { | |
| 81 | GdkColor red = {0, 0xffff, 0, 0}; | |
| 82 | GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(event->window)); | |
| 83 | ||
| 84 | gdk_gc_set_rgb_fg_color(gc, &red); | |
| 85 | gdk_draw_line(event->window, gc, | |
| 86 | 0, y, visible_rect.width, y); | |
| 87 | gdk_gc_unref(gc); | |
| 88 | } | |
| 89 | return FALSE; | |
| 90 | } | |
| 91 | ||
| 92 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
93 | update_marker_for_gtkconv(PidginConversation *gtkconv) |
| 15231 | 94 | { |
| 95 | GtkTextIter iter; | |
| 96 | GtkTextBuffer *buffer; | |
| 97 | g_return_if_fail(gtkconv != NULL); | |
| 98 | ||
| 99 | buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->imhtml)); | |
| 100 | ||
| 101 | if (!gtk_text_buffer_get_char_count(buffer)) | |
| 102 | return; | |
| 103 | ||
| 104 | gtk_text_buffer_get_end_iter(buffer, &iter); | |
| 105 | ||
| 106 | g_object_set_data(G_OBJECT(gtkconv->imhtml), "markerline", | |
| 107 | GINT_TO_POINTER(gtk_text_iter_get_offset(&iter))); | |
| 108 | gtk_widget_queue_draw(gtkconv->imhtml); | |
| 109 | } | |
| 110 | ||
| 111 | static gboolean | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
112 | focus_removed(GtkWidget *widget, GdkEventVisibility *event, PidginWindow *win) |
| 15231 | 113 | { |
| 15884 | 114 | PurpleConversation *conv; |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
115 | PidginConversation *gtkconv; |
| 15231 | 116 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
117 | conv = pidgin_conv_window_get_active_conversation(win); |
| 15231 | 118 | g_return_val_if_fail(conv != NULL, FALSE); |
| 119 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
120 | gtkconv = PIDGIN_CONVERSATION(conv); |
| 15231 | 121 | update_marker_for_gtkconv(gtkconv); |
| 122 | ||
| 123 | return FALSE; | |
| 124 | } | |
| 125 | ||
| 126 | #if 0 | |
| 127 | static gboolean | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
128 | window_resized(GtkWidget *w, GdkEventConfigure *event, PidginWindow *win) |
| 15231 | 129 | { |
| 130 | GList *list; | |
| 131 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
132 | list = pidgin_conv_window_get_gtkconvs(win); |
| 15231 | 133 | |
| 134 | for (; list; list = list->next) | |
| 135 | update_marker_for_gtkconv(list->data); | |
| 136 | ||
| 137 | return FALSE; | |
| 138 | } | |
| 139 | ||
| 140 | static gboolean | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
141 | imhtml_resize_cb(GtkWidget *w, GtkAllocation *allocation, PidginConversation *gtkconv) |
| 15231 | 142 | { |
| 143 | gtk_widget_queue_draw(w); | |
| 144 | return FALSE; | |
| 145 | } | |
| 146 | #endif | |
| 147 | ||
| 148 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
149 | page_switched(GtkWidget *widget, GtkWidget *page, gint num, PidginWindow *win) |
| 15231 | 150 | { |
| 151 | focus_removed(NULL, NULL, win); | |
| 152 | } | |
| 153 | ||
| 154 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
155 | detach_from_gtkconv(PidginConversation *gtkconv, gpointer null) |
| 15231 | 156 | { |
| 157 | g_signal_handlers_disconnect_by_func(G_OBJECT(gtkconv->imhtml), imhtml_expose_cb, gtkconv); | |
| 158 | } | |
| 159 | ||
| 160 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
161 | detach_from_pidgin_window(PidginWindow *win, gpointer null) |
| 15231 | 162 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
163 | g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)detach_from_gtkconv, NULL); |
| 15231 | 164 | g_signal_handlers_disconnect_by_func(G_OBJECT(win->notebook), page_switched, win); |
| 165 | g_signal_handlers_disconnect_by_func(G_OBJECT(win->window), focus_removed, win); | |
| 166 | ||
| 167 | gtk_widget_queue_draw(win->window); | |
| 168 | } | |
| 169 | ||
| 170 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
171 | attach_to_gtkconv(PidginConversation *gtkconv, gpointer null) |
| 15231 | 172 | { |
| 173 | detach_from_gtkconv(gtkconv, NULL); | |
| 174 | g_signal_connect(G_OBJECT(gtkconv->imhtml), "expose_event", | |
| 175 | G_CALLBACK(imhtml_expose_cb), gtkconv); | |
| 176 | } | |
| 177 | ||
| 178 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
179 | attach_to_pidgin_window(PidginWindow *win, gpointer null) |
| 15231 | 180 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
181 | g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)attach_to_gtkconv, NULL); |
| 15231 | 182 | |
| 183 | g_signal_connect(G_OBJECT(win->window), "focus_out_event", | |
| 184 | G_CALLBACK(focus_removed), win); | |
| 185 | ||
| 186 | g_signal_connect(G_OBJECT(win->notebook), "switch_page", | |
| 187 | G_CALLBACK(page_switched), win); | |
| 188 | ||
| 189 | gtk_widget_queue_draw(win->window); | |
| 190 | } | |
| 191 | ||
| 192 | 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
|
193 | detach_from_all_windows(void) |
| 15231 | 194 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
195 | g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)detach_from_pidgin_window, NULL); |
| 15231 | 196 | } |
| 197 | ||
| 198 | 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
|
199 | attach_to_all_windows(void) |
| 15231 | 200 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
201 | g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)attach_to_pidgin_window, NULL); |
| 15231 | 202 | } |
| 203 | ||
| 204 | static void | |
| 15884 | 205 | conv_created(PurpleConversation *conv, gpointer null) |
| 15231 | 206 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
207 | PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
208 | PidginWindow *win; |
| 15231 | 209 | |
| 210 | if (!gtkconv) | |
| 211 | return; | |
| 212 | ||
| 15563 | 213 | win = pidgin_conv_get_window(gtkconv); |
| 15231 | 214 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
215 | detach_from_pidgin_window(win, NULL); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
216 | attach_to_pidgin_window(win, NULL); |
| 15231 | 217 | } |
| 218 | ||
|
22809
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
219 | 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
|
220 | 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
|
221 | { |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
222 | 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
|
223 | int offset; |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
224 | GtkTextIter iter; |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
225 | |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
226 | 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
|
227 | return; |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
228 | |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
229 | offset = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(gtkconv->imhtml), "markerline")); |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
230 | gtk_text_buffer_get_iter_at_offset(GTK_IMHTML(gtkconv->imhtml)->text_buffer, &iter, offset); |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
231 | gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(gtkconv->imhtml), &iter, 0, TRUE, 0, 0); |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
232 | } |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
233 | |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
234 | 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
|
235 | 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
|
236 | { |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
237 | 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
|
238 | 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
|
239 | (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
|
240 | 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
|
241 | 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
|
242 | *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
|
243 | } |
|
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
244 | |
| 15231 | 245 | static gboolean |
| 15884 | 246 | plugin_load(PurplePlugin *plugin) |
| 15231 | 247 | { |
| 248 | attach_to_all_windows(); | |
| 249 | ||
| 15884 | 250 | purple_signal_connect(purple_conversations_get_handle(), "conversation-created", |
| 251 | plugin, PURPLE_CALLBACK(conv_created), NULL); | |
| 15231 | 252 | |
|
22809
c2b010c50376
Add a 'Jump to markerline' option in the conversation window menu to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
253 | 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
|
254 | plugin, PURPLE_CALLBACK(conv_menu_cb), NULL); |
| 15231 | 255 | return TRUE; |
| 256 | } | |
| 257 | ||
| 258 | static gboolean | |
| 15884 | 259 | plugin_unload(PurplePlugin *plugin) |
| 15231 | 260 | { |
| 261 | detach_from_all_windows(); | |
| 262 | ||
| 263 | return TRUE; | |
| 264 | } | |
| 265 | ||
| 15884 | 266 | static PurplePluginPrefFrame * |
| 267 | get_plugin_pref_frame(PurplePlugin *plugin) | |
| 15231 | 268 | { |
| 15884 | 269 | PurplePluginPrefFrame *frame; |
| 270 | PurplePluginPref *pref; | |
| 15231 | 271 | |
| 15884 | 272 | frame = purple_plugin_pref_frame_new(); |
| 15231 | 273 | |
| 15884 | 274 | pref = purple_plugin_pref_new_with_label(_("Draw Markerline in ")); |
| 275 | purple_plugin_pref_frame_add(frame, pref); | |
| 15231 | 276 | |
| 15884 | 277 | pref = purple_plugin_pref_new_with_name_and_label(PREF_IMS, |
| 15231 | 278 | _("_IM windows")); |
| 15884 | 279 | purple_plugin_pref_frame_add(frame, pref); |
| 15231 | 280 | |
| 15884 | 281 | pref = purple_plugin_pref_new_with_name_and_label(PREF_CHATS, |
| 15231 | 282 | _("C_hat windows")); |
| 15884 | 283 | purple_plugin_pref_frame_add(frame, pref); |
| 15231 | 284 | |
| 285 | return frame; | |
| 286 | } | |
| 287 | ||
| 15884 | 288 | static PurplePluginUiInfo prefs_info = { |
| 15231 | 289 | get_plugin_pref_frame, |
| 290 | 0, | |
| 291 | 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
|
292 | |
|
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
|
293 | /* 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
|
294 | 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
|
295 | 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
|
296 | 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
|
297 | NULL |
| 15231 | 298 | }; |
| 299 | ||
| 15884 | 300 | static PurplePluginInfo info = { |
| 301 | PURPLE_PLUGIN_MAGIC, /* Magic */ | |
| 302 | PURPLE_MAJOR_VERSION, /* Purple Major Version */ | |
| 303 | PURPLE_MINOR_VERSION, /* Purple Minor Version */ | |
| 304 | PURPLE_PLUGIN_STANDARD, /* plugin type */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
305 | PIDGIN_PLUGIN_TYPE, /* ui requirement */ |
| 15231 | 306 | 0, /* flags */ |
| 307 | NULL, /* dependencies */ | |
| 15884 | 308 | PURPLE_PRIORITY_DEFAULT, /* priority */ |
| 15231 | 309 | |
| 310 | PLUGIN_ID, /* plugin id */ | |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
311 | PLUGIN_NAME, /* name */ |
|
20288
5ca925a094e2
applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
312 | DISPLAY_VERSION, /* version */ |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
313 | PLUGIN_SUMMARY, /* summary */ |
|
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
314 | PLUGIN_DESCRIPTION, /* description */ |
| 15231 | 315 | PLUGIN_AUTHOR, /* author */ |
| 15884 | 316 | PURPLE_WEBSITE, /* website */ |
| 15231 | 317 | |
| 318 | plugin_load, /* load */ | |
| 319 | plugin_unload, /* unload */ | |
| 320 | NULL, /* destroy */ | |
| 321 | ||
| 322 | NULL, /* ui_info */ | |
| 323 | NULL, /* extra_info */ | |
| 324 | &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
|
325 | 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
|
326 | |
|
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
|
327 | /* 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
|
328 | 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
|
329 | 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
|
330 | 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
|
331 | NULL |
| 15231 | 332 | }; |
| 333 | ||
| 334 | static void | |
| 15884 | 335 | init_plugin(PurplePlugin *plugin) |
| 15231 | 336 | { |
| 15884 | 337 | purple_prefs_add_none(PREF_PREFIX); |
| 338 | purple_prefs_add_bool(PREF_IMS, FALSE); | |
| 339 | purple_prefs_add_bool(PREF_CHATS, TRUE); | |
| 15231 | 340 | } |
| 341 | ||
| 15884 | 342 | PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info) |