/************************************************************************** * GTK+ File Transfer API **************************************************************************/ void gaim_gtk_xfers_init(void) { gaim_prefs_add_none("/gaim/gtk/filetransfer"); gaim_prefs_add_bool("/gaim/gtk/filetransfer/clear_finished", TRUE); gaim_prefs_add_bool("/gaim/gtk/filetransfer/keep_open", FALSE); }
void gaim_status_init(void) { void *handle = gaim_status_get_handle; gaim_prefs_add_none("/core/status"); gaim_prefs_add_none("/core/status/scores"); gaim_prefs_add_int("/core/status/scores/offline", primitive_scores[GAIM_STATUS_OFFLINE]); gaim_prefs_add_int("/core/status/scores/available", primitive_scores[GAIM_STATUS_AVAILABLE]); gaim_prefs_add_int("/core/status/scores/invisible", primitive_scores[GAIM_STATUS_INVISIBLE]); gaim_prefs_add_int("/core/status/scores/away", primitive_scores[GAIM_STATUS_AWAY]); gaim_prefs_add_int("/core/status/scores/extended_away", primitive_scores[GAIM_STATUS_EXTENDED_AWAY]); gaim_prefs_add_int("/core/status/scores/idle", primitive_scores[SCORE_IDLE]); gaim_prefs_connect_callback(handle, "/core/status/scores/offline", score_pref_changed_cb, GINT_TO_POINTER(GAIM_STATUS_OFFLINE)); gaim_prefs_connect_callback(handle, "/core/status/scores/available", score_pref_changed_cb, GINT_TO_POINTER(GAIM_STATUS_AVAILABLE)); gaim_prefs_connect_callback(handle, "/core/status/scores/invisible", score_pref_changed_cb, GINT_TO_POINTER(GAIM_STATUS_INVISIBLE)); gaim_prefs_connect_callback(handle, "/core/status/scores/away", score_pref_changed_cb, GINT_TO_POINTER(GAIM_STATUS_AWAY)); gaim_prefs_connect_callback(handle, "/core/status/scores/extended_away", score_pref_changed_cb, GINT_TO_POINTER(GAIM_STATUS_EXTENDED_AWAY)); gaim_prefs_connect_callback(handle, "/core/status/scores/idle", score_pref_changed_cb, GINT_TO_POINTER(SCORE_IDLE)); buddy_presences = g_hash_table_new_full(gaim_buddy_presences_hash, gaim_buddy_presences_equal, gaim_buddy_presences_key_free, NULL); }
void gaim_debug_init(void) { gaim_prefs_add_none("/core/debug"); /* * This pref is currently used by both the console * output and the debug window output. */ gaim_prefs_add_bool("/core/debug/timestamps", FALSE); }
static void init_plugin(GaimPlugin *plugin) { char *dirname; dirname = g_build_filename(gaim_user_dir(), "autoaccept", NULL); gaim_prefs_add_none(PREF_PREFIX); gaim_prefs_add_string(PREF_PATH, dirname); gaim_prefs_add_bool(PREF_STRANGER, TRUE); gaim_prefs_add_bool(PREF_NOTIFY, TRUE); g_free(dirname); }
static gboolean plugin_load(GaimPlugin * plugin) { void *conv_handle = gaim_conversations_get_handle(); gaim_prefs_add_none("/plugins"); gaim_prefs_add_none("/plugins/core"); gaim_prefs_add_none("/plugins/core/bot"); gaim_prefs_add_none("/plugins/core/bot/challenger"); gaim_prefs_add_string("/plugins/core/bot/challenger/question", _("How do you spell the number 10?")); gaim_prefs_add_string("/plugins/core/bot/challenger/answer", _("ten")); gaim_prefs_add_bool("/plugins/core/bot/challenger/auto_add_permit", FALSE); gaim_signal_connect(conv_handle, "receiving-im-msg", plugin, GAIM_CALLBACK(receiving_im_msg_cb), NULL); return TRUE; }
static gboolean plugin_load(GaimPlugin * plugin) { init_chat_icons(plugin); init_popups(); init_roombrowse(plugin); gaim_signal_connect(gaim_conversations_get_handle(), "conversation-created", plugin, GAIM_CALLBACK(redo_im_window), NULL); gaim_signal_connect(gaim_accounts_get_handle(), "info-updated", plugin, GAIM_CALLBACK(update_info_cb), NULL); gaim_signal_connect(gaim_conversations_get_handle(), "deleting-conversation", plugin, GAIM_CALLBACK(clean_popup_stuff), NULL); gaim_prefs_add_none("/plugins/gaym-extras"); gaim_prefs_add_none("/plugins/gaym-extras/silly"); extras_register_stock(); return TRUE; }
static void init_plugin(GaimPlugin *plugin) { gaim_prefs_add_none("/plugins/core/pluginpref_example"); gaim_prefs_add_bool("/plugins/core/pluginpref_example/bool", TRUE); gaim_prefs_add_int("/plugins/core/pluginpref_example/int", 0); gaim_prefs_add_int("/plugins/core/pluginpref_example/int_choice", 1); gaim_prefs_add_string("/plugins/core/pluginpref_example/string", "string"); gaim_prefs_add_string("/plugins/core/pluginpref_example/max_string", "max length string"); gaim_prefs_add_string("/plugins/core/pluginpref_example/masked_string", "masked"); gaim_prefs_add_string("/plugins/core/pluginpref_example/string_choice", "red"); }
void gaim_gtk_debug_init(void) { /* Debug window preferences. */ /* * NOTE: This must be set before prefs are loaded, and the callbacks * set after they are loaded, since prefs sets the enabled * preference here and that loads the window, which calls the * configure event, which overrides the width and height! :P */ gaim_prefs_add_none("/gaim/gtk/debug"); gaim_prefs_add_bool("/gaim/gtk/debug/enabled", FALSE); gaim_prefs_add_bool("/gaim/gtk/debug/timestamps", FALSE); gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE); gaim_prefs_add_int("/gaim/gtk/debug/width", 450); gaim_prefs_add_int("/gaim/gtk/debug/height", 250); gaim_prefs_connect_callback("/gaim/gtk/debug/enabled", debug_enabled_cb, NULL); #define REGISTER_G_LOG_HANDLER(name) \ g_log_set_handler((name), G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL \ | G_LOG_FLAG_RECURSION, \ gaim_glib_log_handler, NULL) /* Register the glib/gtk log handlers. */ REGISTER_G_LOG_HANDLER(NULL); REGISTER_G_LOG_HANDLER("Gdk"); REGISTER_G_LOG_HANDLER("Gtk"); REGISTER_G_LOG_HANDLER("GdkPixbuf"); REGISTER_G_LOG_HANDLER("GLib"); REGISTER_G_LOG_HANDLER("GModule"); REGISTER_G_LOG_HANDLER("GLib-GObject"); REGISTER_G_LOG_HANDLER("GThread"); #ifdef _WIN32 if (!opt_debug) g_set_print_handler(gaim_glib_dummy_print_handler); #endif }
void gaim_log_init(void) { gaim_prefs_add_none("/core/logging"); gaim_prefs_add_bool("/core/logging/log_ims", FALSE); gaim_prefs_add_bool("/core/logging/log_chats", FALSE); gaim_prefs_add_bool("/core/logging/log_system", FALSE); gaim_prefs_add_bool("/core/logging/log_signon_signoff", FALSE); gaim_prefs_add_bool("/core/logging/log_idle_state", FALSE); gaim_prefs_add_bool("/core/logging/log_away_state", FALSE); gaim_prefs_add_bool("/core/logging/log_own_states", FALSE); gaim_prefs_add_string("/core/logging/format", "txt"); gaim_log_logger_add(&html_logger); gaim_log_logger_add(&txt_logger); gaim_log_logger_add(&old_logger); gaim_prefs_connect_callback("/core/logging/format", logger_pref_cb, NULL); gaim_prefs_trigger_callback("/core/logging/format"); logsize_users = g_hash_table_new_full((GHashFunc)_gaim_logsize_user_hash, (GEqualFunc)_gaim_logsize_user_equal, (GDestroyNotify)_gaim_logsize_user_free_key, NULL); }
static void _init_plugin(GaimPlugin * plugin) { GaimAccountOption *option; option = gaim_account_option_string_new(_("Bio Line"), "bioline", ""); prpl_info.protocol_options = g_list_prepend(prpl_info.protocol_options, option); option = gaim_account_option_int_new(_("Port"), "port", IRC_DEFAULT_PORT); prpl_info.protocol_options = g_list_prepend(prpl_info.protocol_options, option); option = gaim_account_option_string_new(_("Server"), "server", IRC_DEFAULT_SERVER); prpl_info.protocol_options = g_list_prepend(prpl_info.protocol_options, option); /** * We have to pull thumbnails, since they aren't pushed like with * other protocols. */ gaim_signal_connect(gaim_conversations_get_handle(), "conversation-created", plugin, GAIM_CALLBACK(gaym_get_photo_info), NULL); gaim_signal_connect(gaim_conversations_get_handle(), "deleting-conversation", plugin, GAIM_CALLBACK(gaym_clean_channel_members), NULL); gaim_signal_register(gaim_accounts_get_handle(), "info-updated", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), gaim_value_new(GAIM_TYPE_POINTER, GAIM_TYPE_CHAR)); gaim_prefs_add_none("/plugins/prpl/gaym"); gaim_prefs_add_int("/plugins/prpl/gaym/chat_room_instances", 4); gaim_prefs_add_bool("/plugins/prpl/gaym/show_join", TRUE); gaim_prefs_add_bool("/plugins/prpl/gaym/show_part", TRUE); gaim_prefs_add_bool("/plugins/prpl/gaym/show_bio_with_join", TRUE); gaim_prefs_add_bool("/plugins/prpl/gaym/botfilter_enable", FALSE); gaim_prefs_add_bool("/plugins/prpl/gaym/botfilter_ignore_null", FALSE); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_sep", "|"); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_patterns", "NULL|MODE * -i|*dantcamboy*|*Free preview*|*epowerchat*|*Live gay sex cam show*|*camboiz*"); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_url", GAYBOI_SPAM_URL); gaim_prefs_connect_callback("/plugins/prpl/gaym/botfilter_url", botfilter_url_changed_cb, NULL); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_url_result", ""); gaim_prefs_add_int("/plugins/prpl/gaym/botfilter_url_last_check", 0); _gaym_plugin = plugin; gaym_register_commands(); }
void gaim_xfers_init(void) { gaim_prefs_add_none("/core/ft"); gaim_prefs_add_string("/core/ft/public_ip", ""); }
static void init_plugin(GaimPlugin *plugin) { gaim_prefs_add_none("/plugins/gtk/relnot"); gaim_prefs_add_int("/plugins/gtk/relnot/last_check", 0); }