コード例 #1
0
	def __init__(self, context):
		BaseCard.__init__(self, 'Step 3 of 7 : Timezone', context)

		self.label = Gtk.Label(label='', xalign=0)
		self.label.set_markup(label)
		self.label.set_hexpand(True)
		self.theBox.pack_start(self.label, False, True, 0)

		with open('/opt/installer-new/zone.csv') as zonefile:
			self.timezones = list(csv.reader(zonefile))

		self.timezone_list = list()
		for timezone in self.timezones:
			self.timezone_list.append(timezone[2])

		self.timezone_list.sort()

		self.timezone = Gtk.ListBox()
		self.timezone.set_selection_mode(Gtk.SelectionMode.SINGLE)
		for tzdata in self.timezone_list:
			listbox_row = Gtk.ListBoxRow()
			listbox_row.data = tzdata
			listbox_row.add(Gtk.Label(tzdata, xalign=0))
			self.timezone.add(listbox_row)

		scrolled_window = Gtk.ScrolledWindow()
		scrolled_window.set_hexpand(True)
		scrolled_window.set_vexpand(True)
		scrolled_window.add(self.timezone)

		self.theBox.pack_start(scrolled_window, True, True, 0)
コード例 #2
0
ファイル: partition.py プロジェクト: xhaa123/alps
    def __init__(self, context):
        BaseCard.__init__(self, 'Step 2 of 7 : Partition selection', context)

        self.label = Gtk.Label(label, xalign=0)
        self.label.set_markup(label)
        self.label.set_hexpand(True)
        self.theBox.pack_start(self.label, False, True, 5)

        self.selected_partition = None

        self.partition_store = Gtk.ListStore(str)

        self.root_part_combo = self.create_combo(self.partition_store)
        self.home_part_combo = self.create_combo(self.partition_store)
        self.boot_part_combo = self.create_combo(self.partition_store)
        self.swap_part_combo = self.create_combo(self.partition_store)

        self.combos = [
            self.root_part_combo, self.home_part_combo, self.boot_part_combo,
            self.swap_part_combo
        ]

        self.theBox.pack_start(Gtk.Label('Root (/) *', xalign=0), False, True,
                               0)
        self.theBox.pack_start(self.root_part_combo, False, True, 0)
        self.theBox.pack_start(Gtk.Label('Home (/home)', xalign=0), False,
                               True, 0)
        self.theBox.pack_start(self.home_part_combo, False, True, 0)
        self.theBox.pack_start(Gtk.Label('Boot (/boot)', xalign=0), False,
                               True, 0)
        self.theBox.pack_start(self.boot_part_combo, False, True, 0)
        self.theBox.pack_start(Gtk.Label('Swap', xalign=0), False, True, 0)
        self.theBox.pack_start(self.swap_part_combo, False, True, 0)
コード例 #3
0
ファイル: intro.py プロジェクト: xhaa123/alps
    def __init__(self, context):
        BaseCard.__init__(self, 'Welcome to AryaLinux', context)

        self.label2 = Gtk.Label(descriptionText, xalign=0, yalign=0)
        self.label2.set_hexpand(True)
        self.label2.set_vexpand(True)
        self.label2.set_line_wrap(True)
        self.label2.set_markup(descriptionText)
        self.label2.set_justify(Gtk.Justification.FILL)
        self.theBox.pack_start(self.label2, True, True, 0)
コード例 #4
0
ファイル: status.py プロジェクト: xhaa123/alps
    def __init__(self, context):
        BaseCard.__init__(self, 'Installation in progress', context)

        self.label = Gtk.Label(label, xalign=0)
        self.label.set_markup(label)
        self.label.set_hexpand(True)
        self.theBox.pack_start(self.label, False, True, 0)

        self.terminal = Vte.Terminal()
        self.pty = Vte.Pty.new_sync(Vte.PtyFlags.DEFAULT)
        self.terminal.set_pty(self.pty)
        self.theBox.pack_start(self.terminal, True, True, 0)
        self.context['pty'] = self.pty

        self.context = context
コード例 #5
0
ファイル: root.py プロジェクト: xhaa123/alps
    def __init__(self, context):
        BaseCard.__init__(self, 'Step 6 of 7 : Root password details', context)

        self.label = Gtk.Label(label='', xalign=0)
        self.label.set_markup(label)
        self.theBox.pack_start(self.label, False, True, 0)

        self.label1 = Gtk.Label('Enter the root password:'******'Re-Enter the root password:', xalign=0)

        self.password = Gtk.Entry()
        self.password.set_hexpand(True)
        self.password.set_visibility(False)
        self.retype_password = Gtk.Entry()
        self.retype_password.set_hexpand(True)
        self.retype_password.set_visibility(False)

        self.theBox.pack_start(self.label1, False, True, 0)
        self.theBox.pack_start(self.password, False, True, 0)
        self.theBox.pack_start(self.label2, False, True, 0)
        self.theBox.pack_start(self.retype_password, False, True, 0)
