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)  

gntgf.c File Reference
#include "internal.h"
#include <glib.h>
#include <plugin.h>
#include <version.h>
#include <blist.h>
#include <conversation.h>
#include <debug.h>
#include <eventloop.h>
#include <util.h>
#include <gnt.h>
#include <gntbox.h>
#include <gntbutton.h>
#include <gntcheckbox.h>
#include <gntlabel.h>
#include <gnttree.h>
#include "gntplugin.h"
#include "gntconv.h"
Include dependency graph for gntgf.c:

Go to the source code of this file.

Data Structures

struct  GntToast
 

Macros

#define PLUGIN_STATIC_NAME   GntGf
 
#define PREFS_PREFIX   "/plugins/gnt/gntgf"
 
#define PREFS_EVENT   PREFS_PREFIX "/events"
 
#define PREFS_EVENT_SIGNONF   PREFS_EVENT "/signonf"
 
#define PREFS_EVENT_IM_MSG   PREFS_EVENT "/immsg"
 
#define PREFS_EVENT_CHAT_MSG   PREFS_EVENT "/chatmsg"
 
#define PREFS_EVENT_CHAT_NICK   PREFS_EVENT "/chatnick"
 
#define PREFS_BEEP   PREFS_PREFIX "/beep"
 
#define MAX_COLS   3
 

Functions

static void destroy_toaster (GntToast *toast)
 
static gboolean remove_toaster (GntToast *toast)
 
static void notify (PurpleConversation *conv, const char *fmt,...)
 
static void buddy_signed_on (PurpleBuddy *buddy, gpointer null)
 
static void buddy_signed_off (PurpleBuddy *buddy, gpointer null)
 
static void received_im_msg (PurpleAccount *account, const char *sender, const char *msg, PurpleConversation *conv, PurpleMessageFlags flags, gpointer null)
 
static void received_chat_msg (PurpleAccount *account, const char *sender, const char *msg, PurpleConversation *conv, PurpleMessageFlags flags, gpointer null)
 
static gboolean plugin_load (PurplePlugin *plugin)
 
static gboolean plugin_unload (PurplePlugin *plugin)
 
static void pref_toggled (GntTree *tree, char *key, gpointer null)
 
static void toggle_option (GntCheckBox *check, gpointer str)
 
static GntWidgetconfig_frame (void)
 
static void init_plugin (PurplePlugin *plugin)
 

Variables

static GList * toasters
 
static int gpsy [3]
 
static int gpsw [3]
 
struct {
   char *   pref
 
