Start reimplementing panel launcher creation
This commit is contained in:
parent
f57cfd9bd1
commit
50d3bb0c65
@ -3,7 +3,7 @@
|
|||||||
import gi
|
import gi
|
||||||
gi.require_version("Gtk", "2.0")
|
gi.require_version("Gtk", "2.0")
|
||||||
|
|
||||||
from gi.repository import Gtk, GObject, Pango, Gdk
|
from gi.repository import Gtk, GObject, Pango, Gdk, Gio
|
||||||
|
|
||||||
import os
|
import os
|
||||||
#import mateconf
|
#import mateconf
|
||||||
@ -25,6 +25,7 @@ from easyfiles import *
|
|||||||
|
|
||||||
gtk = CDLL("libgtk-x11-2.0.so.0")
|
gtk = CDLL("libgtk-x11-2.0.so.0")
|
||||||
|
|
||||||
|
|
||||||
from filemonitor import monitor as filemonitor
|
from filemonitor import monitor as filemonitor
|
||||||
|
|
||||||
#import xdg.Menu
|
#import xdg.Menu
|
||||||
@ -348,15 +349,18 @@ class pluginclass( object ):
|
|||||||
os.system("/usr/lib/linuxmint/mintMenu/plugins/get_apt_cache.py > %s/.linuxmint/mintMenu/apt.cache &" % home)
|
os.system("/usr/lib/linuxmint/mintMenu/plugins/get_apt_cache.py > %s/.linuxmint/mintMenu/apt.cache &" % home)
|
||||||
|
|
||||||
def get_panel(self):
|
def get_panel(self):
|
||||||
pass
|
self.panel = None
|
||||||
# self.panel = None
|
self.panel_position = 0
|
||||||
#FIX # self.panel_position = 0
|
panelsettings = Gio.Settings.new("org.mate.panel")
|
||||||
# appletidlist = mateconf.client_get_default().get_list("/apps/panel/general/applet_id_list", "string")
|
applet_list = panelsettings.get_strv("object-id-list")
|
||||||
# for applet in appletidlist:
|
for applet in applet_list:
|
||||||
# bonobo_id = mateconf.client_get_default().get_string("/apps/panel/applets/" + applet + "/applet_iid")
|
object_schema = Gio.Settings.new_with_path("org.mate.panel.object", "/org/mate/panel/objects/%s/" % (applet))
|
||||||
# if bonobo_id == "OAFIID:MATE_mintMenu":
|
keys = object_schema.list_keys()
|
||||||
# self.panel = mateconf.client_get_default().get_string("/apps/panel/applets/" + applet + "/toplevel_id")
|
if "applet-iid" in keys:
|
||||||
# self.panel_position = mateconf.client_get_default().get_int("/apps/panel/applets/" + applet + "/position") + 1
|
iid = object_schema.get_string("applet-iid")
|
||||||
|
if iid is not None and iid.find("MintMenuApplet") > 0:
|
||||||
|
self.panel = object_schema.get_string("toplevel-id")
|
||||||
|
self.panel_position = object_schema.get_int("position") + 1
|
||||||
|
|
||||||
def apturl_install(self, widget, pkg_name):
|
def apturl_install(self, widget, pkg_name):
|
||||||
if os.path.exists("/usr/bin/apturl"):
|
if os.path.exists("/usr/bin/apturl"):
|
||||||
|
Loading…
Reference in New Issue
Block a user