Fix tooltips and make them optional, remove category tooltips in apps
This commit is contained in:
parent
8988476df2
commit
651214aa18
@ -73,9 +73,6 @@ class MainWindow(object):
|
|||||||
plugindir = os.path.join(os.path.expanduser("~"), ".linuxmint/mintMenu/plugins")
|
plugindir = os.path.join(os.path.expanduser("~"), ".linuxmint/mintMenu/plugins")
|
||||||
sys.path.append(plugindir)
|
sys.path.append(plugindir)
|
||||||
|
|
||||||
self.panelSettings = Gio.Settings.new("org.mate.panel")
|
|
||||||
self.panelSettings.connect("changed::tooltips-enabled", self.toggleTooltipsEnabled)
|
|
||||||
|
|
||||||
self.settings.connect("changed::plugins-list", self.RegenPlugins)
|
self.settings.connect("changed::plugins-list", self.RegenPlugins)
|
||||||
self.settings.connect("changed::start-with-favorites", self.toggleStartWithFavorites)
|
self.settings.connect("changed::start-with-favorites", self.toggleStartWithFavorites)
|
||||||
self.settings.connect("changed::tooltips-enabled", self.toggleTooltipsEnabled)
|
self.settings.connect("changed::tooltips-enabled", self.toggleTooltipsEnabled)
|
||||||
@ -86,12 +83,9 @@ class MainWindow(object):
|
|||||||
self.getSetGSettingEntries()
|
self.getSetGSettingEntries()
|
||||||
|
|
||||||
self.tooltipsWidgets = []
|
self.tooltipsWidgets = []
|
||||||
if self.globalEnableTooltips and self.enableTooltips:
|
|
||||||
self.tooltipsEnable()
|
|
||||||
else:
|
|
||||||
self.tooltipsEnable(False)
|
|
||||||
|
|
||||||
self.PopulatePlugins()
|
self.PopulatePlugins()
|
||||||
|
self.toggleTooltipsEnabled(self.settings, "tooltips-enabled")
|
||||||
self.firstTime = True
|
self.firstTime = True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -106,13 +100,9 @@ class MainWindow(object):
|
|||||||
plugin.wake()
|
plugin.wake()
|
||||||
|
|
||||||
def toggleTooltipsEnabled(self, settings, key, args = None):
|
def toggleTooltipsEnabled(self, settings, key, args = None):
|
||||||
if key == "tooltips-enabled":
|
self.enableTooltips = settings.get_boolean(key)
|
||||||
self.globalEnableTooltips = settings.get_boolean(key)
|
if self.enableTooltips:
|
||||||
else:
|
self.tooltipsEnable(True)
|
||||||
self.enableTooltips = settings.get_boolean(key)
|
|
||||||
|
|
||||||
if self.globalEnableTooltips and self.enableTooltips:
|
|
||||||
self.tooltipsEnable()
|
|
||||||
else:
|
else:
|
||||||
self.tooltipsEnable(False)
|
self.tooltipsEnable(False)
|
||||||
|
|
||||||
@ -142,8 +132,6 @@ class MainWindow(object):
|
|||||||
self.enableTooltips = self.settings.get_boolean("tooltips-enabled")
|
self.enableTooltips = self.settings.get_boolean("tooltips-enabled")
|
||||||
self.startWithFavorites = self.settings.get_boolean("start-with-favorites")
|
self.startWithFavorites = self.settings.get_boolean("start-with-favorites")
|
||||||
|
|
||||||
self.globalEnableTooltips = self.panelSettings.get_boolean("tooltips-enabled")
|
|
||||||
|
|
||||||
def PopulatePlugins(self):
|
def PopulatePlugins(self):
|
||||||
self.panesToColor = []
|
self.panesToColor = []
|
||||||
self.headingsToColor = []
|
self.headingsToColor = []
|
||||||
@ -294,7 +282,6 @@ class MainWindow(object):
|
|||||||
|
|
||||||
self.paneholder.pack_start(ImageBox, False, False, 0)
|
self.paneholder.pack_start(ImageBox, False, False, 0)
|
||||||
self.paneholder.pack_start(PluginPane, False, False, 0)
|
self.paneholder.pack_start(PluginPane, False, False, 0)
|
||||||
self.tooltipsEnable(False)
|
|
||||||
|
|
||||||
# A little bit hacky but works.
|
# A little bit hacky but works.
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -1476,7 +1476,7 @@ class pluginclass(object):
|
|||||||
for item in addedCategories:
|
for item in addedCategories:
|
||||||
try:
|
try:
|
||||||
item["button"] = CategoryButton(item["icon"], categoryIconSize, [item["name"]], item["filter"])
|
item["button"] = CategoryButton(item["icon"], categoryIconSize, [item["name"]], item["filter"])
|
||||||
self.mintMenuWin.setTooltip(item["button"], item["tooltip"])
|
# self.mintMenuWin.setTooltip(item["button"], item["tooltip"])
|
||||||
|
|
||||||
if self.categories_mouse_over:
|
if self.categories_mouse_over:
|
||||||
startId = item["button"].connect("enter", self.StartFilter, item["filter"])
|
startId = item["button"].connect("enter", self.StartFilter, item["filter"])
|
||||||
|
Loading…
Reference in New Issue
Block a user