示例#1
0
static void
init_plugin(PurplePlugin *plugin)
{
	purple_prefs_add_none("/plugins/gtk");
	purple_prefs_add_none("/plugins/gtk/win32");
	purple_prefs_add_none("/plugins/gtk/win32/winprefs");
	purple_prefs_add_bool(PREF_DBLIST_DOCKABLE, FALSE);
	purple_prefs_add_bool(PREF_DBLIST_DOCKED, FALSE);
	purple_prefs_add_int(PREF_DBLIST_HEIGHT, 0);
	purple_prefs_add_int(PREF_DBLIST_SIDE, 0);

	/* Convert old preferences */
	if(purple_prefs_exists(PREF_DBLIST_ON_TOP)) {
		gint blist_top = BLIST_TOP_NEVER;
		if(purple_prefs_get_bool(PREF_BLIST_ON_TOP))
			blist_top = BLIST_TOP_ALWAYS;
		else if(purple_prefs_get_bool(PREF_DBLIST_ON_TOP))
			blist_top = BLIST_TOP_DOCKED;
		purple_prefs_remove(PREF_BLIST_ON_TOP);
		purple_prefs_remove(PREF_DBLIST_ON_TOP);
		purple_prefs_add_int(PREF_BLIST_ON_TOP, blist_top);
	} else
		purple_prefs_add_int(PREF_BLIST_ON_TOP, BLIST_TOP_NEVER);
	purple_prefs_remove(PREF_CHAT_BLINK);
}
示例#2
0
static void
init_plugin(PurplePlugin *plugin) {
  purple_prefs_add_none(PREFS_BASE);
  purple_prefs_add_bool(PREF_BUDDIES, FALSE);
  purple_prefs_add_bool(PREF_NOTICE, TRUE);
  purple_prefs_add_bool(PREF_STATUS, TRUE);
}
示例#3
0
void
finch_pounces_init(void)
{
	purple_pounces_register_handler(FINCH_UI, pounce_cb, new_pounce,
								  free_pounce);

	purple_prefs_add_none("/finch/pounces");
	purple_prefs_add_none("/finch/pounces/default_actions");
	purple_prefs_add_bool("/finch/pounces/default_actions/open-window",
						FALSE);
	purple_prefs_add_bool("/finch/pounces/default_actions/popup-notify",
						TRUE);
	purple_prefs_add_bool("/finch/pounces/default_actions/send-message",
						FALSE);
	purple_prefs_add_bool("/finch/pounces/default_actions/execute-command",
						FALSE);
	purple_prefs_add_bool("/finch/pounces/default_actions/play-beep",
						FALSE);
	purple_prefs_add_none("/finch/pounces/dialog");

	purple_signal_connect(purple_connections_get_handle(), "signed-on",
						finch_pounces_get_handle(),
						PURPLE_CALLBACK(signed_on_off_cb), NULL);
	purple_signal_connect(purple_connections_get_handle(), "signed-off",
						finch_pounces_get_handle(),
						PURPLE_CALLBACK(signed_on_off_cb), NULL);
}
示例#4
0
static void
init_plugin(PurplePlugin *plugin)
{
	purple_prefs_add_none(PREF_PREFIX);
	purple_prefs_add_bool(PREF_IMS, FALSE);
	purple_prefs_add_bool(PREF_CHATS, TRUE);
}
示例#5
0
/* This gets called when the active profile changes */
static void
initialize_profile(const char *name, PurplePrefType type, gconstpointer val, gpointer null)
{
	FinchSoundEvent *event;
	if (purple_prefs_exists(make_pref("")))
		return;

	purple_prefs_add_none(make_pref(""));
	purple_prefs_add_none(make_pref("/enabled"));
	purple_prefs_add_none(make_pref("/file"));

	for (event = sounds; event - sounds < PURPLE_NUM_SOUNDS; event++) {
		char pref[512];
		g_snprintf(pref, sizeof(pref), "/enabled/%s", event->pref);
		purple_prefs_add_bool(make_pref(pref), FALSE);
		g_snprintf(pref, sizeof(pref), "/file/%s", event->pref);
		purple_prefs_add_path(make_pref(pref), "");
	}

	purple_prefs_add_bool(make_pref("/conv_focus"), FALSE);
	purple_prefs_add_bool(make_pref("/mute"), FALSE);
	purple_prefs_add_path(make_pref("/command"), "");
	purple_prefs_add_string(make_pref("/method"), "automatic");
	purple_prefs_add_int(make_pref("/volume"), 50);
}
示例#6
0
文件: gtkft.c 项目: bf4/pidgin-mac
/**************************************************************************
 * GTK+ File Transfer API
 **************************************************************************/
