[pitivi] prefs: Initialize labels only once
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] prefs: Initialize labels only once
- Date: Tue, 27 Sep 2016 08:49:39 +0000 (UTC)
commit 46582caaf04419e9ff2344da4d989129eed8f598
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Thu Sep 15 23:13:19 2016 +0200
prefs: Initialize labels only once
Reviewed-by: Jakub Brindza <jakub brindza gmail com>
Differential Revision: https://phabricator.freedesktop.org/D1312
pitivi/dialogs/prefs.py | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/dialogs/prefs.py b/pitivi/dialogs/prefs.py
index b5e1708..6e4b037 100644
--- a/pitivi/dialogs/prefs.py
+++ b/pitivi/dialogs/prefs.py
@@ -434,7 +434,14 @@ class CustomShortcutDialog(Gtk.Dialog):
# Initialise all potential widgets used in the dialog.
self.accelerator_label = Gtk.Label()
self.currently_used = Gtk.Label()
+ self.currently_used.set_text(_("This is the currently set accelerator"
+ " for this shortcut.\n You may want to"
+ " change it to something else."))
self.invalid_used = Gtk.Label()
+ self.invalid_used.set_text(_("The accelerator you are trying to set"
+ " might interfere with typing.\n"
+ " Try using Control, Shift or Alt"
+ " with some other key, please."))
self.conflicting_action = None
self.conflict_label = Gtk.Label()
self.apply_button = Gtk.Button()
@@ -479,17 +486,7 @@ class CustomShortcutDialog(Gtk.Dialog):
self.accelerator_label.set_markup("<span size='20000'><b>%s</b></span>"
% accelerator)
equal_accelerators = self.check_equal_to_set(custom_keyval, custom_mask)
- if equal_accelerators:
- self.currently_used.set_markup(_("This is the currently set accelerator "
- "for this shortcut.\n You may want to "
- "change it to something else."))
-
valid = Gtk.accelerator_valid(custom_keyval, custom_mask)
- if not valid:
- self.invalid_used.set_markup(_("The accelerator you are trying to set "
- "might interfere with typing.\n "
- "Try using Control, Shift or Alt "
- "with some other key, please."))
self.conflicting_action = self.app.shortcuts.get_conflicting_action(
self.customised_item.action_name, custom_keyval, custom_mask)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]