comparison pidgin/gtkft.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 b9d27d1f2e60
children eb2d5ba2a50d
comparison
equal deleted inserted replaced
21645:d0ea3a86add5 21646:2a2496044eef
757 purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/filetransfer/keep_open"); 757 purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/filetransfer/keep_open");
758 dialog->auto_clear = 758 dialog->auto_clear =
759 purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/filetransfer/clear_finished"); 759 purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/filetransfer/clear_finished");
760 760
761 /* Create the window. */ 761 /* Create the window. */
762 dialog->window = window = pidgin_create_window(_("File Transfers"), PIDGIN_HIG_BORDER, "file transfer", TRUE); 762 dialog->window = window = pidgin_create_dialog(_("File Transfers"), PIDGIN_HIG_BORDER, "file transfer", TRUE);
763 763
764 g_signal_connect(G_OBJECT(window), "delete_event", 764 g_signal_connect(G_OBJECT(window), "delete_event",
765 G_CALLBACK(delete_win_cb), dialog); 765 G_CALLBACK(delete_win_cb), dialog);
766 766
767 /* Create the parent vbox for everything. */ 767 /* Create the parent vbox for everything. */
768 vbox1 = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER); 768 vbox1 = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(window), FALSE, PIDGIN_HIG_BORDER);
769 gtk_container_add(GTK_CONTAINER(window), vbox1);
770 gtk_widget_show(vbox1);
771 769
772 /* Create the main vbox for top half of the window. */ 770 /* Create the main vbox for top half of the window. */
773 vbox2 = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); 771 vbox2 = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
774 gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); 772 gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0);
775 gtk_widget_show(vbox2); 773 gtk_widget_show(vbox2);
811 table = make_info_table(dialog); 809 table = make_info_table(dialog);
812 gtk_container_add(GTK_CONTAINER(expander), table); 810 gtk_container_add(GTK_CONTAINER(expander), table);
813 gtk_widget_show(table); 811 gtk_widget_show(table);
814 812
815 /* Now the button box for the buttons */ 813 /* Now the button box for the buttons */
816 bbox = gtk_hbutton_box_new(); 814 bbox = pidgin_dialog_get_action_area(GTK_DIALOG(window));
817 gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE); 815 gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE);
818 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); 816 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
819 gtk_box_pack_end(GTK_BOX(vbox1), bbox, FALSE, TRUE, 0);
820 gtk_widget_show(bbox);
821 817
822 /* Open button */ 818 /* Open button */
823 button = gtk_button_new_from_stock(GTK_STOCK_OPEN); 819 button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
824 gtk_widget_set_sensitive(button, FALSE); 820 gtk_widget_set_sensitive(button, FALSE);
825 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); 821 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);