summaryrefslogtreecommitdiffstats
path: root/firstboot/gui/gui.py
blob: e830a9ff1908891c95f474ee2d4bae2ac608ba59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from pyanaconda.ui.gui import QuitDialog, GUIObject, GraphicalUserInterface
#from .product import productName, productVersion
from .hubs import FirstbootHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke
import pyanaconda.ui.gui.spokes
from pyanaconda.ui.common import collect, FirstbootSpokeMixIn
import os.path

productName = "Fedora"
productVersion = "rawhide"
isFinal = False

class FirstbootQuitDialog(QuitDialog):
    MESSAGE = "Are you sure you want to quit the configuration process?\nYou might end up with unusable system if you do."

class FirstbootGraphicalUserInterface(GraphicalUserInterface):
    """This is the main Gtk based firstboot interface. It inherits from
       anaconda to make the look & feel as similar as possible.
    """

    TITLE = "%(productName)s %(productVersion)s SETUP"
    
    def __init__(self, storage, payload, instclass):
        GraphicalUserInterface.__init__(self, storage, payload, instclass,
                                        productName, productVersion, isFinal,
                                        quitDialog = FirstbootQuitDialog)
    
    def _list_hubs(self):
        return [FirstbootHub]

    basemask = "firstboot.gui"
    basepath = os.path.dirname(__file__)
    paths = GraphicalUserInterface.paths + {
        "spokes": [(basemask + ".spokes.%s", os.path.join(basepath, "spokes"))],
        "categories": [(basemask + ".categories.%s", os.path.join(basepath, "categories"))],
        }