Mercurial > pidgin
comparison src/dialogs.c @ 5314:1f901484599d
[gaim-migrate @ 5686]
GTK_OBJECT -> G_OBJECT
Also fixed a few compiler warnings.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 06 May 2003 05:48:03 +0000 |
parents | d579d5367836 |
children | c1e7c3f72128 |
comparison
equal
deleted
inserted
replaced
5313:8d118c2b03c9 | 5314:1f901484599d |
---|---|
757 g_snprintf(buf, sizeof(buf), "%s (%s)", | 757 g_snprintf(buf, sizeof(buf), "%s (%s)", |
758 c->username, c->prpl->info->name); | 758 c->username, c->prpl->info->name); |
759 opt = gtk_menu_item_new_with_label(buf); | 759 opt = gtk_menu_item_new_with_label(buf); |
760 g_object_set_data(G_OBJECT(opt), "getuserinfo", info); | 760 g_object_set_data(G_OBJECT(opt), "getuserinfo", info); |
761 | 761 |
762 g_signal_connect(GTK_OBJECT(opt), "activate", | 762 g_signal_connect(G_OBJECT(opt), "activate", |
763 G_CALLBACK(show_info_select_account), c); | 763 G_CALLBACK(show_info_select_account), c); |
764 | 764 |
765 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); | 765 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); |
766 g = g->next; | 766 g = g->next; |
767 } | 767 } |
859 g_snprintf(buf, sizeof(buf), "%s (%s)", | 859 g_snprintf(buf, sizeof(buf), "%s (%s)", |
860 c->username, c->prpl->info->name); | 860 c->username, c->prpl->info->name); |
861 opt = gtk_menu_item_new_with_label(buf); | 861 opt = gtk_menu_item_new_with_label(buf); |
862 g_object_set_data(G_OBJECT(opt), "getuserinfo", info); | 862 g_object_set_data(G_OBJECT(opt), "getuserinfo", info); |
863 | 863 |
864 g_signal_connect(GTK_OBJECT(opt), "activate", | 864 g_signal_connect(G_OBJECT(opt), "activate", |
865 G_CALLBACK(show_info_select_account), c); | 865 G_CALLBACK(show_info_select_account), c); |
866 | 866 |
867 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); | 867 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); |
868 g = g->next; | 868 g = g->next; |
869 } | 869 } |
1054 c = (struct gaim_connection *)g->data; | 1054 c = (struct gaim_connection *)g->data; |
1055 g_snprintf(buf, sizeof(buf), "%s (%s)", | 1055 g_snprintf(buf, sizeof(buf), "%s (%s)", |
1056 c->username, c->prpl->info->name); | 1056 c->username, c->prpl->info->name); |
1057 opt = gtk_menu_item_new_with_label(buf); | 1057 opt = gtk_menu_item_new_with_label(buf); |
1058 g_object_set_data(G_OBJECT(opt), "addbuddy", b); | 1058 g_object_set_data(G_OBJECT(opt), "addbuddy", b); |
1059 g_signal_connect(GTK_OBJECT(opt), "activate", | 1059 g_signal_connect(G_OBJECT(opt), "activate", |
1060 G_CALLBACK(addbuddy_select_account), | 1060 G_CALLBACK(addbuddy_select_account), |
1061 c); | 1061 c); |
1062 gtk_widget_show(opt); | 1062 gtk_widget_show(opt); |
1063 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); | 1063 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); |
1064 | 1064 |
1125 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | 1125 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
1126 | 1126 |
1127 hbox = gtk_hbox_new(FALSE, 6); | 1127 hbox = gtk_hbox_new(FALSE, 6); |
1128 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 1128 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
1129 | 1129 |
1130 g_signal_connect(GTK_OBJECT(a->window), "destroy", G_CALLBACK(destroy_dialog), a->window); | 1130 g_signal_connect(G_OBJECT(a->window), "destroy", G_CALLBACK(destroy_dialog), a->window); |
1131 g_signal_connect(GTK_OBJECT(a->window), "destroy", G_CALLBACK(free_dialog), a); | 1131 g_signal_connect(G_OBJECT(a->window), "destroy", G_CALLBACK(free_dialog), a); |
1132 dialogwindows = g_list_prepend(dialogwindows, a->window); | 1132 dialogwindows = g_list_prepend(dialogwindows, a->window); |
1133 | 1133 |
1134 table = gtk_table_new(4, 2, FALSE); | 1134 table = gtk_table_new(4, 2, FALSE); |
1135 gtk_table_set_row_spacings(GTK_TABLE(table), 5); | 1135 gtk_table_set_row_spacings(GTK_TABLE(table), 5); |
1136 gtk_table_set_col_spacings(GTK_TABLE(table), 5); | 1136 gtk_table_set_col_spacings(GTK_TABLE(table), 5); |
1343 if (GAIM_PLUGIN_PROTOCOL_INFO(c->prpl)->join_chat) { | 1343 if (GAIM_PLUGIN_PROTOCOL_INFO(c->prpl)->join_chat) { |
1344 g_snprintf(buf, sizeof(buf), "%s (%s)", | 1344 g_snprintf(buf, sizeof(buf), "%s (%s)", |
1345 c->username, c->prpl->info->name); | 1345 c->username, c->prpl->info->name); |
1346 opt = gtk_menu_item_new_with_label(buf); | 1346 opt = gtk_menu_item_new_with_label(buf); |
1347 g_object_set_data(G_OBJECT(opt), "addchat", ac); | 1347 g_object_set_data(G_OBJECT(opt), "addchat", ac); |
1348 g_signal_connect(GTK_OBJECT(opt), "activate", | 1348 g_signal_connect(G_OBJECT(opt), "activate", |
1349 G_CALLBACK(addchat_select_account), | 1349 G_CALLBACK(addchat_select_account), |
1350 c); | 1350 c); |
1351 gtk_widget_show(opt); | 1351 gtk_widget_show(opt); |
1352 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); | 1352 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); |
1353 | 1353 |
1525 opt = | 1525 opt = |
1526 gtk_radio_button_new_with_label(gtk_radio_button_get_group( | 1526 gtk_radio_button_new_with_label(gtk_radio_button_get_group( |
1527 GTK_RADIO_BUTTON(set)), | 1527 GTK_RADIO_BUTTON(set)), |
1528 label); | 1528 label); |
1529 | 1529 |
1530 g_signal_connect(GTK_OBJECT(opt), "toggled", G_CALLBACK(set_deny_mode), (void *)which); | 1530 g_signal_connect(G_OBJECT(opt), "toggled", G_CALLBACK(set_deny_mode), (void *)which); |
1531 gtk_widget_show(opt); | 1531 gtk_widget_show(opt); |
1532 if (current_deny_gc->account->permdeny == which) | 1532 if (current_deny_gc->account->permdeny == which) |
1533 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt), TRUE); | 1533 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt), TRUE); |
1534 | 1534 |
1535 return opt; | 1535 return opt; |
1655 continue; | 1655 continue; |
1656 | 1656 |
1657 g_snprintf(buf, sizeof buf, "%s (%s)", | 1657 g_snprintf(buf, sizeof buf, "%s (%s)", |
1658 gc->username, gc->prpl->info->name); | 1658 gc->username, gc->prpl->info->name); |
1659 opt = gtk_menu_item_new_with_label(buf); | 1659 opt = gtk_menu_item_new_with_label(buf); |
1660 g_signal_connect(GTK_OBJECT(opt), "activate", G_CALLBACK(deny_gc_opt), gc); | 1660 g_signal_connect(G_OBJECT(opt), "activate", G_CALLBACK(deny_gc_opt), gc); |
1661 gtk_widget_show(opt); | 1661 gtk_widget_show(opt); |
1662 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); | 1662 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); |
1663 if (gc == current_deny_gc) | 1663 if (gc == current_deny_gc) |
1664 found = TRUE; | 1664 found = TRUE; |
1665 else if (!found) | 1665 else if (!found) |
1803 | 1803 |
1804 privacy_win = pwin = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 1804 privacy_win = pwin = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
1805 gtk_window_set_resizable(GTK_WINDOW(pwin), FALSE); | 1805 gtk_window_set_resizable(GTK_WINDOW(pwin), FALSE); |
1806 gtk_window_set_role(GTK_WINDOW(pwin), "privacy"); | 1806 gtk_window_set_role(GTK_WINDOW(pwin), "privacy"); |
1807 gtk_window_set_title(GTK_WINDOW(pwin), _("Privacy")); | 1807 gtk_window_set_title(GTK_WINDOW(pwin), _("Privacy")); |
1808 g_signal_connect(GTK_OBJECT(pwin), "destroy", G_CALLBACK(destroy_privacy), NULL); | 1808 g_signal_connect(G_OBJECT(pwin), "destroy", G_CALLBACK(destroy_privacy), NULL); |
1809 gtk_widget_realize(pwin); | 1809 gtk_widget_realize(pwin); |
1810 | 1810 |
1811 gtk_widget_set_size_request(pwin, -1, 400); | 1811 gtk_widget_set_size_request(pwin, -1, 400); |
1812 | 1812 |
1813 box = gtk_vbox_new(FALSE, 5); | 1813 box = gtk_vbox_new(FALSE, 5); |
1828 gtk_box_pack_start(GTK_BOX(deny_conn_hbox), label, FALSE, FALSE, 5); | 1828 gtk_box_pack_start(GTK_BOX(deny_conn_hbox), label, FALSE, FALSE, 5); |
1829 gtk_widget_show(label); | 1829 gtk_widget_show(label); |
1830 | 1830 |
1831 deny_opt_menu = gtk_option_menu_new(); | 1831 deny_opt_menu = gtk_option_menu_new(); |
1832 gtk_box_pack_start(GTK_BOX(deny_conn_hbox), deny_opt_menu, FALSE, FALSE, 5); | 1832 gtk_box_pack_start(GTK_BOX(deny_conn_hbox), deny_opt_menu, FALSE, FALSE, 5); |
1833 g_signal_connect(GTK_OBJECT(deny_opt_menu), "destroy", G_CALLBACK(des_deny_opt), NULL); | 1833 g_signal_connect(G_OBJECT(deny_opt_menu), "destroy", G_CALLBACK(des_deny_opt), NULL); |
1834 gtk_widget_show(deny_opt_menu); | 1834 gtk_widget_show(deny_opt_menu); |
1835 | 1835 |
1836 build_deny_menu(); | 1836 build_deny_menu(); |
1837 | 1837 |
1838 table = gtk_table_new(5, 2, FALSE); | 1838 table = gtk_table_new(5, 2, FALSE); |
1876 gtk_table_attach(GTK_TABLE(table), bbox, 0, 1, 4, 5, GTK_FILL, 0, 0, 0); | 1876 gtk_table_attach(GTK_TABLE(table), bbox, 0, 1, 4, 5, GTK_FILL, 0, 0, 0); |
1877 | 1877 |
1878 button = gtk_button_new_from_stock(GTK_STOCK_ADD); | 1878 button = gtk_button_new_from_stock(GTK_STOCK_ADD); |
1879 gtk_size_group_add_widget(sg2, button); | 1879 gtk_size_group_add_widget(sg2, button); |
1880 gtk_widget_show(button); | 1880 gtk_widget_show(button); |
1881 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(pref_deny_add), (void *)TRUE); | 1881 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_add), (void *)TRUE); |
1882 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 1882 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
1883 | 1883 |
1884 button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); | 1884 button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); |
1885 gtk_size_group_add_widget(sg2, button); | 1885 gtk_size_group_add_widget(sg2, button); |
1886 gtk_widget_show(button); | 1886 gtk_widget_show(button); |
1887 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(pref_deny_rem), (void *)TRUE); | 1887 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_rem), (void *)TRUE); |
1888 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 1888 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
1889 | 1889 |
1890 deny_type = deny_opt(_("Deny all users"), 2, deny_type); | 1890 deny_type = deny_opt(_("Deny all users"), 2, deny_type); |
1891 gtk_size_group_add_widget(sg1, deny_type); | 1891 gtk_size_group_add_widget(sg1, deny_type); |
1892 gtk_table_attach(GTK_TABLE(table), deny_type, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); | 1892 gtk_table_attach(GTK_TABLE(table), deny_type, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); |
1918 gtk_widget_show(bbox); | 1918 gtk_widget_show(bbox); |
1919 | 1919 |
1920 button = gtk_button_new_from_stock(GTK_STOCK_ADD); | 1920 button = gtk_button_new_from_stock(GTK_STOCK_ADD); |
1921 gtk_size_group_add_widget(sg2, button); | 1921 gtk_size_group_add_widget(sg2, button); |
1922 gtk_widget_show(button); | 1922 gtk_widget_show(button); |
1923 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(pref_deny_add), FALSE); | 1923 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_add), FALSE); |
1924 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 1924 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
1925 | 1925 |
1926 button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); | 1926 button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); |
1927 gtk_size_group_add_widget(sg2, button); | 1927 gtk_size_group_add_widget(sg2, button); |
1928 gtk_widget_show(button); | 1928 gtk_widget_show(button); |
1929 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(pref_deny_rem), FALSE); | 1929 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_rem), FALSE); |
1930 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 1930 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
1931 | 1931 |
1932 sep = gtk_hseparator_new(); | 1932 sep = gtk_hseparator_new(); |
1933 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); | 1933 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
1934 gtk_widget_show(sep); | 1934 gtk_widget_show(sep); |
1937 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); | 1937 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
1938 gtk_widget_show(hbox); | 1938 gtk_widget_show(hbox); |
1939 | 1939 |
1940 close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | 1940 close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); |
1941 gtk_box_pack_end(GTK_BOX(hbox), close_button, FALSE, FALSE, 0); | 1941 gtk_box_pack_end(GTK_BOX(hbox), close_button, FALSE, FALSE, 0); |
1942 g_signal_connect_swapped(GTK_OBJECT(close_button), "clicked", G_CALLBACK(gtk_widget_destroy), pwin); | 1942 g_signal_connect_swapped(G_OBJECT(close_button), "clicked", G_CALLBACK(gtk_widget_destroy), pwin); |
1943 gtk_widget_show(close_button); | 1943 gtk_widget_show(close_button); |
1944 | 1944 |
1945 gtk_widget_show(pwin); | 1945 gtk_widget_show(pwin); |
1946 | 1946 |
1947 } | 1947 } |
2005 GAIM_DIALOG(b->window); | 2005 GAIM_DIALOG(b->window); |
2006 dialogwindows = g_list_prepend(dialogwindows, b->window); | 2006 dialogwindows = g_list_prepend(dialogwindows, b->window); |
2007 gtk_window_set_role(GTK_WINDOW(b->window), "set_dir"); | 2007 gtk_window_set_role(GTK_WINDOW(b->window), "set_dir"); |
2008 gtk_window_set_resizable(GTK_WINDOW(b->window), TRUE); | 2008 gtk_window_set_resizable(GTK_WINDOW(b->window), TRUE); |
2009 gtk_window_set_title(GTK_WINDOW(b->window), _("Set Directory Info")); | 2009 gtk_window_set_title(GTK_WINDOW(b->window), _("Set Directory Info")); |
2010 g_signal_connect(GTK_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); | 2010 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); |
2011 gtk_widget_realize(b->window); | 2011 gtk_widget_realize(b->window); |
2012 | 2012 |
2013 fbox = gtk_vbox_new(FALSE, 5); | 2013 fbox = gtk_vbox_new(FALSE, 5); |
2014 gtk_container_add(GTK_CONTAINER(b->window), fbox); | 2014 gtk_container_add(GTK_CONTAINER(b->window), fbox); |
2015 gtk_widget_show(fbox); | 2015 gtk_widget_show(fbox); |
2137 bot = gtk_hbox_new(FALSE, 5); | 2137 bot = gtk_hbox_new(FALSE, 5); |
2138 gtk_box_pack_start(GTK_BOX(fbox), bot, FALSE, FALSE, 0); | 2138 gtk_box_pack_start(GTK_BOX(fbox), bot, FALSE, FALSE, 0); |
2139 | 2139 |
2140 b->save = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); | 2140 b->save = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); |
2141 gtk_box_pack_end(GTK_BOX(bot), b->save, FALSE, FALSE, 0); | 2141 gtk_box_pack_end(GTK_BOX(bot), b->save, FALSE, FALSE, 0); |
2142 g_signal_connect(GTK_OBJECT(b->save), "clicked", G_CALLBACK(do_set_dir), b); | 2142 g_signal_connect(G_OBJECT(b->save), "clicked", G_CALLBACK(do_set_dir), b); |
2143 | 2143 |
2144 b->cancel = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 2144 b->cancel = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
2145 gtk_box_pack_end(GTK_BOX(bot), b->cancel, FALSE, FALSE, 0); | 2145 gtk_box_pack_end(GTK_BOX(bot), b->cancel, FALSE, FALSE, 0); |
2146 g_signal_connect(GTK_OBJECT(b->cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); | 2146 g_signal_connect(G_OBJECT(b->cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); |
2147 | 2147 |
2148 gtk_window_set_focus(GTK_WINDOW(b->window), b->first); | 2148 gtk_window_set_focus(GTK_WINDOW(b->window), b->first); |
2149 | 2149 |
2150 gtk_widget_show_all(b->window); | 2150 gtk_widget_show_all(b->window); |
2151 } | 2151 } |
2190 | 2190 |
2191 GAIM_DIALOG(b->window); | 2191 GAIM_DIALOG(b->window); |
2192 gtk_window_set_resizable(GTK_WINDOW(b->window), TRUE); | 2192 gtk_window_set_resizable(GTK_WINDOW(b->window), TRUE); |
2193 gtk_window_set_role(GTK_WINDOW(b->window), "change_passwd"); | 2193 gtk_window_set_role(GTK_WINDOW(b->window), "change_passwd"); |
2194 gtk_window_set_title(GTK_WINDOW(b->window), _("Change Password")); | 2194 gtk_window_set_title(GTK_WINDOW(b->window), _("Change Password")); |
2195 g_signal_connect(GTK_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); | 2195 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); |
2196 gtk_widget_realize(b->window); | 2196 gtk_widget_realize(b->window); |
2197 dialogwindows = g_list_prepend(dialogwindows, b->window); | 2197 dialogwindows = g_list_prepend(dialogwindows, b->window); |
2198 | 2198 |
2199 fbox = gtk_vbox_new(FALSE, 5); | 2199 fbox = gtk_vbox_new(FALSE, 5); |
2200 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); | 2200 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); |
2248 hbox = gtk_hbox_new(FALSE, 5); | 2248 hbox = gtk_hbox_new(FALSE, 5); |
2249 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 0); | 2249 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 0); |
2250 | 2250 |
2251 b->ok = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | 2251 b->ok = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
2252 gtk_box_pack_end(GTK_BOX(hbox), b->ok, FALSE, FALSE, 0); | 2252 gtk_box_pack_end(GTK_BOX(hbox), b->ok, FALSE, FALSE, 0); |
2253 g_signal_connect(GTK_OBJECT(b->ok), "clicked", G_CALLBACK(do_change_password), b); | 2253 g_signal_connect(G_OBJECT(b->ok), "clicked", G_CALLBACK(do_change_password), b); |
2254 | 2254 |
2255 b->cancel = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 2255 b->cancel = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
2256 gtk_box_pack_end(GTK_BOX(hbox), b->cancel, FALSE, FALSE, 0); | 2256 gtk_box_pack_end(GTK_BOX(hbox), b->cancel, FALSE, FALSE, 0); |
2257 g_signal_connect(GTK_OBJECT(b->cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); | 2257 g_signal_connect(G_OBJECT(b->cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); |
2258 | 2258 |
2259 gtk_widget_show_all(b->window); | 2259 gtk_widget_show_all(b->window); |
2260 } | 2260 } |
2261 | 2261 |
2262 void show_set_info(struct gaim_connection *gc) | 2262 void show_set_info(struct gaim_connection *gc) |
2275 | 2275 |
2276 GAIM_DIALOG(b->window); | 2276 GAIM_DIALOG(b->window); |
2277 gtk_window_set_role(GTK_WINDOW(b->window), "set_info"); | 2277 gtk_window_set_role(GTK_WINDOW(b->window), "set_info"); |
2278 dialogwindows = g_list_prepend(dialogwindows, b->window); | 2278 dialogwindows = g_list_prepend(dialogwindows, b->window); |
2279 gtk_window_set_title(GTK_WINDOW(b->window), _("Set User Info")); | 2279 gtk_window_set_title(GTK_WINDOW(b->window), _("Set User Info")); |
2280 g_signal_connect(GTK_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); | 2280 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); |
2281 gtk_widget_realize(b->window); | 2281 gtk_widget_realize(b->window); |
2282 | 2282 |
2283 vbox = gtk_vbox_new(FALSE, 5); | 2283 vbox = gtk_vbox_new(FALSE, 5); |
2284 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 2284 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
2285 gtk_container_add(GTK_CONTAINER(b->window), vbox); | 2285 gtk_container_add(GTK_CONTAINER(b->window), vbox); |
2308 buttons = gtk_hbox_new(FALSE, 5); | 2308 buttons = gtk_hbox_new(FALSE, 5); |
2309 gtk_box_pack_start(GTK_BOX(vbox), buttons, FALSE, FALSE, 0); | 2309 gtk_box_pack_start(GTK_BOX(vbox), buttons, FALSE, FALSE, 0); |
2310 | 2310 |
2311 b->save = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); | 2311 b->save = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); |
2312 gtk_box_pack_end(GTK_BOX(buttons), b->save, FALSE, FALSE, 0); | 2312 gtk_box_pack_end(GTK_BOX(buttons), b->save, FALSE, FALSE, 0); |
2313 g_signal_connect(GTK_OBJECT(b->save), "clicked", G_CALLBACK(do_save_info), b); | 2313 g_signal_connect(G_OBJECT(b->save), "clicked", G_CALLBACK(do_save_info), b); |
2314 | 2314 |
2315 b->cancel = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 2315 b->cancel = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
2316 gtk_box_pack_end(GTK_BOX(buttons), b->cancel, FALSE, FALSE, 0); | 2316 gtk_box_pack_end(GTK_BOX(buttons), b->cancel, FALSE, FALSE, 0); |
2317 g_signal_connect(GTK_OBJECT(b->cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); | 2317 g_signal_connect(G_OBJECT(b->cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); |
2318 | 2318 |
2319 gtk_widget_show_all(b->window); | 2319 gtk_widget_show_all(b->window); |
2320 } | 2320 } |
2321 | 2321 |
2322 /*------------------------------------------------------------------------*/ | 2322 /*------------------------------------------------------------------------*/ |
2359 | 2359 |
2360 GAIM_DIALOG(b->window); | 2360 GAIM_DIALOG(b->window); |
2361 gtk_window_set_title(GTK_WINDOW(b->window), "Gaim"); | 2361 gtk_window_set_title(GTK_WINDOW(b->window), "Gaim"); |
2362 gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); | 2362 gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); |
2363 gtk_widget_realize(GTK_WIDGET(b->window)); | 2363 gtk_widget_realize(GTK_WIDGET(b->window)); |
2364 g_signal_connect(GTK_OBJECT(b->window), "destroy", G_CALLBACK(info_dlg_free), b); | 2364 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(info_dlg_free), b); |
2365 | 2365 |
2366 bbox = gtk_vbox_new(FALSE, 5); | 2366 bbox = gtk_vbox_new(FALSE, 5); |
2367 gtk_container_add(GTK_CONTAINER(b->window), bbox); | 2367 gtk_container_add(GTK_CONTAINER(b->window), bbox); |
2368 | 2368 |
2369 label = gtk_label_new(_("Below are the results of your search: ")); | 2369 label = gtk_label_new(_("Below are the results of your search: ")); |
2379 gtk_container_add(GTK_CONTAINER(sw), text); | 2379 gtk_container_add(GTK_CONTAINER(sw), text); |
2380 gtk_widget_set_size_request(sw, 300, 250); | 2380 gtk_widget_set_size_request(sw, 300, 250); |
2381 gaim_setup_imhtml(text); | 2381 gaim_setup_imhtml(text); |
2382 | 2382 |
2383 ok = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | 2383 ok = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
2384 g_signal_connect_swapped(GTK_OBJECT(ok), "clicked", G_CALLBACK(gtk_widget_destroy), | 2384 g_signal_connect_swapped(G_OBJECT(ok), "clicked", G_CALLBACK(gtk_widget_destroy), |
2385 GTK_OBJECT(b->window)); | 2385 G_OBJECT(b->window)); |
2386 gtk_box_pack_start(GTK_BOX(bbox), ok, FALSE, FALSE, 0); | 2386 gtk_box_pack_start(GTK_BOX(bbox), ok, FALSE, FALSE, 0); |
2387 | 2387 |
2388 gtk_widget_show_all(b->window); | 2388 gtk_widget_show_all(b->window); |
2389 } | 2389 } |
2390 | 2390 |
2497 topbox=gtk_hbox_new(FALSE, 5); | 2497 topbox=gtk_hbox_new(FALSE, 5); |
2498 gtk_box_pack_start(GTK_BOX(topbox), vbox, FALSE, FALSE, 5); | 2498 gtk_box_pack_start(GTK_BOX(topbox), vbox, FALSE, FALSE, 5); |
2499 | 2499 |
2500 | 2500 |
2501 /* Handle closes right */ | 2501 /* Handle closes right */ |
2502 g_signal_connect(GTK_OBJECT(p->window), "destroy", G_CALLBACK(destroy_dialog), p->window); | 2502 g_signal_connect(G_OBJECT(p->window), "destroy", G_CALLBACK(destroy_dialog), p->window); |
2503 g_signal_connect(GTK_OBJECT(cancel), "clicked", G_CALLBACK(destroy_dialog), p->window); | 2503 g_signal_connect(G_OBJECT(cancel), "clicked", G_CALLBACK(destroy_dialog), p->window); |
2504 g_signal_connect(GTK_OBJECT(add), "clicked", G_CALLBACK(do_add_perm), p); | 2504 g_signal_connect(G_OBJECT(add), "clicked", G_CALLBACK(do_add_perm), p); |
2505 g_signal_connect(GTK_OBJECT(p->entry), "activate", G_CALLBACK(do_add_perm), p); | 2505 g_signal_connect(G_OBJECT(p->entry), "activate", G_CALLBACK(do_add_perm), p); |
2506 | 2506 |
2507 /* Finish up */ | 2507 /* Finish up */ |
2508 if (permit) | 2508 if (permit) |
2509 gtk_window_set_title(GTK_WINDOW(p->window), _("Add Permit")); | 2509 gtk_window_set_title(GTK_WINDOW(p->window), _("Add Permit")); |
2510 else | 2510 else |
2751 | 2751 |
2752 gtk_container_add(GTK_CONTAINER(frame), vbox); | 2752 gtk_container_add(GTK_CONTAINER(frame), vbox); |
2753 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 0); | 2753 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 0); |
2754 gtk_box_pack_start(GTK_BOX(fbox), bbox, FALSE, FALSE, 0); | 2754 gtk_box_pack_start(GTK_BOX(fbox), bbox, FALSE, FALSE, 0); |
2755 | 2755 |
2756 g_signal_connect(GTK_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); | 2756 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); |
2757 g_signal_connect(GTK_OBJECT(cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); | 2757 g_signal_connect(G_OBJECT(cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); |
2758 g_signal_connect(GTK_OBJECT(ok), "clicked", G_CALLBACK(do_find_info), b); | 2758 g_signal_connect(G_OBJECT(ok), "clicked", G_CALLBACK(do_find_info), b); |
2759 | 2759 |
2760 gtk_window_set_title(GTK_WINDOW(b->window), _("Find Buddy By Info")); | 2760 gtk_window_set_title(GTK_WINDOW(b->window), _("Find Buddy By Info")); |
2761 gtk_window_set_focus(GTK_WINDOW(b->window), b->firstentry); | 2761 gtk_window_set_focus(GTK_WINDOW(b->window), b->firstentry); |
2762 gtk_container_add(GTK_CONTAINER(b->window), fbox); | 2762 gtk_container_add(GTK_CONTAINER(b->window), fbox); |
2763 gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); | 2763 gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); |
2781 GAIM_DIALOG(b->window); | 2781 GAIM_DIALOG(b->window); |
2782 gtk_window_set_resizable(GTK_WINDOW(b->window), TRUE); | 2782 gtk_window_set_resizable(GTK_WINDOW(b->window), TRUE); |
2783 gtk_window_set_role(GTK_WINDOW(b->window), "find_email"); | 2783 gtk_window_set_role(GTK_WINDOW(b->window), "find_email"); |
2784 gtk_widget_realize(b->window); | 2784 gtk_widget_realize(b->window); |
2785 dialogwindows = g_list_prepend(dialogwindows, b->window); | 2785 dialogwindows = g_list_prepend(dialogwindows, b->window); |
2786 g_signal_connect(GTK_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); | 2786 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); |
2787 gtk_window_set_title(GTK_WINDOW(b->window), _("Find Buddy By Email")); | 2787 gtk_window_set_title(GTK_WINDOW(b->window), _("Find Buddy By Email")); |
2788 | 2788 |
2789 vbox = gtk_vbox_new(FALSE, 5); | 2789 vbox = gtk_vbox_new(FALSE, 5); |
2790 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 2790 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
2791 gtk_container_add(GTK_CONTAINER(b->window), vbox); | 2791 gtk_container_add(GTK_CONTAINER(b->window), vbox); |
2800 label = gtk_label_new(_("Email")); | 2800 label = gtk_label_new(_("Email")); |
2801 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 0); | 2801 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 0); |
2802 | 2802 |
2803 b->emailentry = gtk_entry_new(); | 2803 b->emailentry = gtk_entry_new(); |
2804 gtk_box_pack_start(GTK_BOX(topbox), b->emailentry, TRUE, TRUE, 0); | 2804 gtk_box_pack_start(GTK_BOX(topbox), b->emailentry, TRUE, TRUE, 0); |
2805 g_signal_connect(GTK_OBJECT(b->emailentry), "activate", G_CALLBACK(do_find_email), b); | 2805 g_signal_connect(G_OBJECT(b->emailentry), "activate", G_CALLBACK(do_find_email), b); |
2806 gtk_window_set_focus(GTK_WINDOW(b->window), b->emailentry); | 2806 gtk_window_set_focus(GTK_WINDOW(b->window), b->emailentry); |
2807 | 2807 |
2808 bbox = gtk_hbox_new(FALSE, 5); | 2808 bbox = gtk_hbox_new(FALSE, 5); |
2809 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | 2809 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); |
2810 | 2810 |
2811 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | 2811 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
2812 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(do_find_email), b); | 2812 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(do_find_email), b); |
2813 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 2813 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
2814 | 2814 |
2815 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 2815 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
2816 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), b->window); | 2816 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), b->window); |
2817 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 2817 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
2818 | 2818 |
2819 gtk_widget_show_all(b->window); | 2819 gtk_widget_show_all(b->window); |
2820 } | 2820 } |
2821 | 2821 |
3075 return; | 3075 return; |
3076 | 3076 |
3077 fgcseld = gtk_color_selection_dialog_new(_("Select Text Color")); | 3077 fgcseld = gtk_color_selection_dialog_new(_("Select Text Color")); |
3078 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION | 3078 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION |
3079 (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), &fgcolor); | 3079 (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), &fgcolor); |
3080 g_signal_connect(GTK_OBJECT(fgcseld), "delete_event", | 3080 g_signal_connect(G_OBJECT(fgcseld), "delete_event", |
3081 G_CALLBACK(destroy_colorsel), (void *)1); | 3081 G_CALLBACK(destroy_colorsel), (void *)1); |
3082 g_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(fgcseld)->cancel_button), | 3082 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(fgcseld)->cancel_button), |
3083 "clicked", G_CALLBACK(destroy_colorsel), (void *)1); | 3083 "clicked", G_CALLBACK(destroy_colorsel), (void *)1); |
3084 g_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(fgcseld)->ok_button), "clicked", | 3084 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(fgcseld)->ok_button), "clicked", |
3085 G_CALLBACK(apply_color_dlg), (void *)1); | 3085 G_CALLBACK(apply_color_dlg), (void *)1); |
3086 gtk_widget_realize(fgcseld); | 3086 gtk_widget_realize(fgcseld); |
3087 gtk_widget_show(fgcseld); | 3087 gtk_widget_show(fgcseld); |
3088 gdk_window_raise(fgcseld->window); | 3088 gdk_window_raise(fgcseld->window); |
3089 return; | 3089 return; |
3094 gtkconv->dialogs.fg_color = gtk_color_selection_dialog_new(_("Select Text Color")); | 3094 gtkconv->dialogs.fg_color = gtk_color_selection_dialog_new(_("Select Text Color")); |
3095 colorsel = GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.fg_color)->colorsel; | 3095 colorsel = GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.fg_color)->colorsel; |
3096 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), &fgcolor); | 3096 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), &fgcolor); |
3097 g_object_set_data(G_OBJECT(colorsel), "gaim_conversation", c); | 3097 g_object_set_data(G_OBJECT(colorsel), "gaim_conversation", c); |
3098 | 3098 |
3099 g_signal_connect(GTK_OBJECT(gtkconv->dialogs.fg_color), "delete_event", | 3099 g_signal_connect(G_OBJECT(gtkconv->dialogs.fg_color), "delete_event", |
3100 G_CALLBACK(delete_event_dialog), c); | 3100 G_CALLBACK(delete_event_dialog), c); |
3101 g_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.fg_color)->ok_button), | 3101 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.fg_color)->ok_button), |
3102 "clicked", G_CALLBACK(do_fgcolor), colorsel); | 3102 "clicked", G_CALLBACK(do_fgcolor), colorsel); |
3103 g_signal_connect(GTK_OBJECT | 3103 g_signal_connect(G_OBJECT |
3104 (GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.fg_color)->cancel_button), | 3104 (GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.fg_color)->cancel_button), |
3105 "clicked", G_CALLBACK(cancel_fgcolor), c); | 3105 "clicked", G_CALLBACK(cancel_fgcolor), c); |
3106 | 3106 |
3107 gtk_widget_realize(gtkconv->dialogs.fg_color); | 3107 gtk_widget_realize(gtkconv->dialogs.fg_color); |
3108 } | 3108 } |
3123 return; | 3123 return; |
3124 | 3124 |
3125 bgcseld = gtk_color_selection_dialog_new(_("Select Background Color")); | 3125 bgcseld = gtk_color_selection_dialog_new(_("Select Background Color")); |
3126 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION | 3126 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION |
3127 (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), &bgcolor); | 3127 (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), &bgcolor); |
3128 g_signal_connect(GTK_OBJECT(bgcseld), "delete_event", | 3128 g_signal_connect(G_OBJECT(bgcseld), "delete_event", |
3129 G_CALLBACK(destroy_colorsel), NULL); | 3129 G_CALLBACK(destroy_colorsel), NULL); |
3130 g_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(bgcseld)->cancel_button), | 3130 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(bgcseld)->cancel_button), |
3131 "clicked", G_CALLBACK(destroy_colorsel), NULL); | 3131 "clicked", G_CALLBACK(destroy_colorsel), NULL); |
3132 g_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(bgcseld)->ok_button), "clicked", | 3132 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(bgcseld)->ok_button), "clicked", |
3133 G_CALLBACK(apply_color_dlg), (void *)2); | 3133 G_CALLBACK(apply_color_dlg), (void *)2); |
3134 gtk_widget_realize(bgcseld); | 3134 gtk_widget_realize(bgcseld); |
3135 gtk_widget_show(bgcseld); | 3135 gtk_widget_show(bgcseld); |
3136 gdk_window_raise(bgcseld->window); | 3136 gdk_window_raise(bgcseld->window); |
3137 return; | 3137 return; |
3142 gtkconv->dialogs.bg_color = gtk_color_selection_dialog_new(_("Select Background Color")); | 3142 gtkconv->dialogs.bg_color = gtk_color_selection_dialog_new(_("Select Background Color")); |
3143 colorsel = GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.bg_color)->colorsel; | 3143 colorsel = GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.bg_color)->colorsel; |
3144 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), &bgcolor); | 3144 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), &bgcolor); |
3145 g_object_set_data(G_OBJECT(colorsel), "gaim_conversation", c); | 3145 g_object_set_data(G_OBJECT(colorsel), "gaim_conversation", c); |
3146 | 3146 |
3147 g_signal_connect(GTK_OBJECT(gtkconv->dialogs.bg_color), "delete_event", | 3147 g_signal_connect(G_OBJECT(gtkconv->dialogs.bg_color), "delete_event", |
3148 G_CALLBACK(delete_event_dialog), c); | 3148 G_CALLBACK(delete_event_dialog), c); |
3149 g_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.bg_color)->ok_button), | 3149 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.bg_color)->ok_button), |
3150 "clicked", G_CALLBACK(do_bgcolor), colorsel); | 3150 "clicked", G_CALLBACK(do_bgcolor), colorsel); |
3151 g_signal_connect(GTK_OBJECT | 3151 g_signal_connect(G_OBJECT |
3152 (GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.bg_color)->cancel_button), | 3152 (GTK_COLOR_SELECTION_DIALOG(gtkconv->dialogs.bg_color)->cancel_button), |
3153 "clicked", G_CALLBACK(cancel_bgcolor), c); | 3153 "clicked", G_CALLBACK(cancel_bgcolor), c); |
3154 | 3154 |
3155 gtk_widget_realize(gtkconv->dialogs.bg_color); | 3155 gtk_widget_realize(gtkconv->dialogs.bg_color); |
3156 } | 3156 } |
3231 } else { | 3231 } else { |
3232 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), | 3232 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), |
3233 DEFAULT_FONT_FACE " 12"); | 3233 DEFAULT_FONT_FACE " 12"); |
3234 } | 3234 } |
3235 | 3235 |
3236 g_signal_connect(GTK_OBJECT(fontseld), "delete_event", | 3236 g_signal_connect(G_OBJECT(fontseld), "delete_event", |
3237 G_CALLBACK(destroy_fontsel), NULL); | 3237 G_CALLBACK(destroy_fontsel), NULL); |
3238 g_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->cancel_button), | 3238 g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->cancel_button), |
3239 "clicked", G_CALLBACK(destroy_fontsel), NULL); | 3239 "clicked", G_CALLBACK(destroy_fontsel), NULL); |
3240 g_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->ok_button), "clicked", | 3240 g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->ok_button), "clicked", |
3241 G_CALLBACK(apply_font_dlg), fontseld); | 3241 G_CALLBACK(apply_font_dlg), fontseld); |
3242 gtk_widget_realize(fontseld); | 3242 gtk_widget_realize(fontseld); |
3243 gtk_widget_show(fontseld); | 3243 gtk_widget_show(fontseld); |
3244 gdk_window_raise(fontseld->window); | 3244 gdk_window_raise(fontseld->window); |
3245 return; | 3245 return; |
3257 } else { | 3257 } else { |
3258 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(gtkconv->dialogs.font), | 3258 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(gtkconv->dialogs.font), |
3259 DEFAULT_FONT_FACE); | 3259 DEFAULT_FONT_FACE); |
3260 } | 3260 } |
3261 | 3261 |
3262 g_signal_connect(GTK_OBJECT(gtkconv->dialogs.font), "delete_event", | 3262 g_signal_connect(G_OBJECT(gtkconv->dialogs.font), "delete_event", |
3263 G_CALLBACK(delete_event_dialog), c); | 3263 G_CALLBACK(delete_event_dialog), c); |
3264 g_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(gtkconv->dialogs.font)->ok_button), | 3264 g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(gtkconv->dialogs.font)->ok_button), |
3265 "clicked", G_CALLBACK(apply_font), gtkconv->dialogs.font); | 3265 "clicked", G_CALLBACK(apply_font), gtkconv->dialogs.font); |
3266 g_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(gtkconv->dialogs.font)->cancel_button), | 3266 g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(gtkconv->dialogs.font)->cancel_button), |
3267 "clicked", G_CALLBACK(cancel_font), c); | 3267 "clicked", G_CALLBACK(cancel_font), c); |
3268 | 3268 |
3269 gtk_widget_realize(gtkconv->dialogs.font); | 3269 gtk_widget_realize(gtkconv->dialogs.font); |
3270 | 3270 |
3271 } | 3271 } |
3385 GAIM_DIALOG(ca->window); | 3385 GAIM_DIALOG(ca->window); |
3386 gtk_widget_set_size_request(ca->window, -1, 250); | 3386 gtk_widget_set_size_request(ca->window, -1, 250); |
3387 gtk_container_set_border_width(GTK_CONTAINER(ca->window), 5); | 3387 gtk_container_set_border_width(GTK_CONTAINER(ca->window), 5); |
3388 gtk_window_set_role(GTK_WINDOW(ca->window), "away_mess"); | 3388 gtk_window_set_role(GTK_WINDOW(ca->window), "away_mess"); |
3389 gtk_window_set_title(GTK_WINDOW(ca->window), _("New away message")); | 3389 gtk_window_set_title(GTK_WINDOW(ca->window), _("New away message")); |
3390 g_signal_connect(GTK_OBJECT(ca->window), "delete_event", | 3390 g_signal_connect(G_OBJECT(ca->window), "delete_event", |
3391 G_CALLBACK(destroy_dialog), ca->window); | 3391 G_CALLBACK(destroy_dialog), ca->window); |
3392 gtk_widget_realize(ca->window); | 3392 gtk_widget_realize(ca->window); |
3393 | 3393 |
3394 tbox = gtk_vbox_new(FALSE, 5); | 3394 tbox = gtk_vbox_new(FALSE, 5); |
3395 gtk_container_add(GTK_CONTAINER(ca->window), tbox); | 3395 gtk_container_add(GTK_CONTAINER(ca->window), tbox); |
3444 | 3444 |
3445 hbox = gtk_hbox_new(FALSE, 5); | 3445 hbox = gtk_hbox_new(FALSE, 5); |
3446 gtk_box_pack_start(GTK_BOX(tbox), hbox, FALSE, FALSE, 0); | 3446 gtk_box_pack_start(GTK_BOX(tbox), hbox, FALSE, FALSE, 0); |
3447 | 3447 |
3448 button = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); | 3448 button = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); |
3449 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(save_away_mess), ca); | 3449 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(save_away_mess), ca); |
3450 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 3450 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
3451 | 3451 |
3452 button = gaim_pixbuf_button_from_stock(_("Save & Use"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | 3452 button = gaim_pixbuf_button_from_stock(_("Save & Use"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
3453 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(su_away_mess), ca); | 3453 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(su_away_mess), ca); |
3454 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 3454 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
3455 | 3455 |
3456 button = gaim_pixbuf_button_from_stock(_("Use"), GTK_STOCK_EXECUTE, GAIM_BUTTON_HORIZONTAL); | 3456 button = gaim_pixbuf_button_from_stock(_("Use"), GTK_STOCK_EXECUTE, GAIM_BUTTON_HORIZONTAL); |
3457 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(use_away_mess), ca); | 3457 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(use_away_mess), ca); |
3458 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 3458 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
3459 | 3459 |
3460 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 3460 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
3461 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), ca->window); | 3461 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), ca->window); |
3462 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 3462 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
3463 | 3463 |
3464 gtk_widget_show_all(ca->window); | 3464 gtk_widget_show_all(ca->window); |
3465 } | 3465 } |
3466 | 3466 |
3874 | 3874 |
3875 g_snprintf(buf, BUF_LEN - 1, "%s" G_DIR_SEPARATOR_S "%s%s", gaim_home_dir(), | 3875 g_snprintf(buf, BUF_LEN - 1, "%s" G_DIR_SEPARATOR_S "%s%s", gaim_home_dir(), |
3876 name ? normalize(name) : "system", name ? ".log" : ""); | 3876 name ? normalize(name) : "system", name ? ".log" : ""); |
3877 | 3877 |
3878 filesel = gtk_file_selection_new(_("Save Log File")); | 3878 filesel = gtk_file_selection_new(_("Save Log File")); |
3879 g_signal_connect(GTK_OBJECT(filesel), "delete_event", | 3879 g_signal_connect(G_OBJECT(filesel), "delete_event", |
3880 G_CALLBACK(destroy_dialog), filesel); | 3880 G_CALLBACK(destroy_dialog), filesel); |
3881 | 3881 |
3882 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filesel)); | 3882 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filesel)); |
3883 gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), buf); | 3883 gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), buf); |
3884 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), | 3884 g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), |
3885 "clicked", G_CALLBACK(do_save_log), filesel); | 3885 "clicked", G_CALLBACK(do_save_log), filesel); |
3886 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), | 3886 g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), |
3887 "clicked", G_CALLBACK(destroy_dialog), filesel); | 3887 "clicked", G_CALLBACK(destroy_dialog), filesel); |
3888 g_object_set_data(G_OBJECT(filesel), "name", name); | 3888 g_object_set_data(G_OBJECT(filesel), "name", name); |
3889 | 3889 |
3890 gtk_widget_realize(filesel); | 3890 gtk_widget_realize(filesel); |
3891 gtk_widget_show(filesel); | 3891 gtk_widget_show(filesel); |
3925 GAIM_DIALOG(window); | 3925 GAIM_DIALOG(window); |
3926 gtk_window_set_role(GTK_WINDOW(window), "dialog"); | 3926 gtk_window_set_role(GTK_WINDOW(window), "dialog"); |
3927 gtk_window_set_title(GTK_WINDOW(window), _("Clear Log")); | 3927 gtk_window_set_title(GTK_WINDOW(window), _("Clear Log")); |
3928 gtk_container_set_border_width(GTK_CONTAINER(window), 10); | 3928 gtk_container_set_border_width(GTK_CONTAINER(window), 10); |
3929 gtk_window_set_resizable(GTK_WINDOW(window), TRUE); | 3929 gtk_window_set_resizable(GTK_WINDOW(window), TRUE); |
3930 g_signal_connect(GTK_OBJECT(window), "delete_event", G_CALLBACK(destroy_dialog), window); | 3930 g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(destroy_dialog), window); |
3931 gtk_widget_realize(window); | 3931 gtk_widget_realize(window); |
3932 | 3932 |
3933 box = gtk_vbox_new(FALSE, 5); | 3933 box = gtk_vbox_new(FALSE, 5); |
3934 gtk_container_add(GTK_CONTAINER(window), box); | 3934 gtk_container_add(GTK_CONTAINER(window), box); |
3935 | 3935 |
3943 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); | 3943 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
3944 | 3944 |
3945 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | 3945 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
3946 g_object_set_data(G_OBJECT(button), "log_window", g_object_get_data(G_OBJECT(w), | 3946 g_object_set_data(G_OBJECT(button), "log_window", g_object_get_data(G_OBJECT(w), |
3947 "log_window")); | 3947 "log_window")); |
3948 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(do_clear_log_file), name); | 3948 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(do_clear_log_file), name); |
3949 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), window); | 3949 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), window); |
3950 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); | 3950 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); |
3951 | 3951 |
3952 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 3952 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
3953 g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), window); | 3953 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), window); |
3954 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); | 3954 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); |
3955 | 3955 |
3956 gtk_widget_show_all(window); | 3956 gtk_widget_show_all(window); |
3957 | 3957 |
3958 return; | 3958 return; |
3988 } | 3988 } |
3989 | 3989 |
3990 gtk_widget_set_sensitive(view->bbox, FALSE); | 3990 gtk_widget_set_sensitive(view->bbox, FALSE); |
3991 g_signal_handlers_disconnect_by_func(G_OBJECT(view->window), | 3991 g_signal_handlers_disconnect_by_func(G_OBJECT(view->window), |
3992 G_CALLBACK(destroy_dialog), view->window); | 3992 G_CALLBACK(destroy_dialog), view->window); |
3993 block = g_signal_connect(GTK_OBJECT(view->window), "delete_event", | 3993 block = g_signal_connect(G_OBJECT(view->window), "delete_event", |
3994 G_CALLBACK(dont_destroy), view->window); | 3994 G_CALLBACK(dont_destroy), view->window); |
3995 | 3995 |
3996 fseek(fp, view->offset, SEEK_SET); | 3996 fseek(fp, view->offset, SEEK_SET); |
3997 gtk_imhtml_clear(GTK_IMHTML(view->layout)); | 3997 gtk_imhtml_clear(GTK_IMHTML(view->layout)); |
3998 /* | 3998 /* |
4025 gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, -1, view->options); | 4025 gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, -1, view->options); |
4026 gtk_imhtml_append_text(GTK_IMHTML(view->layout), "<BR>", -1, view->options); | 4026 gtk_imhtml_append_text(GTK_IMHTML(view->layout), "<BR>", -1, view->options); |
4027 | 4027 |
4028 gtk_widget_set_sensitive(view->bbox, TRUE); | 4028 gtk_widget_set_sensitive(view->bbox, TRUE); |
4029 g_signal_handler_disconnect(G_OBJECT(view->window), block); | 4029 g_signal_handler_disconnect(G_OBJECT(view->window), block); |
4030 g_signal_connect(GTK_OBJECT(view->window), "delete_event", | 4030 g_signal_connect(G_OBJECT(view->window), "delete_event", |
4031 G_CALLBACK(destroy_dialog), view->window); | 4031 G_CALLBACK(destroy_dialog), view->window); |
4032 g_string_free(string, TRUE); | 4032 g_string_free(string, TRUE); |
4033 fclose(fp); | 4033 fclose(fp); |
4034 } | 4034 } |
4035 | 4035 |
4112 if (convo_options & OPT_CONVO_IGNORE_SIZES) | 4112 if (convo_options & OPT_CONVO_IGNORE_SIZES) |
4113 options ^= GTK_IMHTML_NO_SIZES; | 4113 options ^= GTK_IMHTML_NO_SIZES; |
4114 | 4114 |
4115 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 4115 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
4116 g_object_set_data(G_OBJECT(window), "name", name); | 4116 g_object_set_data(G_OBJECT(window), "name", name); |
4117 g_signal_connect(GTK_OBJECT(window), "destroy", G_CALLBACK(des_log_win), NULL); | 4117 g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(des_log_win), NULL); |
4118 gtk_window_set_role(GTK_WINDOW(window), "log"); | 4118 gtk_window_set_role(GTK_WINDOW(window), "log"); |
4119 if (name) | 4119 if (name) |
4120 g_snprintf(buf, BUF_LONG, _("Conversations with %s"), name); | 4120 g_snprintf(buf, BUF_LONG, _("Conversations with %s"), name); |
4121 else | 4121 else |
4122 g_snprintf(buf, BUF_LONG, _("System Log")); | 4122 g_snprintf(buf, BUF_LONG, _("System Log")); |
4123 gtk_window_set_title(GTK_WINDOW(window), buf); | 4123 gtk_window_set_title(GTK_WINDOW(window), buf); |
4124 gtk_container_set_border_width(GTK_CONTAINER(window), 10); | 4124 gtk_container_set_border_width(GTK_CONTAINER(window), 10); |
4125 gtk_window_set_resizable(GTK_WINDOW(window), TRUE); | 4125 gtk_window_set_resizable(GTK_WINDOW(window), TRUE); |
4126 block = g_signal_connect(GTK_OBJECT(window), "delete_event", | 4126 block = g_signal_connect(G_OBJECT(window), "delete_event", |
4127 G_CALLBACK(dont_destroy), window); | 4127 G_CALLBACK(dont_destroy), window); |
4128 gtk_widget_realize(window); | 4128 gtk_widget_realize(window); |
4129 | 4129 |
4130 layout = gtk_imhtml_new(NULL, NULL); | 4130 layout = gtk_imhtml_new(NULL, NULL); |
4131 bbox = gtk_hbox_new(FALSE, 0); | 4131 bbox = gtk_hbox_new(FALSE, 0); |
4213 | 4213 |
4214 g_object_unref(G_OBJECT(list_store)); | 4214 g_object_unref(G_OBJECT(list_store)); |
4215 } | 4215 } |
4216 | 4216 |
4217 | 4217 |
4218 g_signal_handler_disconnect(GTK_OBJECT(window), block); | 4218 g_signal_handler_disconnect(G_OBJECT(window), block); |
4219 g_signal_connect(GTK_OBJECT(window), "delete_event", G_CALLBACK(destroy_dialog), window); | 4219 g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(destroy_dialog), window); |
4220 | 4220 |
4221 frame = gtk_frame_new(_("Conversation")); | 4221 frame = gtk_frame_new(_("Conversation")); |
4222 gtk_widget_show(frame); | 4222 gtk_widget_show(frame); |
4223 | 4223 |
4224 sw = gtk_scrolled_window_new(NULL, NULL); | 4224 sw = gtk_scrolled_window_new(NULL, NULL); |
4227 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | 4227 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
4228 gtk_widget_set_size_request(sw, 390, 220); | 4228 gtk_widget_set_size_request(sw, 390, 220); |
4229 gtk_container_add(GTK_CONTAINER(frame), sw); | 4229 gtk_container_add(GTK_CONTAINER(frame), sw); |
4230 gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); | 4230 gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); |
4231 | 4231 |
4232 g_signal_connect(GTK_OBJECT(layout), "url_clicked", G_CALLBACK(open_url), NULL); | 4232 g_signal_connect(G_OBJECT(layout), "url_clicked", G_CALLBACK(open_url), NULL); |
4233 gtk_container_add(GTK_CONTAINER(sw), layout); | 4233 gtk_container_add(GTK_CONTAINER(sw), layout); |
4234 gaim_setup_imhtml(layout); | 4234 gaim_setup_imhtml(layout); |
4235 | 4235 |
4236 gtk_box_pack_start(GTK_BOX(box), bbox, FALSE, FALSE, 0); | 4236 gtk_box_pack_start(GTK_BOX(box), bbox, FALSE, FALSE, 0); |
4237 gtk_widget_set_sensitive(bbox, FALSE); | 4237 gtk_widget_set_sensitive(bbox, FALSE); |
4238 | 4238 |
4239 close_button = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); | 4239 close_button = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); |
4240 gtk_box_pack_end(GTK_BOX(bbox), close_button, FALSE, FALSE, 5); | 4240 gtk_box_pack_end(GTK_BOX(bbox), close_button, FALSE, FALSE, 5); |
4241 g_signal_connect(GTK_OBJECT(close_button), "clicked", G_CALLBACK(destroy_dialog), window); | 4241 g_signal_connect(G_OBJECT(close_button), "clicked", G_CALLBACK(destroy_dialog), window); |
4242 | 4242 |
4243 clear_button = gaim_pixbuf_button_from_stock(_("Clear"), GTK_STOCK_CLEAR, GAIM_BUTTON_HORIZONTAL); | 4243 clear_button = gaim_pixbuf_button_from_stock(_("Clear"), GTK_STOCK_CLEAR, GAIM_BUTTON_HORIZONTAL); |
4244 g_object_set_data(G_OBJECT(clear_button), "log_window", window); | 4244 g_object_set_data(G_OBJECT(clear_button), "log_window", window); |
4245 gtk_box_pack_end(GTK_BOX(bbox), clear_button, FALSE, FALSE, 5); | 4245 gtk_box_pack_end(GTK_BOX(bbox), clear_button, FALSE, FALSE, 5); |
4246 g_signal_connect(GTK_OBJECT(clear_button), "clicked", G_CALLBACK(show_clear_log), name); | 4246 g_signal_connect(G_OBJECT(clear_button), "clicked", G_CALLBACK(show_clear_log), name); |
4247 | 4247 |
4248 save_button = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); | 4248 save_button = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); |
4249 gtk_box_pack_end(GTK_BOX(bbox), save_button, FALSE, FALSE, 5); | 4249 gtk_box_pack_end(GTK_BOX(bbox), save_button, FALSE, FALSE, 5); |
4250 g_signal_connect(GTK_OBJECT(save_button), "clicked", G_CALLBACK(show_save_log), name); | 4250 g_signal_connect(G_OBJECT(save_button), "clicked", G_CALLBACK(show_save_log), name); |
4251 | 4251 |
4252 gtk_widget_show_all(window); | 4252 gtk_widget_show_all(window); |
4253 | 4253 |
4254 if (!name) { | 4254 if (!name) { |
4255 view = g_new0(struct view_log, 1); | 4255 view = g_new0(struct view_log, 1); |
4257 view->name = NULL; | 4257 view->name = NULL; |
4258 view->bbox = bbox; | 4258 view->bbox = bbox; |
4259 view->window = window; | 4259 view->window = window; |
4260 view->layout = layout; | 4260 view->layout = layout; |
4261 log_show_convo(view); | 4261 log_show_convo(view); |
4262 g_signal_connect(GTK_OBJECT(layout), "destroy", G_CALLBACK(des_view_item), view); | 4262 g_signal_connect(G_OBJECT(layout), "destroy", G_CALLBACK(des_view_item), view); |
4263 } | 4263 } |
4264 | 4264 |
4265 gtk_widget_set_sensitive(bbox, TRUE); | 4265 gtk_widget_set_sensitive(bbox, TRUE); |
4266 | 4266 |
4267 return; | 4267 return; |
4416 if (!rename_bud_dialog) { | 4416 if (!rename_bud_dialog) { |
4417 GAIM_DIALOG(rename_bud_dialog); | 4417 GAIM_DIALOG(rename_bud_dialog); |
4418 gtk_window_set_role(GTK_WINDOW(rename_bud_dialog), "rename_bud_dialog"); | 4418 gtk_window_set_role(GTK_WINDOW(rename_bud_dialog), "rename_bud_dialog"); |
4419 gtk_window_set_resizable(GTK_WINDOW(rename_bud_dialog), TRUE); | 4419 gtk_window_set_resizable(GTK_WINDOW(rename_bud_dialog), TRUE); |
4420 gtk_window_set_title(GTK_WINDOW(rename_bud_dialog), _("Rename Buddy")); | 4420 gtk_window_set_title(GTK_WINDOW(rename_bud_dialog), _("Rename Buddy")); |
4421 g_signal_connect(GTK_OBJECT(rename_bud_dialog), "destroy", | 4421 g_signal_connect(G_OBJECT(rename_bud_dialog), "destroy", |
4422 G_CALLBACK(destroy_dialog), rename_bud_dialog); | 4422 G_CALLBACK(destroy_dialog), rename_bud_dialog); |
4423 gtk_widget_realize(rename_bud_dialog); | 4423 gtk_widget_realize(rename_bud_dialog); |
4424 | 4424 |
4425 mainbox = gtk_vbox_new(FALSE, 5); | 4425 mainbox = gtk_vbox_new(FALSE, 5); |
4426 gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); | 4426 gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); |
4438 | 4438 |
4439 name_entry = gtk_entry_new(); | 4439 name_entry = gtk_entry_new(); |
4440 gtk_box_pack_start(GTK_BOX(fbox), name_entry, TRUE, TRUE, 0); | 4440 gtk_box_pack_start(GTK_BOX(fbox), name_entry, TRUE, TRUE, 0); |
4441 g_object_set_data(G_OBJECT(name_entry), "buddy", b); | 4441 g_object_set_data(G_OBJECT(name_entry), "buddy", b); |
4442 gtk_entry_set_text(GTK_ENTRY(name_entry), b->name); | 4442 gtk_entry_set_text(GTK_ENTRY(name_entry), b->name); |
4443 g_signal_connect(GTK_OBJECT(name_entry), "activate", | 4443 g_signal_connect(G_OBJECT(name_entry), "activate", |
4444 G_CALLBACK(do_rename_buddy), name_entry); | 4444 G_CALLBACK(do_rename_buddy), name_entry); |
4445 gtk_widget_grab_focus(name_entry); | 4445 gtk_widget_grab_focus(name_entry); |
4446 | 4446 |
4447 bbox = gtk_hbox_new(FALSE, 5); | 4447 bbox = gtk_hbox_new(FALSE, 5); |
4448 gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0); | 4448 gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0); |
4449 | 4449 |
4450 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | 4450 button = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
4451 g_object_set_data(G_OBJECT(button), "buddy", b); | 4451 g_object_set_data(G_OBJECT(button), "buddy", b); |
4452 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 4452 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
4453 g_signal_connect(GTK_OBJECT(button), "clicked", | 4453 g_signal_connect(G_OBJECT(button), "clicked", |
4454 G_CALLBACK(do_rename_buddy), name_entry); | 4454 G_CALLBACK(do_rename_buddy), name_entry); |
4455 | 4455 |
4456 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 4456 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
4457 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 4457 gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
4458 g_signal_connect(GTK_OBJECT(button), "clicked", | 4458 g_signal_connect(G_OBJECT(button), "clicked", |
4459 G_CALLBACK(destroy_dialog), rename_bud_dialog); | 4459 G_CALLBACK(destroy_dialog), rename_bud_dialog); |
4460 } | 4460 } |
4461 | 4461 |
4462 gtk_widget_show_all(rename_bud_dialog); | 4462 gtk_widget_show_all(rename_bud_dialog); |
4463 } | 4463 } |
4995 gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); | 4995 gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); |
4996 gtk_window_set_role(GTK_WINDOW(b->window), b->role); | 4996 gtk_window_set_role(GTK_WINDOW(b->window), b->role); |
4997 gtk_window_set_title(GTK_WINDOW (b->window), b->title); | 4997 gtk_window_set_title(GTK_WINDOW (b->window), b->title); |
4998 | 4998 |
4999 /* Clean up if user dismisses window via window manager! */ | 4999 /* Clean up if user dismisses window via window manager! */ |
5000 g_signal_connect(GTK_OBJECT(b->window), "destroy", G_CALLBACK(b->cancel), (gpointer) b); | 5000 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(b->cancel), (gpointer) b); |
5001 gtk_widget_realize(b->window); | 5001 gtk_widget_realize(b->window); |
5002 | 5002 |
5003 vbox = gtk_vbox_new(FALSE, 5); | 5003 vbox = gtk_vbox_new(FALSE, 5); |
5004 gtk_container_add(GTK_CONTAINER (b->window), vbox); | 5004 gtk_container_add(GTK_CONTAINER (b->window), vbox); |
5005 | 5005 |
5020 | 5020 |
5021 hbox = gtk_hbox_new(FALSE, 0); | 5021 hbox = gtk_hbox_new(FALSE, 0); |
5022 gtk_box_pack_start(GTK_BOX (vbox), hbox, FALSE, FALSE, 5); | 5022 gtk_box_pack_start(GTK_BOX (vbox), hbox, FALSE, FALSE, 5); |
5023 | 5023 |
5024 button = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); | 5024 button = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); |
5025 g_signal_connect(GTK_OBJECT (button), "clicked", | 5025 g_signal_connect(G_OBJECT (button), "clicked", |
5026 G_CALLBACK (b->ok), (gpointer) b); | 5026 G_CALLBACK (b->ok), (gpointer) b); |
5027 gtk_box_pack_end(GTK_BOX (hbox), button, FALSE, FALSE, 5); | 5027 gtk_box_pack_end(GTK_BOX (hbox), button, FALSE, FALSE, 5); |
5028 | 5028 |
5029 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | 5029 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
5030 | 5030 |
5031 /* Let "destroy handling" (set above) handle cleanup */ | 5031 /* Let "destroy handling" (set above) handle cleanup */ |
5032 g_signal_connect_swapped(GTK_OBJECT (button), "clicked", | 5032 g_signal_connect_swapped(G_OBJECT (button), "clicked", |
5033 G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (b->window)); | 5033 G_CALLBACK (gtk_widget_destroy), G_OBJECT (b->window)); |
5034 gtk_box_pack_end(GTK_BOX (hbox), button, FALSE, FALSE, 5); | 5034 gtk_box_pack_end(GTK_BOX (hbox), button, FALSE, FALSE, 5); |
5035 | 5035 |
5036 gtk_widget_show_all(b->window); | 5036 gtk_widget_show_all(b->window); |
5037 } | 5037 } |
5038 | 5038 |