Kaydet (Commit) 225cb83a authored tarafından /a's avatar /a

tuple fix

üst 4cd28660
......@@ -3,8 +3,8 @@ DESTDIR=/
all: clean build
build:
mkdir -p build/usr/local/lib/ || true
cp -prfv live-installer build/usr/local/lib/
mkdir -p build/usr/lib/ || true
cp -prfv live-installer build/usr/lib/
#set parmissions
chmod 755 -R build
chown root -R build
......@@ -13,6 +13,6 @@ install:
cp -prfv build/* $(DESTDIR)/
uninstall:
rm -rf $(DESTDIR)//usr/local/lib/live-installer
rm -rf $(DESTDIR)//usr/lib/live-installer
clean:
rm -rf build
from gi.repository import Gtk
import gi
gi.require_version('Gtk', '3.0')
class Dialog(Gtk.MessageDialog):
def __init__(self, style, buttons, title, text, text2=None, parent=None):
Gtk.MessageDialog.__init__(self, parent, 0, style, buttons)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_icon_from_file("./icons/live-installer.png")
self.set_title(title)
self.set_markup(text)
self.desc = text[:30] + ' ...' if len(text) > 30 else text
if text2:
self.format_secondary_markup(text2)
if parent:
self.set_transient_for(parent)
self.set_modal(True)
def show(self):
try:
response = self.run()
if response in (Gtk.ResponseType.YES, Gtk.ResponseType.APPLY, Gtk.ResponseType.OK, Gtk.ResponseType.ACCEPT):
return True
else:
return False
finally:
self.destroy()
def MessageDialog(*args):
dialog = Dialog(Gtk.MessageType.INFO, Gtk.ButtonsType.NONE, *args)
dialog.add_button(("OK"), Gtk.ResponseType.OK)
return dialog.show()
def QuestionDialog(*args):
dialog = Dialog(Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, *args)
dialog.add_button(("No"), Gtk.ResponseType.NO)
dialog.add_button(("Yes"), Gtk.ResponseType.YES)
return dialog.show()
def WarningDialog(*args):
dialog = Dialog(Gtk.MessageType.WARNING, Gtk.ButtonsType.NONE, *args)
dialog.add_button(("OK"), Gtk.ResponseType.OK)
return dialog.show()
def ErrorDialog(*args):
dialog = Dialog(Gtk.MessageType.ERROR, Gtk.ButtonsType.NONE, *args)
dialog.add_button(("OK"), Gtk.ResponseType.OK)
return dialog.show()
This diff is collapsed.
from gi.repository import Gtk
import gi
from frontend.gtk_interface import InstallerWindow
import sys
import subprocess
import gettext
sys.path.insert(1, '/usr/lib/live-installer')
gi.require_version('Gtk', '3.0')
# main entry
if __name__ == "__main__":
if ("--expert-mode" in sys.argv):
win = InstallerWindow(expert_mode=True)
else:
win = InstallerWindow()
if ("--window" not in sys.argv):
win.fullscreen()
Gtk.main()
This diff is collapsed.