From: Yuuki H. <ma...@ma...> - 2015-12-25 15:57:37
|
原野です。 On Sat, 26 Dec 2015 00:43:28 +0900 (JST), Yuuki Harano <ma...@ma...> wrote: > これです。 > http://wiki.mate-desktop.org/docs:devel:mate-panel すみません、若干変更を加えていたので、そのまま以下に載せます。 ---------------------------------------------------------------- #!/usr/bin/env python import gi gi.require_version("Gtk", "3.0") gi.require_version("MatePanelApplet", "4.0") from gi.repository import Gtk from gi.repository import MatePanelApplet def applet_fill(applet): # you can use this path with gio/gsettings settings_path = applet.get_preferences_path() label = Gtk.Label("My MATE applet in Python") applet.add(label) applet.show_all() def applet_factory(applet, iid, data): if iid != "TestApplet": return False applet_fill(applet) return True MatePanelApplet.Applet.factory_main("TestAppletFactory", True, MatePanelApplet.Applet.__gtype__, applet_factory, None) ---------------------------------------------------------------- 失礼しました。 -- 原野 裕樹 mailto:ma...@ma... https://masm11.ddo.jp/~masm/ |