void
pidgin_xfers_init(void)
{
	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/filetransfer");
	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/filetransfer/clear_finished", TRUE);
	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/filetransfer/keep_open", FALSE);
}
示例#7
0
/**************************************************************************
 * GNT File Transfer API
 **************************************************************************/
void
finch_xfers_init(void)
{
	purple_prefs_add_none("/finch/filetransfer");
	purple_prefs_add_bool("/finch/filetransfer/clear_finished", TRUE);
	purple_prefs_add_bool("/finch/filetransfer/keep_open", FALSE);
}
示例#8
0
static void
_purple_eventc_init(PurplePlugin *plugin)
{
#if ENABLE_NLS
    bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */

    _purple_eventc_info.name = _("Client for eventd");
    _purple_eventc_info.summary = _("Propagate events to eventd");
    _purple_eventc_info.description = _("Use eventd to inform the user of events");

    _purple_eventc_info.dependencies = g_list_prepend(_purple_eventc_info.dependencies, (gpointer) purple_events_get_plugin_id());

    purple_prefs_add_none("/plugins/core/eventc");

    purple_prefs_add_none("/plugins/core/eventc/connection");
    purple_prefs_add_string("/plugins/core/eventc/connection/uri", "");
    purple_prefs_add_int("/plugins/core/eventc/connection/max-tries", 3);
    purple_prefs_add_int("/plugins/core/eventc/connection/retry-delay", 10);

    purple_prefs_add_none("/plugins/core/eventc/restrictions");
    purple_prefs_add_bool("/plugins/core/eventc/restrictions/no-buddy-icon", FALSE);
    purple_prefs_add_bool("/plugins/core/eventc/restrictions/no-protocol-icon", FALSE);
}
示例#9
0
void
purple_prefs_init(void)
{
	void *handle = purple_prefs_get_handle();

	prefs_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);

	purple_prefs_connect_callback(handle, "/", prefs_save_cb, NULL);

	purple_prefs_add_none("/purple");
	purple_prefs_add_none("/plugins");
	purple_prefs_add_none("/plugins/core");
	purple_prefs_add_none("/plugins/lopl");
	purple_prefs_add_none("/plugins/prpl");

	/* Away */
	purple_prefs_add_none("/purple/away");
	purple_prefs_add_string("/purple/away/idle_reporting", "system");
	purple_prefs_add_bool("/purple/away/away_when_idle", TRUE);
	purple_prefs_add_int("/purple/away/mins_before_away", 5);

	/* Away -> Auto-Reply */
	if (!purple_prefs_exists("/purple/away/auto_response/enabled") ||
	    !purple_prefs_exists("/purple/away/auto_response/idle_only"))
	{
		purple_prefs_add_string("/purple/away/auto_reply", "awayidle");
	}
	else
	{
		if (!purple_prefs_get_bool("/purple/away/auto_response/enabled"))
		{
			purple_prefs_add_string("/purple/away/auto_reply", "never");
		}
		else
		{
			if (purple_prefs_get_bool("/purple/away/auto_response/idle_only"))
			{
				purple_prefs_add_string("/purple/away/auto_reply", "awayidle");
			}
			else
			{
				purple_prefs_add_string("/purple/away/auto_reply", "away");
			}
		}
	}

	/* Buddies */
	purple_prefs_add_none("/purple/buddies");

	/* Contact Priority Settings */
	purple_prefs_add_none("/purple/contact");
	purple_prefs_add_bool("/purple/contact/last_match", FALSE);
	purple_prefs_remove("/purple/contact/offline_score");
	purple_prefs_remove("/purple/contact/away_score");
	purple_prefs_remove("/purple/contact/idle_score");

	purple_prefs_load();
	purple_prefs_update_old();
}
示例#10
0
static void
init_plugin(PurplePlugin *plugin)
{
	purple_prefs_add_none("/plugins/core/statenotify");
	purple_prefs_add_bool("/plugins/core/statenotify/notify_away", TRUE);
	purple_prefs_add_bool("/plugins/core/statenotify/notify_idle", TRUE);
	purple_prefs_add_bool("/plugins/core/statenotify/notify_signon", TRUE);
}
示例#11
0
BuddyList::BuddyList()
: Window(0, 0, 80, 24)
{
  SetColorScheme("buddylist");

  CppConsUI::HorizontalListBox *lbox
    = new CppConsUI::HorizontalListBox(AUTOSIZE, AUTOSIZE);
  lbox->AppendWidget(*(new CppConsUI::Spacer(1, AUTOSIZE)));
  treeview = new CppConsUI::TreeView(AUTOSIZE, AUTOSIZE);
  lbox->AppendWidget(*treeview);
  lbox->AppendWidget(*(new CppConsUI::Spacer(1, AUTOSIZE)));
  AddWidget(*lbox, 0, 0);

  /* TODO Check if this has been moved to purple_blist_init(). Remove these
   * lines if it was as this will probably move to purple_init(), the
   * buddylist object should be available a lot more early and the uiops
   * should be set a lot more early. (All in all a lot of work.) */
  buddylist = purple_blist_new();
  buddylist->ui_data = this;
  purple_set_blist(buddylist);

  // load the pounces
  purple_pounces_load();

  // init prefs
  purple_prefs_add_none(CONF_PREFIX "/blist");
  purple_prefs_add_bool(CONF_PREFIX "/blist/show_empty_groups", false);
  purple_prefs_add_bool(CONF_PREFIX "/blist/show_offline_buddies", true);
  purple_prefs_add_string(CONF_PREFIX "/blist/colorization_mode", "none");

  UpdateCachedPreference(CONF_PREFIX "/blist/show_empty_groups");
  UpdateCachedPreference(CONF_PREFIX "/blist/show_offline_buddies");
  UpdateCachedPreference(CONF_PREFIX "/blist/colorization_mode");

  // connect callbacks
  purple_prefs_connect_callback(this, CONF_PREFIX "/blist",
      blist_pref_change_, this);

  // setup the callbacks for the buddylist
  memset(&centerim_blist_ui_ops, 0, sizeof(centerim_blist_ui_ops));
  centerim_blist_ui_ops.new_list = new_list_;
  centerim_blist_ui_ops.new_node = new_node_;
  //centerim_blist_ui_ops.show = show_;
  centerim_blist_ui_ops.update = update_;
  centerim_blist_ui_ops.remove = remove_;
  centerim_blist_ui_ops.destroy = destroy_;
  //centerim_blist_ui_ops.set_visible = set_visible_;
  centerim_blist_ui_ops.request_add_buddy = request_add_buddy_;
  centerim_blist_ui_ops.request_add_chat = request_add_chat_;
  centerim_blist_ui_ops.request_add_group = request_add_group_;
  // since libpurple 2.6.0
  //centerim_blist_ui_ops.save_node = save_node_;
  //centerim_blist_ui_ops.remove_node = remove_node_;
  //centerim_blist_ui_ops.save_account = save_account_;
  purple_blist_set_ui_ops(&centerim_blist_ui_ops);

  COREMANAGER->TimeoutOnceConnect(sigc::mem_fun(this, &BuddyList::Load), 0);
}
示例#12
0
/**************************************************************************************************
    Initialize plugin
**************************************************************************************************/
static void
init_plugin(PurplePlugin *plugin)
{
    purple_prefs_add_none("/plugins/core/hidemenu");
    purple_prefs_add_bool("/plugins/core/hidemenu/default_state", TRUE);
    purple_prefs_add_bool("/plugins/core/hidemenu/menu_blist",    TRUE);
    purple_prefs_add_bool("/plugins/core/hidemenu/status_blist",  TRUE);
    purple_prefs_add_bool("/plugins/core/hidemenu/menu_conv",     TRUE);
}
示例#13
0
void
qQuailNotifyInit(void)
{
    purple_prefs_add_none("/quail/notify");
    purple_prefs_add_bool("/quail/notify/incoming_im",   true);
    purple_prefs_add_bool("/quail/notify/incoming_chat", false);
    purple_prefs_add_bool("/quail/notify/use_buzzer",    false);
    purple_prefs_add_bool("/quail/notify/use_led",       true);
    purple_prefs_add_bool("/quail/notify/use_sound",     false);
}
示例#14
0
static void
init_plugin(PurplePlugin *plugin) {
	char *dirname;

	dirname = g_build_filename(purple_user_dir(), "autoaccept", NULL);
	purple_prefs_add_none(PREF_PREFIX);
	purple_prefs_add_string(PREF_PATH, dirname);
	purple_prefs_add_bool(PREF_NOTIFY, TRUE);
	purple_prefs_add_bool(PREF_NEWDIR, TRUE);
	purple_prefs_add_bool(PREF_ESCAPE, TRUE);
	g_free(dirname);
}
void prefs_init()
{
		purple_prefs_add_none	(PREF_PREFIX);
	purple_prefs_add_string	(PREF_SERVER_COMMAND_LINE, 	DEFAULT_SERVER_COMMAND_LINE	);
	purple_prefs_add_string	(PREF_CLIENT_COMMAND_LINE, 	DEFAULT_CLIENT_COMMAND_LINE	);
	purple_prefs_add_bool 	(PREF_USE_UPNP,			DEFAULT_USE_UPNP 		);
	purple_prefs_add_bool 	(PREF_USE_LIBPURPLE_UPNP,	DEFAULT_USE_LIBPURPLE_UPNP 	);
	purple_prefs_add_string (PREF_PORT,			DEFAULT_PORT 			);
	/*
	purple_prefs_add_bool (PREF_,DEFAULT_ );
*/
}
示例#16
0
static void
init_plugin(PurplePlugin *plugin)
{	
	purple_prefs_add_none("/plugins/core/pidgin-gntp");
	
	purple_prefs_add_bool("/plugins/core/pidgin-gntp/on_focus", FALSE);	
	
	purple_prefs_add_bool("/plugins/core/pidgin-gntp/on_available", TRUE);
	purple_prefs_add_bool("/plugins/core/pidgin-gntp/on_unavailable", TRUE);
	purple_prefs_add_bool("/plugins/core/pidgin-gntp/on_invisible", TRUE);
	purple_prefs_add_bool("/plugins/core/pidgin-gntp/on_away", TRUE);
	
	purple_prefs_add_int("/plugins/core/pidgin-gntp/hack_ms", 10000);
	
	acc_status = purple_savedstatus_get_type( purple_savedstatus_get_startup() );		
}
示例#17
0
文件: gntprefs.c 项目: bf4/pidgin-mac
void finch_prefs_init()
{
	purple_prefs_add_none("/finch");

	purple_prefs_add_none("/finch/plugins");
	purple_prefs_add_path_list("/finch/plugins/loaded", NULL);
	purple_prefs_add_path_list("/finch/plugins/seen", NULL);

	purple_prefs_add_none("/finch/conversations");
	purple_prefs_add_bool("/finch/conversations/timestamps", TRUE);
	purple_prefs_add_bool("/finch/conversations/notify_typing", FALSE);

	purple_prefs_add_none("/finch/filelocations");
	purple_prefs_add_path("/finch/filelocations/last_save_folder", "");
	purple_prefs_add_path("/finch/filelocations/last_save_folder", "");
}
示例#18
0
static void
init_plugin(PurplePlugin *plugin)
{
	purple_prefs_add_none("/plugins/gtk/extplacement");
	purple_prefs_add_int("/plugins/gtk/extplacement/placement_number", 4);
	purple_prefs_add_bool("/plugins/gtk/extplacement/placement_number_separate", FALSE);
}
示例#19
0
文件: simple.c 项目: ralight/ggz
void ggzpurple_preferences_add()
{
 purple_prefs_add_none("/plugins/gtk/ggzpurple");
 purple_prefs_add_string("/plugins/gtk/ggzpurple/login", "");
 purple_prefs_add_string("/plugins/gtk/ggzpurple/password", "");
 purple_prefs_add_string("/plugins/gtk/ggzpurple/server", SERVER);
 purple_prefs_add_bool("/plugins/gtk/ggzpurple/guest", TRUE);
}
示例#20
0
static gboolean plugin_load(PurplePlugin *plugin, GError **error) {
	purple_prefs_add_none("/plugins/gtk");
	purple_prefs_add_none("/plugins/gtk/win32");
	purple_prefs_add_none("/plugins/gtk/win32/winprefs");
	purple_prefs_add_bool(PREF_DBLIST_DOCKABLE, FALSE);
	purple_prefs_add_bool(PREF_DBLIST_DOCKED, FALSE);
	purple_prefs_add_int(PREF_DBLIST_HEIGHT, 0);
	purple_prefs_add_int(PREF_DBLIST_SIDE, 0);

	/* Convert old preferences */
	if(purple_prefs_exists(PREF_DBLIST_ON_TOP)) {
		gint blist_top = BLIST_TOP_NEVER;
		if(purple_prefs_get_bool(PREF_BLIST_ON_TOP))
			blist_top = BLIST_TOP_ALWAYS;
		else if(purple_prefs_get_bool(PREF_DBLIST_ON_TOP))
			blist_top = BLIST_TOP_DOCKED;
		purple_prefs_remove(PREF_BLIST_ON_TOP);
		purple_prefs_remove(PREF_DBLIST_ON_TOP);
		purple_prefs_add_int(PREF_BLIST_ON_TOP, blist_top);
	} else
		purple_prefs_add_int(PREF_BLIST_ON_TOP, BLIST_TOP_NEVER);
	purple_prefs_remove(PREF_CHAT_BLINK);

	handle = plugin;

	/* blist docking init */
	if(purple_blist_get_buddy_list() && PIDGIN_BLIST(purple_blist_get_buddy_list())
			&& PIDGIN_BLIST(purple_blist_get_buddy_list())->window) {
		blist_create_cb(purple_blist_get_buddy_list(), NULL);
	}

	/* This really shouldn't happen anymore generally, but if for some strange
	   reason, the blist is recreated, we need to set it up again. */
	purple_signal_connect(pidgin_blist_get_handle(), "gtkblist-created",
		plugin, PURPLE_CALLBACK(blist_create_cb), NULL);

	purple_signal_connect((void*)purple_get_core(), "quitting", plugin,
		PURPLE_CALLBACK(purple_quit_cb), NULL);

	purple_prefs_connect_callback(handle, PREF_BLIST_ON_TOP,
		winprefs_set_blist_ontop, NULL);
	purple_prefs_connect_callback(handle, PREF_DBLIST_DOCKABLE,
		winprefs_set_blist_dockable, NULL);

	return TRUE;
}
示例#21
0
static gboolean
plugin_load(PurplePlugin *plugin, GError **error)
{
	GList *convs = purple_conversations_get_all();
	PurpleSavedStatus *saved_status;
	void *conv_handle = purple_conversations_get_handle();
	void *gtk_conv_handle = pidgin_conversations_get_handle();
	void *savedstat_handle = purple_savedstatuses_get_handle();

	purple_prefs_add_none("/plugins/gtk");
	purple_prefs_add_none("/plugins/gtk/unity");
	purple_prefs_add_int("/plugins/gtk/unity/launcher_count", LAUNCHER_COUNT_SOURCES);
	purple_prefs_add_int("/plugins/gtk/unity/messaging_menu_text", MESSAGING_MENU_COUNT);
	purple_prefs_add_bool("/plugins/gtk/unity/alert_chat_nick", TRUE);

	alert_chat_nick = purple_prefs_get_bool("/plugins/gtk/unity/alert_chat_nick");

	mmapp = messaging_menu_app_new("pidgin.desktop");
	g_object_ref(mmapp);
	messaging_menu_app_register(mmapp);
	messaging_menu_text = purple_prefs_get_int("/plugins/gtk/unity/messaging_menu_text");

	g_signal_connect(mmapp, "activate-source",
			G_CALLBACK(message_source_activated), NULL);
	g_signal_connect(mmapp, "status-changed",
			G_CALLBACK(messaging_menu_status_changed), NULL);

	saved_status = purple_savedstatus_get_current();
	status_changed_cb(saved_status);

	purple_signal_connect(savedstat_handle, "savedstatus-changed", plugin,
			PURPLE_CALLBACK(status_changed_cb), NULL);

	launcher = unity_launcher_entry_get_for_desktop_id("pidgin.desktop");
	g_object_ref(launcher);
	launcher_count = purple_prefs_get_int("/plugins/gtk/unity/launcher_count");

	purple_signal_connect(gtk_conv_handle, "displayed-im-msg", plugin,
			PURPLE_CALLBACK(message_displayed_cb), NULL);
	purple_signal_connect(gtk_conv_handle, "displayed-chat-msg", plugin,
			PURPLE_CALLBACK(message_displayed_cb), NULL);
	purple_signal_connect(conv_handle, "sent-im-msg", plugin,
			PURPLE_CALLBACK(im_sent_im), NULL);
	purple_signal_connect(conv_handle, "sent-chat-msg", plugin,
			PURPLE_CALLBACK(chat_sent_im), NULL);
	purple_signal_connect(conv_handle, "conversation-created", plugin,
			PURPLE_CALLBACK(conv_created), NULL);
	purple_signal_connect(conv_handle, "deleting-conversation", plugin,
			PURPLE_CALLBACK(deleting_conv), NULL);

	while (convs) {
		PurpleConversation *conv = (PurpleConversation *)convs->data;
		attach_signals(conv);
		convs = convs->next;
	}

	return TRUE;
}
示例#22
0
static void
init_plugin(PurplePlugin *plugin)
{
#ifdef ENABLE_NLS
  bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
#endif

  purple_prefs_add_none("/plugins/gtk");
  purple_prefs_add_none("/plugins/gtk/festival");
  purple_prefs_add_none("/plugins/gtk/festival/speaker");

  purple_prefs_add_string("/plugins/gtk/festival/speaker/voice", "");
  purple_prefs_add_string("/plugins/gtk/festival/speaker/duration", "1.0");
  purple_prefs_add_int("/plugins/gtk/festival/speaker/maxlength", 256);
  purple_prefs_add_bool("/plugins/gtk/festival/speaker/prepend_who", FALSE);
  purple_prefs_add_bool("/plugins/gtk/festival/speaker/replace_url", FALSE);
  purple_prefs_add_bool("/plugins/gtk/festival/speaker/announce_events", FALSE);
}
示例#23
0
文件: joinpart.c 项目: bf4/pidgin-mac
static void
init_plugin(PurplePlugin *plugin)
{
	purple_prefs_add_none("/plugins/core/joinpart");

	purple_prefs_add_int(DELAY_PREF, DELAY_DEFAULT);
	purple_prefs_add_int(THRESHOLD_PREF, THRESHOLD_DEFAULT);
	purple_prefs_add_bool(HIDE_BUDDIES_PREF, HIDE_BUDDIES_DEFAULT);
}
示例#24
0
/* Save the global OTR UI options */
static void otrg_gtk_ui_global_options_save(gboolean showotrbutton)
{
    if (! purple_prefs_exists("/OTR")) {
	purple_prefs_add_none("/OTR");
    }
    if (! purple_prefs_exists("/OTR/showotrbutton")) {
	purple_prefs_add_bool("/OTR/showotrbutton", showotrbutton);
    }
    purple_prefs_set_bool("/OTR/showotrbutton", showotrbutton);
}
示例#25
0
static gboolean
plugin_load(PurplePlugin *plugin, GError **error)
{
	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/webview");
	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/webview/inspector_enabled", FALSE);

	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/webview/inspector_enabled", TRUE);

	return TRUE;
}
示例#26
0
文件: gestures.c 项目: bf4/pidgin-mac
static void
init_plugin(PurplePlugin *plugin)
{
	purple_prefs_add_none("/plugins/gtk");
	purple_prefs_add_none("/plugins/gtk/X11");
	purple_prefs_add_none("/plugins/gtk/X11/gestures");
	purple_prefs_add_bool("/plugins/gtk/X11/gestures/visual", FALSE);

	purple_prefs_connect_callback(plugin, "/plugins/gtk/X11/gestures/visual",
								visual_pref_cb, NULL);
}
示例#27
0
文件: debug.c 项目: bf4/pidgin-mac
void
purple_debug_init(void)
{
	purple_prefs_add_none("/purple/debug");

	/*
	 * This pref is obsolete and no longer referenced anywhere. It only
	 * survives here because it would be an API break if we removed it.
	 * Remove this when we get to 3.0.0 :)
	 */
	purple_prefs_add_bool("/purple/debug/timestamps", TRUE);
}
示例#28
0
static void
init_plugin(PurplePlugin *plugin)
{
	purple_prefs_add_none("/plugins/gtk");
	purple_prefs_add_none("/plugins/gtk/timestamp_format");

	purple_prefs_add_bool("/plugins/gtk/timestamp_format/force_24hr", TRUE);

	purple_prefs_add_none("/plugins/gtk/timestamp_format/use_dates");
	purple_prefs_add_string("/plugins/gtk/timestamp_format/use_dates/conversation", "automatic");
	purple_prefs_add_string("/plugins/gtk/timestamp_format/use_dates/log", "automatic");
}
示例#29
0
static gboolean
plugin_load(PurplePlugin *plugin, GError **error)
{
	purple_prefs_add_none("/plugins");
	purple_prefs_add_none("/plugins/gnt");

	purple_prefs_add_none("/plugins/gnt/gntgf");
	purple_prefs_add_none(PREFS_EVENT);

	purple_prefs_add_bool(PREFS_EVENT_SIGNONF, TRUE);
	purple_prefs_add_bool(PREFS_EVENT_IM_MSG, TRUE);
	purple_prefs_add_bool(PREFS_EVENT_CHAT_MSG, TRUE);
	purple_prefs_add_bool(PREFS_EVENT_CHAT_NICK, TRUE);

	purple_prefs_add_bool(PREFS_BEEP, TRUE);
#ifdef HAVE_X11
	purple_prefs_add_bool(PREFS_URGENT, FALSE);
#endif

	purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", plugin,
			PURPLE_CALLBACK(buddy_signed_on), NULL);
	purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", plugin,
			PURPLE_CALLBACK(buddy_signed_off), NULL);
	purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", plugin,
			PURPLE_CALLBACK(received_im_msg), NULL);
	purple_signal_connect(purple_conversations_get_handle(), "received-chat-msg", plugin,
			PURPLE_CALLBACK(received_chat_msg), NULL);

	memset(&gpsy, 0, sizeof(gpsy));
	memset(&gpsw, 0, sizeof(gpsw));

	return TRUE;
}
示例#30
0
static void
purplerc_init(PurplePlugin *plugin)
{
	gsize i;

	purple_prefs_add_none("/plugins");
	purple_prefs_add_none("/plugins/gtk");
	purple_prefs_add_none("/plugins/gtk/purplerc");
	purple_prefs_add_none("/plugins/gtk/purplerc/set");

	purple_prefs_add_string("/plugins/gtk/purplerc/gtk-font-name", "");
	purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-font-name", FALSE);

	purple_prefs_add_string("/plugins/gtk/purplerc/gtk-key-theme-name", "");
	purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name", FALSE);

	purple_prefs_add_none("/plugins/gtk/purplerc/color");
	purple_prefs_add_none("/plugins/gtk/purplerc/set/color");
	for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) {
		purple_prefs_add_string(color_prefs[i], "");
		purple_prefs_add_bool(color_prefs_set[i], FALSE);
	}

	purple_prefs_add_none("/plugins/gtk/purplerc/size");
	purple_prefs_add_none("/plugins/gtk/purplerc/set/size");
	for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) {
		purple_prefs_add_int(widget_size_prefs[i], 0);
		purple_prefs_add_bool(widget_size_prefs_set[i], FALSE);
	}

	purple_prefs_add_none("/plugins/gtk/purplerc/font");
	purple_prefs_add_none("/plugins/gtk/purplerc/set/font");
	for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) {
		purple_prefs_add_string(font_prefs[i], "");
		purple_prefs_add_bool(font_prefs_set[i], FALSE);
	}

	/*
	purple_prefs_add_none("/plugins/gtk/purplerc/bool");
	purple_prefs_add_none("/plugins/gtk/purplerc/set/bool");
	for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) {
		purple_prefs_add_bool(widget_bool_prefs[i], TRUE);
		purple_prefs_add_bool(widget_bool_prefs_set[i], FALSE);
	}
	*/

	purple_prefs_add_bool("/plugins/gtk/purplerc/disable-typing-notification", FALSE);
	purple_prefs_add_bool("/plugins/gtk/purplerc/set/disable-typing-notification", FALSE);

	/* remove old cursor color prefs */
	purple_prefs_remove("/plugins/gtk/purplerc/color/GtkWidget::cursor-color");
	purple_prefs_remove("/plugins/gtk/purplerc/color/GtkWidget::secondary-cursor-color");
	purple_prefs_remove("/plugins/gtk/purplerc/set/color/GtkWidget::cursor-color");
	purple_prefs_remove("/plugins/gtk/purplerc/set/color/GtkWidget::secondary-cursor-color");
}