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 File Reference
#include <internal.h>
#include <gnt.h>
#include <gntbox.h>
#include <gntbutton.h>
#include <gntcheckbox.h>
#include <gntcombobox.h>
#include <gntentry.h>
#include <gntlabel.h>
#include <gntline.h>
#include <gnttree.h>
#include <gntutils.h>
#include <gntwindow.h>
#include "finch.h"
#include <account.h>
#include <accountopt.h>
#include <connection.h>
#include <notify.h>
#include <plugin.h>
#include <request.h>
#include <savedstatuses.h>
#include "gntaccount.h"
#include "gntblist.h"
#include <string.h>
Include dependency graph for gntaccount.c:

Go to the source code of this file.

Data Structures

struct  FinchAccountList
 
struct  AccountEditDialog
 
struct  AddUserData
 
struct  auth_and_add
 

Functions

static void account_add (PurpleAccount *account)
 
static void edit_dialog_destroy (AccountEditDialog *dialog)
 
static void save_account_cb (AccountEditDialog *dialog)
 
static void update_user_splits (AccountEditDialog *dialog)
 
static void add_protocol_options (AccountEditDialog *dialog)
 
static void update_user_options (AccountEditDialog *dialog)
 
static void prpl_changed_cb (GntWidget *combo, PurplePlugin *old, PurplePlugin *new, AccountEditDialog *dialog)
 
static void edit_account (PurpleAccount *account)
 
static void add_account_cb (GntWidget *widget, gpointer null)
 
static void modify_account_cb (GntWidget *widget, GntTree *tree)
 
static void really_delete_account (PurpleAccount *account)
 
static void delete_account_cb (GntWidget *widget, GntTree *tree)
 
static void account_toggled (GntWidget *widget, void *key, gpointer null)
 
static gboolean account_list_key_pressed_cb (GntWidget *widget, const char *text, gpointer null)
 
static void reset_accounts_win (GntWidget *widget, gpointer null)
 
void finch_accounts_show_all ()
 
void finch_account_dialog_show (PurpleAccount *account)
 
static gpointer finch_accounts_get_handle (void)
 
static void account_added_callback (PurpleAccount *account)
 
static void account_removed_callback (PurpleAccount *account)
 
static void account_abled_cb (PurpleAccount *account, gpointer user_data)
 
void finch_accounts_init ()
 
void finch_accounts_uninit ()
 
static char * make_info (PurpleAccount *account, PurpleConnection *gc, const char *remote_user, const char *id, const char *alias, const char *msg)
 
static void notify_added (PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *msg)
 
static void free_add_user_data (AddUserData *data)
 
static void add_user_cb (AddUserData *data)
 
static void request_add (PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *msg)
 
static void free_auth_and_add (auth_and_add *aa)
 
static void authorize_and_add_cb (auth_and_add *aa)
 
static void deny_no_add_cb (auth_and_add *aa)
 
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)
 
static void finch_request_close (void *uihandle)
 
PurpleAccountUiOpsfinch_accounts_get_ui_ops ()
 

Variables

static FinchAccountList accounts
 
static GList * accountdialogs
 
static PurpleAccountUiOps ui_ops
 

Detailed Description

GNT Account API

Definition in file gntaccount.c.

Function Documentation

◆ account_abled_cb()

static void account_abled_cb ( PurpleAccount account,
gpointer  user_data 
)
static

◆ account_add()

◆ account_added_callback()

static void account_added_callback ( PurpleAccount account)
static

◆ account_list_key_pressed_cb()

static gboolean account_list_key_pressed_cb ( GntWidget widget,
const char *  text,
gpointer  null 
)
static

◆ account_removed_callback()

static void account_removed_callback ( PurpleAccount account)
static

◆ account_toggled()

static void account_toggled ( GntWidget widget,
void *  key,
gpointer  null 
)
static

◆ add_account_cb()

static void add_account_cb ( GntWidget widget,
gpointer  null 
)
static

Definition at line 670 of file gntaccount.c.

References edit_account(), and NULL.

Referenced by finch_accounts_show_all().

◆ add_protocol_options()

◆ add_user_cb()

static void add_user_cb ( AddUserData data)
static

◆ authorize_and_add_cb()

static void authorize_and_add_cb ( auth_and_add aa)
static

◆ delete_account_cb()

static void delete_account_cb ( GntWidget widget,
GntTree tree 
)
static

◆ deny_no_add_cb()

static void deny_no_add_cb ( auth_and_add aa)
static

Definition at line 1045 of file gntaccount.c.

References auth_and_add::data, and auth_and_add::deny_cb.

Referenced by finch_request_authorize().

◆ edit_account()

◆ edit_dialog_destroy()

static void edit_dialog_destroy ( AccountEditDialog dialog)
static

Definition at line 101 of file gntaccount.c.

References accountdialogs, and pietray::dialog.

Referenced by edit_account().

◆ finch_account_dialog_show()

void finch_account_dialog_show ( PurpleAccount account)

Show the edit dialog for an account.

Parameters
accountThe account to edit, or NULL to create a new account.
Since
2.2.0

Definition at line 844 of file gntaccount.c.

References account, and edit_account().

Referenced by ce_modify_account_cb().

