Добавлена возможность запуска через symlink для определения метода

Изменён порядок выбора изображений для методов
master-3.5 3.5.0_alpha14
parent 4ac3a0f4b3
commit f5261a934d

@ -34,29 +34,31 @@ def main():
DBUS_NAME, DBUS_METHOD_APP, DBusWidget, dbus_updater_hide_tray)
__builtin__.__dict__['_print'] = _print
host, port, args = None, None, None
if len(sys.argv) > 1:
parser = parse()
args = parser.parse_args()
if args.help:
parser.print_help()
sys.exit(0)
if args.method:
app = QtGui.QApplication(sys.argv)
app.setQuitOnLastWindowClosed(True)
ex = SelectedMethodWgt(app, args)
if args.method == 'update':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
session_bus = dbus.SessionBus()
# Export the service
name = dbus.service.BusName(DBUS_NAME, session_bus)
# Export the object
widget = DBusWidget(session_bus, DBUS_METHOD_APP % args.method,
ex)
sys.exit(app.exec_())
if args.host:
host = args.host
if args.port:
port = args.port
parser = parse()
args = parser.parse_args()
if args.help:
parser.print_help()
sys.exit(0)
sym_link = os.path.basename(sys.argv[0])
if sym_link != 'cl-console-gui' and sym_link.startswith("cl-console-gui-"):
args.method = sym_link[len("cl-console-gui-"):].replace("-","_")
if args.method:
app = QtGui.QApplication(sys.argv)
app.setQuitOnLastWindowClosed(True)
ex = SelectedMethodWgt(app, args)
if args.method == 'update':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
session_bus = dbus.SessionBus()
# Export the service
name = dbus.service.BusName(DBUS_NAME, session_bus)
# Export the object
widget = DBusWidget(session_bus, DBUS_METHOD_APP % args.method,
ex)
sys.exit(app.exec_())
if args.host:
host = args.host
if args.port:
port = args.port
# Enable glib main loop support
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)

@ -6,7 +6,7 @@ Name[es]=Instalar Calculate Linux
Name[de]=Calculate Linux installieren
Name[ua]=Установка Calculate Linux
Comment=Calculate Linux installer
Exec=cl-console-gui --method install
Exec=cl-console-gui-install
Icon=cl-console-gui-install
Terminal=false
Type=Application

@ -2,7 +2,7 @@
Name=Calculate Linux Update
Name[ru]=Обновление Calculate Linux
Comment=Calculate Linux updater
Exec=cl-console-gui --method update
Exec=cl-console-gui-update
Icon=cl-console-gui-update
Terminal=false
Type=Application

@ -56,10 +56,12 @@ class SelectedMethodWgt(QtGui.QWidget):
layout.addWidget(self.MethodWidget)
QtGui.QIcon.setThemeName('Calculate')
self.setWindowIcon(
QtGui.QIcon.fromTheme('calculate-%s'%self.method.replace("_","-")))
QtGui.QApplication.setWindowIcon(
QtGui.QIcon.fromTheme('calculate-%s'%self.method.replace("_","-")))
icon = QtGui.QIcon.fromTheme('cl-console-gui-%s'%self.method.replace("_","-"))
if icon.isNull():
icon = QtGui.QIcon.fromTheme('calculate-%s'%self.method.replace("_","-"))
self.setWindowIcon(icon)
QtGui.QApplication.setWindowIcon(icon)
conf_path = self.VarsGui.Get('cl_gui_config_path')
homePath = self.VarsGui.Get('ur_home_path')

Loading…
Cancel
Save