changeset 1139:ce935e673907

[gaim-migrate @ 1149] Ok, I stayed up later than I had expected to. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sun, 26 Nov 2000 11:46:49 +0000
parents 68f2f021ad1b
children 249b040f6a83
files src/dialogs.c src/gaimrc.c
diffstat 2 files changed, 21 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialogs.c	Sun Nov 26 10:49:25 2000 +0000
+++ b/src/dialogs.c	Sun Nov 26 11:46:49 2000 +0000
@@ -120,6 +120,8 @@
 	GtkWidget *p_unaway;
 	GtkWidget *p_unidle;
 	GtkWidget *menu;
+
+	struct aim_user *user;
 };
 
 struct findbyemail {
@@ -1034,6 +1036,7 @@
 	
 	g_snprintf(bp->name, 80, "%s", gtk_entry_get_text(GTK_ENTRY(b->nameentry)));
 	g_snprintf(bp->message, 2048, "%s", gtk_entry_get_text(GTK_ENTRY(b->messentry)));
+	g_snprintf(bp->pouncer, 80, "%s", b->user->username);
 
 	if (GTK_TOGGLE_BUTTON(b->openwindow)->active)
 		bp->popup = 1;
@@ -1070,6 +1073,12 @@
         g_free(b);
 }
 
+static void pounce_choose(GtkWidget *opt, struct addbp *b)
+{
+	struct aim_user *u = gtk_object_get_user_data(GTK_OBJECT(opt));
+	b->user = u;
+}
+
 static void pounce_user_menu(struct addbp *b, GtkWidget *box)
 {
 	GtkWidget *hbox;
@@ -1098,6 +1107,7 @@
 		a = (struct aim_user *)u->data;
 		opt = gtk_menu_item_new_with_label(a->username);
 		gtk_object_set_user_data(GTK_OBJECT(opt), a);
+		gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(pounce_choose), b);
 		gtk_menu_append(GTK_MENU(menu), opt);
 		gtk_widget_show(opt);
 		u = u->next;
--- a/src/gaimrc.c	Sun Nov 26 10:49:25 2000 +0000
+++ b/src/gaimrc.c	Sun Nov 26 11:46:49 2000 +0000
@@ -36,7 +36,7 @@
 
 /* for people like myself, who are too lazy to add an away msg :) */
 #define BORING_DEFAULT_AWAY_MSG "sorry, i ran out for a while. bbl"
-#define MAX_VALUES 7
+#define MAX_VALUES 10
 
 GList *aim_users = NULL;
 int general_options;
@@ -279,19 +279,20 @@
 		{
 			b = g_new0(struct buddy_pounce, 1);
 
-			g_snprintf(b->name, sizeof(b->name),  "%s", p->value[0]);
-			g_snprintf(b->message, sizeof(b->message), "%s", p->value[1]);
+			g_snprintf(b->name, sizeof(b->name),  "%s", p->value[1]);
+			g_snprintf(b->message, sizeof(b->message), "%s", p->value[2]);
+			g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[0]);
 
-			b->popup = atoi(p->value[2]);
-			b->sendim = atoi(p->value[3]);
+			b->popup = atoi(p->value[3]);
+			b->sendim = atoi(p->value[4]);
 
 			/* Let's check our version and see what's going on here */
-			if ((p->value[4]) && (strlen(p->value[4]) > 0))
+			if ((p->value[5]) && (strlen(p->value[5]) > 0))
 			{
 				/* If we have data, lets use it */
-				b->signon = atoi(p->value[4]);		
-				b->unaway = atoi(p->value[5]);		
-				b->unidle = atoi(p->value[6]);		
+				b->signon = atoi(p->value[5]);		
+				b->unaway = atoi(p->value[6]);		
+				b->unidle = atoi(p->value[7]);		
 			}
 			else
 			{
@@ -329,7 +330,7 @@
 				str2[0] = 0;
 			}
 
-			fprintf(f, "\tentry { %s } { %s } { %d } { %d } { %d } { %d } { %d }\n", str1, str2, b->popup, b->sendim, b->signon, b->unaway, b->unidle);
+			fprintf(f, "\tentry { %s } { %s } { %s } { %d } { %d } { %d } { %d } { %d }\n", b->pouncer, str1, str2, b->popup, b->sendim, b->signon, b->unaway, b->unidle);
 
 			/* escape_text2 uses malloc(), so we don't want to g_free these */
 			free(str1);