Merge lp:~bluesabre/ubuntu/trusty/light-locker-settings/trusty-1.2.1 into lp:ubuntu/trusty/light-locker-settings

Proposed by Sean Davis on 2014-04-05
Status: Merged
Approved by: Logan Rosen on 2014-04-08
Approved revision: 6
Merged at revision: 6
Proposed branch: lp:~bluesabre/ubuntu/trusty/light-locker-settings/trusty-1.2.1
Merge into: lp:ubuntu/trusty/light-locker-settings
Diff against target: 1202 lines (+563/-229)
18 files modified
Makefile.in.in (+1/-0)
NEWS (+5/-0)
debian/changelog (+7/-0)
light-locker-settings/light-locker-settings.py (+320/-191)
light-locker-settings/light_locker_xfsync.py (+190/-0)
po/ca.po (+1/-1)
po/de.po (+1/-1)
po/en_AU.po (+1/-1)
po/es.po (+1/-1)
po/fi.po (+1/-1)
po/fr.po (+6/-6)
po/ja.po (+6/-6)
po/nl.po (+7/-7)
po/pl.po (+12/-10)
po/pt.po (+1/-1)
po/pt_BR.po (+1/-1)
po/pt_PT.po (+1/-1)
po/ru.po (+1/-1)
To merge this branch: bzr merge lp:~bluesabre/ubuntu/trusty/light-locker-settings/trusty-1.2.1
Reviewer Review Type Date Requested Status
Logan Rosen Approve on 2014-04-08
Chris J Arges 2014-04-05 Approve on 2014-04-07
Pasi Lallinaho (community) community 2014-04-05 Approve on 2014-04-05
Review via email: mp+214362@code.launchpad.net

Description of the change

