Kaydet (Commit) 4353aee5 authored tarafından sulincix's avatar sulincix

minor fixes

üst 9c54c1dc
......@@ -261,10 +261,13 @@ class InstallerWindow:
def i18n(self):
window_title = ("Installer")
with open("/etc/lsb-release") as f:
config = dict([line.strip().split("=") for line in f])
window_title = "%s - %s" % (
config['DISTRIB_DESCRIPTION'].replace('"', ''), ("Installer"))
if os.path.isfile("/etc/lsb-release"):
with open("/etc/lsb-release") as f:
config = dict([line.strip().split("=") for line in f])
window_title = "%s - %s" % (
config['DISTRIB_DESCRIPTION'].replace('"', ''), ("Installer"))
else:
window_title = "Sulin - %s" % ("Installer")
self.builder.get_object("button_expert").set_no_show_all(True)
if self.expert_mode:
......
......@@ -525,10 +525,7 @@ class Partition(object):
self.free_space = to_human_readable(int(free)*1024)
self.used_percent = self.used_percent.strip(b'%') or 0
description = ''
if path_exists(str(mount_point), str('etc/linuxmint/info')):
description = getoutput("cat %s/etc/linuxmint/info | grep GRUB_TITLE" % mount_point).replace(
'GRUB_TITLE', '').replace('=', '').replace('"', '').strip()
elif path_exists(str(mount_point), str('Windows/servicing/Version')):
if path_exists(str(mount_point), str('Windows/servicing/Version')):
description = 'Windows ' + {
'6.4': '10',
'6.3': '8.1',
......
from gi.repository import Gtk, Gdk, WebKit2
import sys
import gi
import os
from slideshow import Slideshow
gi.require_version("Gtk", "3.0")
gi.require_version("WebKit2", "4.0")
def on_context_menu(unused_web_view, unused_context_menu,
unused_event, unused_hit_test_result):
# True will not show the menu
return True
resource_dir = './resources'
glade_file = os.path.join(resource_dir, 'interface.ui')
builder = Gtk.Builder()
builder.add_from_file(glade_file)
# We have no significant browsing interface, so there isn't much point
# in WebKit creating a memory-hungry cache.
context = WebKit2.WebContext.get_default()
context.set_cache_model(WebKit2.CacheModel.DOCUMENT_VIEWER)
slideshow_path = "file:///usr/share/live-installer/slideshow/index.html"
webview = WebKit2.WebView()
s = webview.get_settings()
s.set_allow_file_access_from_file_urls(True)
webview.connect('context-menu', on_context_menu)
s.set_property('enable-caret-browsing', False)
webview.load_uri(slideshow_path)
webview.show()
builder.get_object("scrolled_slideshow").add(webview)
window = builder.get_object("main_window")
builder.get_object("notebook1").set_current_page(8)
window.show_all()
window.connect("destroy", Gtk.main_quit)
Gtk.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment