comparison src/prefs.c @ 891:fa2feef25e1e

[gaim-migrate @ 901] Oscar options? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 12 Sep 2000 22:59:36 +0000
parents ef4bff967e89
children 93385c6fc772
comparison
equal deleted inserted replaced
890:1fd6a31679f3 891:fa2feef25e1e
188 static void connect_page() 188 static void connect_page()
189 { 189 {
190 GtkWidget *parent; 190 GtkWidget *parent;
191 GtkWidget *box; 191 GtkWidget *box;
192 GtkWidget *label; 192 GtkWidget *label;
193
194 parent = prefdialog->parent;
195 gtk_widget_destroy(prefdialog);
196
197 prefdialog = gtk_frame_new(_("TOC Options"));
198 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
199 gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0);
200
201 box = gtk_vbox_new(FALSE, 5);
202 gtk_container_add(GTK_CONTAINER(prefdialog), box);
203 gtk_widget_show(box);
204
205 label = gtk_label_new(_("AOL has two protocols for connecting to AIM. One of them is Oscar and the other is TOC.\n\nTOC is a published protocol; AOL allows people to use the TOC protocol in their clients to connect. It is a simplified version of Oscar; it is capable of most tasks, but cannot perform all of the functions of Oscar. Because TOC is published, using TOC in gaim tends to be more stable and reliable.\n\nOscar is a proprietary protocol. AOL has not published any information about it. Gaim is able to use Oscar thanks to libfaim, which reverse-engineered the Oscar protocol and is able to emulate it. While libfaim has not decoded or implemented all of the functions of Oscar, it is still able to perform most functions TOC provides as well as several others. However, using Oscar in gaim tends to be less stable and reliable, though more useable.\n\nChanging this option takes effect at signon time."));
206 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
207 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
208 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
209 gtk_widget_show(label);
210
211 gaim_button(_("Use Oscar Protocol"), &general_options, OPT_GEN_USE_OSCAR, box);
212
213 gtk_widget_show(prefdialog);
214 }
215
216 static void toc_page()
217 {
218 GtkWidget *parent;
219 GtkWidget *box;
220 GtkWidget *label;
193 GtkWidget *sep; 221 GtkWidget *sep;
194 GtkWidget *hbox; 222 GtkWidget *hbox;
195 GtkWidget *opt; 223 GtkWidget *opt;
196 char buffer[1024]; 224 char buffer[1024];
197 225
198 parent = prefdialog->parent; 226 parent = prefdialog->parent;
199 gtk_widget_destroy(prefdialog); 227 gtk_widget_destroy(prefdialog);
200 228
201 prefdialog = gtk_frame_new(_("Connection Options")); 229 prefdialog = gtk_frame_new(_("TOC Options"));
202 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 230 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
203 gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0); 231 gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0);
204 232
205 box = gtk_vbox_new(FALSE, 5); 233 box = gtk_vbox_new(FALSE, 5);
206 gtk_container_add(GTK_CONTAINER(prefdialog), box); 234 gtk_container_add(GTK_CONTAINER(prefdialog), box);
207 gtk_widget_show(box); 235 gtk_widget_show(box);
208
209 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
210 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
211 gtk_widget_show(label);
212
213 gaim_button(_("Use Oscar Protocol (experimental; only takes effect before signon)"), &general_options, OPT_GEN_USE_OSCAR, box);
214
215 sep = gtk_hseparator_new();
216 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
217 gtk_widget_show(sep);
218
219 label = gtk_label_new(_("The following options do not apply if you use Oscar."));
220 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
221 gtk_widget_show(label);
222 236
223 hbox = gtk_hbox_new(FALSE, 0); 237 hbox = gtk_hbox_new(FALSE, 0);
224 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); 238 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0);
225 gtk_widget_show(hbox); 239 gtk_widget_show(hbox);
226 240
309 gtk_widget_set_sensitive(proxy_port_entry, TRUE); 323 gtk_widget_set_sensitive(proxy_port_entry, TRUE);
310 } else { 324 } else {
311 gtk_widget_set_sensitive(proxy_host_entry, FALSE); 325 gtk_widget_set_sensitive(proxy_host_entry, FALSE);
312 gtk_widget_set_sensitive(proxy_port_entry, FALSE); 326 gtk_widget_set_sensitive(proxy_port_entry, FALSE);
313 } 327 }
328
329 gtk_widget_show(prefdialog);
330 }
331
332 static void oscar_page()
333 {
334 GtkWidget *parent;
335 GtkWidget *box;
336 GtkWidget *label;
337
338 parent = prefdialog->parent;
339 gtk_widget_destroy(prefdialog);
340
341 prefdialog = gtk_frame_new(_("Buddy List Options"));
342 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
343
344 box = gtk_vbox_new(FALSE, 5);
345 gtk_container_add(GTK_CONTAINER(prefdialog), box);
346 gtk_widget_show(box);
347
348 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
349 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
350 gtk_widget_show(label);
351
352 gaim_button(_("Send Keep-Alive Packet (6 bytes/minute)"), &general_options, OPT_GEN_KEEPALIVE, box);
314 353
315 gtk_widget_show(prefdialog); 354 gtk_widget_show(prefdialog);
316 } 355 }
317 356
318 static void buddy_page() 357 static void buddy_page()
1690 general_options = general_options ^ (int)option; 1729 general_options = general_options ^ (int)option;
1691 1730
1692 if ((int)option == OPT_GEN_LOG_ALL) 1731 if ((int)option == OPT_GEN_LOG_ALL)
1693 update_log_convs(); 1732 update_log_convs();
1694 1733
1734 if ((int)option == OPT_GEN_KEEPALIVE)
1735 update_keepalive(general_options & OPT_GEN_KEEPALIVE);
1736
1695 if (prefrem) 1737 if (prefrem)
1696 gtk_signal_handler_block_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS); 1738 gtk_signal_handler_block_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS);
1697 if (remember) 1739 if (remember)
1698 gtk_signal_handler_block_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS); 1740 gtk_signal_handler_block_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS);
1699 if (prefrem) 1741 if (prefrem)
1775 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, general_page); 1817 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, general_page);
1776 } 1818 }
1777 1819
1778 void prefs_build_connect(GtkWidget *preftree) 1820 void prefs_build_connect(GtkWidget *preftree)
1779 { 1821 {
1780 GtkCTreeNode *parent; 1822 GtkCTreeNode *parent, *node;
1781 char *text[1]; 1823 char *text[1];
1782 1824
1783 text[0] = _("Connection"); 1825 text[0] = _("Connection");
1784 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, 1826 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1785 text, 5, NULL, NULL, NULL, NULL, 0, 1); 1827 text, 5, NULL, NULL, NULL, NULL, 0, 1);
1786 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, connect_page); 1828 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, connect_page);
1829
1830 text[0] = _("TOC Options");
1831 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL,
1832 text, 5, NULL, NULL, NULL, NULL, 0, 1);
1833 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, toc_page);
1834
1835 text[0] = _("Oscar Options");
1836 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL,
1837 text, 5, NULL, NULL, NULL, NULL, 0, 1);
1838 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, oscar_page);
1787 } 1839 }
1788 1840
1789 void prefs_build_buddy(GtkWidget *preftree) 1841 void prefs_build_buddy(GtkWidget *preftree)
1790 { 1842 {
1791 GtkCTreeNode *parent, *node; 1843 GtkCTreeNode *parent, *node;