changeset 2008:6f049002d963

[gaim-migrate @ 2018] i'm not sure i like this yet. i think we need better pixmaps or something. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 13 Jun 2001 07:26:16 +0000
parents 948a67a691a6
children ac9dd6b00b34
files pixmaps/Makefile.am pixmaps/tb_redo.xpm pixmaps/tb_refresh.xpm pixmaps/tb_undo.xpm src/multi.c
diffstat 5 files changed, 181 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/pixmaps/Makefile.am	Wed Jun 13 06:44:03 2001 +0000
+++ b/pixmaps/Makefile.am	Wed Jun 13 07:26:16 2001 +0000
@@ -119,7 +119,10 @@
 		status-idle.xpm			\
 		strike.xpm			\
 		tb_forward.xpm			\
+		tb_redo.xpm			\
+		tb_refresh.xpm			\
 		tb_search.xpm			\
+		tb_undo.xpm			\
 		think.xpm			\
 		tmp_send.xpm			\
 		tongue.xpm			\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/tb_redo.xpm	Wed Jun 13 07:26:16 2001 +0000
@@ -0,0 +1,35 @@
+/* XPM */
+static char * tb_redo_xpm[] = {
+"24 24 8 1",
+" 	c None",
+".	c #000000",
+"+	c #4C603C",
+"@	c #566B43",
+"#	c #445636",
+"$	c #526741",
+"%	c #5A7046",
+"&	c #37452B",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"              .         ",
+"              ..        ",
+"           ...+@.       ",
+"         ..#+$$%$.      ",
+"        .##...$@.       ",
+"        .&.   ..        ",
+"       .&.    .         ",
+"       ..               ",
+"       ..               ",
+"        .               ",
+"         .              ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/tb_refresh.xpm	Wed Jun 13 07:26:16 2001 +0000
@@ -0,0 +1,40 @@
+/* XPM */
+static char *tb_refresh_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 10 1",
+"  c black",
+". c #37452b",
+"X c #004300550035",
+"o c #475937",
+"O c #4c603c",
+"+ c #526741",
+"@ c #566b43",
+"# c #5a7046",
+"$ c #5c7449",
+"% c None",
+/* pixels */
+"%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%% %%%%%%%%%%%%",
+"%%%%%%%%%%  %%%%%%%%%%%%",
+"%%%%%%%%% @O   %%%%%%%%%",
+"%%%%%%%% +#++OX  %%%%%%%",
+"%%%%%%%%% @+   XX %%%%%%",
+"%%%%%%% %%  %%% . %%%%%%",
+"%%%%%% %%%% %%%% . %%%%%",
+"%%%%%  %%%%%%%%%%  %%%%%",
+"%%%%%  %%%%%%%%%%  %%%%%",
+"%%%%% X %%%% %%%% %%%%%%",
+"%%%%%% X %%%  %% %%%%%%%",
+"%%%%%% XO   +o %%%%%%%%%",
+"%%%%%%%  ++$+O+ %%%%%%%%",
+"%%%%%%%%%   OX %%%%%%%%%",
+"%%%%%%%%%%%%  %%%%%%%%%%",
+"%%%%%%%%%%%% %%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%"
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/tb_undo.xpm	Wed Jun 13 07:26:16 2001 +0000
@@ -0,0 +1,35 @@
+/* XPM */
+static char * tb_undo_xpm[] = {
+"24 24 8 1",
+" 	c None",
+".	c #000000",
+"+	c #8F431E",
+"@	c #803C1B",
+"#	c #8A411D",
+"$	c #954620",
+"%	c #733618",
+"&	c #5C2B13",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"         .              ",
+"        ..              ",
+"       .+@...           ",
+"      .#$##@%..         ",
+"       .+#...%%.        ",
+"        ..   .&.        ",
+"         .    .&.       ",
+"               ..       ",
+"               ..       ",
+"               .        ",
+"              .         ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};
--- a/src/multi.c	Wed Jun 13 06:44:03 2001 +0000
+++ b/src/multi.c	Wed Jun 13 07:26:16 2001 +0000
@@ -33,6 +33,9 @@
 #include "pixmaps/gnome_remove.xpm"
 #include "pixmaps/cancel.xpm"
 #include "pixmaps/ok.xpm"
+#include "pixmaps/tb_redo.xpm"
+#include "pixmaps/tb_undo.xpm"
+#include "pixmaps/tb_refresh.xpm"
 
 #define LOGIN_STEPS 5
 
@@ -164,7 +167,7 @@
 
 	list = gtk_clist_new_with_titles(4, titles);
 	gtk_clist_set_column_width(GTK_CLIST(list), 0, 90);
-	gtk_clist_set_selection_mode(GTK_CLIST(list), GTK_SELECTION_BROWSE);
+	gtk_clist_set_selection_mode(GTK_CLIST(list), GTK_SELECTION_MULTIPLE);
 	gtk_clist_column_titles_passive(GTK_CLIST(list));
 	gtk_container_add(GTK_CONTAINER(win), list);
 	gtk_widget_show(list);
@@ -500,14 +503,17 @@
 
 static void mod_acct(GtkWidget *w, gpointer d)
 {
+	GList *l = GTK_CLIST(list)->selection;
 	int row = -1;
 	struct aim_user *u;
-	if (GTK_CLIST(list)->selection)
-		row = (int)GTK_CLIST(list)->selection->data;
-	if (row != -1) {
-		u = g_list_nth_data(aim_users, row);
-		if (u)
-			show_acct_mod(u);
+	while (l) {
+		row = (int)l->data;
+		if (row != -1) {
+			u = g_list_nth_data(aim_users, row);
+			if (u)
+				show_acct_mod(u);
+		}
+		l = l->next;
 	}
 }
 
@@ -597,11 +603,11 @@
 
 static void acct_signin(GtkWidget *w, gpointer d)
 {
+	GList *l = GTK_CLIST(list)->selection;
 	int row = -1;
 	struct aim_user *u;
-	if (GTK_CLIST(list)->selection)
-		row = (int)GTK_CLIST(list)->selection->data;
-	if (row != -1) {
+	while (l) {
+		row = (int)l->data;
 		u = g_list_nth_data(aim_users, row);
 		if (!u->gc) {
 			if (!u->password[0]) {
@@ -617,6 +623,7 @@
 			u->gc->wants_to_die = TRUE;
 			signoff(u->gc);
 		}
+		l = l->next;
 	}
 }
 
@@ -633,20 +640,36 @@
 
 static void del_acct(GtkWidget *w, gpointer d)
 {
+	GList *l = GTK_CLIST(list)->selection;
 	char buf[8192];
 	int row = -1;
 	struct aim_user *u;
-	if (GTK_CLIST(list)->selection)
-		row = (int)GTK_CLIST(list)->selection->data;
-	if (row == -1)
-	return;
+	while (l) {
+		row = (int)l->data;
+		u = g_list_nth_data(aim_users, row);
+		if (!u)
+			return;
+
+		g_snprintf(buf, sizeof(buf), _("Are you sure you want to delete %s?"), u->username);
+		do_ask_dialog(buf, u, do_del_acct, NULL);
+		l = l->next;
+	}
+}
 
-	u = g_list_nth_data(aim_users, row);
-	if (!u)
-		return;
-
-	g_snprintf(buf, sizeof(buf), _("Are you sure you want to delete %s?"), u->username);
-	do_ask_dialog(buf, u, do_del_acct, NULL);
+static void sel_auto(gpointer w, gpointer d)
+{
+	GList *l = aim_users;
+	struct aim_user *u;
+	int i = 0; /* faster than doing g_list_index each time */
+	while (l) {
+		u = l->data;
+		l = l->next;
+		if (u->options & OPT_USR_AUTO)
+			gtk_clist_select_row(GTK_CLIST(list), i, -1);
+		else
+			gtk_clist_unselect_row(GTK_CLIST(list), i, -1);
+		i++;
+	}
 }
 
 void account_editor(GtkWidget *w, GtkWidget *W)
@@ -654,7 +677,8 @@
 	/* please kill me */
 	GtkWidget *vbox;
 	GtkWidget *hbox;
-	GtkWidget *list;
+	GtkWidget *vbox2;
+	GtkWidget *sw;
 	GtkWidget *button;	/* used for many things */
 
 	if (acctedit) {
@@ -674,8 +698,29 @@
 	gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
 	gtk_container_add(GTK_CONTAINER(acctedit), vbox);
 
-	list = generate_list();
-	gtk_box_pack_start(GTK_BOX(vbox), list, TRUE, TRUE, 0);
+	hbox = gtk_hbox_new(FALSE, 5);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
+
+	sw = generate_list();
+
+	vbox2 = gtk_vbox_new(TRUE, 5);
+	gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 0);
+
+	button = picture_button2(acctedit, _("Select All"), tb_refresh_xpm, 2);
+	gtk_box_pack_start(GTK_BOX(vbox2), button, TRUE, TRUE, 0);
+	gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
+				  GTK_SIGNAL_FUNC(gtk_clist_select_all), GTK_OBJECT(list));
+
+	button = picture_button2(acctedit, _("Select Autos"), tb_redo_xpm, 2);
+	gtk_box_pack_start(GTK_BOX(vbox2), button, TRUE, TRUE, 0);
+	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(sel_auto), NULL);
+
+	button = picture_button2(acctedit, _("Select None"), tb_undo_xpm, 2);
+	gtk_box_pack_start(GTK_BOX(vbox2), button, TRUE, TRUE, 0);
+	gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
+				  GTK_SIGNAL_FUNC(gtk_clist_unselect_all), GTK_OBJECT(list));
+
+	gtk_box_pack_start(GTK_BOX(hbox), sw, TRUE, TRUE, 0);
 
 	hbox = gtk_hbox_new(TRUE, 5);
 	gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);