~xubuntu-dev/ubiquity/lp1437180_feh

« back to all changes in this revision

Viewing changes to ubiquity/frontend/kde-ui.py

  • Committer: Colin Watson
  • Date: 2006-04-21 11:39:15 UTC
  • Revision ID: colin.watson@canonical.com-20060421113915-7d2d711cd6afc4f5
* Rename from espresso to ubiquity, to better suggest an association with
  Ubuntu. Log output now written to /var/log/installer/syslog rather than
  using the package name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
# Copyright (C) 2006 Canonical Ltd.
4
4
#
5
 
# Espresso live installer is free software; you can redistribute it
6
 
# and/or modify it under the terms of the GNU General Public License as
7
 
# published by the Free Software Foundation; either version 2 of the License, or
8
 
# (at your option) any later version.
9
 
#
10
 
# Espresso live installer is distributed in the hope that it will be
11
 
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13
 
# Public License for more details.
14
 
#
15
 
# You should have received a copy of the GNU General Public License along with
16
 
# Guadalinex 2005 live installer; if not, write to the Free Software Foundation,
17
 
# Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
5
# Ubiquity is free software; you can redistribute it and/or modify it under
 
6
# the terms of the GNU General Public License as published by the Free
 
7
# Software Foundation; either version 2 of the License, or (at your option)
 
8
# any later version.
 
9
#
 
10
# Ubiquity is distributed in the hope that it will be useful, but WITHOUT
 
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
12
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 
13
# more details.
 
14
#
 
15
# You should have received a copy of the GNU General Public License along
 
16
# with Ubiquity; if not, write to the Free Software Foundation, Inc., 51
 
17
# Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
#
19
19
# Author:
20
20
#   Jonathan Riddell <jriddell@ubuntu.com>
26
26
from kdeui import *
27
27
from kdecore import *
28
28
#import kdedesigner
29
 
from espresso.frontend.liveinstaller import EspressoUI
 
29
from ubiquity.frontend.liveinstaller import UbiquityUI
30
30
 
31
31
import os
32
32
import time
42
42
try:
43
43
    from debconf import DebconfCommunicator
44
44
except ImportError:
45
 
    from espresso.debconfcommunicator import DebconfCommunicator
 
45
    from ubiquity.debconfcommunicator import DebconfCommunicator
46
46
 
47
 
from espresso import filteredcommand, validation
48
 
from espresso.misc import *
49
 
from espresso.settings import *
50
 
from espresso.components import language, kbd_chooser, timezone, usersetup, \
 
47
from ubiquity import filteredcommand, validation
 
48
from ubiquity.misc import *
 
49
from ubiquity.settings import *
 
50
from ubiquity.components import language, kbd_chooser, timezone, usersetup, \
51
51
                                partman, partman_commit, summary, install
52
 
import espresso.tz
53
 
import espresso.progressposition
 
52
import ubiquity.tz
 
53
import ubiquity.progressposition
54
54
 
55
 
# Define Espresso global path
56
 
PATH = '/usr/share/espresso'
 
55
# Define global path
 
56
PATH = '/usr/share/ubiquity'
57
57
 
58
58
# Define glade path
59
59
GLADEDIR = os.path.join(PATH, 'glade')
88
88
    "stepReady": 9
89
89
}
90
90
 
91
 
class MyEspressoUI(EspressoUI):
 
91
class MyUbiquityUI(UbiquityUI):
92
92
    
93
93
    def setWizard(self, wizardRef):
94
94
        self.wizard = wizardRef
101
101
 
102
102
    def __init__(self, distro):
103
103
        print "  init(distro)"
104
 
        about=KAboutData("kubuntu-espresso","Installer","0.1","Live CD Installer for Kubuntu",KAboutData.License_GPL,"(c) 2006 Canonical Ltd", "http://wiki.kubuntu.org/KubuntuEspresso", "jriddell@ubuntu.com")
 
104
        about=KAboutData("kubuntu-ubiquity","Installer","0.1","Live CD Installer for Kubuntu",KAboutData.License_GPL,"(c) 2006 Canonical Ltd", "http://wiki.kubuntu.org/KubuntuEspresso", "jriddell@ubuntu.com")
105
105
        about.addAuthor("Jonathan Riddell", None,"jriddell@ubuntu.com")
106
106
        KCmdLineArgs.init(["./installer"],about)
107
107
        
108
108
        self.app = KApplication()
109
109
        
110
 
        #self.userinterface = EspressoUI(None, "Espresso")
111
 
        self.userinterface = MyEspressoUI(None, "Espresso")
 
110
        #self.userinterface = UbiquityUI(None, "Ubiquity")
 
111
        self.userinterface = MyUbiquityUI(None, "Ubiquity")
112
112
        self.userinterface.setWizard(self)
113
113
        self.app.setMainWidget(self.userinterface)
114
114
        self.userinterface.show()
132
132
        self.current_page = None
133
133
        self.dbfilter = None
134
134
        self.locale = None
135
 
        self.progress_position = espresso.progressposition.ProgressPosition()
 
135
        self.progress_position = ubiquity.progressposition.ProgressPosition()
136
136
        self.progress_cancelled = False
137
137
        self.previous_partitioning_page = None
138
138
        self.installing = False
146
146
 
147
147
        # FIXME seems to quit program
148
148
        # set default language
149
 
        dbfilter = language.Language(self, DebconfCommunicator('espresso'))
 
149
        dbfilter = language.Language(self, DebconfCommunicator('ubiquity'))
150
150
        dbfilter.cleanup()
151
151
        dbfilter.db.shutdown()
152
152
 
323
323
        #if isinstance(widget, gtk.Button) and widget.get_use_stock():
324
324
        #    widget.set_label(widget.get_label())
325
325
 
326
 
        text = get_string('espresso/text/%s' % widget.name(), lang)
 
326
        text = get_string('ubiquity/text/%s' % widget.name(), lang)
327
327
        if text is None:
328
328
            return
329
329
 
345
345
        elif isinstance(widget, QPushButton):
346
346
            widget.setText(unicode(text, "UTF-8"))
347
347
 
348
 
        elif isinstance(widget, QWidget) and widget.name() == EspressoUI:
 
348
        elif isinstance(widget, QWidget) and widget.name() == UbiquityUI:
349
349
            widget.setCaption(unicode(text, "UTF-8"))
350
350
 
351
351
    def show_intro(self):
353
353
        print "  show_intro()"
354
354
    
355
355
        #intro = os.path.join(PATH, 'htmldocs', self.distro, 'intro.txt')
356
 
        intro = "/usr/share/espresso/htmldocs/ubuntu/intro.txt"
 
356
        intro = "/usr/share/ubiquity/htmldocs/ubuntu/intro.txt"
357
357
    
358
358
        if os.path.isfile(intro):
359
359
            intro_file = open(intro)
972
972
        """write all values in this widget (GtkComboBox) from local
973
973
        partitions values."""
974
974
 
975
 
        from espresso import misc
 
975
        from ubiquity import misc
976
976
 
977
977
        self.partitions = []
978
978
        partition_list = get_partitions()
1529
1529
    def __init__(self, frontend):
1530
1530
        print "  TimezoneMap.__init__(self, frontend):"
1531
1531
        self.frontend = frontend
1532
 
        self.tzdb = espresso.tz.Database()
1533
 
        #self.tzmap = espresso.emap.EMap()
 
1532
        self.tzdb = ubiquity.tz.Database()
 
1533
        #self.tzmap = ubiquity.emap.EMap()
1534
1534
        self.update_timeout = None
1535
1535
        self.point_selected = None
1536
1536
        self.point_hover = None