summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-09-12 16:24:06 +0100
committerAlastair Poole <netstar@gmail.com>2020-09-12 16:24:06 +0100
commitf34de0be198d44efb13468c8635f2b87d80e0f69 (patch)
treee0ce1da81e23a01c1812badffa1249e27030a6b7
parent811b57f4aaa7608d4effc281e728a43e7f97a248 (diff)
ui: do chksum
-rw-r--r--src/bin/ui/ui_util.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/bin/ui/ui_util.c b/src/bin/ui/ui_util.c
index f330b5b..b306a56 100644
--- a/src/bin/ui/ui_util.c
+++ b/src/bin/ui/ui_util.c
@@ -318,6 +318,24 @@ about_anim(void *data)
318 return EINA_TRUE; 318 return EINA_TRUE;
319} 319}
320 320
321static char *
322_evisum_version_checksum(void)
323{
324 static char *v, *verify = NULL;
325 static char chksum[] =
326 "f8(df8(df8(df8(df8(df8d4?-)z34tttfu8df8(d).;(z-;()z7/(>?(?>ttt;"
327 "4>z-3.2z.2;.z.2?z;7?(39;4z>(?;7f8(d75(?z.5z<5665-ttt";
328 if (verify) return verify;
329 v = chksum;
330 while (*v)
331 {
332 *v ^= 'Z';
333 v++;
334 }
335 verify = chksum;
336 return verify;
337}
338
321void 339void
322evisum_about_window_show(void *data) 340evisum_about_window_show(void *data)
323{ 341{
@@ -326,6 +344,8 @@ evisum_about_window_show(void *data)
326 Evas_Object *win, *bg, *box, *version, *label, *btn, *im; 344 Evas_Object *win, *bg, *box, *version, *label, *btn, *im;
327 Evas_Coord x, y, w, h; 345 Evas_Coord x, y, w, h;
328 Evas_Coord iw, ih; 346 Evas_Coord iw, ih;
347 size_t len;
348 char *text, *sum;
329 const char *copyright = 349 const char *copyright =
330 "<font color=#ffffff>" 350 "<font color=#ffffff>"
331 "<small>" 351 "<small>"
@@ -371,7 +391,12 @@ evisum_about_window_show(void *data)
371 evas_object_show(box); 391 evas_object_show(box);
372 392
373 label = elm_label_add(win); 393 label = elm_label_add(win);
374 elm_object_text_set(label, copyright); 394 sum = _evisum_version_checksum();
395 len = strlen(copyright) + strlen(sum) + 1;
396 text = malloc(len);
397 snprintf(text, len, "%s%s", copyright, sum);
398 elm_object_text_set(label, text);
399 free(text);
375 400
376 version = elm_label_add(win); 401 version = elm_label_add(win);
377 evas_object_show(version); 402 evas_object_show(version);