   char *   display
 
prefs []
 
static PurplePluginInfo info
 

Detailed Description

Minimal toaster plugin in Gnt.

Copyright (C) 2006 Sadrul Habib Chowdhury sadru.nosp@m.l@us.nosp@m.ers.s.nosp@m.ourc.nosp@m.eforg.nosp@m.e.ne.nosp@m.t

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA

Definition in file gntgf.c.

Macro Definition Documentation

◆ MAX_COLS

#define MAX_COLS   3

Definition at line 34 of file gntgf.c.

◆ PLUGIN_STATIC_NAME

#define PLUGIN_STATIC_NAME   GntGf

Definition at line 24 of file gntgf.c.

◆ PREFS_BEEP

#define PREFS_BEEP   PREFS_PREFIX "/beep"

Definition at line 32 of file gntgf.c.

◆ PREFS_EVENT

#define PREFS_EVENT   PREFS_PREFIX "/events"

Definition at line 27 of file gntgf.c.

◆ PREFS_EVENT_CHAT_MSG

#define PREFS_EVENT_CHAT_MSG   PREFS_EVENT "/chatmsg"

Definition at line 30 of file gntgf.c.

◆ PREFS_EVENT_CHAT_NICK

#define PREFS_EVENT_CHAT_NICK   PREFS_EVENT "/chatnick"

Definition at line 31 of file gntgf.c.

◆ PREFS_EVENT_IM_MSG

#define PREFS_EVENT_IM_MSG   PREFS_EVENT "/immsg"

Definition at line 29 of file gntgf.c.

◆ PREFS_EVENT_SIGNONF

#define PREFS_EVENT_SIGNONF   PREFS_EVENT "/signonf"

Definition at line 28 of file gntgf.c.

◆ PREFS_PREFIX

#define PREFS_PREFIX   "/plugins/gnt/gntgf"

Definition at line 26 of file gntgf.c.

Function Documentation

◆ buddy_signed_off()

static void buddy_signed_off ( PurpleBuddy buddy,
gpointer  null 
)
static

Definition at line 236 of file gntgf.c.

References _(), notify(), NULL, PREFS_EVENT_SIGNONF, purple_buddy_get_alias(), and purple_prefs_get_bool().

Referenced by plugin_load().

◆ buddy_signed_on()

static void buddy_signed_on ( PurpleBuddy buddy,
gpointer  null 
)
static

Definition at line 229 of file gntgf.c.

References _(), notify(), NULL, PREFS_EVENT_SIGNONF, purple_buddy_get_alias(), and purple_prefs_get_bool().

Referenced by plugin_load().

◆ config_frame()

◆ destroy_toaster()

static void destroy_toaster ( GntToast toast)
static

◆ init_plugin()

◆ notify()

◆ plugin_load()

◆ plugin_unload()

static gboolean plugin_unload ( PurplePlugin plugin)
static

Definition at line 290 of file gntgf.c.

References destroy_toaster(), toasters, and TRUE.

◆ pref_toggled()

static void pref_toggled ( GntTree tree,
char *  key,
gpointer  null 
)
static

Definition at line 314 of file gntgf.c.

References gnt_tree_get_choice(), purple_prefs_set_bool(), and tree.

Referenced by config_frame().

◆ received_chat_msg()

static void received_chat_msg ( PurpleAccount account,
const char *  sender,
const char *  msg,
PurpleConversation conv,
PurpleMessageFlags  flags,
gpointer  null 
)
static

◆ received_im_msg()

static void received_im_msg ( PurpleAccount account,
const char *  sender,
const char *  msg,
PurpleConversation conv,
PurpleMessageFlags  flags,
gpointer  null 
)
static

Definition at line 243 of file gntgf.c.

References _(), notify(), PREFS_EVENT_IM_MSG, and purple_prefs_get_bool().

Referenced by blist_show(), and plugin_load().

◆ remove_toaster()

static gboolean remove_toaster ( GntToast toast)
static

◆ toggle_option()

static void toggle_option ( GntCheckBox check,
gpointer  str 
)
static

Definition at line 320 of file gntgf.c.

References check, gnt_check_box_get_checked(), purple_prefs_set_bool(), and str.

Referenced by config_frame().

Variable Documentation

◆ display

char* display

Definition at line 303 of file gntgf.c.

Referenced by config_frame(), main(), update_row_text(), and Z_SendLocation().

◆ gpsw

int gpsw[3]
static

Definition at line 72 of file gntgf.c.

Referenced by notify(), plugin_load(), and remove_toaster().

◆ gpsy

int gpsy[3]
static

Definition at line 71 of file gntgf.c.

Referenced by notify(), plugin_load(), and remove_toaster().

◆ info

PurplePluginInfo info
static

Definition at line 368 of file gntgf.c.

◆ pref

char* pref

Definition at line 302 of file gntgf.c.

Referenced by alpha_pref_set_int(), blist_visible_cb(), config_frame(), device_changed_cb(), entry_cb(), event_toggled(), file_recv_request_cb(), finch_sound_is_enabled(), finch_sound_play_event(), get_config_frame(), get_plugin_pref_frame(), history_prefs_check(), imhtml_cb(), initialize_profile(), make_gtkrc_string(), make_info_pref(), make_int_pref(), make_string_pref(), method_toggle_cb(), mw_plugin_get_plugin_pref_frame(), notify_toggle_cb(), pidgin_plugin_pref_create_frame(), pidgin_sound_is_customized(), pidgin_sound_play_event(), pref_to_xmlnode(), pref_update(), prefs_set_sound_theme_cb(), prefs_sound_sel(), prefs_start_element_handler(), prefs_to_xmlnode(), process_pref_frame(), prof_del_cb(), purple_plugin_pref_add_choice(), purple_plugin_pref_destroy(), purple_plugin_pref_frame_add(), purple_plugin_pref_get_bounds(), purple_plugin_pref_get_choices(), purple_plugin_pref_get_format_type(), purple_plugin_pref_get_label(), purple_plugin_pref_get_masked(), purple_plugin_pref_get_max_length(), purple_plugin_pref_get_name(), purple_plugin_pref_get_type(), purple_plugin_pref_new(), purple_plugin_pref_new_with_label(), purple_plugin_pref_new_with_name(), purple_plugin_pref_new_with_name_and_label(), purple_plugin_pref_set_bounds(), purple_plugin_pref_set_format_type(), purple_plugin_pref_set_label(), purple_plugin_pref_set_masked(), purple_plugin_pref_set_max_length(), purple_plugin_pref_set_name(), purple_plugin_pref_set_type(), purple_prefs_exists(), purple_prefs_set_generic(), purple_srv_sort(), purplerc_set_color(), purplerc_set_font(), remove_pref(), reset_sound(), resolve(), select_sound(), set_blist_trans(), sound_chosen_cb(), sound_page(), test_sound(), type_toggle_cb(), and update_convs_wintrans().

◆ prefs

struct { ... } prefs[]
Initial value:
=
{
{ "/plugins/gnt/gntgf" "/events" "/signonf" , N_("Buddy signs on/off")},
{ "/plugins/gnt/gntgf" "/events" "/immsg" , N_("You receive an IM")},
{ "/plugins/gnt/gntgf" "/events" "/chatmsg" , N_("Someone speaks in a chat")},
{ "/plugins/gnt/gntgf" "/events" "/chatnick" , N_("Someone says your name in a chat")},
}

Referenced by add_pref_group(), config_frame(), get_pref_field(), history_prefs_check(), and process_pref_frame().

◆ toasters

GList* toasters
static

Definition at line 70 of file gntgf.c.

Referenced by destroy_toaster(), notify(), plugin_unload(), and remove_toaster().

N_
#define N_(String)
Definition: internal.h:59
NULL
#define NULL
Definition: getopt1.c:52