◆ finch_accounts_get_handle()

static gpointer finch_accounts_get_handle ( void  )
static

Definition at line 850 of file gntaccount.c.

References handle.

Referenced by finch_accounts_init().

◆ finch_accounts_get_ui_ops()

PurpleAccountUiOps* finch_accounts_get_ui_ops ( void  )

Get the ui-functions.

Returns
The PurpleAccountUiOps structure populated with the appropriate functions.

Definition at line 1156 of file gntaccount.c.

References ui_ops.

Referenced by gnt_ui_init().

◆ finch_accounts_init()

◆ finch_accounts_show_all()

◆ finch_accounts_uninit()

void finch_accounts_uninit ( void  )

Perform necessary uninitializations.

Definition at line 915 of file gntaccount.c.

References accounts, gnt_widget_destroy(), and FinchAccountList::window.

◆ finch_request_authorize()

◆ finch_request_close()

static void finch_request_close ( void *  uihandle)
static

Definition at line 1138 of file gntaccount.c.

References PURPLE_REQUEST_ACTION, and purple_request_close().

◆ free_add_user_data()

static void free_add_user_data ( AddUserData data)
static

Definition at line 968 of file gntaccount.c.

References data, and NULL.

Referenced by add_user_cb(), and request_add().

◆ free_auth_and_add()

static void free_auth_and_add ( auth_and_add aa)
static

Definition at line 1029 of file gntaccount.c.

References auth_and_add::alias, and auth_and_add::username.

Referenced by finch_request_authorize().

◆ make_info()

static char* make_info ( PurpleAccount account,
PurpleConnection gc,
const char *  remote_user,
const char *  id,
const char *  alias,
const char *  msg 
)
static

◆ modify_account_cb()

static void modify_account_cb ( GntWidget widget,
GntTree tree 
)
static

Definition at line 676 of file gntaccount.c.

References account, edit_account(), gnt_tree_get_selection_data(), and tree.

Referenced by finch_accounts_show_all().

◆ notify_added()

static void notify_added ( PurpleAccount account,
const char *  remote_user,
const char *  id,
const char *  alias,
const char *  msg 
)
static

◆ prpl_changed_cb()

static void prpl_changed_cb ( GntWidget combo,
PurplePlugin old,
PurplePlugin new,
AccountEditDialog dialog 
)
static

◆ really_delete_account()

static void really_delete_account ( PurpleAccount account)
static

◆ request_add()

static void request_add ( PurpleAccount account,
const char *  remote_user,
const char *  id,
const char *  alias,
const char *  msg 
)
static

◆ reset_accounts_win()

static void reset_accounts_win ( GntWidget widget,
gpointer  null 
)
static

Definition at line 775 of file gntaccount.c.

References accounts, NULL, FinchAccountList::tree, and FinchAccountList::window.

Referenced by finch_accounts_show_all().

◆ save_account_cb()

static void save_account_cb ( AccountEditDialog dialog)
static

Definition at line 110 of file gntaccount.c.

References _(), account, accounts, pietray::dialog, FINCH_UI, GNT_BOX, gnt_box_give_focus_to_child(), GNT_CHECK_BOX, gnt_check_box_get_checked(), GNT_COMBO_BOX, gnt_combo_box_get_selected_data(), GNT_ENTRY, gnt_entry_get_text(), GNT_TREE, gnt_tree_change_text(), gnt_tree_set_selected(), gnt_widget_destroy(), NULL, _PurplePluginProtocolInfo::protocol_options, purple_account_get_protocol_id(), purple_account_get_protocol_name(), purple_account_get_username(), purple_account_is_disconnected(), purple_account_new(), purple_account_option_get_setting(), purple_account_option_get_type(), purple_account_register(), purple_account_set_alias(), purple_account_set_bool(), purple_account_set_check_mail(), purple_account_set_enabled(), purple_account_set_int(), purple_account_set_password(), purple_account_set_protocol_id(), purple_account_set_remember_password(), purple_account_set_string(), purple_account_set_username(), purple_account_user_split_get_default_value(), purple_account_user_split_get_separator(), purple_accounts_add(), purple_normalize(), purple_notify_error, purple_plugin_get_id(), PURPLE_PLUGIN_PROTOCOL_INFO, PURPLE_PREF_BOOLEAN, PURPLE_PREF_INT, PURPLE_PREF_STRING, PURPLE_PREF_STRING_LIST, purple_savedstatus_activate_for_account(), purple_savedstatus_get_current(), purple_strequal(), _PurplePluginProtocolInfo::register_user, str, FinchAccountList::tree, TRUE, dbus-analyze-signals::type, _PurplePluginProtocolInfo::user_splits, value, and FinchAccountList::window.

Referenced by edit_account().

◆ update_user_options()

◆ update_user_splits()

Variable Documentation

◆ accountdialogs

GList* accountdialogs
static

Definition at line 86 of file gntaccount.c.

Referenced by edit_account(), edit_dialog_destroy(), and really_delete_account().

◆ accounts

◆ ui_ops

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
finch_request_close
static void finch_request_close(void *uihandle)
Definition: gntaccount.c:1138
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
NULL
#define NULL
Definition: getopt1.c:52
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