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)  

gntaccount.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 <gntcheckbox.h>
32 #include <gntcombobox.h>
33 #include <gntentry.h>
34 #include <gntlabel.h>
35 #include <gntline.h>
36 #include <gnttree.h>
37 #include <gntutils.h>
38 #include <gntwindow.h>
39 
40 #include "finch.h"
41 
42 #include <account.h>
43 #include <accountopt.h>
44 #include <connection.h>
45 #include <notify.h>
46 #include <plugin.h>
47 #include <request.h>
48 #include <savedstatuses.h>
49 
50 #include "gntaccount.h"
51 #include "gntblist.h"
52 
53 #include <string.h>
54 
55 typedef struct
56 {
60 
62 
63 typedef struct
64 {
65  PurpleAccount *account; /* NULL for a new account */
66 
68 
73 
75  GList *split_entries;
76 
77  GList *prpl_entries;
79 
84 
85 /* This is necessary to close an edit-dialog when an account is deleted */
86 static GList *accountdialogs;
87 
88 static void
90 {
95  NULL, NULL);
98 }
99 
100 static void
102 {
103  accountdialogs = g_list_remove(accountdialogs, dialog);
104  g_list_free(dialog->prpl_entries);
105  g_list_free(dialog->split_entries);
106  g_free(dialog);
107 }
108 
109 static void
111 {
113  PurplePlugin *plugin;
114  PurplePluginProtocolInfo *prplinfo;
115  const char *value;
116  GString *username;
117 
118  /* XXX: Do some error checking first. */
119 
121  prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plugin);
122 
123  /* Username && user-splits */
125 
126  if (value == NULL || *value == '\0')
127  {
128  purple_notify_error(NULL, _("Error"),
129  dialog->account ? _("Account was not modified") : _("Account was not added"),
130  _("Username of an account must be non-empty."));
131  return;
132  }
133 
134  username = g_string_new(value);
135 
136  if (prplinfo != NULL)
137  {
138  GList *iter, *entries;
139  for (iter = prplinfo->user_splits, entries = dialog->split_entries;
140  iter && entries; iter = iter->next, entries = entries->next)
141  {
142  PurpleAccountUserSplit *split = iter->data;
143  GntWidget *entry = entries->data;
144 
146  if (value == NULL || *value == '\0')
148  g_string_append_printf(username, "%c%s",
150  value);
151  }
152  }
153 
154  if (dialog->account == NULL)
155  {
156  account = purple_account_new(username->str, purple_plugin_get_id(plugin));
158  }
159  else
160  {
161  account = dialog->account;
162 
163  /* Protocol */
166  purple_account_set_username(account, username->str);
167  } else {
168  const char *old = purple_account_get_protocol_id(account);
169  char *oldprpl;
170  if (!purple_strequal(old, purple_plugin_get_id(plugin))) {
171  purple_notify_error(NULL, _("Error"), _("Account was not modified"),
172  _("The account's protocol cannot be changed while it is connected to the server."));
173  return;
174  }
175 
177  if (g_utf8_collate(oldprpl, purple_normalize(account, username->str))) {
178  purple_notify_error(NULL, _("Error"), _("Account was not modified"),
179  _("The account's username cannot be changed while it is connected to the server."));
180  g_free(oldprpl);
181  return;
182  }
183  g_free(oldprpl);
184  purple_account_set_username(account, username->str);
185  }
186  }
187  g_string_free(username, TRUE);
188 
189  /* Alias */
192 
193  /* Remember password and password */
197  if (value && *value)
199  else
201 
202  /* Mail notification */
205 
206  /* Protocol options */
207  if (prplinfo)
208  {
209  GList *iter, *entries;
210 
211  for (iter = prplinfo->protocol_options, entries = dialog->prpl_entries;
212  iter && entries; iter = iter->next, entries = entries->next)
213  {
214  PurpleAccountOption *option = iter->data;
215  GntWidget *entry = entries->data;
217  const char *setting = purple_account_option_get_setting(option);
218 
219  if (type == PURPLE_PREF_STRING)
220  {
221  const char *value = gnt_entry_get_text(GNT_ENTRY(entry));
223  }
224  else if (type == PURPLE_PREF_INT)
225  {
226  const char *str = gnt_entry_get_text(GNT_ENTRY(entry));
227  int value = 0;
228  if (str)
229  value = atoi(str);
231  }
232  else if (type == PURPLE_PREF_BOOLEAN)
233  {
234  gboolean value = gnt_check_box_get_checked(GNT_CHECK_BOX(entry));
236  }
237  else if (type == PURPLE_PREF_STRING_LIST)
238  {
241  }
242  else
243  {
244  g_assert_not_reached();
245  }
246  }
247  }
248 
249  /* XXX: Proxy options */
250 
251  if (accounts.window && accounts.tree) {
254  }
255 
256  if (prplinfo && prplinfo->register_user &&
259  } else if (dialog->account == NULL) {
260  /* This is a new account. Set it to the current status. */
261  /* Xerox from gtkaccount.c :D */
262  const PurpleSavedStatus *saved_status;
263  saved_status = purple_savedstatus_get_current();
264  if (saved_status != NULL) {
267  }
268  }
269 
270  /* In case of a new account, the 'Accounts' window is updated from the account-added
271  * callback. In case of changes in an existing account, we need to explicitly do it
272  * here.
273  */
274  if (dialog->account != NULL && accounts.window) {
276  0, purple_account_get_username(dialog->account));
279  }
280 
281  gnt_widget_destroy(dialog->window);
282 }
283 
284 static void
286 {
287  GntWidget *hbox;
288  PurplePlugin *plugin;
289  PurplePluginProtocolInfo *prplinfo;
290  GList *iter, *entries;
291  char *username = NULL;
292 
293  if (dialog->splits)
294  {
296  g_list_free(dialog->split_entries);
297  }
298  else
299  {
300  dialog->splits = gnt_vbox_new(FALSE);
301  gnt_box_set_pad(GNT_BOX(dialog->splits), 0);
302  gnt_box_set_fill(GNT_BOX(dialog->splits), TRUE);
303  }
304 
305  dialog->split_entries = NULL;
306 
308  if (!plugin)
309  return;
310  prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plugin);
311 
312  username = dialog->account ? g_strdup(purple_account_get_username(dialog->account)) : NULL;
313 
314  for (iter = prplinfo->user_splits; iter; iter = iter->next)
315  {
316  PurpleAccountUserSplit *split = iter->data;
317  GntWidget *entry;
318  char *buf;
319 
320  hbox = gnt_hbox_new(TRUE);
321  gnt_box_add_widget(GNT_BOX(dialog->splits), hbox);
322 
323  buf = g_strdup_printf("%s:", purple_account_user_split_get_text(split));
325 
326  entry = gnt_entry_new(NULL);
327  gnt_box_add_widget(GNT_BOX(hbox), entry);
328 
329  dialog->split_entries = g_list_append(dialog->split_entries, entry);
330  g_free(buf);
331  }
332 
333  for (iter = g_list_last(prplinfo->user_splits), entries = g_list_last(dialog->split_entries);
334  iter && entries; iter = iter->prev, entries = entries->prev)
335  {
336  GntWidget *entry = entries->data;
337  PurpleAccountUserSplit *split = iter->data;
338  const char *value = NULL;
339  char *s;
340 
341  if (dialog->account)
342  {
344  s = strrchr(username, purple_account_user_split_get_separator(split));
345  else
346  s = strchr(username, purple_account_user_split_get_separator(split));
347 
348  if (s != NULL)
349  {
350  *s = '\0';
351  s++;
352  value = s;
353  }
354  }
355  if (value == NULL)
357 
358  if (value != NULL)
360  }
361 
362  if (username != NULL)
363  gnt_entry_set_text(GNT_ENTRY(dialog->username), username);
364 
365  g_free(username);
366 }
367 
368 static void
370 {
371  PurplePlugin *plugin;
372  PurplePluginProtocolInfo *prplinfo;
373  GList *iter;
374  GntWidget *vbox, *box;
376 
377  if (dialog->prpls)
379  else
380  {
381  dialog->prpls = vbox = gnt_vbox_new(FALSE);
382  gnt_box_set_pad(GNT_BOX(vbox), 0);
384  gnt_box_set_fill(GNT_BOX(vbox), TRUE);
385  }
386 
387  if (dialog->prpl_entries)
388  {
389  g_list_free(dialog->prpl_entries);
390  dialog->prpl_entries = NULL;
391  }
392 
393  vbox = dialog->prpls;
394 
396  if (!plugin)
397  return;
398 
399  prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plugin);
400 
401  account = dialog->account;
402 
403  for (iter = prplinfo->protocol_options; iter; iter = iter->next)
404  {
405  PurpleAccountOption *option = iter->data;
407 
408  box = gnt_hbox_new(TRUE);
409  gnt_box_set_pad(GNT_BOX(box), 0);
410  gnt_box_add_widget(GNT_BOX(vbox), box);
411 
412  if (type == PURPLE_PREF_BOOLEAN)
413  {
416  dialog->prpl_entries = g_list_append(dialog->prpl_entries, widget);
417 
418  if (account)
423  else
426  }
427  else
428  {
431 
433  {
434  GntWidget *combo = gnt_combo_box_new();
435  GList *opt_iter = purple_account_option_get_list(option);
437  const char *active = dv;
438 
439  if (account)
442 
443  gnt_box_add_widget(GNT_BOX(box), combo);
444  dialog->prpl_entries = g_list_append(dialog->prpl_entries, combo);
445 
446  for ( ; opt_iter; opt_iter = opt_iter->next)
447  {
448  PurpleKeyValuePair *kvp = opt_iter->data;
449  gnt_combo_box_add_data(GNT_COMBO_BOX(combo), kvp->value, kvp->key);
450 
451  if (purple_strequal(kvp->value, active))
453  }
454  }
455  else
456  {
457  GntWidget *entry = gnt_entry_new(NULL);
458  gnt_box_add_widget(GNT_BOX(box), entry);
459  dialog->prpl_entries = g_list_append(dialog->prpl_entries, entry);
460 
461  if (type == PURPLE_PREF_STRING)
462  {
464 
465  if (account)
469  else
470  gnt_entry_set_text(GNT_ENTRY(entry), dv);
471  }
472  else if (type == PURPLE_PREF_INT)
473  {
474  char str[32];
476  if (account)
479  snprintf(str, sizeof(str), "%d", value);
482  }
483  else
484  {
485  g_assert_not_reached();
486  }
487  }
488  }
489  }
490 
491  /* Show the registration checkbox only in a new account dialog,
492  * and when the selected prpl has the support for it. */
493  gnt_widget_set_visible(dialog->regserver, account == NULL &&
494  prplinfo->register_user != NULL);
495 }
496 
497 static void
499 {
500  PurplePlugin *plugin;
501  PurplePluginProtocolInfo *prplinfo;
502 
504  if (!plugin)
505  return;
506 
507  prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plugin);
508 
509  if (dialog->newmail == NULL)
510  dialog->newmail = gnt_check_box_new(_("New mail notifications"));
511  if (dialog->account)
514  if (!prplinfo || !(prplinfo->options & OPT_PROTO_MAIL_CHECK))
516  else
518 
519  if (dialog->remember == NULL)
520  dialog->remember = gnt_check_box_new(_("Remember password"));
521  if (dialog->account)
524 }
525 
526 static void
528 {
531  update_user_options(dialog); /* This may not be necessary here */
532  gnt_box_readjust(GNT_BOX(dialog->window));
533  gnt_widget_draw(dialog->window);
534 }
535 
536 static void
538 {
539  GntWidget *window, *hbox;
540  GntWidget *combo, *button, *entry;
541  GList *list, *iter;
543  PurplePlugin *plugin;
544 
545  if (account)
546  {
547  GList *iter;
548  for (iter = accountdialogs; iter; iter = iter->next)
549  {
550  AccountEditDialog *dlg = iter->data;
551  if (dlg->account == account)
552  return;
553  }
554  }
555 
557  if (list == NULL) {
558  purple_notify_error(NULL, _("Error"),
559  _("There are no protocol plugins installed."),
560  _("(You probably forgot to 'make install'.)"));
561  return;
562  }
563 
564  dialog = g_new0(AccountEditDialog, 1);
565  accountdialogs = g_list_prepend(accountdialogs, dialog);
566 
567  dialog->window = window = gnt_vbox_new(FALSE);
568  dialog->account = account;
570  gnt_box_set_title(GNT_BOX(window), account ? _("Modify Account") : _("New Account"));
573  gnt_widget_set_name(window, "edit-account");
575 
576  hbox = gnt_hbox_new(TRUE);
577  gnt_box_set_pad(GNT_BOX(hbox), 0);
579 
580  dialog->protocol = combo = gnt_combo_box_new();
581  for (iter = list; iter; iter = iter->next)
582  {
583  gnt_combo_box_add_data(GNT_COMBO_BOX(combo), iter->data,
584  ((PurplePlugin*)iter->data)->info->name);
585  }
586 
588 
589  if (account && plugin)
591  else
592  gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), list->data);
593 
594  g_signal_connect(G_OBJECT(combo), "selection-changed", G_CALLBACK(prpl_changed_cb), dialog);
595 
596  gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Protocol:")));
597  gnt_box_add_widget(GNT_BOX(hbox), combo);
598 
599  hbox = gnt_hbox_new(TRUE);
600  gnt_box_set_pad(GNT_BOX(hbox), 0);
602 
603  dialog->username = entry = gnt_entry_new(NULL);
604  gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Username:")));
605  gnt_box_add_widget(GNT_BOX(hbox), entry);
606 
607  /* User splits */
610 
611  hbox = gnt_hbox_new(TRUE);
612  gnt_box_set_pad(GNT_BOX(hbox), 0);
614 
615  dialog->password = entry = gnt_entry_new(NULL);
617  gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Password:")));
618  gnt_box_add_widget(GNT_BOX(hbox), entry);
619  if (account)
621 
622  hbox = gnt_hbox_new(TRUE);
623  gnt_box_set_pad(GNT_BOX(hbox), 0);
625 
626  dialog->alias = entry = gnt_entry_new(NULL);
627  gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Alias:")));
628  gnt_box_add_widget(GNT_BOX(hbox), entry);
629  if (account)
631 
632  /* User options */
636 
637  /* Register checkbox */
638  dialog->regserver = gnt_check_box_new(_("Create this account on the server"));
639  gnt_box_add_widget(GNT_BOX(window), dialog->regserver);
640 
642 
643  /* The advanced box */
646 
647  /* TODO: Add proxy options */
648 
649  /* The button box */
650  hbox = gnt_hbox_new(FALSE);
653 
654  button = gnt_button_new(_("Cancel"));
655  gnt_box_add_widget(GNT_BOX(hbox), button);
656  g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gnt_widget_destroy), window);
657 
658  button = gnt_button_new(_("Save"));
659  gnt_box_add_widget(GNT_BOX(hbox), button);
660  g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(save_account_cb), dialog);
661 
662  g_signal_connect_swapped(G_OBJECT(window), "destroy", G_CALLBACK(edit_dialog_destroy), dialog);
663 
667 }
668 
669 static void
671 {
673 }
674 
675 static void
677 {
679  if (!account)
680  return;
682 }
683 
684 static void
686 {
687  GList *iter;
688  for (iter = accountdialogs; iter; iter = iter->next)
689  {
690  AccountEditDialog *dlg = iter->data;
691  if (dlg->account == account)
692  {
694  break;
695  }
696  }
697  purple_request_close_with_handle(account); /* Close any other opened delete window */
699 }
700 
701 static void
703 {
705  char *prompt;
706 
708  if (!account)
709  return;
710 
711  prompt = g_strdup_printf(_("Are you sure you want to delete %s?"),
713 
714  purple_request_action(account, _("Delete Account"), prompt, NULL,
716  account, NULL, NULL, account, 2,
717  _("Delete"), really_delete_account,
718  _("Cancel"), NULL);
719  g_free(prompt);
720 }
721 
722 static void
723 account_toggled(GntWidget *widget, void *key, gpointer null)
724 {
725  PurpleAccount *account = key;
726  gboolean enabled = gnt_tree_get_choice(GNT_TREE(widget), key);
727 
728  if (enabled)
730  account);
731 
733 }
734 
735 static gboolean
736 account_list_key_pressed_cb(GntWidget *widget, const char *text, gpointer null)
737 {
740  int move, pos, count;
741  GList *accounts;
742 
743  if (!account)
744  return FALSE;
745 
746  switch (text[0]) {
747  case '-':
748  move = -1;
749  break;
750  case '=':
751  move = 2; /* XXX: This seems to be a bug in libpurple */
752  break;
753  default:
754  return FALSE;
755  }
756 
758  count = g_list_length(accounts);
759  pos = g_list_index(accounts, account);
760  pos = (move + pos + count + 1) % (count + 1);
762 
763  /* I don't like this, but recreating the entire list seems to be
764  * the easiest way of doing it */
767  for (; accounts; accounts = accounts->next)
768  account_add(accounts->data);
770 
771  return TRUE;
772 }
773 
774 static void
776 {
777  accounts.window = NULL;
778  accounts.tree = NULL;
779 }
780 
782 {
783  GList *iter;
784  GntWidget *box, *button;
785 
786  if (accounts.window) {
788  return;
789  }
790 
793  gnt_box_set_title(GNT_BOX(accounts.window), _("Accounts"));
796  gnt_widget_set_name(accounts.window, "accounts");
797 
799  gnt_label_new(_("You can enable/disable accounts from the following list.")));
800 
802 
805 
806  for (iter = purple_accounts_get_all(); iter; iter = iter->next)
807  {
808  PurpleAccount *account = iter->data;
810  }
811 
812  g_signal_connect(G_OBJECT(accounts.tree), "toggled", G_CALLBACK(account_toggled), NULL);
813  g_signal_connect(G_OBJECT(accounts.tree), "key_pressed", G_CALLBACK(account_list_key_pressed_cb), NULL);
814 
818 
820 
821  box = gnt_hbox_new(FALSE);
822 
823  button = gnt_button_new(_("Add"));
824  gnt_box_add_widget(GNT_BOX(box), button);
826  g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(add_account_cb), NULL);
827 
828  button = gnt_button_new(_("Modify"));
829  gnt_box_add_widget(GNT_BOX(box), button);
830  g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(modify_account_cb), accounts.tree);
831 
832  button = gnt_button_new(_("Delete"));
833  gnt_box_add_widget(GNT_BOX(box), button);
835  g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(delete_account_cb), accounts.tree);
836 
838 
839  g_signal_connect(G_OBJECT(accounts.window), "destroy", G_CALLBACK(reset_accounts_win), NULL);
840 
842 }
843 
845 {
847 }
848 
849 static gpointer
851 {
852  static int handle;
853 
854  return &handle;
855 }
856 
857 static void
859 {
860  if (accounts.window == NULL)
861  return;
864 }
865 
866 static void
868 {
869  if (accounts.window == NULL)
870  return;
871 
873 }
874 
875 static void
877 {
878  if (accounts.window == NULL)
879  return;
881  GPOINTER_TO_INT(user_data));
882 }
883 
885 {
886  GList *iter;
887 
890  NULL);
893  NULL);
896  PURPLE_CALLBACK(account_abled_cb), GINT_TO_POINTER(FALSE));
899  PURPLE_CALLBACK(account_abled_cb), GINT_TO_POINTER(TRUE));
900 
901  iter = purple_accounts_get_all();
902  if (iter) {
903  for (; iter; iter = iter->next) {
904  if (purple_account_get_enabled(iter->data, FINCH_UI))
905  break;
906  }
907  if (!iter)
909  } else {
912  }
913 }
914 
916 {
917  if (accounts.window)
919 }
920 
921 /* The following uiops stuff are copied from gtkaccount.c */
922 typedef struct
923 {
925  char *username;
926  char *alias;
927 } AddUserData;
928 
929 static char *
930 make_info(PurpleAccount *account, PurpleConnection *gc, const char *remote_user,
931  const char *id, const char *alias, const char *msg)
932 {
933  if (msg != NULL && *msg == '\0')
934  msg = NULL;
935 
936  return g_strdup_printf(_("%s%s%s%s has made %s his or her buddy%s%s"),
937  remote_user,
938  (alias != NULL ? " (" : ""),
939  (alias != NULL ? alias : ""),
940  (alias != NULL ? ")" : ""),
941  (id != NULL
942  ? id
946  (msg != NULL ? ": " : "."),
947  (msg != NULL ? msg : ""));
948 }
949 
950 static void
951 notify_added(PurpleAccount *account, const char *remote_user,
952  const char *id, const char *alias,
953  const char *msg)
954 {
955  char *buffer;
956  PurpleConnection *gc;
957 
959 
960  buffer = make_info(account, gc, remote_user, id, alias, msg);
961 
962  purple_notify_info(NULL, NULL, buffer, NULL);
963 
964  g_free(buffer);
965 }
966 
967 static void
969 {
970  g_free(data->username);
971 
972  if (data->alias != NULL)
973  g_free(data->alias);
974 
975  g_free(data);
976 }
977 
978 static void
980 {
982 
983  if (g_list_find(purple_connections_get_all(), gc))
984  {
985  purple_blist_request_add_buddy(data->account, data->username,
986  NULL, data->alias);
987  }
988 
990 }
991 
992 static void
993 request_add(PurpleAccount *account, const char *remote_user,
994  const char *id, const char *alias,
995  const char *msg)
996 {
997  char *buffer;
998  PurpleConnection *gc;
999  AddUserData *data;
1000 
1002 
1003  data = g_new0(AddUserData, 1);
1004  data->account = account;
1005  data->username = g_strdup(remote_user);
1006  data->alias = (alias != NULL ? g_strdup(alias) : NULL);
1007 
1008  buffer = make_info(account, gc, remote_user, id, alias, msg);
1009  purple_request_action(NULL, NULL, _("Add buddy to your list?"),
1011  account, remote_user, NULL,
1012  data, 2,
1013  _("Add"), G_CALLBACK(add_user_cb),
1014  _("Cancel"), G_CALLBACK(free_add_user_data));
1015  g_free(buffer);
1016 }
1017 
1018 /* Copied from gtkaccount.c */
1019 typedef struct {
1022  void *data;
1023  char *username;
1024  char *alias;
1026 } auth_and_add;
1027 
1028 static void
1030 {
1031  g_free(aa->username);
1032  g_free(aa->alias);
1033  g_free(aa);
1034 }
1035 
1036 static void
1038 {
1039  aa->auth_cb(aa->data);
1041  NULL, aa->alias);
1042 }
1043 
1044 static void
1046 {
1047  aa->deny_cb(aa->data);
1048 }
1049 
1050 static void *
1052  const char *remote_user,
1053  const char *id,
1054  const char *alias,
1055  const char *message,
1056  gboolean on_list,
1059  void *user_data)
1060 {
1061  char *buffer;
1062  PurpleConnection *gc;
1063  void *uihandle;
1064 
1066  if (message != NULL && *message == '\0')
1067  message = NULL;
1068 
1069  buffer = g_strdup_printf(_("%s%s%s%s wants to add %s to his or her buddy list%s%s"),
1070  remote_user,
1071  (alias != NULL ? " (" : ""),
1072  (alias != NULL ? alias : ""),
1073  (alias != NULL ? ")" : ""),
1074  (id != NULL
1075  ? id
1079  (message != NULL ? ": " : "."),
1080  (message != NULL ? message : ""));
1081  if (!on_list) {
1082  GntWidget *widget;
1083  GList *iter;
1084  auth_and_add *aa = g_new(auth_and_add, 1);
1085 
1086  aa->auth_cb = auth_cb;
1087  aa->deny_cb = deny_cb;
1088  aa->data = user_data;
1089  aa->username = g_strdup(remote_user);
1090  aa->alias = g_strdup(alias);
1091  aa->account = account;
1092 
1093  uihandle = gnt_vwindow_new(FALSE);
1094  gnt_box_set_title(GNT_BOX(uihandle), _("Authorize buddy?"));
1095  gnt_box_set_pad(GNT_BOX(uihandle), 0);
1096 
1097  widget = purple_request_action(NULL, _("Authorize buddy?"), buffer, NULL,
1099  account, remote_user, NULL,
1100  aa, 2,
1101  _("Authorize"), authorize_and_add_cb,
1102  _("Deny"), deny_no_add_cb);
1105  gnt_box_add_widget(GNT_BOX(uihandle), widget);
1106 
1108 
1110  for (iter = GNT_BOX(widget)->list; iter; iter = iter->next) {
1111  if (GNT_IS_BUTTON(iter->data)) {
1112  gnt_widget_destroy(iter->data);
1113  gnt_box_remove(GNT_BOX(widget), iter->data);
1114  break;
1115  }
1116  }
1119  gnt_box_add_widget(GNT_BOX(uihandle), widget);
1120  gnt_widget_show(uihandle);
1121 
1122  g_signal_connect_swapped(G_OBJECT(uihandle), "destroy", G_CALLBACK(free_auth_and_add), aa);
1123  } else {
1124  uihandle = purple_request_action(NULL, _("Authorize buddy?"), buffer, NULL,
1126  account, remote_user, NULL,
1127  user_data, 2,
1128  _("Authorize"), auth_cb,
1129  _("Deny"), deny_cb);
1130  }
1131  g_signal_connect(G_OBJECT(uihandle), "destroy",
1132  G_CALLBACK(purple_account_request_close), NULL);
1133  g_free(buffer);
1134  return uihandle;
1135 }
1136 
1137 static void
1138 finch_request_close(void *uihandle)
1139 {
1141 }
1142 
1144 {
1145  notify_added,
1146  NULL,
1147  request_add,
1150  NULL,
1151  NULL,
1152  NULL,
1153  NULL
1154 };
1155 
1157 {
1158  return &ui_ops;
1159 }
1160 
GNT_WIDGET_NO_BORDER
Definition: gntwidget.h:59
purple_request_action
void * purple_request_action(void *handle, const char *title, const char *primary, const char *secondary, int default_action, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count,...)
Definition: request.c:1300
PURPLE_PREF_STRING_LIST
Definition: prefs.h:41
AccountEditDialog::alias
GntWidget * alias
Definition: gntaccount.c:72
purple_plugins_find_with_id
PurplePlugin * purple_plugins_find_with_id(const char *id)
Definition: plugin.c:1617
OPT_PROTO_MAIL_CHECK
Definition: prpl.h:167
GNT_IS_BUTTON
#define GNT_IS_BUTTON(obj)
Definition: gntbutton.h:38
gnt_box_set_pad
void gnt_box_set_pad(GntBox *box, int pad)
Definition: gntbox.c:695
ui_ops
static PurpleAccountUiOps ui_ops
Definition: gntaccount.c:1143
account
static PurpleAccount * account
Definition: raw.c:45
purple_account_set_int
void purple_account_set_int(PurpleAccount *account, const char *name, int value)
Definition: account.c:2029
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
gnt_entry_set_text
void gnt_entry_set_text(GntEntry *entry, const char *text)
Definition: gntentry.c:1140
purple_account_set_check_mail
void purple_account_set_check_mail(PurpleAccount *account, gboolean value)
Definition: account.c:1785
purple_account_set_enabled
void purple_account_set_enabled(PurpleAccount *account, const char *ui, gboolean value)
Definition: account.c:1793
purple_account_get_username
const char * purple_account_get_username(const PurpleAccount *account)
Definition: account.c:2225
gnt_widget_show
void gnt_widget_show(GntWidget *widget)
Definition: gntwidget.c:326
purple_account_option_get_type
PurplePrefType purple_account_option_get_type(const PurpleAccountOption *option)
Definition: accountopt.c:223
gntbox.h
account_toggled
static void account_toggled(GntWidget *widget, void *key, gpointer null)
Definition: gntaccount.c:723
gnt_tree_get_choice
gboolean gnt_tree_get_choice(GntTree *tree, void *key)
Definition: gnttree.c:1624
account_add
static void account_add(PurpleAccount *account)
Definition: gntaccount.c:89
PURPLE_DEFAULT_ACTION_NONE
#define PURPLE_DEFAULT_ACTION_NONE
Definition: request.h:38
gnt_combo_box_new
GntWidget * gnt_combo_box_new()
Definition: gntcombobox.c:350
account.h
AccountEditDialog::username
GntWidget * username
Definition: gntaccount.c:70
GNT_COMBO_BOX
#define GNT_COMBO_BOX(obj)
Definition: gntcombobox.h:36
count
static int count
Definition: nmcontact.c:50
finch_accounts_show_all
void finch_accounts_show_all()
Definition: gntaccount.c:781
notify.h
auth_and_add::data
void * data
Definition: gntaccount.c:1022
PURPLE_PREF_BOOLEAN
Definition: prefs.h:38
add_account_cb
static void add_account_cb(GntWidget *widget, gpointer null)
Definition: gntaccount.c:670
gnt_label_new
GntWidget * gnt_label_new(const char *text)
Definition: gntlabel.c:186
gnt_tree_remove
void gnt_tree_remove(GntTree *tree, gpointer key)
Definition: gnttree.c:1479
widget
GtkWidget * widget
Definition: pidgintooltip.c:38
purple_signal_connect
gulong purple_signal_connect(void *instance, const char *signal, void *handle, PurpleCallback func, void *data)
Definition: signals.c:305
PurpleAccountRequestAuthorizationCb
void(* PurpleAccountRequestAuthorizationCb)(void *)
Definition: account.h:41
_GntWidget
Definition: gntwidget.h:98
deny_no_add_cb
static void deny_no_add_cb(auth_and_add *aa)
Definition: gntaccount.c:1045
gnt.h
purple_account_user_split_get_text
const char * purple_account_user_split_get_text(const PurpleAccountUserSplit *split)
Definition: accountopt.c:339
gnt_tree_set_selected
void gnt_tree_set_selected(GntTree *tree, void *key)
Definition: gnttree.c:1655
window
GntWidget * window
Definition: gntcertmgr.c:45
PURPLE_PREF_INT
Definition: prefs.h:39
purple_account_get_alias
const char * purple_account_get_alias(const PurpleAccount *account)
Definition: account.c:2241
finch_retrieve_user_info
gpointer finch_retrieve_user_info(PurpleConnection *conn, const char *name)
Definition: gntblist.c:1267
notify_added
static void notify_added(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *msg)
Definition: gntaccount.c:951
_PurplePluginProtocolInfo::options
PurpleProtocolOptions options
Definition: prpl.h:225
gnt_vbox_new
#define gnt_vbox_new(homo)
Definition: gntbox.h:96
purple_accounts_add
void purple_accounts_add(PurpleAccount *account)
Definition: account.c:2944
gntutils.h
finch_accounts_uninit
void finch_accounts_uninit()
Definition: gntaccount.c:915
purple_account_set_remember_password
void purple_account_set_remember_password(PurpleAccount *account, gboolean value)
Definition: account.c:1775
make_info
static char * make_info(PurpleAccount *account, PurpleConnection *gc, const char *remote_user, const char *id, const char *alias, const char *msg)
Definition: gntaccount.c:930
gnt_combo_box_set_selected
void gnt_combo_box_set_selected(GntComboBox *box, gpointer key)
Definition: gntcombobox.c:370
plugin.h
_
void boot_DynaLoader _((pTHX_ CV *cv))
gnt_util_set_trigger_widget
void gnt_util_set_trigger_widget(GntWidget *wid, const char *text, GntWidget *button)
Definition: gntutils.c:496
gnt_window_present
void gnt_window_present(GntWidget *window)
Definition: gntmain.c:548
AddUserData::alias
char * alias
Definition: gntaccount.c:926
finch_request_close
static void finch_request_close(void *uihandle)
Definition: gntaccount.c:1138
GNT_BOX
#define GNT_BOX(obj)
Definition: gntbox.h:34
purple_account_get_connection
PurpleConnection * purple_account_get_connection(const PurpleAccount *account)
Definition: account.c:2284
authorize_and_add_cb
static void authorize_and_add_cb(auth_and_add *aa)
Definition: gntaccount.c:1037
gntentry.h
purple_account_set_username
void purple_account_set_username(PurpleAccount *account, const char *username)
Definition: account.c:1678
gnt_box_add_widget
void gnt_box_add_widget(GntBox *b, GntWidget *widget)
Definition: gntbox.c:674
AccountEditDialog::split_entries
GList * split_entries
Definition: gntaccount.c:75
gnt_button_new
GntWidget * gnt_button_new(const char *text)
Definition: gntbutton.c:170
handle
static PurplePlugin * handle
Definition: nss-prefs.c:61
AccountEditDialog
Definition: gntaccount.c:63
purple_account_get_check_mail
gboolean purple_account_get_check_mail(const PurpleAccount *account)
Definition: account.c:2336
purple_request_close_with_handle
void purple_request_close_with_handle(void *handle)
Definition: request.c:1539
purple_account_user_split_get_separator
char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split)
Definition: accountopt.c:355
edit_account
static void edit_account(PurpleAccount *account)
Definition: gntaccount.c:537
GNT_ALIGN_MID
Definition: gntbox.h:49
request_add
static void request_add(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *msg)
Definition: gntaccount.c:993
free_add_user_data
static void free_add_user_data(AddUserData *data)
Definition: gntaccount.c:968
_PurplePluginProtocolInfo
Definition: prpl.h:223
str
static char str[256]
Definition: util.c:28
FINCH_UI
#define FINCH_UI
Definition: finch.h:27
gnt_tree_change_text
void gnt_tree_change_text(GntTree *tree, gpointer key, int colno, const char *text)
Definition: gnttree.c:1560
finch_accounts_get_handle
static gpointer finch_accounts_get_handle(void)
Definition: gntaccount.c:850
gnt_widget_set_name
void gnt_widget_set_name(GntWidget *widget, const char *name)
Definition: gntwidget.c:589
AccountEditDialog::protocol
GntWidget * protocol
Definition: gntaccount.c:69
_PurplePlugin
Definition: plugin.h:151
PurplePrefType
enum _PurplePrefType PurplePrefType
gntlabel.h
delete_account_cb
static void delete_account_cb(GntWidget *widget, GntTree *tree)
Definition: gntaccount.c:702
auth_and_add::auth_cb
PurpleAccountRequestAuthorizationCb auth_cb
Definition: gntaccount.c:1020
purple_account_set_password
void purple_account_set_password(PurpleAccount *account, const char *password)
Definition: account.c:1697
data
gpointer data
Definition: gntwm.c:1781
save_account_cb
static void save_account_cb(AccountEditDialog *dialog)
Definition: gntaccount.c:110
gnt_box_remove_all
void gnt_box_remove_all(GntBox *box)
Definition: gntbox.c:799
purple_accounts_delete
void purple_accounts_delete(PurpleAccount *account)
Definition: account.c:2976
AddUserData::account
PurpleAccount * account
Definition: gntaccount.c:924
add_user_cb
static void add_user_cb(AddUserData *data)
Definition: gntaccount.c:979
add_protocol_options
static void add_protocol_options(AccountEditDialog *dialog)
Definition: gntaccount.c:369
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
FinchAccountList::window
GntWidget * window
Definition: gntaccount.c:57
purple_account_get_enabled
gboolean purple_account_get_enabled(const PurpleAccount *account, const char *ui)
Definition: account.c:2344
PurpleAccountUserSplit
Definition: accountopt.h:65
_GntTree
Definition: gnttree.h:57
auth_and_add::deny_cb
PurpleAccountRequestAuthorizationCb deny_cb
Definition: gntaccount.c:1021
pietray.dialog
dialog
Definition: pietray.py:204
GNT_TREE
#define GNT_TREE(obj)
Definition: gnttree.h:37
_PurplePluginProtocolInfo::user_splits
GList * user_splits
Definition: prpl.h:227
AccountEditDialog::window
GntWidget * window
Definition: gntaccount.c:67
purple_account_get_remember_password
gboolean purple_account_get_remember_password(const PurpleAccount *account)
Definition: account.c:2328
GNT_CHECK_BOX
#define GNT_CHECK_BOX(obj)
Definition: gntcheckbox.h:36
gnt_check_box_set_checked
void gnt_check_box_set_checked(GntCheckBox *box, gboolean set)
Definition: gntcheckbox.c:164
PURPLE_PREF_STRING
Definition: prefs.h:40
gntcombobox.h
gnt_check_box_new
GntWidget * gnt_check_box_new(const char *text)
Definition: gntcheckbox.c:154
gnt_box_give_focus_to_child
void gnt_box_give_focus_to_child(GntBox *box, GntWidget *widget)
Definition: gntbox.c:881
gnt_box_set_toplevel
void gnt_box_set_toplevel(GntBox *box, gboolean set)
Definition: gntbox.c:701
purple_account_option_get_default_bool
gboolean purple_account_option_get_default_bool(const PurpleAccountOption *option)
Definition: accountopt.c:247
PURPLE_CALLBACK
#define PURPLE_CALLBACK(func)
Definition: signals.h:32
gnt_box_remove
void gnt_box_remove(GntBox *box, GntWidget *widget)
Definition: gntbox.c:780
GNT_WIDGET_SET_FLAGS
#define GNT_WIDGET_SET_FLAGS(obj, flags)
Definition: gntwidget.h:44
finch_account_dialog_show
void finch_account_dialog_show(PurpleAccount *account)
Definition: gntaccount.c:844
purple_account_get_protocol_id
const char * purple_account_get_protocol_id(const PurpleAccount *account)
Definition: account.c:2265
reset_accounts_win
static void reset_accounts_win(GntWidget *widget, gpointer null)
Definition: gntaccount.c:775
auth_and_add::username
char * username
Definition: gntaccount.c:1023
gnt_check_box_get_checked
gboolean gnt_check_box_get_checked(GntCheckBox *box)
Definition: gntcheckbox.c:173
purple_blist_request_add_buddy
void purple_blist_request_add_buddy(PurpleAccount *account, const char *username, const char *group, const char *alias)
Definition: blist.c:2816
gnt_entry_set_masked
void gnt_entry_set_masked(GntEntry *entry, gboolean set)
Definition: gntentry.c:1177
purple_accounts_get_handle
void * purple_accounts_get_handle(void)
Definition: account.c:3180
gntbutton.h
GNT_WIDGET
#define GNT_WIDGET(obj)
Definition: gntwidget.h:37
_PurplePluginProtocolInfo::register_user
void(* register_user)(PurpleAccount *)
Definition: prpl.h:440
purple_account_user_split_get_reverse
gboolean purple_account_user_split_get_reverse(const PurpleAccountUserSplit *split)
Definition: accountopt.c:363
accounts
static FinchAccountList accounts
Definition: gntaccount.c:61
purple_savedstatus_get_current
PurpleSavedStatus * purple_savedstatus_get_current(void)
Definition: savedstatuses.c:791
purple_account_option_get_default_string
const char * purple_account_option_get_default_string(const PurpleAccountOption *option)
Definition: accountopt.c:265
strchr
#define strchr
Definition: sysdep.h:62
TRUE
#define TRUE
Definition: protobuf-c.c:56
_PurpleAccount
Definition: account.h:169
dbus-analyze-signals.type
string type
Definition: dbus-analyze-signals.py:42
really_delete_account
static void really_delete_account(PurpleAccount *account)
Definition: gntaccount.c:685
gnt_tree_add_choice
GntTreeRow * gnt_tree_add_choice(GntTree *tree, void *key, GntTreeRow *row, void *parent, void *bigbro)
Definition: gnttree.c:1584
_PurpleKeyValuePair::value
void * value
Definition: util.h:73
snprintf
#define snprintf
Definition: libc_interface.h:136
_PurpleAccountUiOps
Definition: account.h:78
finch_accounts_init
void finch_accounts_init()
Definition: gntaccount.c:884
GNT_ENTRY_FLAG_INT
Definition: gntentry.h:57
FALSE
#define FALSE
Definition: protobuf-c.c:57
purple_account_get_int
int purple_account_get_int(const PurpleAccount *account, const char *name, int default_value)
Definition: account.c:2449
AccountEditDialog::remember
GntWidget * remember
Definition: gntaccount.c:81
account_abled_cb
static void account_abled_cb(PurpleAccount *account, gpointer user_data)
Definition: gntaccount.c:876
purple_account_request_close
void purple_account_request_close(void *ui_handle)
Definition: account.c:1421
auth_and_add
Definition: gntaccount.c:1019
PURPLE_REQUEST_ACTION
Definition: request.h:47
purple_request_close
void purple_request_close(PurpleRequestType type, void *ui_handle)
Definition: request.c:1521
request.h
purple_account_set_string
void purple_account_set_string(PurpleAccount *account, const char *name, const char *value)
Definition: account.c:2054
purple_account_new
PurpleAccount * purple_account_new(const char *username, const char *protocol_id)
Definition: account.c:1052
purple_account_get_bool
gboolean purple_account_get_bool(const PurpleAccount *account, const char *name, gboolean default_value)
Definition: account.c:2487
_PurplePluginProtocolInfo::protocol_options
GList * protocol_options
Definition: prpl.h:228
purple_account_get_password
const char * purple_account_get_password(const PurpleAccount *account)
Definition: account.c:2233
purple_account_set_alias
void purple_account_set_alias(PurpleAccount *account, const char *alias)
Definition: account.c:1708
gnt_box_set_title
void gnt_box_set_title(GntBox *b, const char *title)
Definition: gntbox.c:680
gnt_screen_release
void gnt_screen_release(GntWidget *widget)
Definition: gntmain.c:561
strrchr
#define strrchr
Definition: sysdep.h:63
FinchAccountList
Definition: gntaccount.c:55
text
static char * text[]
Definition: zephyr_err.c:10
modify_account_cb
static void modify_account_cb(GntWidget *widget, GntTree *tree)
Definition: gntaccount.c:676
purple_account_option_get_list
GList * purple_account_option_get_list(const PurpleAccountOption *option)
Definition: accountopt.c:299
purple_plugin_get_id
const gchar * purple_plugin_get_id(const PurplePlugin *plugin)
Definition: plugin.c:916
purple_account_get_string
const char * purple_account_get_string(const PurpleAccount *account, const char *name, const char *default_value)
Definition: account.c:2468
purple_account_set_protocol_id
void purple_account_set_protocol_id(PurpleAccount *account, const char *protocol_id)
Definition: account.c:1755
GNT_KEY_DEL
#define GNT_KEY_DEL
Definition: gntkeys.h:66
_PurpleKeyValuePair
Definition: util.h:70
gnt_combo_box_get_selected_data
gpointer gnt_combo_box_get_selected_data(GntComboBox *box)
Definition: gntcombobox.c:365
gnt_tree_new_with_columns
GntWidget * gnt_tree_new_with_columns(int col)
Definition: gnttree.c:1694
connection.h
purple_account_register
void purple_account_register(PurpleAccount *account)
Definition: account.c:1187
AccountEditDialog::regserver
GntWidget * regserver
Definition: gntaccount.c:82
purple_notify_info
#define purple_notify_info(handle, title, primary, secondary)
Definition: notify.h:742
purple_account_get_protocol_name
const char * purple_account_get_protocol_name(const PurpleAccount *account)
Definition: account.c:2272
savedstatuses.h
option
Definition: getopt.h:84
AddUserData::username
char * username
Definition: gntaccount.c:925
purple_account_is_disconnected
gboolean purple_account_is_disconnected(const PurpleAccount *account)
Definition: account.c:2219
tree
GntWidget * tree
Definition: gntcertmgr.c:46
gnt_widget_destroy
void gnt_widget_destroy(GntWidget *obj)
Definition: gntwidget.c:312
gntblist.h
purple_account_option_get_default_list_value
const char * purple_account_option_get_default_list_value(const PurpleAccountOption *option)
Definition: accountopt.c:274
FinchAccountList::tree
GntWidget * tree
Definition: gntaccount.c:58
gnt_widget_draw
void gnt_widget_draw(GntWidget *widget)
Definition: gntwidget.c:335
gnt_tree_set_col_width
void gnt_tree_set_col_width(GntTree *tree, int col, int width)
Definition: gnttree.c:1748
prpl_changed_cb
static void prpl_changed_cb(GntWidget *combo, PurplePlugin *old, PurplePlugin *new, AccountEditDialog *dialog)
Definition: gntaccount.c:527
gnt_widget_set_visible
void gnt_widget_set_visible(GntWidget *widget, gboolean set)
Definition: gntwidget.c:640
AccountEditDialog::newmail
GntWidget * newmail
Definition: gntaccount.c:80
free_auth_and_add
static void free_auth_and_add(auth_and_add *aa)
Definition: gntaccount.c:1029
purple_accounts_get_all
GList * purple_accounts_get_all(void)
Definition: account.c:3082
gntcheckbox.h
update_user_options
static void update_user_options(AccountEditDialog *dialog)
Definition: gntaccount.c:498
auth_and_add::account
PurpleAccount * account
Definition: gntaccount.c:1025
gnt_hbox_new
#define gnt_hbox_new(homo)
Definition: gntbox.h:97
purple_account_option_get_setting
const char * purple_account_option_get_setting(const PurpleAccountOption *option)
Definition: accountopt.c:239
purple_accounts_reorder
void purple_accounts_reorder(PurpleAccount *account, gint new_index)
Definition: account.c:3049
gnt_entry_get_text
const char * gnt_entry_get_text(GntEntry *entry)
Definition: gntentry.c:1163
AccountEditDialog::account
PurpleAccount * account
Definition: gntaccount.c:65
finch.h
AccountEditDialog::password
GntWidget * password
Definition: gntaccount.c:71
purple_plugins_get_protocols
GList * purple_plugins_get_protocols(void)
Definition: plugin.c:1642
update_user_splits
static void update_user_splits(AccountEditDialog *dialog)
Definition: gntaccount.c:285
AccountEditDialog::splits
GntWidget * splits
Definition: gntaccount.c:74
gnt_tree_remove_all
void gnt_tree_remove_all(GntTree *tree)
Definition: gnttree.c:1545
gntline.h
purple_savedstatus_activate_for_account
void purple_savedstatus_activate_for_account(const PurpleSavedStatus *saved_status, PurpleAccount *account)
Definition: savedstatuses.c:1137
gnt_vwindow_new
#define gnt_vwindow_new(homo)
Definition: gntwindow.h:81
purple_connection_get_display_name
const char * purple_connection_get_display_name(const PurpleConnection *gc)
Definition: connection.c:464
_PurpleConnection
Definition: connection.h:245
gnt_line_new
GntWidget * gnt_line_new(gboolean vertical)
Definition: gntline.c:168
value
gpointer value
Definition: gntwm.c:1782
AccountEditDialog::prpl_entries
GList * prpl_entries
Definition: gntaccount.c:77
GNT_ALIGN_LEFT
Definition: gntbox.h:46
purple_account_option_get_text
const char * purple_account_option_get_text(const PurpleAccountOption *option)
Definition: accountopt.c:231
finch_request_authorize
static void * finch_request_authorize(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message, gboolean on_list, PurpleAccountRequestAuthorizationCb auth_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data)
Definition: gntaccount.c:1051
AddUserData
Definition: gntaccount.c:922
purple_account_set_bool
void purple_account_set_bool(PurpleAccount *account, const char *name, gboolean value)
Definition: account.c:2080
gnttree.h
GNT_ENTRY
#define GNT_ENTRY(obj)
Definition: gntentry.h:36
PurpleAccountOption
Definition: accountopt.h:37
accountopt.h
gnt_tree_create_row
GntTreeRow * gnt_tree_create_row(GntTree *tree,...)
Definition: gnttree.c:1728
gntaccount.h
purple_account_option_get_default_int
int purple_account_option_get_default_int(const PurpleAccountOption *option)
Definition: accountopt.c:256
finch_accounts_get_ui_ops
PurpleAccountUiOps * finch_accounts_get_ui_ops()
Definition: gntaccount.c:1156
account_added_callback
static void account_added_callback(PurpleAccount *account)
Definition: gntaccount.c:858
_PurpleKeyValuePair::key
gchar * key
Definition: util.h:72
gnt_box_readjust
void gnt_box_readjust(GntBox *box)
Definition: gntbox.c:810
AccountEditDialog::prpls
GntWidget * prpls
Definition: gntaccount.c:78
auth_and_add::alias
char * alias
Definition: gntaccount.c:1024
gnt_combo_box_add_data
void gnt_combo_box_add_data(GntComboBox *box, gpointer key, const char *text)
Definition: gntcombobox.c:357
purple_connections_get_all
GList * purple_connections_get_all(void)
Definition: connection.c:665
gnt_tree_get_selection_data
gpointer gnt_tree_get_selection_data(GntTree *tree)
Definition: gnttree.c:1441
gnt_entry_new
GntWidget * gnt_entry_new(const char *text)
Definition: gntentry.c:1093
_PurpleSavedStatus
Definition: savedstatuses.c:61
gnt_box_set_fill
void gnt_box_set_fill(GntBox *box, gboolean fill)
Definition: gntbox.c:849
GNT_KEY_INS
#define GNT_KEY_INS
Definition: gntkeys.h:67
gntwindow.h
account_list_key_pressed_cb
static gboolean account_list_key_pressed_cb(GntWidget *widget, const char *text, gpointer null)
Definition: gntaccount.c:736
gnt_entry_set_flag
void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag)
Definition: gntentry.c:1157
purple_normalize
const char * purple_normalize(const PurpleAccount *account, const char *str)
gnt_box_set_alignment
void gnt_box_set_alignment(GntBox *box, GntAlignment alignment)
Definition: gntbox.c:775
purple_account_user_split_get_default_value
const char * purple_account_user_split_get_default_value(const PurpleAccountUserSplit *split)
Definition: accountopt.c:347
accountdialogs
static GList * accountdialogs
Definition: gntaccount.c:86
account_removed_callback
static void account_removed_callback(PurpleAccount *account)
Definition: gntaccount.c:867
edit_dialog_destroy
static void edit_dialog_destroy(AccountEditDialog *dialog)
Definition: gntaccount.c:101
PURPLE_PLUGIN_PROTOCOL_INFO
#define PURPLE_PLUGIN_PROTOCOL_INFO(plugin)
Definition: prpl.h:660
gnt_hline_new
#define gnt_hline_new()
Definition: gntline.h:74