コード例 #6
0
ファイル: device.py プロジェクト: xhaa123/alps
	def __init__(self, context):
		BaseCard.__init__(self, 'Step 1 of 7 : Device Selection', context)

		self.label = Gtk.Label(label, xalign=0)
		self.label.set_markup(label)
		self.label.set_hexpand(True)
		self.theBox.pack_start(self.label, False, True, 0)

		self.device_combo = Gtk.ComboBox()
		self.device_combo.set_hexpand(True)
		self.theBox.pack_start(self.device_combo, False, True, 0)

		self.device_store = Gtk.ListStore(str)

		self.device_combo.set_model(self.device_store)
		self.renderer_text = Gtk.CellRendererText()
		self.device_combo.pack_start(self.renderer_text, True)
		self.device_combo.add_attribute(self.renderer_text, "text", 0)
		self.device_combo.set_active(0)

		#self.context['device'] = self.devices[self.device_combo.get_active()]
		self.context['device_screen'] = self
コード例 #7
0
    def __init__(self, context):
        BaseCard.__init__(self, 'Step 5 of 7 : User details', context)

        self.label = Gtk.Label(label='', xalign=0)
        self.label.set_markup(label)
        self.theBox.pack_start(self.label, False, True, 0)

        self.label1 = Gtk.Label('Enter your full name:', xalign=0)
        self.label2 = Gtk.Label('Enter a name for the computer:', xalign=0)
        self.label3 = Gtk.Label('Enter username:'******'Enter password:'******'Re-Enter the password:', xalign=0)

        self.full_name = Gtk.Entry()
        self.full_name.set_hexpand(True)
        self.computer_name = Gtk.Entry()
        self.computer_name.set_hexpand(True)
        self.username = Gtk.Entry()
        self.username.set_hexpand(True)
        self.password = Gtk.Entry()
        self.password.set_hexpand(True)
        self.password.set_visibility(False)
        self.retype_password = Gtk.Entry()
        self.retype_password.set_hexpand(True)
        self.retype_password.set_visibility(False)

        self.theBox.pack_start(self.label1, False, True, 0)
        self.theBox.pack_start(self.full_name, False, True, 0)
        self.theBox.pack_start(self.label2, False, True, 0)
        self.theBox.pack_start(self.computer_name, False, True, 0)
        self.theBox.pack_start(self.label3, False, True, 0)
        self.theBox.pack_start(self.username, False, True, 0)
        self.theBox.pack_start(self.label4, False, True, 0)
        self.theBox.pack_start(self.password, False, True, 0)
        self.theBox.pack_start(self.label5, False, True, 0)
        self.theBox.pack_start(self.retype_password, False, True, 0)
コード例 #8
0
    def __init__(self, context):
        BaseCard.__init__(self, 'Step 4 of 7 : Locale selection', context)

        self.selected_locale = None

        self.locale_store = []
        locales = misc.list_locales()
        for locale in locales:
            self.locale_store.append(locale)
        self.keymap_store = []
        keymaps = misc.list_keymaps()
        for keymap in keymaps:
            self.keymap_store.append(keymap)

        self.label = Gtk.Label(label='', xalign=0)
        self.label.set_markup(label)
        self.label.set_hexpand(True)
        self.theBox.pack_start(self.label, False, True, 0)

        self.label1 = Gtk.Label('Choose Locale:', xalign=0)
        self.label2 = Gtk.Label('Choose Keyboard Layout:', xalign=0)
        self.label3 = Gtk.Label('Paper Size', xalign=0)

        self.locale_list = self.create_list(self.locale_store)
        scrolledwindow1 = Gtk.ScrolledWindow()
        scrolledwindow1.set_hexpand(True)
        scrolledwindow1.set_vexpand(True)
        scrolledwindow1.add(self.locale_list)

        self.keymaps = self.create_list(self.keymap_store)
        scrolledwindow2 = Gtk.ScrolledWindow()
        scrolledwindow2.set_hexpand(True)
        scrolledwindow2.set_vexpand(True)
        scrolledwindow2.add(self.keymaps)

        self.paper_size_store = Gtk.ListStore(str)
        self.paper_sizes = list()
        self.more_paper_sizes = [
            'DL', 'letter', 'legal', 'tabloid', 'ledger', 'statement',
            'executive', 'com10', 'monarch'
        ]
        for char in ['A', 'B', 'C', 'D']:
            for i in range(0, 7):
                self.paper_sizes.append(char + str(i))
        self.paper_sizes.extend(self.more_paper_sizes)

        for paper_size in self.paper_sizes:
            self.paper_size_store.append([paper_size])

        self.paper_size = Gtk.ComboBox.new_with_model(self.paper_size_store)
        self.paper_size.set_entry_text_column(0)
        renderer_text = Gtk.CellRendererText()
        self.paper_size.pack_start(renderer_text, True)
        self.paper_size.add_attribute(renderer_text, "text", 0)
        self.paper_size.set_active(4)

        self.grid = Gtk.Grid()
        self.grid.set_row_spacing(5)
        self.grid.set_column_spacing(5)
        self.grid.set_hexpand(True)
        self.grid.set_vexpand(True)

        self.grid.attach(self.label1, 0, 0, 1, 1)
        self.grid.attach(self.label2, 1, 0, 1, 1)
        self.grid.attach(scrolledwindow1, 0, 1, 1, 1)
        self.grid.attach(scrolledwindow2, 1, 1, 1, 1)
        self.grid.attach(self.label3, 0, 2, 2, 1)
        self.grid.attach(self.paper_size, 0, 3, 2, 1)

        self.theBox.pack_start(self.grid, True, True, 0)