pidgin: d7c7bb3f: media: Add a close button to the stand-a...
malu at pidgin.im
malu at pidgin.im
Tue Aug 31 16:50:46 EDT 2010
----------------------------------------------------------------------
Revision: d7c7bb3f6eb13f17750ceb5aa22cd2bfe891d2f4
Parent: 8600948ea456b9282a0e85f1ccff1b7efe3a732e
Author: malu at pidgin.im
Date: 08/31/10 16:48:59
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d7c7bb3f6eb13f17750ceb5aa22cd2bfe891d2f4
Changelog:
media: Add a close button to the stand-alone video configuration window. Adjusted title
Changes against parent 8600948ea456b9282a0e85f1ccff1b7efe3a732e
patched pidgin/plugins/vvconfig.c
-------------- next part --------------
============================================================
--- pidgin/plugins/vvconfig.c b2ce58f9b64b3a16d4653ee72838215416acc191
+++ pidgin/plugins/vvconfig.c c15c33325dd303f3181222a2f69f752998a961f0
@@ -513,17 +513,35 @@ static void
}
static void
+config_close(GtkObject *w, gpointer nul)
+{
+ gtk_widget_destroy(GTK_WIDGET(window));
+}
+
+static void
show_config(PurplePluginAction *action)
{
if (!window) {
+ GtkWidget *vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
+ GtkWidget *hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER);
GtkWidget *config_frame = get_plugin_config_frame(NULL);
- window = pidgin_create_window(_("Voice and Video Settings"),
+ GtkWidget *close = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+
+ gtk_container_add(GTK_CONTAINER(vbox), config_frame);
+ gtk_container_add(GTK_CONTAINER(vbox), hbox);
+ window = pidgin_create_window(_("Voice/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);
+ g_signal_connect(G_OBJECT(close), "clicked",
+ G_CALLBACK(config_close), NULL);
+ gtk_box_pack_end(GTK_BOX(hbox), close, FALSE, FALSE, PIDGIN_HIG_BORDER);
+ gtk_container_add(GTK_CONTAINER(window), vbox);
+ gtk_widget_show(GTK_WIDGET(close));
+ gtk_widget_show(GTK_WIDGET(vbox));
+ gtk_widget_show(GTK_WIDGET(hbox));
}
- gtk_window_present(window);
+ gtk_window_present(GTK_WINDOW(window));
}
More information about the Commits
mailing list