[pitivi: 4/5] Move UI files to the data/ui directory.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 4/5] Move UI files to the data/ui directory.
- Date: Fri, 3 Jun 2011 19:16:28 +0000 (UTC)
commit c40a5aa22d90bf6b608798cd29f1dcd8a660a627
Author: Stéphane Maniaci <stephane maniaci gmail com>
Date: Mon May 16 19:01:42 2011 -0700
Move UI files to the data/ui directory.
configure.ac | 1 +
data/Makefile.am | 2 +-
data/ui/Makefile.am | 16 ++++++++++++++
.../ui/cam_capture.glade => data/ui/cam_capture.ui | 0
.../ui/elementsettingsdialog.ui | 0
.../ui/encodingdialog.ui | 0
.../ui/encodingprogress.ui | 0
.../ui/filelisterrordialog.ui | 0
{pitivi => data}/ui/mainwindow.xml | 0
.../ui/net_capture.glade => data/ui/net_capture.ui | 0
.../ui/pluginmanagerdialog.ui | 0
.../ui/projectsettings.ui | 0
.../ui/screencast_manager.ui | 0
.../ui/startupwizard.ui | 0
pitivi/ui/Makefile.am | 15 -------------
pitivi/ui/encodingdialog.py | 2 +-
pitivi/ui/encodingprogress.py | 2 +-
pitivi/ui/filelisterrordialog.py | 2 +-
pitivi/ui/glade.py | 6 +++-
pitivi/ui/gstwidget.py | 2 +-
pitivi/ui/mainwindow.py | 9 +------
pitivi/ui/netstream_managerdialog.py | 9 +------
pitivi/ui/pluginmanagerdialog.py | 8 +-----
pitivi/ui/projectsettings.py | 2 +-
pitivi/ui/screencast_managerdialog.py | 8 +-----
pitivi/ui/startupwizard.py | 9 +------
pitivi/ui/webcam_managerdialog.py | 2 +-
po/POTFILES.in | 22 +++++++++----------
28 files changed, 48 insertions(+), 69 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b7b5de6..aade2d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,4 +100,5 @@ data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/scalable/Makefile
data/pixmaps/Makefile
+data/ui/Makefile
)
diff --git a/data/Makefile.am b/data/Makefile.am
index 0d7ca33..d28c134 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS=icons pixmaps
+SUBDIRS=icons pixmaps ui
desktopdir = $(datadir)/applications
desktop_in_files = pitivi.desktop.in
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
new file mode 100644
index 0000000..4d9282e
--- /dev/null
+++ b/data/ui/Makefile.am
@@ -0,0 +1,16 @@
+uidir = $(pkgdatadir)/ui
+ui_DATA = \
+ elementsettingsdialog.ui \
+ cam_capture.ui \
+ encodingdialog.ui \
+ encodingprogress.ui \
+ filelisterrordialog.ui \
+ mainwindow.xml \
+ net_capture.ui \
+ projectsettings.ui \
+ pluginmanagerdialog.ui \
+ screencast_manager.ui \
+ startupwizard.ui
+
+EXTRA_DIST = \
+ $(ui_DATA)
\ No newline at end of file
diff --git a/pitivi/ui/cam_capture.glade b/data/ui/cam_capture.ui
similarity index 100%
rename from pitivi/ui/cam_capture.glade
rename to data/ui/cam_capture.ui
diff --git a/pitivi/ui/elementsettingsdialog.glade b/data/ui/elementsettingsdialog.ui
similarity index 100%
rename from pitivi/ui/elementsettingsdialog.glade
rename to data/ui/elementsettingsdialog.ui
diff --git a/pitivi/ui/encodingdialog.glade b/data/ui/encodingdialog.ui
similarity index 100%
rename from pitivi/ui/encodingdialog.glade
rename to data/ui/encodingdialog.ui
diff --git a/pitivi/ui/encodingprogress.glade b/data/ui/encodingprogress.ui
similarity index 100%
rename from pitivi/ui/encodingprogress.glade
rename to data/ui/encodingprogress.ui
diff --git a/pitivi/ui/filelisterrordialog.glade b/data/ui/filelisterrordialog.ui
similarity index 100%
rename from pitivi/ui/filelisterrordialog.glade
rename to data/ui/filelisterrordialog.ui
diff --git a/pitivi/ui/mainwindow.xml b/data/ui/mainwindow.xml
similarity index 100%
rename from pitivi/ui/mainwindow.xml
rename to data/ui/mainwindow.xml
diff --git a/pitivi/ui/net_capture.glade b/data/ui/net_capture.ui
similarity index 100%
rename from pitivi/ui/net_capture.glade
rename to data/ui/net_capture.ui
diff --git a/pitivi/ui/pluginmanagerdialog.glade b/data/ui/pluginmanagerdialog.ui
similarity index 100%
rename from pitivi/ui/pluginmanagerdialog.glade
rename to data/ui/pluginmanagerdialog.ui
diff --git a/pitivi/ui/projectsettings.glade b/data/ui/projectsettings.ui
similarity index 100%
rename from pitivi/ui/projectsettings.glade
rename to data/ui/projectsettings.ui
diff --git a/pitivi/ui/screencast_manager.glade b/data/ui/screencast_manager.ui
similarity index 100%
rename from pitivi/ui/screencast_manager.glade
rename to data/ui/screencast_manager.ui
diff --git a/pitivi/ui/startupwizard.glade b/data/ui/startupwizard.ui
similarity index 100%
rename from pitivi/ui/startupwizard.glade
rename to data/ui/startupwizard.ui
diff --git a/pitivi/ui/Makefile.am b/pitivi/ui/Makefile.am
index a832cfc..ea8d19c 100644
--- a/pitivi/ui/Makefile.am
+++ b/pitivi/ui/Makefile.am
@@ -46,20 +46,5 @@ ui_PYTHON = \
filechooserpreview.py \
zoominterface.py
-ui_DATA = \
- elementsettingsdialog.glade \
- cam_capture.glade \
- encodingdialog.glade \
- encodingprogress.glade \
- filelisterrordialog.glade \
- mainwindow.xml \
- net_capture.glade \
- projectsettings.glade \
- pluginmanagerdialog.glade \
- screencast_manager.glade \
- startupwizard.glade
-
clean-local:
rm -rf *.pyc *.pyo
-
-EXTRA_DIST = $(ui_DATA)
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index 3eca308..e655d2d 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -110,7 +110,7 @@ def ellipsize(combo):
class EncodingDialog(GladeWindow, Renderer, Loggable):
""" Encoding dialog box """
- glade_file = "encodingdialog.glade"
+ glade_file = "encodingdialog.ui"
def __init__(self, app, project, pipeline=None):
Loggable.__init__(self)
diff --git a/pitivi/ui/encodingprogress.py b/pitivi/ui/encodingprogress.py
index c65b7a9..cf6a0ca 100644
--- a/pitivi/ui/encodingprogress.py
+++ b/pitivi/ui/encodingprogress.py
@@ -33,7 +33,7 @@ from pitivi.signalinterface import Signallable
class EncodingProgressDialog(GladeWindow, Signallable):
- glade_file = "encodingprogress.glade"
+ glade_file = "encodingprogress.ui"
__signals__ = {
"pause": [],
diff --git a/pitivi/ui/filelisterrordialog.py b/pitivi/ui/filelisterrordialog.py
index ba20950..e1d8474 100644
--- a/pitivi/ui/filelisterrordialog.py
+++ b/pitivi/ui/filelisterrordialog.py
@@ -35,7 +35,7 @@ from pitivi.log.loggable import Loggable
class FileListErrorDialog(GladeWindow, Signallable, Loggable):
""" Dialog box for showing errors in a list of files """
- glade_file = "filelisterrordialog.glade"
+ glade_file = "filelisterrordialog.ui"
__signals__ = {
'close': None,
'response': ["something"]
diff --git a/pitivi/ui/glade.py b/pitivi/ui/glade.py
index 9e78238..ee85d85 100644
--- a/pitivi/ui/glade.py
+++ b/pitivi/ui/glade.py
@@ -31,6 +31,8 @@ import sys
import gtk
from gtk.glade import XML, set_custom_handler
+from pitivi.configure import get_ui_dir
+
# proc := module1.module2.moduleN.proc1().maybe_another_proc()
# -> eval proc1().maybe_another_proc() in module1.module2.moduleN
def flumotion_glade_custom_handler(unused_xml, proc, name, *unused_args):
@@ -77,7 +79,7 @@ class GladeWidget(gtk.VBox):
Remember to chain up if you customize __init__().
'''
- glade_dir = os.path.dirname(os.path.abspath(__file__))
+ glade_dir = get_ui_dir()
glade_file = None
glade_typedict = None
@@ -136,7 +138,7 @@ class GladeWindow(object):
convenience wrappers.
"""
- glade_dir = os.path.dirname(os.path.abspath(__file__))
+ glade_dir = get_ui_dir()
glade_file = None
glade_typedict = None
diff --git a/pitivi/ui/gstwidget.py b/pitivi/ui/gstwidget.py
index c3c14ae..b2055d2 100644
--- a/pitivi/ui/gstwidget.py
+++ b/pitivi/ui/gstwidget.py
@@ -177,7 +177,7 @@ class GstElementSettingsDialog(GladeWindow, Loggable):
"""
Dialog window for viewing/modifying properties of a gst.Element
"""
- glade_file = "elementsettingsdialog.glade"
+ glade_file = "elementsettingsdialog.ui"
def __init__(self, elementfactory, properties={}):
GladeWindow.__init__(self)
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 32ee24e..a29b660 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -49,7 +49,7 @@ from pitivi.ui.timeline import Timeline
from pitivi.ui.basetabs import BaseTabs
from pitivi.ui.viewer import PitiviViewer
from pitivi.configure import pitivi_version, APPNAME, APPURL, APPMANUALURL, \
- get_pixmap_dir, LIBDIR
+ get_pixmap_dir, LIBDIR, get_ui_dir
from pitivi.ui import dnd
from pitivi.pipeline import Pipeline
from pitivi.action import ViewAction
@@ -384,12 +384,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
self.uimanager = gtk.UIManager()
self.add_accel_group(self.uimanager.get_accel_group())
self.uimanager.insert_action_group(self.actiongroup, 0)
- if 'pitivi.exe' in __file__.lower():
- xml = LIBDIR + '\\pitivi.exe'
- else:
- xml = __file__
- self.uimanager.add_ui_from_file(os.path.join(os.path.dirname(
- os.path.abspath(xml)), "mainwindow.xml"))
+ self.uimanager.add_ui_from_file(os.path.join(get_ui_dir(), "mainwindow.xml"))
def _createUi(self, instance):
""" Create the graphical interface """
diff --git a/pitivi/ui/netstream_managerdialog.py b/pitivi/ui/netstream_managerdialog.py
index 63ee6a9..06605d3 100644
--- a/pitivi/ui/netstream_managerdialog.py
+++ b/pitivi/ui/netstream_managerdialog.py
@@ -24,7 +24,7 @@ import gtk
import gtk.glade
import gst
import tempfile
-from pitivi.configure import LIBDIR
+from pitivi.configure import LIBDIR, get_ui_dir
from pitivi.sourcelist import SourceList
from pitivi.bin import SmartStreamBin, SinkBin
from pitivi.settings import ExportSettings
@@ -36,12 +36,7 @@ class NetstreamManagerDialog(object):
self.capture_pipe = None
self.player = None
- if 'pitivi.exe' in __file__.lower():
- glade_dir = LIBDIR + '\\pitivi.exe'
- else:
- glade_dir = os.path.dirname(os.path.abspath(__file__))
-
- self.objectpool_ui = gtk.glade.XML(os.path.join(glade_dir, "net_capture.glade"))
+ self.objectpool_ui = gtk.glade.XML(os.path.join(get_ui_dir), "net_capture.ui")
self.stream_window = self.objectpool_ui.get_widget("network_capture")
self.screen = self.objectpool_ui.get_widget("screen")
self.capture_btn = self.objectpool_ui.get_widget("capture_btn")
diff --git a/pitivi/ui/pluginmanagerdialog.py b/pitivi/ui/pluginmanagerdialog.py
index c556fda..20e246c 100644
--- a/pitivi/ui/pluginmanagerdialog.py
+++ b/pitivi/ui/pluginmanagerdialog.py
@@ -26,7 +26,7 @@ import pango
import gobject
from gettext import gettext as _
-from pitivi.configure import LIBDIR
+from pitivi.configure import LIBDIR, get_ui_dir
import pitivi.plugincore as plugincore
import pitivi.pluginmanager as pluginmanager
@@ -41,11 +41,7 @@ class PluginManagerDialog(object):
self.pm = plugin_manager
# load user interface items
- if 'pitivi.exe' in __file__.lower():
- glade_dir = LIBDIR
- else:
- glade_dir = os.path.dirname(os.path.abspath(__file__))
- self.wTree = gtk.glade.XML(os.path.join(glade_dir, 'pluginmanagerdialog.glade'))
+ self.wTree = gtk.glade.XML(os.path.join(get_ui_dir(), 'pluginmanagerdialog.ui'))
self.window = self.wTree.get_widget('pluginmanager_dlg')
self.search_entry = self.wTree.get_widget('search_entry')
self.category_cmb = self.wTree.get_widget('category_cmb')
diff --git a/pitivi/ui/projectsettings.py b/pitivi/ui/projectsettings.py
index d678200..1154b0e 100644
--- a/pitivi/ui/projectsettings.py
+++ b/pitivi/ui/projectsettings.py
@@ -71,7 +71,7 @@ display_aspect_ratios = model((str, object), (
))
class ProjectSettingsDialog(GladeWindow):
- glade_file = "projectsettings.glade"
+ glade_file = "projectsettings.ui"
def __init__(self, parent, project):
GladeWindow.__init__(self, parent)
diff --git a/pitivi/ui/screencast_managerdialog.py b/pitivi/ui/screencast_managerdialog.py
index c4a0671..15f4f2f 100644
--- a/pitivi/ui/screencast_managerdialog.py
+++ b/pitivi/ui/screencast_managerdialog.py
@@ -29,7 +29,7 @@ import dbus.glib
import thread
import time
-from pitivi.configure import LIBDIR
+from pitivi.configure import LIBDIR, get_ui_dir
class ScreencastManagerDialog(object):
@@ -38,11 +38,7 @@ class ScreencastManagerDialog(object):
self.app = instance
# Create gtk widget using glade model
- if 'pitivi.exe' in __file__.lower():
- glade_dir = LIBDIR + '\\pitivi.exe'
- else:
- glade_dir = os.path.dirname(os.path.abspath(__file__))
- pool_ui = gtk.glade.XML(os.path.join(glade_dir, "screencast_manager.glade"))
+ pool_ui = gtk.glade.XML(os.path.join(get_ui_dir(), "screencast_manager.glade"))
self.window = pool_ui.get_widget("screencast_window")
self.close_btn = pool_ui.get_widget("btn_close")
diff --git a/pitivi/ui/startupwizard.py b/pitivi/ui/startupwizard.py
index d9be488..d89c262 100644
--- a/pitivi/ui/startupwizard.py
+++ b/pitivi/ui/startupwizard.py
@@ -4,7 +4,7 @@ import os
import gtk
import webbrowser
-from pitivi.configure import LIBDIR
+from pitivi.configure import LIBDIR, get_ui_dir
from projectsettings import ProjectSettingsDialog
from pitivi.configure import APPMANUALURL
@@ -20,14 +20,9 @@ class StartUpWizard(object):
"""
def __init__(self, app):
- if 'pitivi.exe' in __file__.lower():
- glade_dir = LIBDIR
- else:
- glade_dir = os.path.dirname(os.path.abspath(__file__))
self.app = app
self.builder = gtk.Builder()
- gladefile = os.path.join(glade_dir, "startupwizard.glade")
- self.builder.add_from_file(gladefile)
+ self.builder.add_from_file(os.path.join(get_ui_dir(), "startupwizard.ui"))
self.builder.connect_signals(self)
self.window = self.builder.get_object("window1")
diff --git a/pitivi/ui/webcam_managerdialog.py b/pitivi/ui/webcam_managerdialog.py
index 4f3c111..1f4c827 100644
--- a/pitivi/ui/webcam_managerdialog.py
+++ b/pitivi/ui/webcam_managerdialog.py
@@ -32,7 +32,7 @@ class WebcamManagerDialog(GladeWindow):
"""
Webcan capture dialog box
"""
- glade_file = "cam_capture.glade"
+ glade_file = "cam_capture.ui"
def __init__(self, pitivi):
gst.log("Creating new WebcamManager Dialog")
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5760265..b952857 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,9 +2,18 @@
# Please keep this file sorted alphabetically.
# [encoding: UTF-8]
data/pitivi.desktop.in.in
+data/ui/cam_capture.ui
+data/ui/elementsettingsdialog.ui
+data/ui/encodingdialog.ui
+data/ui/encodingprogress.ui
+data/ui/filelisterrordialog.ui
+data/ui/net_capture.ui
+data/ui/pluginmanagerdialog.ui
+data/ui/projectsettings.ui
+data/ui/screencast_manager.ui
+data/ui/startupwizard.ui
pitivi/application.py
pitivi/check.py
-pitivi.desktop.in.in
pitivi/discoverer.py
pitivi/effects.py
pitivi/factories/base.py
@@ -16,33 +25,23 @@ pitivi/settings.py
pitivi/stream.py
pitivi/ui/audiofxlist.py
pitivi/ui/basetabs.py
-pitivi/ui/cam_capture.glade
pitivi/ui/clipproperties.py
pitivi/ui/common.py
pitivi/ui/defaultpropertyeditor.py
pitivi/ui/dynamic.py
pitivi/ui/effectlist.py
pitivi/ui/effectsconfiguration.py
-pitivi/ui/elementsettingsdialog.glade
-pitivi/ui/encodingdialog.glade
pitivi/ui/encodingdialog.py
-pitivi/ui/encodingprogress.glade
pitivi/ui/filechooserpreview.py
-pitivi/ui/filelisterrordialog.glade
pitivi/ui/filelisterrordialog.py
pitivi/ui/gstwidget.py
pitivi/ui/mainwindow.py
-pitivi/ui/net_capture.glade
-pitivi/ui/pluginmanagerdialog.glade
pitivi/ui/pluginmanagerdialog.py
pitivi/ui/prefs.py
pitivi/ui/previewer.py
-pitivi/ui/projectsettings.glade
pitivi/ui/projectsettings.py
pitivi/ui/propertyeditor.py
-pitivi/ui/screencast_manager.glade
pitivi/ui/sourcelist.py
-pitivi/ui/startupwizard.glade
pitivi/ui/timelinecanvas.py
pitivi/ui/timelinecontrols.py
pitivi/ui/timeline.py
@@ -50,4 +49,3 @@ pitivi/ui/trackobject.py
pitivi/ui/videofxlist.py
pitivi/ui/viewer.py
pitivi/utils.py
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]