light-locker-settings (1.2.1-0ubuntu1) trusty; urgency=medium

  * New upstream release. (LP: #1302484)
    - Fixes XFCE Power Manager setttings sync (LP: #1290737)

 -- Sean Davis <email address hidden> Fri, 04 Apr 2014 06:46:52 -0400

To post a comment you must log in.
Pasi Lallinaho (knome) wrote :

Approve with my Xubuntu Project lead hat on; the Xubuntu team wants this change.

review: Approve (community)
Chris J Arges (arges) wrote :

This is a bugfix only update.

review: Approve
Logan Rosen (logan) wrote :

Uploaded.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.in.in'
--- Makefile.in.in 2014-03-12 07:23:04 +0000
+++ Makefile.in.in 2014-04-05 00:57:27 +0000
@@ -21,6 +21,7 @@
21 21
22 install -d $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/light-locker-settings22 install -d $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/light-locker-settings
23 install light-locker-settings/light-locker-settings.py $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/light-locker-settings23 install light-locker-settings/light-locker-settings.py $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/light-locker-settings
24 install light-locker-settings/light_locker_xfsync.py $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/light-locker-settings
24 install light-locker-settings/light-locker-settings.glade $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/light-locker-settings25 install light-locker-settings/light-locker-settings.glade $(DESTDIR)/$(PREFIX)/share/$(APPNAME)/light-locker-settings
2526
26 install -d $(DESTDIR)/$(PREFIX)/share/doc/$(APPNAME)27 install -d $(DESTDIR)/$(PREFIX)/share/doc/$(APPNAME)
2728
=== modified file 'NEWS'
--- NEWS 2014-03-24 22:31:55 +0000
+++ NEWS 2014-04-05 00:57:27 +0000
@@ -1,5 +1,10 @@
1Light Locker Settings NEWS1Light Locker Settings NEWS
2|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||2|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
304 Apr 2014, Light Locker Settings 1.2.1
4
5- Support for external power management tools
6 . Added support for xfce4-session and xfce4-power-manager (fixes LP:1290737)
7
324 Mar 2014, Light Locker Settings 1.2.0824 Mar 2014, Light Locker Settings 1.2.0
49
5- light-locker settings:10- light-locker settings:
611
=== modified file 'debian/changelog'
--- debian/changelog 2014-03-24 22:31:55 +0000
+++ debian/changelog 2014-04-05 00:57:27 +0000
@@ -1,3 +1,10 @@
1light-locker-settings (1.2.1-0ubuntu1) trusty; urgency=medium
2
3 * New upstream release. (LP: #1302484)
4 - Fixes XFCE Power Manager setttings sync (LP: #1290737)
5
6 -- Sean Davis <smd.seandavis@gmail.com> Fri, 04 Apr 2014 06:46:52 -0400
7
1light-locker-settings (1.2.0-0ubuntu1) trusty; urgency=medium8light-locker-settings (1.2.0-0ubuntu1) trusty; urgency=medium
29
3 * New upstream release. (LP: #1297058)10 * New upstream release. (LP: #1297058)
411
=== modified file 'light-locker-settings/light-locker-settings.py'
--- light-locker-settings/light-locker-settings.py 2014-03-24 22:31:55 +0000
+++ light-locker-settings/light-locker-settings.py 2014-04-05 00:57:27 +0000
@@ -30,6 +30,8 @@
3030
31import psutil31import psutil
3232
33import light_locker_xfsync
34
33''' Settings window for the light-locker '''35''' Settings window for the light-locker '''
3436
35username = GLib.get_user_name()37username = GLib.get_user_name()
@@ -40,7 +42,8 @@
4042
41 def __init__(self):43 def __init__(self):
42 '''Initialize the Light Locker Settings application.'''44 '''Initialize the Light Locker Settings application.'''
43 self.systemwide_desktop_file = "/etc/xdg/autostart/light-locker.desktop"45 self.systemwide_desktop_file = \
46 "/etc/xdg/autostart/light-locker.desktop"
44 self.user_desktop_file = os.path.join(os.path.expanduser('~'),47 self.user_desktop_file = os.path.join(os.path.expanduser('~'),
45 '.config',48 '.config',
46 'autostart',49 'autostart',
@@ -91,32 +94,9 @@
91 self.screenoff_timeout.add_mark(i * 10, 3, None)94 self.screenoff_timeout.add_mark(i * 10, 3, None)
92 self.lock_delay.add_mark(i * 10, 3, None)95 self.lock_delay.add_mark(i * 10, 3, None)
9396
94 ''' if there is a file exists in ~/.config/autostart/ parse that97 self.init_settings()
95 for current settings picked by the user else load in the
96 systemwide '''
97 if os.path.isfile(self.user_desktop_file):
98 self.read_in_desktop(self.user_desktop_file)
99 else:
100 self.read_in_desktop(self.systemwide_desktop_file)
101
102 ''' read in the X11 screensaver settings from bash '''
103 screensaver_output = self.run_command('xset q', check_output=True)
104 screenblank_timeout_grep = re.search(
105 "timeout: *(\d+)", screensaver_output)
106 if screenblank_timeout_grep:
107 screenblank_timeout = re.findall(
108 '\d+', screenblank_timeout_grep.group(1))
109 self.screenblank_timeout.set_value(
110 int(screenblank_timeout[0]) / 60)
111 screenoff_timeout_grep = re.search(
112 "Standby: *(\d+)", screensaver_output)
113 if screenoff_timeout_grep:
114 screenoff_timeout = re.findall(
115 '\d+', screenoff_timeout_grep.group(1))
116 self.screenoff_timeout.set_value(int(screenoff_timeout[0]) / 60)
11798
118 ''' Monitor changes to the settings '''99 ''' Monitor changes to the settings '''
119
120 self.apply.set_sensitive(False)100 self.apply.set_sensitive(False)
121 self.locksettings_changed = False101 self.locksettings_changed = False
122 self.screenblank_timeout.connect(102 self.screenblank_timeout.connect(
@@ -126,6 +106,115 @@
126 self.lock_delay.connect(106 self.lock_delay.connect(
127 "value-changed", self.lock_delay_value_changed_cb)107 "value-changed", self.lock_delay_value_changed_cb)
128108
109# Application Callbacks
110 def screenblank_value_changed_cb(self, gparam):
111 '''Sync screenblank and screenoff settings when values are modified.'''
112 self.apply.set_sensitive(True)
113
114 blank_timeout = int(self.screenblank_timeout.get_value())
115 off_timeout = int(self.screenoff_timeout.get_value())
116
117 ''' screenoff can never be shorter than screenblank-timeout '''
118 if (blank_timeout >= off_timeout) and (off_timeout != 0):
119 self.screenoff_timeout.set_value(blank_timeout)
120
121 def screenoff_value_changed_cb(self, gparam):
122 '''Sync screenblank and screenoff settings when values are modified.'''
123 self.apply.set_sensitive(True)
124
125 blank_timeout = int(self.screenblank_timeout.get_value())
126 off_timeout = int(self.screenoff_timeout.get_value())
127
128 ''' screenoff can never be shorter than screenblank-timeout '''
129 if off_timeout <= blank_timeout:
130 self.screenblank_timeout.set_value(off_timeout)
131
132 def use_lightlocker_cb(self, switch, gparam):
133 '''Update the displayed lock controls when light-locker is enabled or
134 disabled.'''
135 ''' if on then allow for the timeout to be set '''
136 self.locksettings_changed = True
137 self.apply.set_sensitive(True)
138 if switch.get_active():
139 self.lock_delay.set_sensitive(False)
140 self.session_lock_combo.set_sensitive(False)
141 self.lock_on_suspend.set_sensitive(False)
142 else:
143 self.session_lock_combo.set_sensitive(True)
144 self.lock_on_suspend.set_sensitive(True)
145 if self.session_lock_combo.get_active() != 2:
146 self.lock_delay.set_sensitive(True)
147
148 def on_session_lock_combo_changed(self, widget):
149 '''Update the displayed screen blanking controls when locking is
150 enabled or disabled.'''
151 self.locksettings_changed = True
152 self.apply.set_sensitive(True)
153
154 # Check the session lock combo:
155 # 0. lock when screensaver is activated
156 # 1. lock when screensaver is deactivated
157 # 2. never lock
158 active = widget.get_active()
159 self.lock_delay.set_sensitive(active != 2)
160
161 def lock_delay_value_changed_cb(self, gparam):
162 '''Enable saving of lock setting when the delay has been modified.'''
163 self.locksettings_changed = True
164 self.apply.set_sensitive(True)
165
166 def lock_on_suspend_cb(self, widget, gparam):
167 '''Enable saving when locking on suspend is changed.'''
168 self.locksettings_changed = True
169 self.apply.set_sensitive(True)
170
171 def apply_cb(self, button, data=None):
172 '''Apply changes and update the relevant setting files.'''
173 ''' Check whether the autostart-directory exists and if not
174 create it '''
175 autostart_dir = os.path.dirname(self.user_desktop_file)
176 if not os.path.exists(autostart_dir):
177 os.makedirs(autostart_dir)
178
179 self.apply_settings()
180 self.apply.set_sensitive(False)
181
182 def on_window_destroy(self, *args):
183 '''Exit the application when the window is closed.'''
184 Gtk.main_quit()
185
186 def on_close_clicked(self, *args):
187 '''Exit the application when the window is closed.'''
188 Gtk.main_quit()
189
190# Process Management
191 def check_running_process(self, process_name):
192 """Return True if the specified process is active."""
193 # Find the process...
194 for pid in psutil.get_pid_list():
195 p = psutil.Process(pid)
196 if p.username == username:
197 # When found, end the light-locker process.
198 try:
199 if os.path.basename(p.exe) == process_name:
200 return True
201 except psutil._error.AccessDenied:
202 pass
203 return False
204
205 def stop_light_locker(self):
206 """Safely stop the light-locker process."""
207 # Find the process...
208 for pid in psutil.get_pid_list():
209 p = psutil.Process(pid)
210 if p.username == username:
211 # When found, end the light-locker process.
212 try:
213 if os.path.basename(p.exe) == 'light-locker':
214 p.terminate()
215 except psutil._error.AccessDenied:
216 pass
217
129 def run_command(self, cmd, check_output=False):218 def run_command(self, cmd, check_output=False):
130 '''Run a shell command, return its output.'''219 '''Run a shell command, return its output.'''
131 if len(cmd) == 0:220 if len(cmd) == 0:
@@ -137,18 +226,62 @@
137 subprocess.Popen(cmd.split(" "))226 subprocess.Popen(cmd.split(" "))
138 return None227 return None
139228
140 def stop_light_locker(self):229# Settings Parsing
141 """Safely stop the light-locker process."""230 def init_settings(self):
142 # Find the process...231 # Get the Settings, first from light-locker, then override as needed
143 for pid in psutil.get_pid_list():232 ''' if there is a file exists in ~/.config/autostart/ parse that
144 p = psutil.Process(pid)233 for current settings picked by the user else load in the
145 if p.username == username:234 systemwide '''
146 # When found, end the light-locker process.235 if os.path.isfile(self.user_desktop_file):
147 try:236 desktop_file = self.user_desktop_file
148 if os.path.basename(p.exe) == 'light-locker':237 else:
149 p.terminate()238 desktop_file = self.systemwide_desktop_file
150 except psutil._error.AccessDenied:239 settings = self.read_in_desktop(desktop_file)
151 pass240 use_light_locker = settings['light-locker-enabled']
241 lock_after_screensaver = settings['lock-after-screensaver']
242 late_locking = settings['late-locking']
243 lock_on_suspend = settings['lock-on-suspend']
244 lock_time = settings['lock-time']
245 screen_blank_timeout, screen_off_timeout = \
246 self.get_screen_blank_timeout()
247
248 # Replace settings with xfce4-session
249 if self.check_running_process("xfce4-session"):
250 session_sync = light_locker_xfsync.XfceSessionSync()
251 lock_on_suspend = session_sync.get_lock()
252
253 # Replace settings with xfce4-power-manager
254 if self.check_running_process("xfce4-power-manager"):
255 xfpm_sync = light_locker_xfsync.XfpmSync()
256 screen_blank_timeout, screen_off_timeout = xfpm_sync.get_dpms()
257 screen_blank_timeout = self.light_locker_time_down_scaler(
258 screen_blank_timeout)
259 screen_off_timeout = self.light_locker_time_down_scaler(
260 screen_off_timeout)
261
262 # Apply the settings
263 self.use_lightlocker.set_active(use_light_locker)
264 self.session_lock_combo.set_sensitive(use_light_locker)
265 self.lock_on_suspend.set_sensitive(use_light_locker)
266
267 self.lock_delay.set_value(lock_time)
268
269 if lock_after_screensaver:
270 self.lock_delay.set_sensitive(True)
271 if late_locking:
272 self.session_lock_combo.set_active(1)
273 else:
274 self.session_lock_combo.set_active(0)
275 else:
276 self.lock_delay.set_sensitive(False)
277 self.session_lock_combo.set_active(2)
278
279 self.lock_on_suspend.set_active(lock_on_suspend)
280
281 blank = self.light_locker_time_down_scaler(screen_blank_timeout)
282 off = self.light_locker_time_down_scaler(screen_off_timeout)
283 self.screenblank_timeout.set_value(blank)
284 self.screenoff_timeout.set_value(off)
152285
153 def read_in_desktop(self, filepath):286 def read_in_desktop(self, filepath):
154 '''Parse the .desktop file for light-locker settings.'''287 '''Parse the .desktop file for light-locker settings.'''
@@ -156,7 +289,7 @@
156 self.content = f.readlines()289 self.content = f.readlines()
157 for line in self.content:290 for line in self.content:
158 if line.startswith("Exec="):291 if line.startswith("Exec="):
159 self.parse_options(line)292 return self.parse_options(line)
160293
161 def parse_options(self, options_line):294 def parse_options(self, options_line):
162 '''Parse command-line arguments from the Exec line.'''295 '''Parse command-line arguments from the Exec line.'''
@@ -197,107 +330,44 @@
197 if args.lock_on_suspend:330 if args.lock_on_suspend:
198 lock_on_suspend = True331 lock_on_suspend = True
199332
200 # Apply the settings333 settings = dict()
201 self.use_lightlocker.set_active(use_light_locker)334 settings['light-locker-enabled'] = use_light_locker
202 self.session_lock_combo.set_sensitive(use_light_locker)335 settings['lock-after-screensaver'] = lock_after_screensaver
203 self.lock_on_suspend.set_sensitive(use_light_locker)336 settings['late-locking'] = late_locking
204337 settings['lock-on-suspend'] = lock_on_suspend
205 self.lock_delay.set_value(lock_time)338 settings['lock-time'] = lock_time
206339
207 if lock_after_screensaver:340 return settings
208 self.lock_delay.set_sensitive(True)341
209 if late_locking:342 def get_screen_blank_timeout(self):
210 self.session_lock_combo.set_active(1)343 ''' read in the X11 screensaver settings from bash '''
211 else:344 # Defaults
212 self.session_lock_combo.set_active(0)345 screen_blank = 10
213 else:346 screen_off = 15
214 self.lock_delay.set_sensitive(False)347
215 self.session_lock_combo.set_active(2)348 # Get the xset output to parse.
216349 screensaver_output = self.run_command('xset q', check_output=True)
217 self.lock_on_suspend.set_active(lock_on_suspend)350
218351 # Get the Screen-Blank timeout
219 def write_light_locker_file(self, filepath, light_locker_command):352 screenblank_timeout_grep = re.search(
220 '''Write the updated light-locker settings to its .desktop file.'''353 "timeout: *(\d+)", screensaver_output)
221 exec_str = "Exec=%s\n" % light_locker_command354 if screenblank_timeout_grep:
222 with open(filepath, 'w') as f:355 screenblank_timeout = re.findall(
223 for line in self.content:356 '\d+', screenblank_timeout_grep.group(1))
224 if line.startswith("Exec="):357 screen_blank = int(screenblank_timeout[0]) / 60
225 f.write(exec_str)358
226 else:359 # Get the Screen-Off timeout
227 f.write(line)360 screenoff_timeout_grep = re.search(
228361 "Standby: *(\d+)", screensaver_output)
229 def write_screensaver_file(self, filepath, screensaver_command):362 if screenoff_timeout_grep:
230 '''Write the updated screensaver settings to its .desktop file.'''363 screenoff_timeout = re.findall(
231 with open(filepath, 'w') as f:364 '\d+', screenoff_timeout_grep.group(1))
232 f.write(365 screen_off = int(screenoff_timeout[0]) / 60
233 "[Desktop Entry]\n"366
234 "Name=%s\n"367 # Return the current timeout settings
235 "Comment=%s\n"368 return screen_blank, screen_off
236 "Exec=%s\n"369
237 % (_("Screensaver"), _("Set screensaver timeouts"),370# Label Formatters
238 screensaver_command))
239
240 def use_lightlocker_cb(self, switch, gparam):
241 '''Update the displayed lock controls when light-locker is enabled or
242 disabled.'''
243 ''' if on then allow for the timeout to be set '''
244 self.locksettings_changed = True
245 self.apply.set_sensitive(True)
246 if switch.get_active():
247 self.lock_delay.set_sensitive(False)
248 self.session_lock_combo.set_sensitive(False)
249 self.lock_on_suspend.set_sensitive(False)
250 else:
251 self.session_lock_combo.set_sensitive(True)
252 self.lock_on_suspend.set_sensitive(True)
253 if self.session_lock_combo.get_active() != 2:
254 self.lock_delay.set_sensitive(True)
255
256 def on_session_lock_combo_changed(self, widget):
257 '''Update the displayed screen blanking controls when locking is
258 enabled or disabled.'''
259 self.locksettings_changed = True
260 self.apply.set_sensitive(True)
261
262 # Check the session lock combo:
263 # 0. lock when screensaver is activated
264 # 1. lock when screensaver is deactivated
265 # 2. never lock
266 active = widget.get_active()
267 self.lock_delay.set_sensitive(active != 2)
268
269 def lock_on_suspend_cb(self, widget, gparam):
270 '''Enable saving when locking on suspend is changed.'''
271 self.locksettings_changed = True
272 self.apply.set_sensitive(True)
273
274 def screenblank_value_changed_cb(self, gparam):
275 '''Sync screenblank and screenoff settings when values are modified.'''
276 self.apply.set_sensitive(True)
277
278 blank_timeout = int(self.screenblank_timeout.get_value())
279 off_timeout = int(self.screenoff_timeout.get_value())
280
281 ''' screenoff can never be shorter than screenblank-timeout '''
282 if (blank_timeout >= off_timeout) and (off_timeout != 0):
283 self.screenoff_timeout.set_value(blank_timeout)
284
285 def screenoff_value_changed_cb(self, gparam):
286 '''Sync screenblank and screenoff settings when values are modified.'''
287 self.apply.set_sensitive(True)
288
289 blank_timeout = int(self.screenblank_timeout.get_value())
290 off_timeout = int(self.screenoff_timeout.get_value())
291
292 ''' screenoff can never be shorter than screenblank-timeout '''
293 if off_timeout <= blank_timeout:
294 self.screenblank_timeout.set_value(off_timeout)
295
296 def lock_delay_value_changed_cb(self, gparam):
297 '''Enable saving of lock setting when the delay has been modified.'''
298 self.locksettings_changed = True
299 self.apply.set_sensitive(True)
300
301 def screensaver_label_formatter(self, screenblank_timeout, max_value):371 def screensaver_label_formatter(self, screenblank_timeout, max_value):
302 '''Convert timeout values to a more friendly format.'''372 '''Convert timeout values to a more friendly format.'''
303 value = int(screenblank_timeout.get_value())373 value = int(screenblank_timeout.get_value())
@@ -316,6 +386,15 @@
316 formatted_string = self.secs_to_readable(value)386 formatted_string = self.secs_to_readable(value)
317 return formatted_string387 return formatted_string
318388
389 def secs_to_readable(self, seconds):
390 '''Convert seconds to a more friendly format.'''
391 if seconds >= 60:
392 minutes = seconds / 60
393 return ngettext("%d minute", "%d minutes", minutes) % (minutes,)
394 else:
395 return ngettext("%d second", "%d seconds", seconds) % (seconds,)
396
397# Time Scalers
319 def light_locker_time_up_scaler(self, time):398 def light_locker_time_up_scaler(self, time):
320 '''Scale times up.'''399 '''Scale times up.'''
321 if time > 60:400 if time > 60:
@@ -328,49 +407,99 @@
328 time = time / 60 + 60407 time = time / 60 + 60
329 return time408 return time
330409
331 def apply_cb(self, button, data=None):410# Settings Writing
332 '''Apply changes and update the relevant setting files.'''411 def get_updated_settings(self):
333 ''' Check whether the autostart-directory exists and if not412 """Return a dictionary with the updated settings from the GUI."""
334 create it '''
335 autostart_dir = os.path.dirname(self.user_desktop_file)
336 if not os.path.exists(autostart_dir):
337 os.makedirs(autostart_dir)
338
339 # Apply changes.
340 self.apply_light_locker_settings()
341 self.apply_screen_blank_settings()
342
343 self.apply.set_sensitive(False)
344
345 def apply_light_locker_settings(self):
346 '''Apply the light-locker settings'''
347 # Stop any running light-locker processes.
348 self.stop_light_locker()
349
350 # Get the lock-after-screensaver timeout.413 # Get the lock-after-screensaver timeout.
351 session_lock = self.session_lock_combo.get_active()414 session_lock = self.session_lock_combo.get_active()
352 if session_lock == 2: # never lock with screensaver415 if session_lock == 2: # never lock with screensaver
353 late_locking = ""416 late_locking = False
354 timeout = "0"417 lock_delay = 0
355 else:418 else:
356 if session_lock == 0: # lock when screensaver is activated419 if session_lock == 0: # lock when screensaver is activated
357 late_locking = "--no-late-locking"420 late_locking = False
358 if session_lock == 1: # lock when screensaver is deactivated421 if session_lock == 1: # lock when screensaver is deactivated
359 late_locking = "--late-locking"422 late_locking = True
360 lock_delay_scaled = self.light_locker_time_up_scaler(423 lock_delay = self.light_locker_time_up_scaler(
361 int(self.lock_delay.get_value()))424 int(self.lock_delay.get_value()))
362 timeout = str(lock_delay_scaled)425
363 lock_after_screensaver = "--lock-after-screensaver=" + timeout426 # Lock Enabled?
427 lock_enabled = self.use_lightlocker.get_active()
364428
365 # Get the suspend setting.429 # Get the suspend setting.
366 if self.lock_on_suspend.get_active():430 lock_on_suspend = self.lock_on_suspend.get_active()
431
432 # Get the screen-blank and screen-off timeout.
433 screenblank_timeout = \
434 int(self.screenblank_timeout.get_value()) * 60
435 screenoff_timeout = int(self.screenoff_timeout.get_value()) * 60
436
437 settings = {
438 "lock-enabled": lock_enabled,
439 "late-locking": late_locking,
440 "lock-after-screensaver": lock_delay,
441 "lock-on-suspend": lock_on_suspend,
442 "screen-blank-timeout": screenblank_timeout,
443 "screen-off-timeout": screenoff_timeout
444 }
445
446 return settings
447
448 def apply_settings(self):
449 """Apply updated settings."""
450 # Get the current settings from the GUI.
451 settings = self.get_updated_settings()
452 lock_on_suspend = settings['lock-on-suspend']
453
454 # If xfce4-sesssion is running, sync the lock-on-suspend setting.
455 if self.check_running_process("xfce4-session"):
456 session_sync = light_locker_xfsync.XfceSessionSync()
457 session_sync.set_lock(lock_on_suspend)
458
459 # If xfce4-session manages locking, disable it for light-locker.
460 settings['lock-on-suspend'] = False
461
462 # If xfce4-power-manager is running, sync the DPMS settings.
463 if self.check_running_process("xfce4-power-manager"):
464 xfpm_sync = light_locker_xfsync.XfpmSync()
465 screen_off = settings['screen-off-timeout'] / 60
466 screen_blank = settings['screen-blank-timeout'] / 60
467 xfpm_sync.set_dpms(screen_blank, screen_off)
468 xfpm_sync.set_lock(lock_on_suspend)
469
470 # If xfpm manages locking, disable it for light-locker.
471 settings['lock-on-suspend'] = False
472
473 # Apply the remaining settings to light-locker.
474 self.apply_light_locker_settings(settings)
475 self.apply_screen_blank_settings(settings)
476
477 def apply_light_locker_settings(self, settings):
478 '''Apply the light-locker settings'''
479 # Stop any running light-locker processes.
480 self.stop_light_locker()
481
482 lock_enabled = settings['lock-enabled']
483 late_locking = settings['late-locking']
484 lock_on_suspend = settings['lock-on-suspend']
485 lock_after_screensaver = settings['lock-after-screensaver']
486
487 if late_locking:
488 late_locking = "--late-locking"
489 else:
490 late_locking = "--no-late-locking"
491
492 if lock_on_suspend:
367 lock_on_suspend = "--lock-on-suspend"493 lock_on_suspend = "--lock-on-suspend"
368 else:494 else:
369 lock_on_suspend = "--no-lock-on-suspend"495 lock_on_suspend = "--no-lock-on-suspend"
370496
497 lock_after_screensaver = "--lock-after-screensaver=%i" % \
498 lock_after_screensaver
499
371 # Build the light-locker command.500 # Build the light-locker command.
372 light_locker_exec = ""501 light_locker_exec = ""
373 if self.use_lightlocker.get_active():502 if lock_enabled:
374 light_locker_exec = \503 light_locker_exec = \
375 "light-locker %s %s %s" % (lock_after_screensaver,504 "light-locker %s %s %s" % (lock_after_screensaver,
376 lock_on_suspend, late_locking)505 lock_on_suspend, late_locking)
@@ -381,16 +510,14 @@
381 # Execute the updated light-locker command.510 # Execute the updated light-locker command.
382 self.run_command(light_locker_exec)511 self.run_command(light_locker_exec)
383512
384 def apply_screen_blank_settings(self):513 def apply_screen_blank_settings(self, settings):
385 '''Apply the screen blank settings.'''514 '''Apply the screen blank settings.'''
386 # Get the screen-blank and screen-off timeout.515 screenblank_timeout = settings['screen-blank-timeout']
387 screenblank_timeout = str(516 screenoff_timeout = settings['screen-off-timeout']
388 int(self.screenblank_timeout.get_value()) * 60)
389 screenoff_timeout = str(int(self.screenoff_timeout.get_value()) * 60)
390517
391 # Build the screen-blank/off command.518 # Build the screen-blank/off command.
392 screensaver_exec = \519 screensaver_exec = \
393 "xset s %s dpms %s 0 0" % (screenblank_timeout, screenoff_timeout)520 "xset s %i dpms %i 0 0" % (screenblank_timeout, screenoff_timeout)
394521
395 # Execute the updated screensaver command.522 # Execute the updated screensaver command.
396 self.run_command(screensaver_exec)523 self.run_command(screensaver_exec)
@@ -399,24 +526,26 @@
399 self.write_screensaver_file(526 self.write_screensaver_file(
400 self.screenblank_timeout_desktop_file, screensaver_exec)527 self.screenblank_timeout_desktop_file, screensaver_exec)
401528
402 # Does this command really need to be run after we run the right one?529 def write_light_locker_file(self, filepath, light_locker_command):
403 #self.run_command('xset s ' + screenblank_timeout)530 '''Write the updated light-locker settings to its .desktop file.'''
404531 exec_str = "Exec=%s\n" % light_locker_command
405 def secs_to_readable(self, seconds):532 with open(filepath, 'w') as f:
406 '''Convert seconds to a more friendly format.'''533 for line in self.content:
407 if seconds >= 60:534 if line.startswith("Exec="):
408 minutes = seconds / 60535 f.write(exec_str)
409 return ngettext("%d minute", "%d minutes", minutes) % (minutes,)536 else:
410 else:537 f.write(line)
411 return ngettext("%d second", "%d seconds", seconds) % (seconds,)538
412539 def write_screensaver_file(self, filepath, screensaver_command):
413 def on_window_destroy(self, *args):540 '''Write the updated screensaver settings to its .desktop file.'''
414 '''Exit the application when the window is closed.'''541 with open(filepath, 'w') as f:
415 Gtk.main_quit()542 f.write(
416543 "[Desktop Entry]\n"
417 def on_close_clicked(self, *args):544 "Name=%s\n"
418 '''Exit the application when the window is closed.'''545 "Comment=%s\n"
419 Gtk.main_quit()546 "Exec=%s\n"
547 % (_("Screensaver"), _("Set screensaver timeouts"),
548 screensaver_command))
420549
421550
422if __name__ == "__main__":551if __name__ == "__main__":
423552
=== added file 'light-locker-settings/light_locker_xfsync.py'
--- light-locker-settings/light_locker_xfsync.py 1970-01-01 00:00:00 +0000
+++ light-locker-settings/light_locker_xfsync.py 2014-04-05 00:57:27 +0000
@@ -0,0 +1,190 @@
1import subprocess
2
3
4def convert_value(value):
5 """Make output agreeable to xfconf."""
6 if isinstance(value, bool):
7 if value is True:
8 value = 'true'
9 else:
10 value = 'false'
11 return value
12
13
14def xfconf_init_property(channel, p_name, p_type, initial_value):
15 """Initialize the specified xfconf property."""
16 p_type = p_type.__name__
17 initial_value = str(convert_value(initial_value))
18 cmd = 'xfconf-query -c %s -p %s -n -s %s -t %s' % (channel, p_name,
19 initial_value, p_type)
20 subprocess.call(cmd.split())
21
22
23def xfconf_list_properties(channel):
24 """List the properties defined for the given channel."""
25 settings = dict()
26 cmd = 'xfconf-query -c %s -l -v' % channel
27 for line in subprocess.check_output(cmd, shell=True).split('\n'):
28 try:
29 key, value = line.split(None, 1)
30 except ValueError:
31 key = line.strip()
32 value = ""
33 if str.isdigit(value):
34 value = int(value)
35 elif value.lower() in ['true', 'false']:
36 value = value.lower() == 'true'
37 else:
38 value = str(value)
39 settings[key] = value
40 return settings
41
42
43def xfconf_set_property(channel, prop, value):
44 """Set the specified xfconf property."""
45 value = str(value).lower()
46 cmd = 'xfconf-query -c %s -p %s -s %s' % (channel, prop, value)
47 subprocess.call(cmd.split())
48
49
50class XfceSessionSync():
51 """
52 Class to set/get xfce4-session lock settings.
53 """
54 def __init__(self):
55 """Initialize the XfceSessionSync instance."""
56 self.settings = {'/shutdown/LockScreen': False}
57 current_settings = self._get_xfce4_session_settings()
58 self._update_settings(current_settings)
59 self._init_xfconf_properties(current_settings)
60
61 def _init_xfconf_properties(self, current_settings):
62 """If xfce4-session has not been configured, some of its properties
63 may not exist. Create any missing properties."""
64 channel = 'xfce4-session'
65 for key, value in list(self.settings.items()):
66 if key not in list(current_settings.keys()):
67 xfconf_init_property(channel, key, type(value), value)
68
69 def _get_xfce4_session_settings(self):
70 """Return a dictionary of the xfce4-session settings."""
71 return xfconf_list_properties('xfce4-session')
72
73 def _update_settings(self, settings):
74 """Update the internal settings."""
75 for key, value in list(settings.items()):
76 if key in list(self.settings.keys()):
77 self.settings[key] = value
78
79 def get_lock(self):
80 """Return True if Lock on Sleep is enabled."""
81 return self.settings['/shutdown/LockScreen']
82
83 def set_lock(self, value):
84 """Set the Lock on Sleep setting."""
85 xfconf_set_property('xfce4-session', '/shutdown/LockScreen', value)
86 self.settings['/shutdown/LockScreen'] = value
87
88
89class XfpmSync():
90 """
91 Class to set/get xserver dpms timings via xfpm, thus keeping xfpm in sync.
92 """
93 def __init__(self):
94 '''Following settings should concur with xfpm defaults'''
95 self.settings = {'/xfce4-power-manager/dpms-enabled': True,
96 '/xfce4-power-manager/dpms-on-battery-sleep': 5,
97 '/xfce4-power-manager/dpms-on-battery-off': 10,
98 '/xfce4-power-manager/dpms-on-ac-sleep': 10,
99 '/xfce4-power-manager/dpms-on-ac-off': 15,
100 '/xfce4-power-manager/lock-screen-suspend-hibernate':
101 False
102 }
103 current_settings = self._get_xfpm_settings()
104 self._update_settings(current_settings)
105 self._init_xfconf_properties(current_settings)
106
107 def _init_xfconf_properties(self, current_settings):
108 """
109 If xfpm has never been used, some xfconf channel properties may not be
110 set. Ensures that we don't get complains about missing properties.
111 """
112 channel = 'xfce4-power-manager'
113 for key, value in list(self.settings.items()):
114 if key not in list(current_settings.keys()):
115 xfconf_init_property(channel, key, type(value), value)
116
117 def _get_power_state(self):
118 """
119 Get the power state from /sys/class/power_supply/AC/online if present.
120 Returns:
121 1: AC connected
122 0: AC disconnected
123 (Do we always have this file, if a battery is present?)
124 """
125 try:
126 with open('/sys/class/power_supply/AC/online', 'rb') as f:
127 pstate = int(f.readline())
128 except:
129 pstate = 1
130
131 return pstate
132
133 def _get_xfpm_settings(self):
134 """Returns xfpm xfconf settings as string"""
135 return xfconf_list_properties('xfce4-power-manager')
136
137 def _update_settings(self, settings):
138 """Update the internal settings."""
139 for key, value in list(settings.items()):
140 if key in list(self.settings.keys()):
141 self.settings[key] = value
142
143 def _get_timings_scope(self):
144 """Return the timings scope (Batter or AC)."""
145 if self._get_power_state() == 0:
146 sleep = '/xfce4-power-manager/dpms-on-battery-sleep'
147 off = '/xfce4-power-manager/dpms-on-battery-off'
148 else: # we assume on ac for all other cases
149 sleep = '/xfce4-power-manager/dpms-on-ac-sleep'
150 off = '/xfce4-power-manager/dpms-on-ac-off'
151
152 return sleep, off
153
154 def set_dpms(self, sleep_time, off_time):
155 """
156 For most monitors *_sleep and *_off have probably the same outcome.
157 So, basically we set the lower value for the corresponding power state.
158 But xfpm ignores settings not in:
159 0 <= *_sleep <= *_off
160 or
161 *_off == 0 and *_sleep >= 0
162 i.e. sometimes we have to adapt both.
163 """
164 sleep, off = self._get_timings_scope()
165
166 if not (sleep_time == 0 and off_time == 0):
167 if sleep_time + 1 > off_time:
168 off_time = sleep_time + 1
169
170 xfconf_set_property('xfce4-power-manager', off, off_time)
171 self.settings[off] = off_time
172
173 xfconf_set_property('xfce4-power-manager', sleep, sleep_time)
174 self.settings[sleep] = sleep_time
175
176 def get_dpms(self):
177 """Return the current DPMS timeouts."""
178 sleep, off = self._get_timings_scope()
179 return self.settings[sleep], self.settings[off]
180
181 def get_lock(self):
182 """Return True if Lock on Suspend/Hibernate is enabled."""
183 prop_name = '/xfce4-power-manager/lock-screen-suspend-hibernate'
184 return self.settings[prop_name]
185
186 def set_lock(self, value):
187 """Set the Lock on Suspend/Hibernate setting."""
188 prop_name = '/xfce4-power-manager/lock-screen-suspend-hibernate'
189 xfconf_set_property('xfce4-power-manager', prop_name, value)
190 self.settings[prop_name] = value
0191
=== modified file 'po/ca.po'
--- po/ca.po 2014-03-24 22:31:55 +0000
+++ po/ca.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/de.po'
--- po/de.po 2014-03-24 22:31:55 +0000
+++ po/de.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/en_AU.po'
--- po/en_AU.po 2014-03-24 22:31:55 +0000
+++ po/en_AU.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:12+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/es.po'
--- po/es.po 2014-03-24 22:31:55 +0000
+++ po/es.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/fi.po'
--- po/fi.po 2014-03-24 22:31:55 +0000
+++ po/fi.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/fr.po'
--- po/fr.po 2014-03-24 22:31:55 +0000
+++ po/fr.po 2014-04-05 00:57:27 +0000
@@ -8,14 +8,14 @@
8"Project-Id-Version: light-locker-settings\n"8"Project-Id-Version: light-locker-settings\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-03-23 23:00-0400\n"10"POT-Creation-Date: 2014-03-23 23:00-0400\n"
11"PO-Revision-Date: 2014-03-16 03:52+0000\n"11"PO-Revision-Date: 2014-03-24 11:08+0000\n"
12"Last-Translator: Urien Desterres <urien.desterres@gmail.com>\n"12"Last-Translator: Urien Desterres <urien.desterres@gmail.com>\n"
13"Language-Team: French <fr@li.org>\n"13"Language-Team: French <fr@li.org>\n"
14"MIME-Version: 1.0\n"14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n > 1;\n"17"Plural-Forms: nplurals=2; plural=n > 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
@@ -29,11 +29,11 @@
2929
30#: ../light-locker-settings/light-locker-settings.glade.h:130#: ../light-locker-settings/light-locker-settings.glade.h:1
31msgid "When the screensaver is activated"31msgid "When the screensaver is activated"
32msgstr ""32msgstr "Lorsque l’économiseur d’écran est activé"
3333
34#: ../light-locker-settings/light-locker-settings.glade.h:234#: ../light-locker-settings/light-locker-settings.glade.h:2
35msgid "When the screensaver is deactivated"35msgid "When the screensaver is deactivated"
36msgstr ""36msgstr "Lorsque l’économiseur d’écran est désactivé"
3737
38#: ../light-locker-settings/light-locker-settings.glade.h:338#: ../light-locker-settings/light-locker-settings.glade.h:3
39#: ../light-locker-settings/light-locker-settings.py:30539#: ../light-locker-settings/light-locker-settings.py:305
@@ -63,7 +63,7 @@
6363
64#: ../light-locker-settings/light-locker-settings.glade.h:964#: ../light-locker-settings/light-locker-settings.glade.h:9
65msgid "Automatically lock the session"65msgid "Automatically lock the session"
66msgstr ""66msgstr "Verrouiller automatiquement la session"
6767
68#: ../light-locker-settings/light-locker-settings.glade.h:1068#: ../light-locker-settings/light-locker-settings.glade.h:10
69msgid "Delay locking after screensaver for"69msgid "Delay locking after screensaver for"
@@ -80,7 +80,7 @@
8080
81#: ../light-locker-settings/light-locker-settings.glade.h:1381#: ../light-locker-settings/light-locker-settings.glade.h:13
82msgid "Lock on suspend"82msgid "Lock on suspend"
83msgstr ""83msgstr "Verrouiller lors de la mise en veille"
8484
85#: ../light-locker-settings/light-locker-settings.glade.h:1485#: ../light-locker-settings/light-locker-settings.glade.h:14
86msgid "Apply"86msgid "Apply"
8787
=== modified file 'po/ja.po'
--- po/ja.po 2014-03-24 22:31:55 +0000
+++ po/ja.po 2014-04-05 00:57:27 +0000
@@ -8,14 +8,14 @@
8"Project-Id-Version: light-locker-settings\n"8"Project-Id-Version: light-locker-settings\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-03-23 23:00-0400\n"10"POT-Creation-Date: 2014-03-23 23:00-0400\n"
11"PO-Revision-Date: 2014-03-20 12:58+0000\n"11"PO-Revision-Date: 2014-03-31 11:20+0000\n"
12"Last-Translator: zriv <Unknown>\n"12"Last-Translator: zriv <Unknown>\n"
13"Language-Team: Japanese <ja@li.org>\n"13"Language-Team: Japanese <ja@li.org>\n"
14"MIME-Version: 1.0\n"14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=1; plural=0;\n"17"Plural-Forms: nplurals=1; plural=0;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-04-01 07:21+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
@@ -29,11 +29,11 @@
2929
30#: ../light-locker-settings/light-locker-settings.glade.h:130#: ../light-locker-settings/light-locker-settings.glade.h:1
31msgid "When the screensaver is activated"31msgid "When the screensaver is activated"
32msgstr ""32msgstr "スクリーンセーバー起動後にする"
3333
34#: ../light-locker-settings/light-locker-settings.glade.h:234#: ../light-locker-settings/light-locker-settings.glade.h:2
35msgid "When the screensaver is deactivated"35msgid "When the screensaver is deactivated"
36msgstr ""36msgstr "スクリーンセーバー終了後にする"
3737
38#: ../light-locker-settings/light-locker-settings.glade.h:338#: ../light-locker-settings/light-locker-settings.glade.h:3
39#: ../light-locker-settings/light-locker-settings.py:30539#: ../light-locker-settings/light-locker-settings.py:305
@@ -63,7 +63,7 @@
6363
64#: ../light-locker-settings/light-locker-settings.glade.h:964#: ../light-locker-settings/light-locker-settings.glade.h:9
65msgid "Automatically lock the session"65msgid "Automatically lock the session"
66msgstr ""66msgstr "自動的にセッションのロックを"
6767
68#: ../light-locker-settings/light-locker-settings.glade.h:1068#: ../light-locker-settings/light-locker-settings.glade.h:10
69msgid "Delay locking after screensaver for"69msgid "Delay locking after screensaver for"
@@ -79,7 +79,7 @@
7979
80#: ../light-locker-settings/light-locker-settings.glade.h:1380#: ../light-locker-settings/light-locker-settings.glade.h:13
81msgid "Lock on suspend"81msgid "Lock on suspend"
82msgstr ""82msgstr "サスペンドする時にロックする"
8383
84#: ../light-locker-settings/light-locker-settings.glade.h:1484#: ../light-locker-settings/light-locker-settings.glade.h:14
85msgid "Apply"85msgid "Apply"
8686
=== modified file 'po/nl.po'
--- po/nl.po 2014-03-24 22:31:55 +0000
+++ po/nl.po 2014-04-05 00:57:27 +0000
@@ -8,14 +8,14 @@
8"Project-Id-Version: light-locker-settings\n"8"Project-Id-Version: light-locker-settings\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-03-23 23:00-0400\n"10"POT-Creation-Date: 2014-03-23 23:00-0400\n"
11"PO-Revision-Date: 2014-03-16 03:51+0000\n"11"PO-Revision-Date: 2014-03-29 10:53+0000\n"
12"Last-Translator: Light Locker Settings Team <Unknown>\n"12"Last-Translator: Pjotr12345 <Unknown>\n"
13"Language-Team: Dutch <nl@li.org>\n"13"Language-Team: Dutch <nl@li.org>\n"
14"MIME-Version: 1.0\n"14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-30 06:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
@@ -29,11 +29,11 @@
2929
30#: ../light-locker-settings/light-locker-settings.glade.h:130#: ../light-locker-settings/light-locker-settings.glade.h:1
31msgid "When the screensaver is activated"31msgid "When the screensaver is activated"
32msgstr ""32msgstr "Wanneer de schermbeveiliging is ingeschakeld"
3333
34#: ../light-locker-settings/light-locker-settings.glade.h:234#: ../light-locker-settings/light-locker-settings.glade.h:2
35msgid "When the screensaver is deactivated"35msgid "When the screensaver is deactivated"
36msgstr ""36msgstr "Wanneer de schermbeveiliging is uitgeschakeld"
3737
38#: ../light-locker-settings/light-locker-settings.glade.h:338#: ../light-locker-settings/light-locker-settings.glade.h:3
39#: ../light-locker-settings/light-locker-settings.py:30539#: ../light-locker-settings/light-locker-settings.py:305
@@ -63,7 +63,7 @@
6363
64#: ../light-locker-settings/light-locker-settings.glade.h:964#: ../light-locker-settings/light-locker-settings.glade.h:9
65msgid "Automatically lock the session"65msgid "Automatically lock the session"
66msgstr ""66msgstr "Sessie automatisch vergrendelen"
6767
68#: ../light-locker-settings/light-locker-settings.glade.h:1068#: ../light-locker-settings/light-locker-settings.glade.h:10
69msgid "Delay locking after screensaver for"69msgid "Delay locking after screensaver for"
@@ -80,7 +80,7 @@
8080
81#: ../light-locker-settings/light-locker-settings.glade.h:1381#: ../light-locker-settings/light-locker-settings.glade.h:13
82msgid "Lock on suspend"82msgid "Lock on suspend"
83msgstr ""83msgstr "Vergrendelen bij pauzestand"
8484
85#: ../light-locker-settings/light-locker-settings.glade.h:1485#: ../light-locker-settings/light-locker-settings.glade.h:14
86msgid "Apply"86msgid "Apply"
8787
=== modified file 'po/pl.po'
--- po/pl.po 2014-03-24 22:31:55 +0000
+++ po/pl.po 2014-04-05 00:57:27 +0000
@@ -8,7 +8,7 @@
8"Project-Id-Version: light-locker-settings\n"8"Project-Id-Version: light-locker-settings\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-03-23 23:00-0400\n"10"POT-Creation-Date: 2014-03-23 23:00-0400\n"
11"PO-Revision-Date: 2014-03-16 03:49+0000\n"11"PO-Revision-Date: 2014-03-28 14:47+0000\n"
12"Last-Translator: Piotr Strębski <strebski@o2.pl>\n"12"Last-Translator: Piotr Strębski <strebski@o2.pl>\n"
13"Language-Team: Polish <pl@li.org>\n"13"Language-Team: Polish <pl@li.org>\n"
14"MIME-Version: 1.0\n"14"MIME-Version: 1.0\n"
@@ -16,7 +16,7 @@
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "17"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
18"|| n%100>=20) ? 1 : 2;\n"18"|| n%100>=20) ? 1 : 2;\n"
19"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"19"X-Launchpad-Export-Date: 2014-03-29 07:45+0000\n"
20"X-Generator: Launchpad (build 16967)\n"20"X-Generator: Launchpad (build 16967)\n"
2121
22#: ../light-locker-settings.desktop.in.h:122#: ../light-locker-settings.desktop.in.h:1
@@ -30,11 +30,11 @@
3030
31#: ../light-locker-settings/light-locker-settings.glade.h:131#: ../light-locker-settings/light-locker-settings.glade.h:1
32msgid "When the screensaver is activated"32msgid "When the screensaver is activated"
33msgstr ""33msgstr "Gdy wygaszacz ekranu jest włączony"
3434
35#: ../light-locker-settings/light-locker-settings.glade.h:235#: ../light-locker-settings/light-locker-settings.glade.h:2
36msgid "When the screensaver is deactivated"36msgid "When the screensaver is deactivated"
37msgstr ""37msgstr "Gdy wygaszacz ekranu jest wyłączony"
3838
39#: ../light-locker-settings/light-locker-settings.glade.h:339#: ../light-locker-settings/light-locker-settings.glade.h:3
40#: ../light-locker-settings/light-locker-settings.py:30540#: ../light-locker-settings/light-locker-settings.py:305
@@ -64,7 +64,7 @@
6464
65#: ../light-locker-settings/light-locker-settings.glade.h:965#: ../light-locker-settings/light-locker-settings.glade.h:9
66msgid "Automatically lock the session"66msgid "Automatically lock the session"
67msgstr ""67msgstr "Automatycznie blokuj sesję"
6868
69#: ../light-locker-settings/light-locker-settings.glade.h:1069#: ../light-locker-settings/light-locker-settings.glade.h:10
70msgid "Delay locking after screensaver for"70msgid "Delay locking after screensaver for"
@@ -80,7 +80,7 @@
8080
81#: ../light-locker-settings/light-locker-settings.glade.h:1381#: ../light-locker-settings/light-locker-settings.glade.h:13
82msgid "Lock on suspend"82msgid "Lock on suspend"
83msgstr ""83msgstr "Zablokuj po wybudzeniu"
8484
85#: ../light-locker-settings/light-locker-settings.glade.h:1485#: ../light-locker-settings/light-locker-settings.glade.h:14
86msgid "Apply"86msgid "Apply"
@@ -99,15 +99,17 @@
99#, python-format99#, python-format
100msgid "%d minute"100msgid "%d minute"
101msgid_plural "%d minutes"101msgid_plural "%d minutes"
102msgstr[0] ""102msgstr[0] "%d minuta"
103msgstr[1] ""103msgstr[1] "%d minuty"
104msgstr[2] "%d minut"
104105
105#: ../light-locker-settings/light-locker-settings.py:411106#: ../light-locker-settings/light-locker-settings.py:411
106#, python-format107#, python-format
107msgid "%d second"108msgid "%d second"
108msgid_plural "%d seconds"109msgid_plural "%d seconds"
109msgstr[0] ""110msgstr[0] "%d sekunda"
110msgstr[1] ""111msgstr[1] "%d sekundy"
112msgstr[2] "%d sekund"
111113
112#~ msgid "Lock automatically after screensaver"114#~ msgid "Lock automatically after screensaver"
113#~ msgstr "Automatycznie zablokuj po wygaszaczu ekranu"115#~ msgstr "Automatycznie zablokuj po wygaszaczu ekranu"
114116
=== modified file 'po/pt.po'
--- po/pt.po 2014-03-24 22:31:55 +0000
+++ po/pt.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/pt_BR.po'
--- po/pt_BR.po 2014-03-24 22:31:55 +0000
+++ po/pt_BR.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n > 1;\n"17"Plural-Forms: nplurals=2; plural=n > 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/pt_PT.po'
--- po/pt_PT.po 2014-03-24 22:31:55 +0000
+++ po/pt_PT.po 2014-04-05 00:57:27 +0000
@@ -15,7 +15,7 @@
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18"X-Launchpad-Export-Date: 2014-03-24 07:12+0000\n"18"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
19"X-Generator: Launchpad (build 16967)\n"19"X-Generator: Launchpad (build 16967)\n"
2020
21#: ../light-locker-settings.desktop.in.h:121#: ../light-locker-settings.desktop.in.h:1
2222
=== modified file 'po/ru.po'
--- po/ru.po 2014-03-24 22:31:55 +0000
+++ po/ru.po 2014-04-05 00:57:27 +0000
@@ -16,7 +16,7 @@
16"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "17"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
18"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"18"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19"X-Launchpad-Export-Date: 2014-03-24 07:11+0000\n"19"X-Launchpad-Export-Date: 2014-03-25 07:33+0000\n"
20"X-Generator: Launchpad (build 16967)\n"20"X-Generator: Launchpad (build 16967)\n"
2121
22#: ../light-locker-settings.desktop.in.h:122#: ../light-locker-settings.desktop.in.h:1

Subscribers

People subscribed via source and target branches

to all changes: