[Xfce4-commits] [apps/xfce4-screensaver] 369/425: Improve panel style and show time in minutes
noreply at xfce.org
noreply at xfce.org
Mon Oct 15 01:53:36 CEST 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit e247e402dbae56a48210fb3c106c4de9841c2321
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Oct 7 20:07:11 2018 +0200
Improve panel style and show time in minutes
The .panel and .xfce4-panel style classes will both be picked up to
style the panel more nicely by default.
Also, the quite hectic time in seconds is changed to a time in minutes,
which should provide enough detail for a simple (un)lock screen.
---
data/lock-dialog-default.ui | 34 +++++++++++++++++++++++++---------
src/gs-lock-plug.c | 8 ++++----
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/data/lock-dialog-default.ui b/data/lock-dialog-default.ui
index 58300fe..7d3839f 100644
--- a/data/lock-dialog-default.ui
+++ b/data/lock-dialog-default.ui
@@ -322,7 +322,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">6</property>
- <property name="label" translatable="yes">%h</property>
+ <property name="label" translatable="yes"><b>%h</b></property>
+ <property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -330,28 +331,43 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <placeholder/>
+ <child type="center">
+ <object class="GtkLabel" id="auth-date-time-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">6</property>
+ <property name="label" translatable="yes"><b>%s</b></property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0.5</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
</child>
<child>
- <object class="GtkLabel" id="auth-date-time-label">
+ <object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_right">6</property>
- <property name="label" translatable="yes">%s</property>
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">system-lock-screen-symbolic</property>
+ <property name="icon_size">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
<style>
<class name="background"/>
+ <class name="panel"/>
+ <class name="xfce4-panel"/>
</style>
</object>
</interface>
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 5f6fb82..b7afb50 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -288,10 +288,10 @@ date_time_update (GSLockPlug *plug)
gchar *str;
datetime = g_date_time_new_now_local ();
- datetime_format = g_date_time_format (datetime, _("%A, %B %e %X"));
+ datetime_format = g_date_time_format (datetime, _("%A, %B %e %H:%M"));
- str = g_strdup_printf ("%s", datetime_format);
- gtk_label_set_text (GTK_LABEL (plug->priv->auth_datetime_label), str);
+ str = g_strdup_printf ("<b>%s</b>", datetime_format);
+ gtk_label_set_markup (GTK_LABEL (plug->priv->auth_datetime_label), str);
g_free (str);
g_free (datetime_format);
@@ -2049,7 +2049,7 @@ gs_lock_plug_init (GSLockPlug *plug)
date_time_update (plug);
gtk_widget_show_all (plug->priv->vbox);
}
- plug->priv->datetime_timeout_id = g_timeout_add_seconds (1, (GSourceFunc) date_time_update, plug);
+ plug->priv->datetime_timeout_id = g_timeout_add_seconds (60, (GSourceFunc) date_time_update, plug);
/* Layout indicator */
#ifdef WITH_KBD_LAYOUT_INDICATOR
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list