[magneto] launch Rigo instead of Sulfur if possible
This commit is contained in:
|
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 916 B |
@@ -20,11 +20,9 @@ import time
|
||||
def _startup():
|
||||
sys.path.insert(0, '/usr/lib/entropy/client')
|
||||
sys.path.insert(0, '/usr/lib/entropy/lib')
|
||||
sys.path.insert(0, '/usr/lib/entropy/sulfur')
|
||||
sys.path.insert(0, '/usr/lib/entropy/magneto')
|
||||
sys.path.insert(0, '../../client')
|
||||
sys.path.insert(0, '../../lib')
|
||||
sys.path.insert(0, '../../sulfur/src')
|
||||
sys.path.insert(0, '../')
|
||||
|
||||
startup_delay = None
|
||||
|
||||
@@ -24,6 +24,7 @@ from entropy.client.interfaces import Client
|
||||
from entropy.const import etpConst
|
||||
import entropy.tools
|
||||
from entropy.i18n import _, ngettext
|
||||
from entropy.misc import ParallelTask
|
||||
|
||||
# Magneto imports
|
||||
from magneto.core import config
|
||||
@@ -123,7 +124,7 @@ class MagnetoCore(MagnetoCoreUI):
|
||||
self.icons.add_file("busy", "applet-busy.png")
|
||||
self.icons.add_file("critical", "applet-critical.png")
|
||||
self.icons.add_file("disable", "applet-disable.png")
|
||||
self.icons.add_file("sulfur", "sulfur.png")
|
||||
self.icons.add_file("pm", "pm.png")
|
||||
self.icons.add_file("web", "applet-web.png")
|
||||
self.icons.add_file("configuration", "applet-configuration.png")
|
||||
self.applet_size = 22
|
||||
@@ -347,7 +348,7 @@ class MagnetoCore(MagnetoCoreUI):
|
||||
def get_menu_image(self, name):
|
||||
|
||||
if name == "update_now":
|
||||
pix = self.icons.best_match("sulfur", 22)
|
||||
pix = self.icons.best_match("pm", 22)
|
||||
elif name == "check_now":
|
||||
pix = self.icons.best_match("okay", 22)
|
||||
elif name in ["web_panel", "web_site"]:
|
||||
@@ -373,7 +374,14 @@ class MagnetoCore(MagnetoCoreUI):
|
||||
subprocess.call(['xdg-open', url])
|
||||
|
||||
def launch_package_manager(self, *data):
|
||||
subprocess.call('sulfur &', shell = True)
|
||||
if os.access("/usr/bin/rigo", os.X_OK | os.R_OK):
|
||||
task = ParallelTask(subprocess.call, ["/usr/bin/rigo"])
|
||||
task.daemon = True
|
||||
task.start()
|
||||
elif os.access("/usr/bin/sulfur", os.X_OK | os.R_OK):
|
||||
task = ParallelTask(subprocess.call, ["/usr/bin/sulfur"])
|
||||
task.daemon = True
|
||||
task.start()
|
||||
|
||||
def disable_applet(self):
|
||||
self.update_tooltip(_("Updates Notification Applet Disabled"))
|
||||
|
||||
@@ -100,7 +100,7 @@ class AppletNoticeWindow(GladeWindow):
|
||||
|
||||
self.xml.signal_autoconnect (
|
||||
{
|
||||
"on_launch_sulfur_clicked": self.on_sulfur,
|
||||
"on_launch_pm_clicked": self.on_pm,
|
||||
"on_close_clicked": self.on_close,
|
||||
})
|
||||
|
||||
@@ -115,7 +115,7 @@ class AppletNoticeWindow(GladeWindow):
|
||||
def show(self):
|
||||
self.window.show()
|
||||
|
||||
def on_sulfur(self, button):
|
||||
def on_pm(self, button):
|
||||
self.__controller.launch_package_manager()
|
||||
|
||||
def on_close(self, *args):
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<signal name="clicked" handler="on_launch_sulfur_clicked"/>
|
||||
<signal name="clicked" handler="on_launch_pm_clicked"/>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@@ -81,7 +81,7 @@ class AppletNoticeWindow(QWidget):
|
||||
|
||||
self.__button_hbox = QHBoxLayout()
|
||||
self.__close_button = QPushButton(_("Close"))
|
||||
self.__launch_pm_button = QPushButton(_("Launch Sulfur"))
|
||||
self.__launch_pm_button = QPushButton(_("Launch Application Browser"))
|
||||
self.__button_hbox.addWidget(self.__launch_pm_button)
|
||||
self.__button_hbox.addWidget(self.__close_button)
|
||||
|
||||
@@ -99,7 +99,7 @@ class AppletNoticeWindow(QWidget):
|
||||
self.setWindowIcon(self.__window_icon)
|
||||
|
||||
self.connect(self.__close_button, SIGNAL("clicked()"), self.on_close)
|
||||
self.connect(self.__launch_pm_button, SIGNAL("clicked()"), self.on_sulfur)
|
||||
self.connect(self.__launch_pm_button, SIGNAL("clicked()"), self.on_pm)
|
||||
|
||||
def closeEvent(self, event):
|
||||
"""
|
||||
@@ -109,7 +109,7 @@ class AppletNoticeWindow(QWidget):
|
||||
event.ignore()
|
||||
self.on_close()
|
||||
|
||||
def on_sulfur(self):
|
||||
def on_pm(self):
|
||||
self.__controller.launch_package_manager()
|
||||
|
||||
def on_close(self):
|
||||
@@ -119,5 +119,3 @@ class AppletNoticeWindow(QWidget):
|
||||
self.__list_model.setStringList(pkg_data)
|
||||
self.__critical_label.setText(critical_txt)
|
||||
self.__list_view.update()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user