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_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); }
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(); }
static void init_plugin(GaimPlugin *plugin) { gaim_prefs_add_none("/plugins/gtk/relnot"); gaim_prefs_add_int("/plugins/gtk/relnot/last_check", 0); }