#1 Add ability change date time on screen patch

closed-later
nobody
None
5
2010-09-26
2010-06-08
YuriiS
No

Hello! %)

I try make little patch for lxdm 2.0
+++++++begin lxdm-alt-datetime.patch+++++++++
*** src/greeter.c 2010-05-02 08:03:01 +0400
--- src/greeter.c_new 2010-06-08 13:19:56 +0400
***************
*** 511,522 ****

static gboolean on_timeout(GtkLabel* label)
{
char buf[128];
time_t t;
struct tm* tmbuf;
time(&t);
tmbuf = localtime(&t);
! strftime(buf, 128, "%c", tmbuf);
gtk_label_set_text(label, buf);
return TRUE;
}
--- 511,525 ----

static gboolean on_timeout(GtkLabel* label)
{
+ char* datetimemask;
char buf[128];
time_t t;
struct tm* tmbuf;
time(&t);
tmbuf = localtime(&t);
! datetimemask = g_key_file_get_string(var_config, "base", "datetimemask", NULL);
! if (datetimemask == NULL) datetimemask="%c";
! strftime(buf, 128, datetimemask, tmbuf);
gtk_label_set_text(label, buf);
return TRUE;
}
+++++++end lxdm-alt-datetime.patch+++++++++

And i can change date & time /etc/lxdm/lxdm.conf
For example
datetimemask=%X

Discussion

  • YuriiS

    YuriiS - 2010-06-08

    lxdm.conf example

     
  • dgod.osa

    dgod.osa - 2010-09-26

    It's a good idea, I'll let it work at next version, thank you.

     
  • dgod.osa

    dgod.osa - 2010-09-26
    • status: open --> closed-later