Mercurial > pidgin.yaz
comparison src/gtkaccount.c @ 11243:a511b77a368b
[gaim-migrate @ 13408]
sf patch #1246384, from shiyee
"This patch globally defines
spacings and boreders according to the Gnome Human
Interfaces Guidelines, and uses those defines where
appropriate. No visual changes are made, but the the
intention is that the defines should help promote
uniformness."
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 12 Aug 2005 23:53:28 +0000 |
parents | 096020ae09a9 |
children | ad9a61894d9b |
comparison
equal
deleted
inserted
replaced
11242:01c06e7ae1f6 | 11243:a511b77a368b |
---|---|
176 const char *text, GtkWidget *widget) | 176 const char *text, GtkWidget *widget) |
177 { | 177 { |
178 GtkWidget *hbox; | 178 GtkWidget *hbox; |
179 GtkWidget *label; | 179 GtkWidget *label; |
180 | 180 |
181 hbox = gtk_hbox_new(FALSE, 6); | 181 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
182 gtk_box_pack_start(GTK_BOX(parent), hbox, FALSE, FALSE, 0); | 182 gtk_box_pack_start(GTK_BOX(parent), hbox, FALSE, FALSE, 0); |
183 gtk_widget_show(hbox); | 183 gtk_widget_show(hbox); |
184 | 184 |
185 label = gtk_label_new_with_mnemonic(text); | 185 label = gtk_label_new_with_mnemonic(text); |
186 gtk_size_group_add_widget(dialog->sg, label); | 186 gtk_size_group_add_widget(dialog->sg, label); |
187 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 187 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
188 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 188 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
189 gtk_widget_show(label); | 189 gtk_widget_show(label); |
190 | 190 |
191 gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 12); | 191 gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, GAIM_HIG_BORDER); |
192 gtk_widget_show(widget); | 192 gtk_widget_show(widget); |
193 gaim_set_accessible_label (widget, label); | 193 gaim_set_accessible_label (widget, label); |
194 | 194 |
195 return hbox; | 195 return hbox; |
196 } | 196 } |
420 if ((current_folder != NULL) && (*current_folder != '\0')) | 420 if ((current_folder != NULL) && (*current_folder != '\0')) |
421 gtk_file_selection_set_filename(GTK_FILE_SELECTION(dialog->icon_filesel), | 421 gtk_file_selection_set_filename(GTK_FILE_SELECTION(dialog->icon_filesel), |
422 current_folder); | 422 current_folder); |
423 | 423 |
424 gtk_widget_set_size_request(GTK_WIDGET(dialog->icon_preview), -1, 50); | 424 gtk_widget_set_size_request(GTK_WIDGET(dialog->icon_preview), -1, 50); |
425 hbox = gtk_hbox_new(FALSE, 6); | 425 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
426 gtk_box_pack_start( | 426 gtk_box_pack_start( |
427 GTK_BOX(GTK_FILE_SELECTION(dialog->icon_filesel)->main_vbox), | 427 GTK_BOX(GTK_FILE_SELECTION(dialog->icon_filesel)->main_vbox), |
428 hbox, FALSE, FALSE, 0); | 428 hbox, FALSE, FALSE, 0); |
429 gtk_box_pack_end(GTK_BOX(hbox), dialog->icon_preview, | 429 gtk_box_pack_end(GTK_BOX(hbox), dialog->icon_preview, |
430 FALSE, FALSE, 0); | 430 FALSE, FALSE, 0); |
669 | 669 |
670 gtk_box_reorder_child(GTK_BOX(parent), dialog->login_frame, 0); | 670 gtk_box_reorder_child(GTK_BOX(parent), dialog->login_frame, 0); |
671 gtk_widget_show(dialog->login_frame); | 671 gtk_widget_show(dialog->login_frame); |
672 | 672 |
673 /* Main vbox */ | 673 /* Main vbox */ |
674 vbox = gtk_vbox_new(FALSE, 6); | 674 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
675 gtk_container_add(GTK_CONTAINER(frame), vbox); | 675 gtk_container_add(GTK_CONTAINER(frame), vbox); |
676 gtk_widget_show(vbox); | 676 gtk_widget_show(vbox); |
677 | 677 |
678 /* Protocol */ | 678 /* Protocol */ |
679 dialog->protocol_menu = gaim_gtk_protocol_option_menu_new( | 679 dialog->protocol_menu = gaim_gtk_protocol_option_menu_new( |
816 | 816 |
817 gtk_box_reorder_child(GTK_BOX(parent), dialog->user_frame, 1); | 817 gtk_box_reorder_child(GTK_BOX(parent), dialog->user_frame, 1); |
818 gtk_widget_show(dialog->user_frame); | 818 gtk_widget_show(dialog->user_frame); |
819 | 819 |
820 /* Main vbox */ | 820 /* Main vbox */ |
821 vbox = gtk_vbox_new(FALSE, 6); | 821 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
822 gtk_container_add(GTK_CONTAINER(frame), vbox); | 822 gtk_container_add(GTK_CONTAINER(frame), vbox); |
823 gtk_widget_show(vbox); | 823 gtk_widget_show(vbox); |
824 | 824 |
825 /* New mail notifications */ | 825 /* New mail notifications */ |
826 dialog->new_mail_check = | 826 dialog->new_mail_check = |
827 gtk_check_button_new_with_label(_("New mail notifications")); | 827 gtk_check_button_new_with_label(_("New mail notifications")); |
828 gtk_box_pack_start(GTK_BOX(vbox), dialog->new_mail_check, FALSE, FALSE, 0); | 828 gtk_box_pack_start(GTK_BOX(vbox), dialog->new_mail_check, FALSE, FALSE, 0); |
829 gtk_widget_show(dialog->new_mail_check); | 829 gtk_widget_show(dialog->new_mail_check); |
830 | 830 |
831 /* Buddy icon */ | 831 /* Buddy icon */ |
832 dialog->icon_hbox = hbox = gtk_hbox_new(FALSE, 6); | 832 dialog->icon_hbox = hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
833 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 833 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
834 gtk_widget_show(hbox); | 834 gtk_widget_show(hbox); |
835 | 835 |
836 label = gtk_label_new(_("Buddy icon:")); | 836 label = gtk_label_new(_("Buddy icon:")); |
837 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0); | 837 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0); |
847 | 847 |
848 vbox2 = gtk_vbox_new(FALSE, 0); | 848 vbox2 = gtk_vbox_new(FALSE, 0); |
849 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0); | 849 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0); |
850 gtk_widget_show(vbox2); | 850 gtk_widget_show(vbox2); |
851 | 851 |
852 hbox2 = gtk_hbox_new(FALSE, 6); | 852 hbox2 = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
853 gtk_box_pack_start(GTK_BOX(vbox2), hbox2, FALSE, FALSE, 12); | 853 gtk_box_pack_start(GTK_BOX(vbox2), hbox2, FALSE, FALSE, GAIM_HIG_BORDER); |
854 gtk_widget_show(hbox2); | 854 gtk_widget_show(hbox2); |
855 | 855 |
856 button = gtk_button_new_from_stock(GTK_STOCK_OPEN); | 856 button = gtk_button_new_from_stock(GTK_STOCK_OPEN); |
857 gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 0); | 857 gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 0); |
858 g_signal_connect(G_OBJECT(button), "clicked", | 858 g_signal_connect(G_OBJECT(button), "clicked", |
930 | 930 |
931 gtk_box_reorder_child(GTK_BOX(parent), dialog->protocol_frame, 0); | 931 gtk_box_reorder_child(GTK_BOX(parent), dialog->protocol_frame, 0); |
932 gtk_widget_show(dialog->protocol_frame); | 932 gtk_widget_show(dialog->protocol_frame); |
933 | 933 |
934 /* Main vbox */ | 934 /* Main vbox */ |
935 vbox = gtk_vbox_new(FALSE, 6); | 935 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
936 gtk_container_add(GTK_CONTAINER(frame), vbox); | 936 gtk_container_add(GTK_CONTAINER(frame), vbox); |
937 gtk_widget_show(vbox); | 937 gtk_widget_show(vbox); |
938 | 938 |
939 if (dialog->protocol_opt_entries != NULL) { | 939 if (dialog->protocol_opt_entries != NULL) { |
940 g_list_free(dialog->protocol_opt_entries); | 940 g_list_free(dialog->protocol_opt_entries); |
1206 | 1206 |
1207 gtk_box_reorder_child(GTK_BOX(parent), dialog->proxy_frame, 1); | 1207 gtk_box_reorder_child(GTK_BOX(parent), dialog->proxy_frame, 1); |
1208 gtk_widget_show(dialog->proxy_frame); | 1208 gtk_widget_show(dialog->proxy_frame); |
1209 | 1209 |
1210 /* Main vbox */ | 1210 /* Main vbox */ |
1211 vbox = gtk_vbox_new(FALSE, 6); | 1211 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
1212 gtk_container_add(GTK_CONTAINER(frame), vbox); | 1212 gtk_container_add(GTK_CONTAINER(frame), vbox); |
1213 gtk_widget_show(vbox); | 1213 gtk_widget_show(vbox); |
1214 | 1214 |
1215 /* Proxy Type drop-down. */ | 1215 /* Proxy Type drop-down. */ |
1216 dialog->proxy_dropdown = make_proxy_dropdown(); | 1216 dialog->proxy_dropdown = make_proxy_dropdown(); |
1220 #endif | 1220 #endif |
1221 | 1221 |
1222 add_pref_box(dialog, vbox, _("Proxy _type:"), dialog->proxy_dropdown); | 1222 add_pref_box(dialog, vbox, _("Proxy _type:"), dialog->proxy_dropdown); |
1223 | 1223 |
1224 /* Setup the second vbox, which may be hidden at times. */ | 1224 /* Setup the second vbox, which may be hidden at times. */ |
1225 dialog->proxy_vbox = vbox2 = gtk_vbox_new(FALSE, 6); | 1225 dialog->proxy_vbox = vbox2 = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
1226 gtk_box_pack_start(GTK_BOX(vbox), vbox2, FALSE, FALSE, 12); | 1226 gtk_box_pack_start(GTK_BOX(vbox), vbox2, FALSE, FALSE, GAIM_HIG_BORDER); |
1227 gtk_widget_show(vbox2); | 1227 gtk_widget_show(vbox2); |
1228 | 1228 |
1229 /* Host */ | 1229 /* Host */ |
1230 dialog->proxy_host_entry = gtk_entry_new(); | 1230 dialog->proxy_host_entry = gtk_entry_new(); |
1231 add_pref_box(dialog, vbox2, _("_Host:"), dialog->proxy_host_entry); | 1231 add_pref_box(dialog, vbox2, _("_Host:"), dialog->proxy_host_entry); |
1626 else | 1626 else |
1627 gtk_window_set_title(GTK_WINDOW(win), _("Modify Account")); | 1627 gtk_window_set_title(GTK_WINDOW(win), _("Modify Account")); |
1628 | 1628 |
1629 gtk_window_set_resizable(GTK_WINDOW(win), FALSE); | 1629 gtk_window_set_resizable(GTK_WINDOW(win), FALSE); |
1630 | 1630 |
1631 gtk_container_set_border_width(GTK_CONTAINER(win), 12); | 1631 gtk_container_set_border_width(GTK_CONTAINER(win), GAIM_HIG_BORDER); |
1632 | 1632 |
1633 g_signal_connect(G_OBJECT(win), "delete_event", | 1633 g_signal_connect(G_OBJECT(win), "delete_event", |
1634 G_CALLBACK(account_win_destroy_cb), dialog); | 1634 G_CALLBACK(account_win_destroy_cb), dialog); |
1635 | 1635 |
1636 /* Setup the vbox */ | 1636 /* Setup the vbox */ |
1637 main_vbox = gtk_vbox_new(FALSE, 12); | 1637 main_vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); |
1638 gtk_container_add(GTK_CONTAINER(win), main_vbox); | 1638 gtk_container_add(GTK_CONTAINER(win), main_vbox); |
1639 gtk_widget_show(main_vbox); | 1639 gtk_widget_show(main_vbox); |
1640 | 1640 |
1641 notebook = gtk_notebook_new(); | 1641 notebook = gtk_notebook_new(); |
1642 gtk_box_pack_start(GTK_BOX(main_vbox), notebook, FALSE, FALSE, 0); | 1642 gtk_box_pack_start(GTK_BOX(main_vbox), notebook, FALSE, FALSE, 0); |
1643 | 1643 |
1644 /* Setup the inner vbox */ | 1644 /* Setup the inner vbox */ |
1645 dialog->top_vbox = vbox = gtk_vbox_new(FALSE, 12); | 1645 dialog->top_vbox = vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); |
1646 gtk_container_set_border_width(GTK_CONTAINER(vbox), 12); | 1646 gtk_container_set_border_width(GTK_CONTAINER(vbox), GAIM_HIG_BORDER); |
1647 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, | 1647 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, |
1648 gtk_label_new_with_mnemonic("_Basic")); | 1648 gtk_label_new_with_mnemonic("_Basic")); |
1649 gtk_widget_show(vbox); | 1649 gtk_widget_show(vbox); |
1650 | 1650 |
1651 /* Setup the top frames. */ | 1651 /* Setup the top frames. */ |
1652 add_login_options(dialog, vbox); | 1652 add_login_options(dialog, vbox); |
1653 add_user_options(dialog, vbox); | 1653 add_user_options(dialog, vbox); |
1654 | 1654 |
1655 /* Setup the page with 'Advanced'. */ | 1655 /* Setup the page with 'Advanced'. */ |
1656 dialog->bottom_vbox = dbox = gtk_vbox_new(FALSE, 12); | 1656 dialog->bottom_vbox = dbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); |
1657 gtk_container_set_border_width(GTK_CONTAINER(dbox), 12); | 1657 gtk_container_set_border_width(GTK_CONTAINER(dbox), GAIM_HIG_BORDER); |
1658 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), dbox, | 1658 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), dbox, |
1659 gtk_label_new_with_mnemonic("_Advanced")); | 1659 gtk_label_new_with_mnemonic("_Advanced")); |
1660 | 1660 |
1661 /** Setup the bottom frames. */ | 1661 /** Setup the bottom frames. */ |
1662 add_protocol_options(dialog, dbox); | 1662 add_protocol_options(dialog, dbox); |
1663 gtk_widget_show_all(GTK_WIDGET(notebook)); | 1663 gtk_widget_show_all(GTK_WIDGET(notebook)); |
1664 add_proxy_options(dialog, dbox); | 1664 add_proxy_options(dialog, dbox); |
1665 | 1665 |
1666 /* Setup the button box */ | 1666 /* Setup the button box */ |
1667 bbox = gtk_hbutton_box_new(); | 1667 bbox = gtk_hbutton_box_new(); |
1668 gtk_box_set_spacing(GTK_BOX(bbox), 6); | 1668 gtk_box_set_spacing(GTK_BOX(bbox), GAIM_HIG_BOX_SPACE); |
1669 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 1669 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
1670 gtk_box_pack_end(GTK_BOX(main_vbox), bbox, FALSE, TRUE, 0); | 1670 gtk_box_pack_end(GTK_BOX(main_vbox), bbox, FALSE, TRUE, 0); |
1671 gtk_widget_show(bbox); | 1671 gtk_widget_show(bbox); |
1672 | 1672 |
1673 /* Register button */ | 1673 /* Register button */ |
2323 | 2323 |
2324 dialog->window = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 2324 dialog->window = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
2325 gtk_window_set_default_size(GTK_WINDOW(win), width, height); | 2325 gtk_window_set_default_size(GTK_WINDOW(win), width, height); |
2326 gtk_window_set_role(GTK_WINDOW(win), "accounts"); | 2326 gtk_window_set_role(GTK_WINDOW(win), "accounts"); |
2327 gtk_window_set_title(GTK_WINDOW(win), _("Accounts")); | 2327 gtk_window_set_title(GTK_WINDOW(win), _("Accounts")); |
2328 gtk_container_set_border_width(GTK_CONTAINER(win), 12); | 2328 gtk_container_set_border_width(GTK_CONTAINER(win), GAIM_HIG_BORDER); |
2329 | 2329 |
2330 g_signal_connect(G_OBJECT(win), "delete_event", | 2330 g_signal_connect(G_OBJECT(win), "delete_event", |
2331 G_CALLBACK(accedit_win_destroy_cb), accounts_window); | 2331 G_CALLBACK(accedit_win_destroy_cb), accounts_window); |
2332 g_signal_connect(G_OBJECT(win), "configure_event", | 2332 g_signal_connect(G_OBJECT(win), "configure_event", |
2333 G_CALLBACK(configure_cb), accounts_window); | 2333 G_CALLBACK(configure_cb), accounts_window); |
2334 | 2334 |
2335 /* Setup the vbox */ | 2335 /* Setup the vbox */ |
2336 vbox = gtk_vbox_new(FALSE, 12); | 2336 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); |
2337 gtk_container_add(GTK_CONTAINER(win), vbox); | 2337 gtk_container_add(GTK_CONTAINER(win), vbox); |
2338 gtk_widget_show(vbox); | 2338 gtk_widget_show(vbox); |
2339 | 2339 |
2340 /* Setup the scrolled window that will contain the list of accounts. */ | 2340 /* Setup the scrolled window that will contain the list of accounts. */ |
2341 sw = create_accounts_list(dialog); | 2341 sw = create_accounts_list(dialog); |
2342 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | 2342 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); |
2343 gtk_widget_show(sw); | 2343 gtk_widget_show(sw); |
2344 | 2344 |
2345 /* Button box. */ | 2345 /* Button box. */ |
2346 bbox = gtk_hbutton_box_new(); | 2346 bbox = gtk_hbutton_box_new(); |
2347 gtk_box_set_spacing(GTK_BOX(bbox), 6); | 2347 gtk_box_set_spacing(GTK_BOX(bbox), GAIM_HIG_BOX_SPACE); |
2348 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 2348 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
2349 gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0); | 2349 gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0); |
2350 gtk_widget_show(bbox); | 2350 gtk_widget_show(bbox); |
2351 | 2351 |
2352 /* Add button */ | 2352 /* Add button */ |