[Frugalware-darcs] fwlive-installer: fwlive-installer: started
coding main application
AlexExtreme
alex at alex-smith.me.uk
Thu Oct 19 21:16:02 CEST 2006
Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fwlive-installer;a=darcs_commitdiff;h=20061019191659-46e39-e42f8c5c5e04b847daae0cc817445c687fd7f2e2.gz;
[fwlive-installer: started coding main application
AlexExtreme <alex at alex-smith.me.uk>**20061019191659] {
addfile ./src/fwlive-installer
addfile ./src/fwlive-installer.py
move ./src/fwlive-installer.py ./src/fwliveinstaller.py
hunk ./src/fwlive-installer 1
+#!/usr/bin/env python
+
+"""
+FwLive Installer
+Copyright (C) 2006 Alex Smith.
+This program is licenced under the terms of the GNU GPL.
+"""
+
+__author__ = "Alex Smith"
+__email__ = "alex at alex-smith.me.uk"
+__license__ = """
+FwLive Installer
+Copyright (C) 2006 Alex Smith <alex at alex-smith.me.uk>
+
+FwLive Installer is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+FwLive Installer is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with FwLive Installer; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+"""
+
+from fwliveinstaller import Installer
+
+if __name__ == "__main__":
+ installer = Installer()
+ installer.main()
hunk ./src/fwliveinstaller.py 1
+"""
+FwLive Installer
+Copyright (C) 2006 Alex Smith.
+This program is licenced under the terms of the GNU GPL.
+"""
+
+__author__ = "Alex Smith"
+__email__ = "alex at alex-smith.me.uk"
+__license__ = """
+FwLive Installer
+Copyright (C) 2006 Alex Smith <alex at alex-smith.me.uk>
+
+This file is part of FwLive Installer.
+
+FwLive Installer is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+FwLive Installer is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with FwLive Installer; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+"""
+
+import gtk, gtk.glade, sys, os
+
+class InstallerGui:
+ def nextPage(self, foo):
+ page = self.notebook.get_current_page()
+ self.notebook.next_page()
+ newpage = self.notebook.get_current_page()
+ if page != newpage:
+ myprogress = self.progress.get_fraction()
+ myprogress = myprogress + 0.10
+ self.progress.set_fraction(myprogress)
+
+ def prevPage(self, foo):
+ page = self.notebook.get_current_page()
+ self.notebook.prev_page()
+ newpage = self.notebook.get_current_page()
+ if page != newpage:
+ myprogress = self.progress.get_fraction()
+ myprogress = myprogress - 0.10
+ self.progress.set_fraction(myprogress)
+
+ def buildLangList(self):
+ self.langmodel = gtk.ListStore(str)
+ self.langmodel.append(['English (United Kingdom)'])
+ self.langlist.set_model(self.langmodel)
+ self.langcell = gtk.CellRendererText()
+ self.langlist.pack_start(self.langcell, True)
+ self.langlist.add_attribute(self.langcell, 'text', 0)
+
+ def buildKbdList(self):
+ self.kbdmodel = gtk.ListStore(str)
+ self.kbdmodel.append(['United Kingdom'])
+ self.kbdlist.set_model(self.kbdmodel)
+ self.kbdcell = gtk.CellRendererText()
+ self.kbdlist.pack_start(self.kbdcell, True)
+ self.kbdlist.add_attribute(self.kbdcell, 'text', 0)
+
+ def __init__(self):
+ self.xml = gtk.glade.XML("data/gui.glade")
+
+ self.window = self.xml.get_widget("mainWindow")
+ self.back = self.xml.get_widget("backButton")
+ self.forward = self.xml.get_widget("forwardButton")
+ self.notebook = self.xml.get_widget("mainDisplay")
+ self.progress = self.xml.get_widget("installProgressBar")
+ self.langlist = self.xml.get_widget("languageLangCombo")
+ self.kbdlist = self.xml.get_widget("languageKbdLayoutCombo")
+
+ self.buildLangList()
+ self.buildKbdList()
+
+ self.back.connect("clicked", self.prevPage)
+ self.forward.connect("clicked", self.nextPage)
+ self.window.connect("destroy", gtk.main_quit)
+
+ self.window.show()
+
+class Installer:
+ def main(self):
+ self.gui = InstallerGui()
+
+ gtk.main()
}
More information about the Frugalware-darcs
mailing list