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)  

gntdebug.c File Reference
#include <internal.h>
#include <gnt.h>
#include <gntbox.h>
#include <gntbutton.h>
#include <gntcheckbox.h>
#include <gntentry.h>
#include <gntfilesel.h>
#include <gntlabel.h>
#include <gntline.h>
#include <gnttextview.h>
#include "gntdebug.h"
#include "finch.h"
#include "notify.h"
#include "util.h"
#include <stdio.h>
#include <string.h>
Include dependency graph for gntdebug.c:

Go to the source code of this file.


#define PREF_ROOT   "/finch/debug"


static gboolean handle_fprintf_stderr_cb (GIOChannel *source, GIOCondition cond, gpointer null)
static void handle_fprintf_stderr (gboolean stop)
static gboolean match_string (const char *category, const char *args)
static void finch_debug_print (PurpleDebugLevel level, const char *category, const char *args)
static gboolean finch_debug_is_enabled (PurpleDebugLevel level, const char *category)
PurpleDebugUiOpsfinch_debug_get_ui_ops ()
static void reset_debug_win (GntWidget *w, gpointer null)
static void clear_debug_win (GntWidget *w, GntTextView *tv)
static void print_stderr (const char *string)
static void toggle_pause (GntWidget *w, gpointer n)
static void purple_glib_log_handler (const gchar *domain, GLogLevelFlags flags, const gchar *msg, gpointer user_data)
static void size_changed_cb (GntWidget *widget, int oldw, int oldh)
static gboolean for_real (gpointer entry)
static void update_filter_string (GntEntry *entry, gpointer null)
static void file_save (GntFileSel *fs, const char *path, const char *file, GntTextView *tv)
static void file_cancel (GntWidget *w, GntFileSel *fs)
static void save_debug_win (GntWidget *w, GntTextView *tv)
void finch_debug_window_show ()
static gboolean start_with_debugwin (gpointer null)
void finch_debug_init ()
void finch_debug_uninit ()


struct {
   GntWidget *   window
   GntWidget *   tview
   GntWidget *   search
   gboolean   paused
static PurpleDebugUiOps uiops

Detailed Description


Definition in file gntdebug.c.

Macro Definition Documentation


#define PREF_ROOT   "/finch/debug"

Definition at line 47 of file gntdebug.c.


#define REGISTER_G_LOG_HANDLER (   name)
g_log_set_handler((name), G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL \

Function Documentation

◆ clear_debug_win()

static void clear_debug_win ( GntWidget w,
GntTextView tv 

Definition at line 183 of file gntdebug.c.

References gnt_text_view_clear(), and tv.

Referenced by finch_debug_window_show().

◆ file_cancel()

static void file_cancel ( GntWidget w,
GntFileSel fs 

Definition at line 287 of file gntdebug.c.

References GNT_WIDGET, and gnt_widget_destroy().

Referenced by save_debug_win().

◆ file_save()

static void file_save ( GntFileSel fs,
const char *  path,
const char *  file,
GntTextView tv 

◆ finch_debug_get_ui_ops()

PurpleDebugUiOps* finch_debug_get_ui_ops ( void  )

Get the ui-functions.

The PurpleDebugUiOps structure populated with the appropriate functions.

Definition at line 171 of file gntdebug.c.

References uiops.

Referenced by debug_init().

◆ finch_debug_init()

void finch_debug_init ( void  )

◆ finch_debug_is_enabled()

static gboolean finch_debug_is_enabled ( PurpleDebugLevel  level,
const char *  category 

Definition at line 154 of file gntdebug.c.

References debug.

◆ finch_debug_print()

◆ finch_debug_uninit()

void finch_debug_uninit ( void  )

Perform necessary uninitializations.

Definition at line 412 of file gntdebug.c.

References handle_fprintf_stderr(), and TRUE.

◆ finch_debug_window_show()

◆ for_real()

static gboolean for_real ( gpointer  entry)

Definition at line 256 of file gntdebug.c.

References FALSE, gnt_entry_get_text(), PREF_ROOT, and purple_prefs_set_string().

Referenced by update_filter_string().

◆ handle_fprintf_stderr()

static void handle_fprintf_stderr ( gboolean  stop)

Definition at line 67 of file gntdebug.c.

References handle_fprintf_stderr_cb(), NULL, STDERR_FILENO, and TRUE.

Referenced by finch_debug_init(), and finch_debug_uninit().

◆ handle_fprintf_stderr_cb()

static gboolean handle_fprintf_stderr_cb ( GIOChannel *  source,
GIOCondition  cond,
gpointer  null 

Definition at line 50 of file gntdebug.c.

References read, and TRUE.

Referenced by handle_fprintf_stderr().

◆ match_string()

static gboolean match_string ( const char *  category,
const char *  args 

Definition at line 103 of file gntdebug.c.

References dbus-analyze-signals::args, debug, FALSE, GNT_ENTRY, gnt_entry_get_text(), NULL, str, and TRUE.

Referenced by finch_debug_print().

◆ print_stderr()

static void print_stderr ( const char *  string)

Definition at line 189 of file gntdebug.c.

Referenced by finch_debug_init().

◆ purple_glib_log_handler()

static void purple_glib_log_handler ( const gchar *  domain,
GLogLevelFlags  flags,
const gchar *  msg,
gpointer  user_data 

◆ reset_debug_win()

static void reset_debug_win ( GntWidget w,
gpointer  null 

Definition at line 177 of file gntdebug.c.

References debug, and NULL.

Referenced by finch_debug_window_show().

◆ save_debug_win()

◆ size_changed_cb()

static void size_changed_cb ( GntWidget widget,
int  oldw,
int  oldh 

Definition at line 247 of file gntdebug.c.

References gnt_widget_get_size(), PREF_ROOT, purple_prefs_set_int(), and widget.

Referenced by finch_debug_window_show().

◆ start_with_debugwin()

static gboolean start_with_debugwin ( gpointer  null)

Definition at line 372 of file gntdebug.c.

References FALSE, and finch_debug_window_show().

Referenced by finch_debug_init().

◆ toggle_pause()

static void toggle_pause ( GntWidget w,
gpointer  n 

Definition at line 195 of file gntdebug.c.

References debug.

Referenced by finch_debug_window_show().

◆ update_filter_string()

static void update_filter_string ( GntEntry entry,
gpointer  null 

Definition at line 263 of file gntdebug.c.

References for_real().

Referenced by finch_debug_window_show().

Variable Documentation

◆ debug

◆ paused

gboolean paused

Definition at line 99 of file gntdebug.c.

◆ search

GntWidget* search

Definition at line 98 of file gntdebug.c.

Referenced by gtk_source_iter_backward_search(), and gtk_source_iter_forward_search().

◆ tview

GntWidget* tview

Definition at line 97 of file gntdebug.c.

◆ uiops

PurpleDebugUiOps uiops
Initial value:

Definition at line 159 of file gntdebug.c.

Referenced by finch_debug_get_ui_ops().

◆ window

GntWidget* window

Definition at line 96 of file gntdebug.c.

Referenced by save_debug_win().

char * name
Definition: gntbindable.c:47
static gboolean finch_debug_is_enabled(PurpleDebugLevel level, const char *category)
Definition: gntdebug.c:154
#define NULL
Definition: getopt1.c:52
static void finch_debug_print(PurpleDebugLevel level, const char *category, const char *args)
Definition: gntdebug.c:116
static void purple_glib_log_handler(const gchar *domain, GLogLevelFlags flags, const gchar *msg, gpointer user_data)
Definition: gntdebug.c:202