pidgin  2.13.0
About: Pidgin is a chat program (multi-protocol instant messaging client) which lets you log in to accounts on multiple chat networks simultaneously (old name "gaim").
  Fossies Dox: pidgin-2.13.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

gntplugin.c
Go to the documentation of this file.
1 
6 /* finch
7  *
8  * Finch is the legal property of its developers, whose names are too numerous
9  * to list here. Please refer to the COPYRIGHT file distributed with this
10  * source distribution.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 #include <internal.h>
27 
28 #include <gnt.h>
29 #include <gntbox.h>
30 #include <gntbutton.h>
31 #include <gntlabel.h>
32 #include <gntline.h>
33 #include <gnttree.h>
34 #include <gntutils.h>
35 
36 #include "finch.h"
37 
38 #include "debug.h"
39 #include "notify.h"
40 #include "request.h"
41 
42 #include "gntplugin.h"
43 #include "gntrequest.h"
44 
45 static struct
46 {
51 } plugins;
52 
53 static GHashTable *confwins;
54 
56 
57 static void
58 free_stringlist(GList *list)
59 {
60  g_list_foreach(list, (GFunc)g_free, NULL);
61  g_list_free(list);
62 }
63 
64 static void
66 {
67  if (purple_plugin_is_loaded(plugin) &&
68  ((PURPLE_IS_GNT_PLUGIN(plugin) &&
69  FINCH_PLUGIN_UI_INFO(plugin) != NULL) ||
70  (plugin->info->prefs_info &&
73  else
75 
77  gnt_widget_draw(plugins.window);
78 }
79 
80 static void
81 plugin_toggled_cb(GntWidget *tree, PurplePlugin *plugin, gpointer null)
82 {
83  if (gnt_tree_get_choice(GNT_TREE(tree), plugin))
84  {
85  if (!purple_plugin_load(plugin)) {
86  purple_notify_error(NULL, _("ERROR"), _("loading plugin failed"), NULL);
88  }
89  }
90  else
91  {
92  GntWidget *win;
93 
94  if (!purple_plugin_unload(plugin)) {
95  purple_notify_error(NULL, _("ERROR"), _("unloading plugin failed"), NULL);
96  purple_plugin_disable(plugin);
98  }
99 
100  if (confwins && (win = g_hash_table_lookup(confwins, plugin)) != NULL)
101  {
102  gnt_widget_destroy(win);
103  }
104  }
105  decide_conf_button(plugin);
107 }
108 
109 /* Xerox */
110 void
112 {
113  purple_plugins_save_loaded("/finch/plugins/loaded");
114 }
115 
116 static void
117 selection_changed(GntWidget *widget, gpointer old, gpointer current, gpointer null)
118 {
119  PurplePlugin *plugin = current;
120  char *text;
121  GList *list = NULL, *iter = NULL;
122 
123  if (!plugin)
124  return;
125 
126  /* If the selected plugin was unseen before, mark it as seen. But save the list
127  * only when the plugin list is closed. So if the user enables a plugin, and it
128  * crashes, it won't get marked as seen so the user can fix the bug and still
129  * quickly find the plugin in the list.
130  * I probably mean 'plugin developers' by 'users' here. */
131  list = g_object_get_data(G_OBJECT(widget), "seen-list");
132  if (list)
133  iter = g_list_find_custom(list, plugin->path, (GCompareFunc)strcmp);
134  if (!iter) {
135  list = g_list_prepend(list, g_strdup(plugin->path));
136  g_object_set_data(G_OBJECT(widget), "seen-list", list);
137  }
138 
139  /* XXX: Use formatting and stuff */
141  text = g_strdup_printf(_("Name: %s\nVersion: %s\nDescription: %s\nAuthor: %s\nWebsite: %s\nFilename: %s\n"),
142  SAFE(_(plugin->info->name)), SAFE(_(plugin->info->version)), SAFE(_(plugin->info->description)),
143  SAFE(_(plugin->info->author)), SAFE(_(plugin->info->homepage)), SAFE(plugin->path));
147  g_free(text);
148  decide_conf_button(plugin);
149 }
150 
151 static void
153 {
154  GList *list = g_object_get_data(G_OBJECT(plugins.tree), "seen-list");
155  purple_prefs_set_path_list("/finch/plugins/seen", list);
156  g_list_foreach(list, (GFunc)g_free, NULL);
157  g_list_free(list);
158 
159  plugins.window = NULL;
160  plugins.tree = NULL;
161  plugins.aboot = NULL;
162 }
163 
164 static int
166 {
167  char *s1 = g_utf8_strup(p1->info->name, -1);
168  char *s2 = g_utf8_strup(p2->info->name, -1);
169  int ret = g_utf8_collate(s1, s2);
170  g_free(s1);
171  g_free(s2);
172  return ret;
173 }
174 
175 static void
177 {
178  confwins = g_hash_table_new(g_direct_hash, g_direct_equal);
179 }
180 
181 static void
182 remove_confwin(GntWidget *window, gpointer plugin)
183 {
184  g_hash_table_remove(confwins, plugin);
185 }
186 
187 static void
188 configure_plugin_cb(GntWidget *button, gpointer null)
189 {
190  PurplePlugin *plugin;
191  FinchPluginFrame callback;
192 
193  g_return_if_fail(plugins.tree != NULL);
194 
196  if (!purple_plugin_is_loaded(plugin))
197  {
198  purple_notify_error(plugin, _("Error"),
199  _("Plugin need to be loaded before you can configure it."), NULL);
200  return;
201  }
202 
203  if (confwins && g_hash_table_lookup(confwins, plugin))
204  return;
205 
206  if (PURPLE_IS_GNT_PLUGIN(plugin) &&
207  (callback = FINCH_PLUGIN_UI_INFO(plugin)) != NULL)
208  {
210  GntWidget *box, *button;
211 
215 
216  box = callback();
218 
219  box = gnt_hbox_new(FALSE);
221 
222  button = gnt_button_new(_("Close"));
223  gnt_box_add_widget(GNT_BOX(box), button);
224  g_signal_connect_swapped(G_OBJECT(button), "activate",
225  G_CALLBACK(gnt_widget_destroy), window);
226  g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(remove_confwin), plugin);
227 
229 
230  if (confwins == NULL)
231  confwin_init();
232  g_hash_table_insert(confwins, plugin, window);
233  }
234  else if (plugin->info->prefs_info &&
236  {
238  if (confwins == NULL)
239  confwin_init();
240  g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(remove_confwin), plugin);
241  g_hash_table_insert(confwins, plugin, win);
242  return;
243  }
244  else
245  {
246  purple_notify_info(plugin, _("Error"),
247  _("No configuration options for this plugin."), NULL);
248  return;
249  }
250 }
251 
252 static void
253 install_selected_file_cb(gpointer handle, const char *filename)
254 {
255  /* Try to init the selected file.
256  * If it succeeds, try to make a copy of the file in $USERDIR/plugins/.
257  * If the copy succeeds, unload and destroy the plugin in the original
258  * location and init+load the new one.
259  * Select the plugin in the plugin list.
260  */
261  char *path;
262  PurplePlugin *plugin;
263 
264  g_return_if_fail(plugins.window);
265 
266  plugin = purple_plugin_probe(filename);
267  if (!plugin) {
268  purple_notify_error(handle, _("Error loading plugin"),
269  _("The selected file is not a valid plugin."),
270  _("Please open the debug window and try again to see the exact error message."));
271  return;
272  }
273  if (g_list_find(gnt_tree_get_rows(GNT_TREE(plugins.tree)), plugin)) {
274  purple_plugin_load(plugin);
276  gnt_tree_set_selected(GNT_TREE(plugins.tree), plugin);
277  return;
278  }
279 
280  path = g_build_filename(purple_user_dir(), "plugins", NULL);
281  if (purple_build_dir(path, S_IRUSR | S_IWUSR | S_IXUSR) == 0) {
282  char *content = NULL;
283  gsize length = 0;
284 
285  if (g_file_get_contents(filename, &content, &length, NULL)) {
286  char *file = g_path_get_basename(filename);
287  g_free(path);
288  path = g_build_filename(purple_user_dir(), "plugins", file, NULL);
289  if (purple_util_write_data_to_file_absolute(path, content, length)) {
290  purple_plugin_destroy(plugin);
291  plugin = purple_plugin_probe(path);
292  if (!plugin) {
293  purple_debug_warning("gntplugin", "This is really strange. %s can be loaded, but %s can't!\n",
294  filename, path);
295  g_unlink(path);
296  plugin = purple_plugin_probe(filename);
297  }
298  } else {
299  }
300  }
301  g_free(content);
302  }
303  g_free(path);
304 
305  purple_plugin_load(plugin);
306 
307  if (plugin->info->type == PURPLE_PLUGIN_LOADER) {
308  GList *cur;
309  for (cur = PURPLE_PLUGIN_LOADER_INFO(plugin)->exts; cur != NULL;
310  cur = cur->next)
311  purple_plugins_probe(cur->data);
312  return;
313  }
314 
315  if (plugin->info->type != PURPLE_PLUGIN_STANDARD ||
316  (plugin->info->flags & PURPLE_PLUGIN_FLAG_INVISIBLE) ||
317  plugin->error)
318  return;
319 
320  gnt_tree_add_choice(GNT_TREE(plugins.tree), plugin,
321  gnt_tree_create_row(GNT_TREE(plugins.tree), plugin->info->name), NULL, NULL);
324  gnt_tree_set_selected(GNT_TREE(plugins.tree), plugin);
325 }
326 
327 static void
328 install_plugin_cb(GntWidget *w, gpointer null)
329 {
330  static int handle;
331 
333  purple_request_file(&handle, _("Select plugin to install"), NULL,
334  FALSE, G_CALLBACK(install_selected_file_cb), NULL,
335  NULL, NULL, NULL, &handle);
336  g_signal_connect_swapped(G_OBJECT(w), "destroy", G_CALLBACK(purple_request_close_with_handle), &handle);
337 }
338 
340 {
341  GntWidget *window, *tree, *box, *aboot, *button;
342  GList *iter;
343  GList *seen;
344 
345  if (plugins.window) {
346  gnt_window_present(plugins.window);
347  return;
348  }
349 
350  purple_plugins_probe(G_MODULE_SUFFIX);
351 
352  plugins.window = window = gnt_vbox_new(FALSE);
354  gnt_box_set_title(GNT_BOX(window), _("Plugins"));
357 
359  gnt_label_new(_("You can (un)load plugins from the following list.")));
361 
362  box = gnt_hbox_new(FALSE);
365 
366  gnt_box_set_pad(GNT_BOX(box), 0);
367  plugins.tree = tree = gnt_tree_new();
372 
373  plugins.aboot = aboot = gnt_text_view_new();
375  gnt_widget_set_size(aboot, 40, 20);
377 
378  seen = purple_prefs_get_path_list("/finch/plugins/seen");
379  for (iter = purple_plugins_get_all(); iter; iter = iter->next)
380  {
381  PurplePlugin *plug = iter->data;
382 
383  if (plug->info->type == PURPLE_PLUGIN_LOADER) {
384  GList *cur;
385  for (cur = PURPLE_PLUGIN_LOADER_INFO(plug)->exts; cur != NULL;
386  cur = cur->next)
387  purple_plugins_probe(cur->data);
388  continue;
389  }
390 
391  if (plug->info->type != PURPLE_PLUGIN_STANDARD ||
393  plug->error)
394  continue;
395 
399  if (!g_list_find_custom(seen, plug->path, (GCompareFunc)strcmp))
401  }
403  g_signal_connect(G_OBJECT(tree), "toggled", G_CALLBACK(plugin_toggled_cb), NULL);
404  g_signal_connect(G_OBJECT(tree), "selection_changed", G_CALLBACK(selection_changed), NULL);
405  g_object_set_data(G_OBJECT(tree), "seen-list", seen);
406 
407  box = gnt_hbox_new(FALSE);
409 
410  button = gnt_button_new(_("Install Plugin..."));
411  gnt_box_add_widget(GNT_BOX(box), button);
413  g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(install_plugin_cb), NULL);
414 
415  button = gnt_button_new(_("Close"));
416  gnt_box_add_widget(GNT_BOX(box), button);
417  g_signal_connect_swapped(G_OBJECT(button), "activate",
418  G_CALLBACK(gnt_widget_destroy), window);
419 
420  plugins.conf = button = gnt_button_new(_("Configure Plugin"));
421  gnt_box_add_widget(GNT_BOX(box), button);
422  g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(configure_plugin_cb), NULL);
423 
424  g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(reset_plugin_window), NULL);
425 
427 
429 }
430 
431 static GntWidget*
433 {
434  PurpleRequestField *field;
435  PurpleRequestFields *fields;
437  GList *prefs;
438  GList *stringlist = NULL;
439  GntWidget *ret = NULL;
440 
441  fields = purple_request_fields_new();
442 
443  for (prefs = purple_plugin_pref_frame_get_prefs(frame); prefs; prefs = prefs->next) {
444  PurplePluginPref *pref = prefs->data;
446  const char *name = purple_plugin_pref_get_name(pref);
447  const char *label = purple_plugin_pref_get_label(pref);
448  if(name == NULL) {
449  if(label == NULL)
450  continue;
451 
455  } else {
458  }
459  continue;
460  }
461 
462  field = NULL;
465  GList *list = purple_plugin_pref_get_choices(pref);
466  gpointer current_value = NULL;
467 
468  switch(type) {
469  case PURPLE_PREF_BOOLEAN:
470  current_value = g_strdup_printf("%d", (int)purple_prefs_get_bool(name));
471  break;
472  case PURPLE_PREF_INT:
473  current_value = g_strdup_printf("%d", (int)purple_prefs_get_int(name));
474  break;
475  case PURPLE_PREF_STRING:
476  current_value = g_strdup(purple_prefs_get_string(name));
477  break;
478  default:
479  continue;
480  }
481 
484  while (list && list->next) {
485  const char *label = list->data;
486  char *value = NULL;
487  switch(type) {
488  case PURPLE_PREF_BOOLEAN:
489  value = g_strdup_printf("%d", GPOINTER_TO_INT(list->next->data));
490  break;
491  case PURPLE_PREF_INT:
492  value = g_strdup_printf("%d", GPOINTER_TO_INT(list->next->data));
493  break;
494  case PURPLE_PREF_STRING:
495  value = g_strdup(list->next->data);
496  break;
497  default:
498  break;
499  }
500  stringlist = g_list_prepend(stringlist, value);
502  if (purple_strequal(value, current_value))
504  list = list->next->next;
505  }
506  g_free(current_value);
507  } else {
508  switch(type) {
509  case PURPLE_PREF_BOOLEAN:
511  break;
512  case PURPLE_PREF_INT:
514  break;
515  case PURPLE_PREF_STRING:
518  break;
519  default:
520  break;
521  }
522  }
523 
524  if (field) {
525  if (group == NULL) {
526  group = purple_request_field_group_new(_("Preferences"));
528  }
530  }
531  }
532 
533  ret = purple_request_fields(NULL, _("Preferences"), NULL, NULL, fields,
534  _("Save"), G_CALLBACK(finch_request_save_in_prefs), _("Cancel"), NULL,
535  NULL, NULL, NULL,
536  NULL);
537  g_signal_connect_swapped(G_OBJECT(ret), "destroy", G_CALLBACK(free_stringlist), stringlist);
538  return ret;
539 }
540 
_PurplePluginPref
Definition: pluginpref.c:38
gnt_widget_set_size
gboolean gnt_widget_set_size(GntWidget *widget, int width, int height)
Definition: gntwidget.c:515
GNT_WIDGET_NO_BORDER
Definition: gntwidget.h:59
pref
char * pref
Definition: gntgf.c:302
name
char * name
Definition: gntbindable.c:47
purple_plugin_destroy
void purple_plugin_destroy(PurplePlugin *plugin)
Definition: plugin.c:789
purple_plugins_get_all
GList * purple_plugins_get_all(void)
Definition: plugin.c:1648
gnt_box_set_pad
void gnt_box_set_pad(GntBox *box, int pad)
Definition: gntbox.c:695
purple_plugin_disable
void purple_plugin_disable(PurplePlugin *plugin)
Definition: plugin.c:759
purple_strequal
gboolean purple_strequal(const gchar *left, const gchar *right)
purple_notify_error
#define purple_notify_error(handle, title, primary, secondary)
Definition: notify.h:756
PURPLE_STRING_FORMAT_TYPE_MULTILINE
Definition: pluginpref.h:39
configure_plugin_cb
static void configure_plugin_cb(GntWidget *button, gpointer null)
Definition: gntplugin.c:188
reset_plugin_window
static void reset_plugin_window(GntWidget *window, gpointer null)
Definition: gntplugin.c:152
gnt_text_view_scroll
void gnt_text_view_scroll(GntTextView *view, int scroll)
Definition: gnttextview.c:618
group
#define group
Definition: module.h:7
_PurplePluginInfo::type
PurplePluginType type
Definition: plugin.h:83
gnt_widget_show
void gnt_widget_show(GntWidget *widget)
Definition: gntwidget.c:326
FinchPluginFrame
GntWidget *(* FinchPluginFrame)(void)
Definition: gntplugin.h:42
gntbox.h
gnt_tree_get_choice
gboolean gnt_tree_get_choice(GntTree *tree, void *key)
Definition: gnttree.c:1624
purple_plugin_pref_get_label
const char * purple_plugin_pref_get_label(PurplePluginPref *pref)
Definition: pluginpref.c:189
purple_request_field_group_add_field
void purple_request_field_group_add_field(PurpleRequestFieldGroup *group, PurpleRequestField *field)
Definition: request.c:300
file
char * file
Definition: gnttextview.c:855
notify.h
purple_prefs_get_string
const char * purple_prefs_get_string(const char *name)
Definition: prefs.c:1155
PURPLE_PREF_BOOLEAN
Definition: prefs.h:38
PURPLE_PLUGIN_LOADER
Definition: plugin.h:60
purple_plugin_pref_get_choices
GList * purple_plugin_pref_get_choices(PurplePluginPref *pref)
Definition: pluginpref.c:268
gnt_label_new
GntWidget * gnt_label_new(const char *text)
Definition: gntlabel.c:186
purple_plugin_pref_frame_get_prefs
GList * purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame)
Definition: pluginpref.c:83
widget
GtkWidget * widget
Definition: pidgintooltip.c:38
_GntWidget
Definition: gntwidget.h:98
gnt.h
gnt_tree_set_compare_func
void gnt_tree_set_compare_func(GntTree *tree, GCompareFunc func)
Definition: gnttree.c:1783
purple_request_field_list_add_icon
void purple_request_field_list_add_icon(PurpleRequestField *field, const char *item, const char *icon_path, void *data)
Definition: request.c:857
gntrequest.h
gnt_tree_set_selected
void gnt_tree_set_selected(GntTree *tree, void *key)
Definition: gnttree.c:1655
PURPLE_PREF_INT
Definition: prefs.h:39
purple_request_field_list_add_selected
void purple_request_field_list_add_selected(PurpleRequestField *field, const char *item)
Definition: request.c:891
gnt_tree_new
GntWidget * gnt_tree_new()
Definition: gnttree.c:1194
gnt_vbox_new
#define gnt_vbox_new(homo)
Definition: gntbox.h:96
gntutils.h
PURPLE_PLUGIN_PREF_INFO
Definition: pluginpref.h:46
S_IWUSR
#define S_IWUSR
Definition: fileio.h:60
_
void boot_DynaLoader _((pTHX_ CV *cv))
purple_prefs_get_int
int purple_prefs_get_int(const char *name)
Definition: prefs.c:1133
gnt_util_set_trigger_widget
void gnt_util_set_trigger_widget(GntWidget *wid, const char *text, GntWidget *button)
Definition: gntutils.c:496
purple_prefs_get_type
PurplePrefType purple_prefs_get_type(const char *name)
Definition: prefs.c:1096
gnt_window_present
void gnt_window_present(GntWidget *window)
Definition: gntmain.c:548
PURPLE_PLUGIN_LOADER_INFO
#define PURPLE_PLUGIN_LOADER_INFO(plugin)
Definition: plugin.h:170
GNT_BOX
#define GNT_BOX(obj)
Definition: gntbox.h:34
gnt_box_add_widget
void gnt_box_add_widget(GntBox *b, GntWidget *widget)
Definition: gntbox.c:674
FINCH_PLUGIN_UI_INFO
#define FINCH_PLUGIN_UI_INFO(plugin)
Definition: gntplugin.h:57
purple_plugins_save_loaded
void purple_plugins_save_loaded(const char *key)
Definition: plugin.c:1265
gnt_button_new
GntWidget * gnt_button_new(const char *text)
Definition: gntbutton.c:170
handle
static PurplePlugin * handle
Definition: nss-prefs.c:61
_PurplePluginInfo::flags
unsigned long flags
Definition: plugin.h:85
gnt_text_view_new
GntWidget * gnt_text_view_new()
Definition: gnttextview.c:499
purple_request_close_with_handle
void purple_request_close_with_handle(void *handle)
Definition: request.c:1539
GNT_ALIGN_MID
Definition: gntbox.h:49
purple_prefs_set_path_list
void purple_prefs_set_path_list(const char *name, GList *value)
Definition: prefs.c:1045
purple_plugin_probe
PurplePlugin * purple_plugin_probe(const char *filename)
Definition: plugin.c:201
purple_plugins_probe
void purple_plugins_probe(const char *ext)
Definition: plugin.c:1348
purple_plugin_pref_get_name
const char * purple_plugin_pref_get_name(PurplePluginPref *pref)
Definition: pluginpref.c:171
conf
GntWidget * conf
Definition: gntplugin.c:50
_PurplePlugin
Definition: plugin.h:151
PurplePrefType
enum _PurplePrefType PurplePrefType
gntlabel.h
GNT_TEXT_FLAG_NORMAL
Definition: gnttextview.h:70
purple_request_fields_new
PurpleRequestFields * purple_request_fields_new(void)
Definition: request.c:47
GNT_TEXT_FLAG_BOLD
Definition: gnttextview.h:71
_PurplePluginPrefFrame
Definition: pluginpref.c:33
purple_prefs_get_path_list
GList * purple_prefs_get_path_list(const char *name)
Definition: prefs.c:1226
purple_request_file
void * purple_request_file(void *handle, const char *title, const char *filename, gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data)
Definition: request.c:1451
gnt_tree_set_choice
void gnt_tree_set_choice(GntTree *tree, void *key, gboolean set)
Definition: gnttree.c:1612
NULL
#define NULL
Definition: getopt1.c:52
gnt_tree_get_rows
GList * gnt_tree_get_rows(GntTree *tree)
Definition: gnttree.c:1216
GNT_TREE
#define GNT_TREE(obj)
Definition: gnttree.h:37
PURPLE_PREF_STRING
Definition: prefs.h:40
gnt_box_set_toplevel
void gnt_box_set_toplevel(GntBox *box, gboolean set)
Definition: gntbox.c:701
PURPLE_IS_GNT_PLUGIN
#define PURPLE_IS_GNT_PLUGIN(plugin)
Definition: gntplugin.h:50
GNT_TEXT_VIEW
#define GNT_TEXT_VIEW(obj)
Definition: gnttextview.h:36
GNT_TEXT_VIEW_TOP_ALIGN
Definition: gnttextview.h:54
plugins
static struct @7 plugins
GNT_WIDGET_SET_FLAGS
#define GNT_WIDGET_SET_FLAGS(obj, flags)
Definition: gntwidget.h:44
remove_confwin
static void remove_confwin(GntWidget *window, gpointer plugin)
Definition: gntplugin.c:182
confwins
static GHashTable * confwins
Definition: gntplugin.c:53
tree
GntWidget * tree
Definition: gntplugin.c:47
purple_request_field_list_set_multi_select
void purple_request_field_list_set_multi_select(PurpleRequestField *field, gboolean multi_select)
Definition: request.c:820
purple_request_field_int_new
PurpleRequestField * purple_request_field_int_new(const char *id, const char *text, int default_value)
Definition: request.c:619
purple_request_field_bool_new
PurpleRequestField * purple_request_field_bool_new(const char *id, const char *text, gboolean default_value)
Definition: request.c:673
gntbutton.h
gnt_text_view_append_text_with_flags
void gnt_text_view_append_text_with_flags(GntTextView *view, const char *text, GntTextFormatFlags flags)
Definition: gnttextview.c:506
finch_plugins_show_all
void finch_plugins_show_all()
Definition: gntplugin.c:339
GNT_WIDGET
#define GNT_WIDGET(obj)
Definition: gntwidget.h:37
TRUE
#define TRUE
Definition: protobuf-c.c:56
_PurplePluginInfo::name
char * name
Definition: plugin.h:90
purple_build_dir
int purple_build_dir(const char *path, int mode)
dbus-analyze-signals.type
string type
Definition: dbus-analyze-signals.py:42
gnt_tree_add_choice
GntTreeRow * gnt_tree_add_choice(GntTree *tree, void *key, GntTreeRow *row, void *parent, void *bigbro)
Definition: gnttree.c:1584
FALSE
#define FALSE
Definition: protobuf-c.c:57
request.h
purple_plugin_pref_get_format_type
PurpleStringFormatType purple_plugin_pref_get_format_type(PurplePluginPref *pref)
Definition: pluginpref.c:317
SAFE
#define SAFE(x)
Definition: gntkeys.h:43
purple_request_fields_add_group
void purple_request_fields_add_group(PurpleRequestFields *fields, PurpleRequestFieldGroup *group)
Definition: request.c:72
free_stringlist
static void free_stringlist(GList *list)
Definition: gntplugin.c:58
gnt_box_set_title
void gnt_box_set_title(GntBox *b, const char *title)
Definition: gntbox.c:680
text
static char * text[]
Definition: zephyr_err.c:10
finch_request_save_in_prefs
void finch_request_save_in_prefs(gpointer null, PurpleRequestFields *allfields)
Definition: gntrequest.c:820
label
const char * label
Definition: jabber.c:1321
gntplugin.h
_PurplePluginInfo::author
char * author
Definition: plugin.h:94
_PurplePluginInfo::prefs_info
PurplePluginUiInfo * prefs_info
Definition: plugin.h:107
purple_prefs_get_bool
gboolean purple_prefs_get_bool(const char *name)
Definition: prefs.c:1111
purple_request_field_group_new
PurpleRequestFieldGroup * purple_request_field_group_new(const char *title)
Definition: request.c:275
_PurplePlugin::path
char * path
Definition: plugin.h:156
_PurplePluginInfo::homepage
char * homepage
Definition: plugin.h:95
_PurplePluginInfo::description
char * description
Definition: plugin.h:93
purple_plugin_is_loaded
gboolean purple_plugin_is_loaded(const PurplePlugin *plugin)
Definition: plugin.c:900
purple_request_field_list_new
PurpleRequestField * purple_request_field_list_new(const char *id, const char *text)
Definition: request.c:802
_PurpleRequestField
Definition: request.h:103
confwin_init
static void confwin_init(void)
Definition: gntplugin.c:176
purple_notify_info
#define purple_notify_info(handle, title, primary, secondary)
Definition: notify.h:742
_PurplePlugin::info
PurplePluginInfo * info
Definition: plugin.h:157
gnt_widget_destroy
void gnt_widget_destroy(GntWidget *obj)
Definition: gntwidget.c:312
PurpleRequestFields
Definition: request.h:74
purple_plugin_load
gboolean purple_plugin_load(PurplePlugin *plugin)
Definition: plugin.c:505
PurpleRequestFieldGroup
Definition: request.h:89
install_plugin_cb
static void install_plugin_cb(GntWidget *w, gpointer null)
Definition: gntplugin.c:328
gnt_widget_draw
void gnt_widget_draw(GntWidget *widget)
Definition: gntwidget.c:335
purple_request_field_string_new
PurpleRequestField * purple_request_field_string_new(const char *id, const char *text, const char *default_value, gboolean multiline)
Definition: request.c:514
gnt_tree_set_col_width
void gnt_tree_set_col_width(GntTree *tree, int col, int width)
Definition: gnttree.c:1748
gnt_widget_set_visible
void gnt_widget_set_visible(GntWidget *widget, gboolean set)
Definition: gntwidget.c:640
_PurplePluginUiInfo::get_plugin_pref_frame
PurplePluginPrefFrame *(* get_plugin_pref_frame)(PurplePlugin *plugin)
Definition: plugin.h:174
purple_plugin_unload
gboolean purple_plugin_unload(PurplePlugin *plugin)
Definition: plugin.c:628
gnt_text_view_clear
void gnt_text_view_clear(GntTextView *view)
Definition: gnttextview.c:690
plugin_compare
static int plugin_compare(PurplePlugin *p1, PurplePlugin *p2)
Definition: gntplugin.c:165
aboot
GntWidget * aboot
Definition: gntplugin.c:49
gnt_hbox_new
#define gnt_hbox_new(homo)
Definition: gntbox.h:97
pietray.path
path
Definition: pietray.py:186
decide_conf_button
static void decide_conf_button(PurplePlugin *plugin)
Definition: gntplugin.c:65
window
GntWidget * window
Definition: gntplugin.c:48
finch.h
purple_util_write_data_to_file_absolute
gboolean purple_util_write_data_to_file_absolute(const char *filename_full, const char *data, gssize size)
gnt_text_view_set_flag
void gnt_text_view_set_flag(GntTextView *view, GntTextViewFlag flag)
Definition: gnttextview.c:846
purple_request_field_label_new
PurpleRequestField * purple_request_field_label_new(const char *id, const char *text)
Definition: request.c:1002
gntline.h
finch_plugins_save_loaded
void finch_plugins_save_loaded(void)
Definition: gntplugin.c:111
_PurplePluginInfo::version
char * version
Definition: plugin.h:91
PURPLE_PLUGIN_STANDARD
Definition: plugin.h:59
value
gpointer value
Definition: gntwm.c:1782
selection_changed
static void selection_changed(GntWidget *widget, gpointer old, gpointer current, gpointer null)
Definition: gntplugin.c:117
purple_request_fields
void * purple_request_fields(void *handle, const char *title, const char *primary, const char *secondary, PurpleRequestFields *fields, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data)
Definition: request.c:1414
process_pref_frame
static GntWidget * process_pref_frame(PurplePluginPrefFrame *frame)
Definition: gntplugin.c:432
gnttree.h
purple_user_dir
const char * purple_user_dir(void)
gnt_vline_new
#define gnt_vline_new()
Definition: gntline.h:75
gnt_tree_create_row
GntTreeRow * gnt_tree_create_row(GntTree *tree,...)
Definition: gnttree.c:1728
gnt_box_readjust
void gnt_box_readjust(GntBox *box)
Definition: gntbox.c:810
install_selected_file_cb
static void install_selected_file_cb(gpointer handle, const char *filename)
Definition: gntplugin.c:253
gnt_tree_set_row_flags
void gnt_tree_set_row_flags(GntTree *tree, void *key, GntTextFormatFlags flags)
Definition: gnttree.c:1635
gnt_tree_get_selection_data
gpointer gnt_tree_get_selection_data(GntTree *tree)
Definition: gnttree.c:1441
prefs
static struct @40 prefs[]
GNT_KEY_INS
#define GNT_KEY_INS
Definition: gntkeys.h:67
_PurplePlugin::error
char * error
Definition: plugin.h:158
plugin_toggled_cb
static void plugin_toggled_cb(GntWidget *tree, PurplePlugin *plugin, gpointer null)
Definition: gntplugin.c:81
gnt_box_set_alignment
void gnt_box_set_alignment(GntBox *box, GntAlignment alignment)
Definition: gntbox.c:775
purple_debug_warning
void purple_debug_warning(const char *category, const char *format,...)
Definition: debug.c:133
purple_plugin_pref_get_type
PurplePluginPrefType purple_plugin_pref_get_type(PurplePluginPref *pref)
Definition: pluginpref.c:249
PURPLE_PLUGIN_FLAG_INVISIBLE
#define PURPLE_PLUGIN_FLAG_INVISIBLE
Definition: plugin.h:69
PURPLE_PLUGIN_PREF_CHOICE
Definition: pluginpref.h:45
gnt_hline_new
#define gnt_hline_new()
Definition: gntline.h:74