static PurplePluginPrefFrame *
get_plugin_pref_frame(PurplePlugin *plugin)
{
	PurplePluginPrefFrame *frame;
	PurplePluginPref *ppref;

	g_return_val_if_fail(plugin != NULL, FALSE);

	frame = purple_plugin_pref_frame_new();

	ppref = purple_plugin_pref_new_with_label(_("Hide Nick Changes"));
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(THRESHOLD_PREF,
	                                                 /* Translators: Followed by an input request a number of people */
	                                                 _("For rooms with more than this many people"));
	purple_plugin_pref_set_bounds(ppref, 0, 1000);
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(DELAY_PREF,
	                                                 _("If user has not spoken in this many minutes"));
	purple_plugin_pref_set_bounds(ppref, 0, 8 * 60); /* 8 Hours */
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(HIDE_BUDDIES_PREF,
	                                                 _("Apply hiding rules to buddies"));
	purple_plugin_pref_frame_add(frame, ppref);

	return frame;
}
Ejemplo n.º 2
0
/* initialize preferences dialog */
static PurplePluginPrefFrame *
get_plugin_pref_frame(PurplePlugin *plugin) {
	PurplePluginPrefFrame *frame;
	PurplePluginPref      *ppref;

	frame = purple_plugin_pref_frame_new();
	g_return_val_if_fail(frame != NULL, NULL);

	ppref = purple_plugin_pref_new_with_label("Message split size");
	g_return_val_if_fail(ppref != NULL, NULL);
	purple_plugin_pref_frame_add(frame, ppref);
	ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/splitter/split_size", 
							 "Letter count: ");
	g_return_val_if_fail(ppref != NULL, NULL);
	purple_plugin_pref_set_bounds(ppref, MIN_SPLIT_SIZE, MAX_SPLIT_SIZE);
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_label("Delay between messages");
	g_return_val_if_fail(ppref != NULL, NULL);
	purple_plugin_pref_frame_add(frame, ppref);
	ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/splitter/delay_ms", 
							 "ms: ");
	g_return_val_if_fail(ppref != NULL, NULL);
	purple_plugin_pref_set_bounds(ppref, MIN_DELAY_MS, MAX_DELAY_MS);
	purple_plugin_pref_frame_add(frame, ppref);

	return frame;
}
Ejemplo n.º 3
0
static PurplePluginPrefFrame *
get_plugin_pref_frame(PurplePlugin *plugin)
{
	PurplePluginPrefFrame *frame;
	PurplePluginPref *ppref;

	g_return_val_if_fail(plugin != NULL, FALSE);

	frame = purple_plugin_pref_frame_new();

	ppref = purple_plugin_pref_new_with_label(_("Join/Part Hiding Configuration"));
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(THRESHOLD_PREF,
	                                                 _("Minimum Room Size"));
	purple_plugin_pref_set_bounds(ppref, 0, 1000);
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(DELAY_PREF,
	                                                 _("User Inactivity Timeout (in minutes)"));
	purple_plugin_pref_set_bounds(ppref, 0, 8 * 60); /* 8 Hours */
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(HIDE_BUDDIES_PREF,
	                                                 _("Apply hiding rules to buddies"));
	purple_plugin_pref_frame_add(frame, ppref);

	return frame;
}
Ejemplo n.º 4
0
static PurplePluginPrefFrame *
get_plugin_pref_frame(PurplePlugin *plugin) {
	PurplePluginPrefFrame *frame;
	PurplePluginPref *ppref;

	frame = purple_plugin_pref_frame_new();

	ppref = purple_plugin_pref_new_with_label(_("Conversation Placement"));
	purple_plugin_pref_frame_add(frame, ppref);

	/* Translators: "New conversations" should match the text in the preferences dialog and "By conversation count" should be the same text used above */
	ppref = purple_plugin_pref_new_with_label(_("Note: The preference for \"New conversations\" must be set to \"By conversation count\"."));
	purple_plugin_pref_set_type(ppref, PURPLE_PLUGIN_PREF_INFO);
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(
							"/plugins/gtk/extplacement/placement_number",
							_("Number of conversations per window"));
	purple_plugin_pref_set_bounds(ppref, 1, 50);
	purple_plugin_pref_frame_add(frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label(
							"/plugins/gtk/extplacement/placement_number_separate",
							_("Separate IM and Chat windows when placing by number"));
	purple_plugin_pref_frame_add(frame, ppref);

	return frame;
}
PurplePluginPrefFrame *get_plugin_pref_frame(PurplePlugin *plugin) {
  PurplePluginPrefFrame *frame;
  PurplePluginPref *pref;

  frame = purple_plugin_pref_frame_new();

  pref = purple_plugin_pref_new_with_name_and_label(PREF_SIZE, "Size of Recent Contacts Group:");
  purple_plugin_pref_set_bounds(pref, 0, 100);
  purple_plugin_pref_frame_add(frame, pref);

  return frame;
}
static PurplePluginPrefFrame *
get_plugin_pref_frame (PurplePlugin *plugin)
{
	PurplePluginPrefFrame *frame;
	PurplePluginPref *ppref;

	frame = purple_plugin_pref_frame_new ();

	ppref = purple_plugin_pref_new_with_name_and_label (
                            "/plugins/gtk/libnotify/newmsg",
                            _("New messages"));
	purple_plugin_pref_frame_add (frame, ppref);
	
	ppref = purple_plugin_pref_new_with_name_and_label (
                            "/plugins/gtk/libnotify/newmsgtxt",
                            _("Show new messages text"));
	purple_plugin_pref_frame_add (frame, ppref);

	if (purple_prefs_get_int("/plugins/gtk/libnotify/timeout") == 0) {
		/* 3 seconds is the default timeout */
		purple_prefs_set_int("/plugins/gtk/libnotify/timeout", 3000);
	}

	ppref = purple_plugin_pref_new_with_name_and_label (
                            "/plugins/gtk/libnotify/timeout",
                            _("Display timeout (msec)"));
	purple_plugin_pref_set_bounds(ppref, 100, 100000);
	purple_plugin_pref_frame_add (frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label (
                            "/plugins/gtk/libnotify/blocked",
                            _("Ignore events from blocked users"));
	purple_plugin_pref_frame_add (frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label (
                            "/plugins/gtk/libnotify/signon",
                            _("Buddy signs on"));
	purple_plugin_pref_frame_add (frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label (
                            "/plugins/gtk/libnotify/signoff",
                            _("Buddy signs off"));
	purple_plugin_pref_frame_add (frame, ppref);

	ppref = purple_plugin_pref_new_with_name_and_label (
                            "/plugins/gtk/libnotify/only_available",
                            _("Only when available"));
	purple_plugin_pref_frame_add (frame, ppref);

	return frame;
}
PurplePluginPrefFrame *
notify_plus_pref_frame(PurplePlugin *plugin)
{
	PurplePluginPrefFrame *frame;
	PurplePluginPref *pref;

	frame = purple_plugin_pref_frame_new();

	pref = purple_plugin_pref_new_with_label(
		_("Notification settings:")
		);
	purple_plugin_pref_frame_add(frame, pref);

	pref = purple_plugin_pref_new_with_name_and_label(
		"/plugins/core/libnotify+/expire-timeout",
		_("Expire timeout (1-120, 0 for never, -1 for auto)")
		);
	purple_plugin_pref_frame_add(frame, pref);
	purple_plugin_pref_set_bounds(pref, -1, 120);

	pref = purple_plugin_pref_new_with_name_and_label(
		"/plugins/core/libnotify+/overlay-scale",
		_("Scale factor for protocol icon (0-100%)")
		);
	purple_plugin_pref_frame_add(frame, pref);
	purple_plugin_pref_set_bounds(pref, 0, 100);

	pref = purple_plugin_pref_new_with_name_and_label(
		"/plugins/core/libnotify+/no-transcient",
		_("Do not use transcient notifications (if supported)")
		);
	purple_plugin_pref_frame_add(frame, pref);


	return frame;
}
Ejemplo n.º 8
0
static PurplePluginPrefFrame *
get_plugin_pref_frame(PurplePlugin *plugin)
{
	PurplePluginPrefFrame *frame;
	PurplePluginPref *ppref;

	PurpleAccount *account;
	char *name, *id, *path;
	int len;
	GList *l, *listed_protocols;
	
	DEBUG_MSG("get_plugin_pref_frame");
	
	frame = purple_plugin_pref_frame_new();

	ppref = purple_plugin_pref_new_with_name_and_label(
	"/plugins/core/pidgin-gntp/on_focus", "show message when window is focused");
	purple_plugin_pref_frame_add(frame, ppref);
	
	ppref = purple_plugin_pref_new_with_label("Send notifications when status is:");
	purple_plugin_pref_frame_add(frame, ppref);	
	
	ppref = purple_plugin_pref_new_with_name_and_label(
	"/plugins/core/pidgin-gntp/on_available", "available");
	purple_plugin_pref_frame_add(frame, ppref);
	
	ppref = purple_plugin_pref_new_with_name_and_label(
	"/plugins/core/pidgin-gntp/on_unavailable", "unavailable");
	purple_plugin_pref_frame_add(frame, ppref);
	
	ppref = purple_plugin_pref_new_with_name_and_label(
	"/plugins/core/pidgin-gntp/on_invisible", "invisible");
	purple_plugin_pref_frame_add(frame, ppref);
	
	ppref = purple_plugin_pref_new_with_name_and_label(
	"/plugins/core/pidgin-gntp/on_away", "away");
	purple_plugin_pref_frame_add(frame, ppref);
	
	
	ppref = purple_plugin_pref_new_with_label("Starting delay (to prevent spam while connecting):");
	purple_plugin_pref_frame_add(frame, ppref);
	
	ppref = purple_plugin_pref_new_with_name_and_label(
	"/plugins/core/pidgin-gntp/hack_ms", "value in milliseconds (1000ms = 1 sec)");
	purple_plugin_pref_set_bounds(ppref, 0, 30000);
	purple_plugin_pref_frame_add(frame, ppref);
	
	
	ppref = purple_plugin_pref_new_with_label("Following protocols sends notifications:");
	purple_plugin_pref_frame_add(frame, ppref);
		
	listed_protocols = NULL;
	for (l = purple_accounts_get_all(); l != NULL; l = l->next)
	{
		account = (PurpleAccount *)l->data;
		
		name = (char*)purple_account_get_protocol_name (account);
		id = (char*)purple_account_get_protocol_id (account);		
		
		if( !g_list_find_custom(listed_protocols, id, (GCompareFunc)strcmp) )
		{
			listed_protocols = g_list_prepend (listed_protocols, id);
			
			len = s_strlen("/plugins/core/pidgin-gntp/") + s_strlen(id) + 1;
			path = malloc( len ); 
			g_snprintf(path, len, "%s%s", "/plugins/core/pidgin-gntp/", id );
				
			if(!purple_prefs_exists(path))
				purple_prefs_add_bool(path, TRUE);
			
			ppref = purple_plugin_pref_new_with_name_and_label(path, name);
			purple_plugin_pref_frame_add(frame, ppref);
			free(path);
		}
	}
	g_list_free(listed_protocols);
			
	ppref = purple_plugin_pref_new_with_label(REV);
	purple_plugin_pref_frame_add(frame, ppref);

	return frame;
}