[ekg-commit] r2839 - in trunk: . docs src

EKG commit list ekg-commit at lists.ziew.org
Tue Feb 2 20:50:24 CET 2010


Author: gophi
Date: 2010-02-02 20:50:23 +0100 (Tue, 02 Feb 2010)
New Revision: 2839

Modified:
   trunk/ChangeLog
   trunk/docs/vars.txt
   trunk/src/ui-ncurses.c
Log:
- wyswietlanie dnd i ffc na liscie kontaktow (Kosma/g)



Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-10-17 15:21:56 UTC (rev 2838)
+++ trunk/ChangeLog	2010-02-02 19:50:23 UTC (rev 2839)
@@ -4,6 +4,10 @@
 to kto¶ oznaczony przez ,,x'' (w - wojtekka, s - speedy, a - arekm,
 d - drg, sz - szalik, del - deletek, g - gophi, p - porridge).
 
+// 2010-02-02
+
+- wy¶wietlanie dnd i ffc na li¶cie kontaktów (Kosma/g)
+
 // 2009-08-15
 
 - poprawienie konwersji cp na iso (Kosma/g)

Modified: trunk/docs/vars.txt
===================================================================
--- trunk/docs/vars.txt	2009-10-17 15:21:56 UTC (rev 2838)
+++ trunk/docs/vars.txt	2010-02-02 19:50:23 UTC (rev 2839)
@@ -251,10 +251,10 @@
 	domy¶lna warto¶æ: brak
 
 	opcje listy kontaktów oddzielone przecinkiem lub spacj±. domy¶lne
-	ustawienia to ,,right, frame, margin=1, nowrap, nodescr, order=0123''.
+	ustawienia to ,,right, frame, margin=1, nowrap, nodescr, order=501623''.
 	mo¿liwe stany to: 0 - dostêpni, 1 - zajêci, 2 - niewidoczni, 3 -
-	blokuj±cy, 4 - niedostêpni). mo¿na pomin±æ niektóre stany -- nie
-	bêd± po prostu wy¶wietlane na li¶cie.
+	blokuj±cy, 4 - niedostêpni, 5 - poGGadaj ze mn±, 6 - nie przeszkadzaæ.
+	mo¿na pomin±æ niektóre stany -- nie bêd± po prostu wy¶wietlane na li¶cie.
 	
 	lista dostêpnych opcji:
 	- left, right, top, bottom - po³o¿enie listy kontaktów na ekranie,

Modified: trunk/src/ui-ncurses.c
===================================================================
--- trunk/src/ui-ncurses.c	2009-10-17 15:21:56 UTC (rev 2838)
+++ trunk/src/ui-ncurses.c	2010-02-02 19:50:23 UTC (rev 2839)
@@ -260,7 +260,7 @@
 static int contacts_frame = WF_LEFT;
 static int contacts_descr = 0;
 static int contacts_wrap = 0;
-static int contacts_order[5] = { 0, 1, 2, 3, -1 };
+static int contacts_order[7] = { 5, 0, 1, 6, 2, 3, -1 };
 static int contacts_framecolor = 4;
 static int contacts_group_index = 0;
 static int contacts_count = 0;
@@ -1479,12 +1479,14 @@
 	struct {
 		int status1, status2;
 		char *format, *format_descr, *format_descr_full, *format_header, *format_footer;
-	} table[5] = {
+	} table[7] = {
 		{ GG_STATUS_AVAIL, GG_STATUS_AVAIL_DESCR, "contacts_avail", "contacts_avail_descr", "contacts_avail_descr_full", "contacts_avail_header", "contacts_avail_footer" },
 		{ GG_STATUS_BUSY, GG_STATUS_BUSY_DESCR, "contacts_busy", "contacts_busy_descr", "contacts_busy_descr_full", "contacts_busy_header", "contacts_busy_footer" },
 		{ GG_STATUS_INVISIBLE, GG_STATUS_INVISIBLE_DESCR, "contacts_invisible", "contacts_invisible_descr", "contacts_invisible_descr_full", "contacts_invisible_header", "contacts_invisible_footer" },
 		{ GG_STATUS_BLOCKED, -1, "contacts_blocking", "contacts_blocking", "contacts_blocking", "contacts_blocking_header", "contacts_blocking_footer" },
 		{ GG_STATUS_NOT_AVAIL, GG_STATUS_NOT_AVAIL_DESCR, "contacts_not_avail", "contacts_not_avail_descr", "contacts_not_avail_descr_full", "contacts_not_avail_header", "contacts_not_avail_footer" },
+		{ GG_STATUS_FFC, GG_STATUS_FFC_DESCR, "contacts_ffc", "contacts_ffc_descr", "contacts_ffc_descr_full", "contacts_ffc_header", "contacts_ffc_footer" },
+		{ GG_STATUS_DND, GG_STATUS_DND_DESCR, "contacts_dnd", "contacts_dnd_descr", "contacts_dnd_descr_full", "contacts_dnd_header", "contacts_dnd_footer" },
 	};
 	const char *header = NULL, *footer = NULL;
 	char *group = NULL;
@@ -1538,12 +1540,12 @@
 	}
 
 	contacts_count = 0;
-	for (j = 0; j < 5; j++) {
+	for (j = 0; j < 7; j++) {
 		const char *header, *footer;
 		int i = contacts_order[j], count;
 		list_t l;
 
-		if (i < 0 || i > 4)
+		if (i < 0 || i > 6)
 			continue;
 
 		header = format_find(table[i].format_header);
@@ -1630,11 +1632,13 @@
 	contacts_margin = 1;
 	contacts_edge = WF_RIGHT;
 	contacts_frame = WF_LEFT;
-	contacts_order[0] = 0;
-	contacts_order[1] = 1;
-	contacts_order[2] = 2;
-	contacts_order[3] = 3;
-	contacts_order[4] = -1;
+	contacts_order[0] = 5;
+	contacts_order[1] = 0;
+	contacts_order[2] = 1;
+	contacts_order[3] = 6;
+	contacts_order[4] = 2;
+	contacts_order[5] = 3;
+	contacts_order[6] = -1;
 	contacts_wrap = 0;
 	contacts_descr = 0;
 	contacts_offset = 0;
@@ -1723,9 +1727,11 @@
 				contacts_order[2] = -1;
 				contacts_order[3] = -1;
 				contacts_order[4] = -1;
+				contacts_order[5] = -1;
+				contacts_order[6] = -1;
 				
-				for (j = 0; args[i][j + 6] && j < 5; j++)
-					if (args[i][j + 6] >= '0' && args[i][j + 6] <= '4')
+				for (j = 0; args[i][j + 6] && j < 7; j++)
+					if (args[i][j + 6] >= '0' && args[i][j + 6] <= '6')
 						contacts_order[j] = args[i][j + 6] - '0';	
 			}
 		}



More information about the ekg-commit mailing list