2
# -*- coding: utf-8 -*-
3
# Copyright 2009 Canonical Ltd.
4
# Author 2009 Didier Roche
6
# This file is part of Quickly ubuntu-project-template
8
#This program is free software: you can redistribute it and/or modify it
9
#under the terms of the GNU General Public License version 3, as published
10
#by the Free Software Foundation.
12
#This program is distributed in the hope that it will be useful, but
13
#WITHOUT ANY WARRANTY; without even the implied warranties of
14
#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15
#PURPOSE. See the GNU General Public License for more details.
17
#You should have received a copy of the GNU General Public License along
18
#with this program. If not, see <http://www.gnu.org/licenses/>.
25
from gettext import gettext as _
27
gettext.textdomain('quickly')
29
from quickly import configurationhandler, templatetools
35
Opens Glade UI editor so that you can edit the UI for dialogs
36
and windows in your project. Note that you *must* open Glade
37
in this manner for quickly to work. If you try to open Glade
38
directly, and the open the UI files, Glade will throw errors
39
and won't open the files.
41
templatetools.handle_additional_parameters(sys.argv, help)
43
if not configurationhandler.project_config:
44
configurationhandler.loadConfig()
45
mainfile = "data/ui/" + configurationhandler.project_config['project'].lower() + "window.ui"
47
for ui_file in glob.glob("data/ui/*.ui"):
48
if ui_file.lower() != mainfile:
49
files.insert(0, ui_file)
53
cmd = "GLADE_CATALOG_PATH=./data/ui glade-3 " + " ".join(files)
55
#run glade with env variables pointing to catalogue xml files
56
if templatetools.in_verbose_mode():
57
subprocess.Popen(cmd, shell=True)
59
nullfile=file("/dev/null")
60
subprocess.Popen(cmd, shell=True, stderr=nullfile)