Mercurial > pidgin.yaz
changeset 30904:bfc08a3c9c21
media: Add a close button to the stand-alone video configuration window. Adjusted title
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Tue, 31 Aug 2010 20:48:59 +0000 |
parents | 1bf7346e5d57 |
children | 89311d2cfce9 |
files | pidgin/plugins/vvconfig.c |
diffstat | 1 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/plugins/vvconfig.c Tue Aug 31 19:38:00 2010 +0000 +++ b/pidgin/plugins/vvconfig.c Tue Aug 31 20:48:59 2010 +0000 @@ -513,17 +513,35 @@ } 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)); }