[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [plasma] [Bug 314224] New: clock freezes after modifying layout.js
From:       <adrelanos () riseup ! net>
Date:       2013-02-01 0:11:11
Message-ID: bug-314224-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=314224

            Bug ID: 314224
           Summary: clock freezes after modifying layout.js
    Classification: Unclassified
           Product: plasma
           Version: 4.8.4
          Platform: Debian testing
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: widget-clock
          Assignee: plasma-bugs@kde.org
          Reporter: adrelanos@riseup.net

I modified the file
"/usr/share/kde4/apps/plasma/layout-templates/org.kde.plasma-desktop.defaultPanel/contents/layout.js".
(Just for ease of testing, I know about kde path stacking.)

Original File (from Debian Wheezy):

------------------------------------------------------------

var panel = new Panel
if (panelIds.length == 1) {
    // we are the only panel, so set the location for the user
    panel.location = 'bottom'
}

panel.height = screenGeometry(panel.screen).height > 1024 ? 35 : 27
panel.addWidget("launcher")
panel.addWidget("org.kde.showActivityManager")
panel.addWidget("pager")
tasks = panel.addWidget("tasks")
panel.addWidget("systemtray")
panel.addWidget("digital-clock")

tasks.currentConfigGroup = new Array("Launchers")
tasks.writeConfig("browser", "preferred://browser, , , ")
tasks.writeConfig("filemanager", "preferred://filemanager, , , ")

------------------------------------------------------------

Diff for Modified File:

------------------------------------------------------------

--- 1   2012-12-13 17:44:13.412226851 +0000
+++ 2   2012-12-13 17:44:34.532227597 +0000
@@ -10,7 +10,27 @@ panel.addWidget("org.kde.showActivityMan
 panel.addWidget("pager")
 tasks = panel.addWidget("tasks")
 panel.addWidget("systemtray")
-panel.addWidget("digital-clock")
+
+// Whonix changes
+clock = panel.addWidget("digital-clock")
+clock.writeConfig("Share", "false")
+clock.writeConfig("announceInterval", "0")
+clock.writeConfig("calendarType", "locale")
+clock.writeConfig("dateStyle", "4")
+clock.writeConfig("defaultTimezone", "UTC")
+clock.writeConfig("displayEvents", "true")
+clock.writeConfig("displayHolidays", "false")
+clock.writeConfig("holidaysRegions", "")
+clock.writeConfig("holidaysRegionsDaysOff", "")
+clock.writeConfig("plainClockDrawShadow", "true")
+clock.writeConfig("plainClockFont", "DejaVu Sans,14,-1,0,50,0,0,0,0,0")
+clock.writeConfig("showSeconds", "true")
+clock.writeConfig("showTimezone", "true")
+clock.writeConfig("timeZones", "UTC")
+clock.writeConfig("timezone", "UTC")
+clock.writeConfig("useCustomColor", "false")
+clock.writeConfig("useCustomShadowColor", "false")
+// End of Whonix changes

 tasks.currentConfigGroup = new Array("Launchers")
 tasks.writeConfig("browser", "preferred://browser, , , ")

------------------------------------------------------------

Diff for "Lighter" modified File:

------------------------------------------------------------

--- 1   2012-12-13 17:44:13.412226851 +0000
+++ 3   2012-12-13 17:44:59.608228916 +0000
@@ -10,7 +10,17 @@ panel.addWidget("org.kde.showActivityMan
 panel.addWidget("pager")
 tasks = panel.addWidget("tasks")
 panel.addWidget("systemtray")
-panel.addWidget("digital-clock")
+
+// Whonix changes
+clock = panel.addWidget("digital-clock")
+clock.writeConfig("dateStyle", "4")
+clock.writeConfig("defaultTimezone", "UTC")
+clock.writeConfig("displayHolidays", "false")
+clock.writeConfig("showSeconds", "true")
+clock.writeConfig("showTimezone", "true")
+clock.writeConfig("timeZones", "UTC")
+clock.writeConfig("timezone", "UTC")
+// End of Whonix changes

 tasks.currentConfigGroup = new Array("Launchers")
 tasks.writeConfig("browser", "preferred://browser, , , ")

------------------------------------------------------------

Both times, the clock is configured as I wish, but the seconds are
frozen. To get it running it is required to view the digital clock
settings and press ok. Then it's working.

Reproducible: Always

Steps to Reproduce:
1. open the file:
kdesudo kwrite
/usr/share/kde4/apps/plasma/layout-templates/org.kde.plasma-desktop.defaultPanel/contents/layout.js

2. add the following content:

var panel = new Panel
if (panelIds.length == 1) {
    // we are the only panel, so set the location for the user
    panel.location = 'bottom'
}

panel.height = screenGeometry(panel.screen).height > 1024 ? 35 : 27
panel.addWidget("launcher")
panel.addWidget("org.kde.showActivityManager")
panel.addWidget("pager")
tasks = panel.addWidget("tasks")
panel.addWidget("systemtray")
panel.addWidget("digital-clock")

// Whonix changes
clock = panel.addWidget("digital-clock")
clock.writeConfig("Share", "false")
clock.writeConfig("announceInterval", "0")
clock.writeConfig("calendarType", "locale")
clock.writeConfig("dateStyle", "4")
clock.writeConfig("defaultTimezone", "UTC")
clock.writeConfig("displayEvents", "true")
clock.writeConfig("displayHolidays", "false")
clock.writeConfig("holidaysRegions", "")
clock.writeConfig("holidaysRegionsDaysOff", "")
clock.writeConfig("plainClockDrawShadow", "true")
clock.writeConfig("plainClockFont", "DejaVu Sans,14,-1,0,50,0,0,0,0,0")
clock.writeConfig("showSeconds", "true")
clock.writeConfig("showTimezone", "true")
clock.writeConfig("timeZones", "UTC")
clock.writeConfig("timezone", "UTC")
clock.writeConfig("useCustomColor", "false")
clock.writeConfig("useCustomShadowColor", "false")
// End of Whonix changes

tasks.currentConfigGroup = new Array("Launchers")
tasks.writeConfig("browser", "preferred://browser, , , ")
tasks.writeConfig("filemanager", "preferred://filemanager, , , ")

3. create a new user account, for example: sudo adduser testuser

4. login as testuser
Actual Results:  
The clock is configured as I wish, but the seconds are
frozen. To get it running it is required to view the digital clock
settings and press ok. Then it's working.

Expected Results:  
The clock is configured as I wish and I can see second by second pass by.

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic