changeset 930:a88af4cc626a

[gaim-migrate @ 940] page in prefs for applet, and toc keepalive committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 20 Sep 2000 23:04:48 +0000
parents b9d34670ea40
children 59d9e1177ab5
files TODO src/gaim.h src/oscar.c src/prefs.c src/toc.c
diffstat 5 files changed, 64 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/TODO	Tue Sep 19 09:55:44 2000 +0000
+++ b/TODO	Wed Sep 20 23:04:48 2000 +0000
@@ -1,7 +1,6 @@
 --- STUFF FOR 0.10.1 RELEASE ---
 	Allow users to select sounds for various events
 	Execute Command on Buddy Pounce
-	Have a page in the prefs for the Applet
 	The about window is very ugly.  I think this shall be fixed.  
 		You know, I really like the gnome look to some apps
 		but I dont want to tie gnome into gaim.  oh life sucks
--- a/src/gaim.h	Tue Sep 19 09:55:44 2000 +0000
+++ b/src/gaim.h	Wed Sep 20 23:04:48 2000 +0000
@@ -414,7 +414,7 @@
 #define TYPE_SIGNOFF   4
 #define TYPE_KEEPALIVE 5
 
-#define REVISION "gaim:$Revision: 927 $"
+#define REVISION "gaim:$Revision: 940 $"
 #define FLAPON "FLAPON\r\n\r\n"
 
 #define ROAST "Tic/Toc"
@@ -438,6 +438,7 @@
 extern GList *oscar_chats;
 extern int create_exchange;
 extern char *create_name;
+extern int keepalv;
 
 /* Globals in server.c */
 extern int correction_time;
--- a/src/oscar.c	Tue Sep 19 09:55:44 2000 +0000
+++ b/src/oscar.c	Wed Sep 20 23:04:48 2000 +0000
@@ -1270,6 +1270,7 @@
 	if (USE_OSCAR) { /* keeping it open for TOC */
 		aim_flap_nop(gaim_sess, gaim_conn);
 	} else {
+		sflap_send("", 0, TYPE_KEEPALIVE);
 	}
 }
 
--- a/src/prefs.c	Tue Sep 19 09:55:44 2000 +0000
+++ b/src/prefs.c	Wed Sep 20 23:04:48 2000 +0000
@@ -51,6 +51,9 @@
 static GtkWidget *gaim_button(const char *, int *, int, GtkWidget *);
 static void prefs_build_general(GtkWidget *);
 static void prefs_build_connect(GtkWidget *);
+#ifdef USE_APPLET
+static void prefs_build_applet(GtkWidget *);
+#endif
 static void prefs_build_buddy(GtkWidget *);
 static void prefs_build_convo(GtkWidget *);
 static void prefs_build_sound(GtkWidget *);
@@ -191,11 +194,12 @@
 	GtkWidget *parent;
 	GtkWidget *box;
 	GtkWidget *label;
+	GtkWidget *sep;
 
 	parent = prefdialog->parent;
 	gtk_widget_destroy(prefdialog);
 
-	prefdialog = gtk_frame_new(_("TOC Options"));
+	prefdialog = gtk_frame_new(_("Connection Options"));
 	gtk_container_add(GTK_CONTAINER(parent), prefdialog);
 	gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0);
 
@@ -211,6 +215,12 @@
 
 	gaim_button(_("Use Oscar Protocol"), &general_options, OPT_GEN_USE_OSCAR, box);
 
+	sep = gtk_hseparator_new();
+	gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
+	gtk_widget_show(sep);
+
+	gaim_button(_("Send Keep-Alive Packet (6 bytes/minute)"), &general_options, OPT_GEN_KEEPALIVE, box);
+
 	gtk_widget_show(prefdialog);
 }
 
@@ -219,7 +229,6 @@
 	GtkWidget *parent;
 	GtkWidget *box;
 	GtkWidget *label;
-	GtkWidget *sep;
 	GtkWidget *hbox;
 	GtkWidget *opt;
 	char buffer[1024];
@@ -350,11 +359,41 @@
 	gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
 	gtk_widget_show(label);
 
-	gaim_button(_("Send Keep-Alive Packet (6 bytes/minute)"), &general_options, OPT_GEN_KEEPALIVE, box);
+	label = gtk_label_new(_("No options currently (Isn't that sad)"));
+	gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
+	gtk_widget_show(label);
 
 	gtk_widget_show(prefdialog);
 }
 
+#ifdef USE_APPLET
+static void applet_page()
+{
+	GtkWidget *parent;
+	GtkWidget *box;
+	GtkWidget *label;
+	GtkWidget *sep;
+
+	parent = prefdialog->parent;
+	gtk_widget_destroy(prefdialog);
+
+	prefdialog = gtk_frame_new(_("Applet Options"));
+	gtk_container_add(GTK_CONTAINER(parent), prefdialog);
+
+	box = gtk_vbox_new(FALSE, 5);
+	gtk_container_add(GTK_CONTAINER(prefdialog), box);
+	gtk_widget_show(box);
+
+	label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
+	gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
+	gtk_widget_show(label);
+
+	gaim_button(_("Display Buddy List near applet"), &general_options, OPT_GEN_NEAR_APPLET, box);
+
+	gtk_widget_show(prefdialog);
+}
+#endif
+
 static void buddy_page()
 {
 	GtkWidget *parent;
@@ -1753,6 +1792,9 @@
 
 	prefs_build_general(preftree);
 	prefs_build_connect(preftree);
+#ifdef USE_APPLET
+	prefs_build_applet(preftree);
+#endif
 	prefs_build_buddy(preftree);
 	prefs_build_convo(preftree);
 	prefs_build_sound(preftree);
@@ -1982,6 +2024,19 @@
 	gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, oscar_page);
 }
 
+#ifdef USE_APPLET
+void prefs_build_applet(GtkWidget *preftree)
+{
+	GtkCTreeNode *parent, *node;
+	char *text[1];
+
+	text[0] = _("Applet");
+	parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
+					text, 5, NULL, NULL, NULL, NULL, 0, 1);
+	gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, applet_page);
+}
+#endif
+
 void prefs_build_buddy(GtkWidget *preftree)
 {
 	GtkCTreeNode *parent, *node;
--- a/src/toc.c	Tue Sep 19 09:55:44 2000 +0000
+++ b/src/toc.c	Wed Sep 20 23:04:48 2000 +0000
@@ -174,6 +174,9 @@
 		   VOICE_UID);
 	sflap_send(buf2, -1, TYPE_DATA);
 
+	if (keepalv < 0)
+		update_keepalive(general_options & OPT_GEN_KEEPALIVE);
+
         serv_finish_login();
 	return 0;
 }