[ekg2-commit] r4068 - trunk/plugins/gg: trunk/plugins/gg/gg.c trunk/plugins/gg/vars-en.txt trunk/plugins/gg/vars-pl.txt
SVN commit
svn w toxygen.net
Wto, 8 Lip 2008, 16:55:00 CEST
Author: wiechu
Date: 2008-07-08 16:55:00 +0200 (Tue, 08 Jul 2008)
New Revision: 4068
Modified:
trunk/plugins/gg/gg.c
trunk/plugins/gg/vars-en.txt
trunk/plugins/gg/vars-pl.txt
Log:
new gg:skip_default_format variable
Modified: trunk/plugins/gg/gg.c
===================================================================
--- trunk/plugins/gg/gg.c 2008-07-08 13:51:12 UTC (rev 4067)
+++ trunk/plugins/gg/gg.c 2008-07-08 14:55:00 UTC (rev 4068)
@@ -68,6 +68,7 @@
list_t gg_currently_checked = NULL;
char *last_tokenid;
int gg_config_display_token;
+int gg_config_skip_default_format;
int gg_config_split_messages;
/**
@@ -950,17 +951,22 @@
if (e->event.msg.formats && e->event.msg.formats_length) {
unsigned char *p = e->event.msg.formats;
- int i, len = xstrlen(__text), ii;
+ int i, len = xstrlen(__text), ii, skip = gg_config_skip_default_format;
+ static char win_gg_default_format[6] = { 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 };
- __format = xcalloc(len, sizeof(uint32_t));
-
gg_debug(GG_DEBUG_DUMP, "// formats:");
- for (ii = 0; ii < e->event.msg.formats_length; ii++)
+ for (ii = 0; ii < e->event.msg.formats_length; ii++) {
+ skip &= (p[ii] == win_gg_default_format[ii]);
gg_debug(GG_DEBUG_DUMP, " %.2x", (unsigned char) p[ii]);
+ }
+ if (skip)
+ gg_debug(GG_DEBUG_DUMP, " <- skipping");
+ else
+ __format = xcalloc(len, sizeof(uint32_t));
gg_debug(GG_DEBUG_DUMP, "\n");
/* XXX, check it. especially this 'pos' */
- for (i = 0; i < e->event.msg.formats_length; ) {
+ for (i = skip ? 0 : e->event.msg.formats_length; i < e->event.msg.formats_length; ) {
int j, pos = p[i] + p[i + 1] * 256;
uint32_t val = 0;
@@ -1784,6 +1790,7 @@
variable_add(&gg_plugin, ("get_images"), VAR_BOOL, 1, &gg_config_get_images, NULL, NULL, NULL);
variable_add(&gg_plugin, ("images_dir"), VAR_STR, 1, &gg_config_images_dir, NULL, NULL, NULL);
variable_add(&gg_plugin, ("image_size"), VAR_INT, 1, &gg_config_image_size, gg_changed_images, NULL, NULL);
+ variable_add(&gg_plugin, ("skip_default_format"), VAR_BOOL, 1, &gg_config_skip_default_format, NULL, NULL, NULL);
variable_add(&gg_plugin, ("split_messages"), VAR_BOOL, 1, &gg_config_split_messages, NULL, NULL, NULL);
idle_add(&gg_plugin, gg_idle_handler, &ekg_tv);
Modified: trunk/plugins/gg/vars-en.txt
===================================================================
--- trunk/plugins/gg/vars-en.txt 2008-07-08 13:51:12 UTC (rev 4067)
+++ trunk/plugins/gg/vars-en.txt 2008-07-08 14:55:00 UTC (rev 4068)
@@ -63,6 +63,11 @@
varible which define size of images in kB
+skip_default_format
+ type: bool
+ default value: 0
+
+ if set, skip default (for windows client) format (black on white)
split_messages
type: bool
Modified: trunk/plugins/gg/vars-pl.txt
===================================================================
--- trunk/plugins/gg/vars-pl.txt 2008-07-08 13:51:12 UTC (rev 4067)
+++ trunk/plugins/gg/vars-pl.txt 2008-07-08 14:55:00 UTC (rev 4068)
@@ -68,6 +68,14 @@
zmienna określa górną granicę wielkości rozmiaru przyjmowanych obrazków
w kB
+skip_default_format
+ typ: bool
+ domyślna wartość: 0
+
+ jeśli ma wartość 1, to nie przetwarza informacji o formatowaniu tekstu
+ wysyłanej przez windowsowe komunikatory od drugiej (a może losowej?)
+ wiadomości (informacja: czarne na białym)
+
split_messages
typ: bool
domyślna wartość: 0
Więcej informacji o liście dyskusyjnej ekg2-commit