Mercurial > pidgin.yaz
comparison pidgin/gtkcertmgr.c @ 21646:2a2496044eef
Patch from fmoo. This makes a lot of the windows closeable with Escape. There
may be other windows that need this.
The buttons at the bottom don't quite line up properly. That needs to be fixed.
Closes #2137.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 26 Nov 2007 08:47:08 +0000 |
parents | 665e04562de0 |
children | eb2d5ba2a50d |
comparison
equal
deleted
inserted
replaced
21645:d0ea3a86add5 | 21646:2a2496044eef |
---|---|
597 /* Create the dialog, and set certmgr_dialog so we never create | 597 /* Create the dialog, and set certmgr_dialog so we never create |
598 more than one at a time */ | 598 more than one at a time */ |
599 dlg = certmgr_dialog = g_new0(CertMgrDialog, 1); | 599 dlg = certmgr_dialog = g_new0(CertMgrDialog, 1); |
600 | 600 |
601 win = dlg->window = | 601 win = dlg->window = |
602 pidgin_create_window(_("Certificate Manager"),/* Title */ | 602 pidgin_create_dialog(_("Certificate Manager"),/* Title */ |
603 PIDGIN_HIG_BORDER, /*Window border*/ | 603 PIDGIN_HIG_BORDER, /*Window border*/ |
604 "certmgr", /* Role */ | 604 "certmgr", /* Role */ |
605 TRUE); /* Allow resizing */ | 605 TRUE); /* Allow resizing */ |
606 g_signal_connect(G_OBJECT(win), "delete_event", | 606 g_signal_connect(G_OBJECT(win), "delete_event", |
607 G_CALLBACK(certmgr_close_cb), dlg); | 607 G_CALLBACK(certmgr_close_cb), dlg); |
609 | 609 |
610 /* TODO: Retrieve the user-set window size and use it */ | 610 /* TODO: Retrieve the user-set window size and use it */ |
611 gtk_window_set_default_size(GTK_WINDOW(win), 400, 400); | 611 gtk_window_set_default_size(GTK_WINDOW(win), 400, 400); |
612 | 612 |
613 /* Main vbox */ | 613 /* Main vbox */ |
614 vbox = gtk_vbox_new( FALSE, PIDGIN_HIG_BORDER ); | 614 vbox = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(win), FALSE, PIDGIN_HIG_BORDER); |
615 gtk_container_add(GTK_CONTAINER(win), vbox); | |
616 gtk_widget_show(vbox); | |
617 | 615 |
618 /* Notebook of various certificate managers */ | 616 /* Notebook of various certificate managers */ |
619 dlg->notebook = gtk_notebook_new(); | 617 dlg->notebook = gtk_notebook_new(); |
620 gtk_box_pack_start(GTK_BOX(vbox), dlg->notebook, | 618 gtk_box_pack_start(GTK_BOX(vbox), dlg->notebook, |
621 TRUE, TRUE, /* Notebook should take extra space */ | 619 TRUE, TRUE, /* Notebook should take extra space */ |
622 0); | 620 0); |
623 gtk_widget_show(dlg->notebook); | 621 gtk_widget_show(dlg->notebook); |
624 | 622 |
625 /* Box for the close button */ | 623 /* Box for the close button */ |
626 bbox = gtk_hbutton_box_new(); | 624 bbox = pidgin_dialog_get_action_area(GTK_DIALOG(win)); |
627 gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE); | 625 gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE); |
628 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 626 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
629 gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0); | |
630 gtk_widget_show(bbox); | |
631 | 627 |
632 /* Close button */ | 628 /* Close button */ |
633 dlg->closebutton = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | 629 dlg->closebutton = gtk_button_new_from_stock(GTK_STOCK_CLOSE); |
634 gtk_box_pack_start(GTK_BOX(bbox), dlg->closebutton, FALSE, FALSE, 0); | 630 gtk_box_pack_start(GTK_BOX(bbox), dlg->closebutton, FALSE, FALSE, 0); |
635 gtk_widget_show(dlg->closebutton); | 631 gtk_widget_show(dlg->closebutton); |