# HG changeset patch # User Marcus Lundblad # Date 1283283480 0 # Node ID 1bf7346e5d5764057c2a9fa09994fd90b841fada # Parent 195d034b6cfeeb10965171a0a5925995ad800a2c media: Added a plugin action menu for the voice and video settings plugin. diff -r 195d034b6cfe -r 1bf7346e5d57 ChangeLog --- a/ChangeLog Tue Aug 31 18:26:04 2010 +0000 +++ b/ChangeLog Tue Aug 31 19:38:00 2010 +0000 @@ -15,6 +15,8 @@ * 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 diff -r 195d034b6cfe -r 1bf7346e5d57 pidgin/plugins/vvconfig.c --- a/pidgin/plugins/vvconfig.c Tue Aug 31 18:26:04 2010 +0000 +++ b/pidgin/plugins/vvconfig.c Tue Aug 31 19:38:00 2010 +0000 @@ -28,6 +28,9 @@ #include +/* 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 @@ 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 @@ &ui_info, /**< ui_info */ NULL, /**< extra_info */ NULL, /**< prefs_info */ - NULL, /**< actions */ + actions, /**< actions */ /* padding */ NULL,