Commit d7a3bb8d authored by Edward Hervey's avatar Edward Hervey

* pitivi/configure.py.in:

Add APPNAME, which contains the configured application name.
This will easily allow changing the application name later on.
* pitivi/check.py:
* pitivi/pitivi.py:
* pitivi/project.py:
* pitivi/ui/mainwindow.py:
Use configure.APPNAME for every string occurence of PiTiVi.
(PitiviMainWindow._setActions):
Don't set action string for some stock items. (NEW, OPEN, SAVE, SAVE_AS,
QUIT, FULLSCREEN, ABOUT). I'm leaving what we set for the others, since
I used them because I couldn't find any better icon.
Closes #339993


git-svn-id: svn+ssh://svn.gnome.org/svn/pitivi/trunk@776 d3729300-e425-0410-8a4c-d956edccc248
parent 25df827e
2006-05-16 Edward Hervey <edward@fluendo.com>
* pitivi/configure.py.in:
Add APPNAME, which contains the configured application name.
This will easily allow changing the application name later on.
* pitivi/check.py:
* pitivi/pitivi.py:
* pitivi/project.py:
* pitivi/ui/mainwindow.py:
Use configure.APPNAME for every string occurence of PiTiVi.
(PitiviMainWindow._setActions):
Don't set action string for some stock items. (NEW, OPEN, SAVE, SAVE_AS,
QUIT, FULLSCREEN, ABOUT). I'm leaving what we set for the others, since
I used them because I couldn't find any better icon.
Closes #339993
2006-05-15 Edward Hervey <edward@fluendo.com>
* pitivi/bin.py:
......
......@@ -27,6 +27,7 @@ import gtk
import gst
import sys
import instance
from configure import APPNAME
def initial_checks():
"""
......@@ -49,8 +50,8 @@ def initial_checks():
def _checks():
reg = gst.registry_get_default()
if instance.PiTiVi:
return ("PiTiVi is already running!",
"An instance of PiTiVi is already running in this script.")
return ("%s is already running!" % APPNAME,
"An instance of %s is already running in this script." % APPNAME)
if not reg.find_plugin("gnonlin"):
return ("Could not find the GNonLin plugins!",
"Make sure the plugins were installed and are available in the GStreamer plugins path.")
......
......@@ -26,6 +26,7 @@ LIBDIR = '@LIBDIR@'
PKGDATADIR = '@DATADIR@/@PACKAGE@'
PIXMAPDIR = '@DATADIR@/pixmaps'
pitivi_version = '@VERSION@'
APPNAME = '@PACKAGE_NAME@'
def get_pixmap_dir():
""" Returns the directory for program-only pixmaps """
......
......@@ -33,6 +33,7 @@ from discoverer import Discoverer
from playground import PlayGround
from project import Project, file_is_project
from effects import Magician
from configure import APPNAME
import instance
class Pitivi(gobject.GObject):
......@@ -69,7 +70,7 @@ class Pitivi(gobject.GObject):
# store ourself in the instance global
if instance.PiTiVi:
raise RuntimeWarning("There is already a PiTiVi instance, inform developers")
raise RuntimeWarning("There is already a %s instance, inform developers" % APPNAME)
instance.PiTiVi = self
# TODO parse cmd line arguments
......
......@@ -31,6 +31,7 @@ from timeline import Timeline
from sourcelist import SourceList
from bin import SmartTimelineBin
from settings import ExportSettings
from configure import APPNAME
class Project(gobject.GObject):
""" The base class for PiTiVi projects """
......@@ -92,6 +93,6 @@ def file_is_project(uri):
""" returns True if the given uri is a PitiviProject file"""
# TODO
if not gst.uri_get_protocol(uri) == "file":
raise NotImplementedError("PiTiVi doesn't yet handle non local projects")
raise NotImplementedError("%s doesn't yet handle non local projects" % APPNAME)
return os.path.isfile(gst.uri_get_location(uri))
......@@ -35,7 +35,7 @@ from timeline import TimelineWidget
from sourcefactories import SourceFactoriesWidget
from viewer import PitiviViewer
from projectsettings import ProjectSettingsDialog
from pitivi.configure import pitivi_version
from pitivi.configure import pitivi_version, APPNAME
class PitiviMainWindow(gtk.Window):
"""
......@@ -62,15 +62,15 @@ class PitiviMainWindow(gtk.Window):
def _setActions(self):
""" sets up the GtkActions """
self.actions = [
("NewProject", gtk.STOCK_NEW, "_New Project", None, "Create a new project", self._newProjectCb),
("OpenProject", gtk.STOCK_OPEN, "_Open Project", None, "Opens an existing project", self._openProjectCb),
("SaveProject", gtk.STOCK_SAVE, "_Save Project", None, "Save the current project", self._saveProjectCb),
("SaveProjectAs", gtk.STOCK_SAVE_AS, "Save Project As...", None, "Save the current project", self._saveProjectAsCb),
("NewProject", gtk.STOCK_NEW, None, None, "Create a new project", self._newProjectCb),
("OpenProject", gtk.STOCK_OPEN, None, None, "Opens an existing project", self._openProjectCb),
("SaveProject", gtk.STOCK_SAVE, None, None, "Save the current project", self._saveProjectCb),
("SaveProjectAs", gtk.STOCK_SAVE_AS, None, None, "Save the current project", self._saveProjectAsCb),
("ProjectSettings", gtk.STOCK_PROPERTIES, "Project Settings", None, "Edit the project settings", self._projectSettingsCb),
("ImportSources", gtk.STOCK_ADD, "_Import Sources...", None, "Import sources to use", self._importSourcesCb),
("Quit", gtk.STOCK_QUIT, "_Quit PiTiVi", None, "Quit PiTiVi", self._quitCb),
("FullScreen", gtk.STOCK_FULLSCREEN, "Toggle _Full Screen", None, "View the main window on the whole screen", self._fullScreenCb),
("About", gtk.STOCK_ABOUT, "About PiTiVi", None, "Information about PiTiVi", self._aboutCb),
("Quit", gtk.STOCK_QUIT, None, None, None, self._quitCb),
("FullScreen", gtk.STOCK_FULLSCREEN, None, None, "View the main window on the whole screen", self._fullScreenCb),
("About", gtk.STOCK_ABOUT, None, None, "Information about %s" % APPNAME, self._aboutCb),
("File", None, "_File"),
("View", None, "_View"),
("Help", None, "_Help")
......@@ -102,7 +102,7 @@ class PitiviMainWindow(gtk.Window):
def _createUi(self):
""" Create the graphical interface """
self.set_title("PiTiVi v%s" % pitivi_version)
self.set_title("%s v%s" % (APPNAME, pitivi_version))
self.set_geometry_hints(min_width=800, min_height=600)
self.connect("destroy", self._destroyCb)
......@@ -218,7 +218,7 @@ class PitiviMainWindow(gtk.Window):
def _aboutCb(self, unused_action):
abt = gtk.AboutDialog()
abt.set_name("PiTiVi")
abt.set_name(APPNAME)
abt.set_version("v%s" % pitivi_version)
abt.set_website("http://www.pitivi.org/")
authors = ["Edward Hervey <edward@fluendo.com>" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment