[pitivi] tabsmanager: Use the same config sections under all locales



commit 9897ad51c27796ccac5ce9805ff0abe2f078926c
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun Mar 4 20:06:37 2018 +0100

    tabsmanager: Use the same config sections under all locales
    
    Using translated strings for config section names leads to encoding
    problems.
    
    The config sections are only for advanced users, having them always in
    Eenglish should not be a problem.
    
    Fixes #2157

 pitivi/mainwindow.py  | 10 +++++-----
 pitivi/tabsmanager.py |  3 +--
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index eab4de6c..4327547a 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -238,9 +238,9 @@ class MainWindow(Gtk.ApplicationWindow, Loggable):
         self.main_tabs = BaseTabs(self.app)
         self.medialibrary = MediaLibraryWidget(self.app)
         self.effectlist = EffectListWidget(self.app)
-        self.main_tabs.append_page(
+        self.main_tabs.append_page("Media Library",
             self.medialibrary, Gtk.Label(label=_("Media Library")))
-        self.main_tabs.append_page(
+        self.main_tabs.append_page("Effect Library",
             self.effectlist, Gtk.Label(label=_("Effect Library")))
         self.medialibrary.connect('play', self._mediaLibraryPlayCb)
         self.medialibrary.show()
@@ -251,11 +251,11 @@ class MainWindow(Gtk.ApplicationWindow, Loggable):
         self.clipconfig = ClipProperties(self.app)
         self.trans_list = TransitionsListWidget(self.app)
         self.title_editor = TitleEditor(self.app)
-        self.context_tabs.append_page(
+        self.context_tabs.append_page("Clip",
             self.clipconfig, Gtk.Label(label=_("Clip")))
-        self.context_tabs.append_page(
+        self.context_tabs.append_page("Transition",
             self.trans_list, Gtk.Label(label=_("Transition")))
-        self.context_tabs.append_page(
+        self.context_tabs.append_page("Title",
             self.title_editor.widget, Gtk.Label(label=_("Title")))
         # Show by default the Title tab, as the Clip and Transition tabs
         # are useful only when a clip or transition is selected, but
diff --git a/pitivi/tabsmanager.py b/pitivi/tabsmanager.py
index 3a9063ec..5126a206 100644
--- a/pitivi/tabsmanager.py
+++ b/pitivi/tabsmanager.py
@@ -45,8 +45,7 @@ class BaseTabs(Gtk.Notebook, Loggable):
         notebook_widget_settings.props.gtk_dnd_drag_threshold = 1
 
     # pylint: disable=arguments-differ
-    def append_page(self, child, label):
-        child_name = label.get_text()
+    def append_page(self, child_name, child, label):
         Gtk.Notebook.append_page(self, child, label)
         self._set_child_properties(child, label)
         label.show()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]