pidgin: 8600948e: media: Added a plugin action menu for th...
malu at pidgin.im
malu at pidgin.im
Tue Aug 31 15:40:48 EDT 2010
----------------------------------------------------------------------
Revision: 8600948ea456b9282a0e85f1ccff1b7efe3a732e
Parent: dca20e09164518b0f7a773edd7e9649f41d8873d
Author: malu at pidgin.im
Date: 08/31/10 15:38:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8600948ea456b9282a0e85f1ccff1b7efe3a732e
Changelog:
media: Added a plugin action menu for the voice and video settings plugin.
Changes against parent dca20e09164518b0f7a773edd7e9649f41d8873d
patched ChangeLog
patched pidgin/plugins/vvconfig.c
-------------- next part --------------
============================================================
--- ChangeLog 498d844350efb4f58e85c3a80b4a8ceb3fcc6d61
+++ ChangeLog a8585b991238d49acc2005985af3ced7dcfb2ab8
@@ -15,6 +15,8 @@ version 2.7.4 (MM/DD/YYYY):
* Remap the "Set User Mood" shortcut to Control-D, which does not
conflict with the previous shortcut for Get Buddy Info on the
selected buddy.
+ * Add a plugin action menu (unter Tools) for the Voice and Video Settings
+ plugin.
Finch:
* Add support for drop-down account options (like the SILC cipher
============================================================
--- pidgin/plugins/vvconfig.c 4cce5f9c82e1caf11d6531f44a3371c5ab8a2877
+++ pidgin/plugins/vvconfig.c b2ce58f9b64b3a16d4653ee72838215416acc191
@@ -28,6 +28,9 @@
#include <gst/interfaces/propertyprobe.h>
+/* container window for showing a stand-alone configurator */
+static GtkWidget *window = NULL;
+
static PurpleMediaElementInfo *old_video_src = NULL, *old_video_sink = NULL,
*old_audio_src = NULL, *old_audio_sink = NULL;
@@ -502,6 +505,41 @@ plugin_load(PurplePlugin *plugin)
return TRUE;
}
+static void
+config_destroy(GtkObject *w, gpointer nul)
+{
+ purple_debug_info("vvconfig", "closing vv configuration window\n");
+ window = NULL;
+}
+
+static void
+show_config(PurplePluginAction *action)
+{
+ if (!window) {
+ GtkWidget *config_frame = get_plugin_config_frame(NULL);
+ window = pidgin_create_window(_("Voice and Video Settings"),
+ PIDGIN_HIG_BORDER, NULL, TRUE);
+ g_signal_connect(G_OBJECT(window), "destroy",
+ G_CALLBACK(config_destroy), NULL);
+ gtk_container_add(GTK_CONTAINER(window), config_frame);
+ }
+ gtk_window_present(window);
+}
+
+
+static GList *
+actions(PurplePlugin *plugin, gpointer context)
+{
+ GList *l = NULL;
+ PurplePluginAction *act = NULL;
+
+ act = purple_plugin_action_new(_("Voice and Video Settings"),
+ show_config);
+ l = g_list_append(l, act);
+
+ return l;
+}
+
static gboolean
plugin_unload(PurplePlugin *plugin)
{
@@ -550,7 +588,7 @@ static PurplePluginInfo info =
&ui_info, /**< ui_info */
NULL, /**< extra_info */
NULL, /**< prefs_info */
- NULL, /**< actions */
+ actions, /**< actions */
/* padding */
NULL,
More information about the Commits
mailing list