Compare commits
5 Commits
master
...
19.3-maint
Author | SHA1 | Date | |
---|---|---|---|
|
cc94108b85 | ||
|
3e863c8b74 | ||
|
d7f650b79f | ||
|
77476ded54 | ||
|
3169e80707 |
12
debian/changelog
vendored
12
debian/changelog
vendored
@ -1,3 +1,15 @@
|
|||||||
|
mintmenu (6.0.5.1) ulyana; urgency=medium
|
||||||
|
|
||||||
|
[ Clement Lefebvre ]
|
||||||
|
* Search: Fix searching for accentuated strings
|
||||||
|
* Add missing dependency
|
||||||
|
|
||||||
|
[ Michael Webster ]
|
||||||
|
* applications.py: Fix dnd for re-ordering/adding favorites.
|
||||||
|
* recentHelper.py: Don't try to modify the recent list unless recents are enabled.
|
||||||
|
|
||||||
|
-- Clement Lefebvre <root@linuxmint.com> Sat, 18 Jul 2020 12:25:24 +0100
|
||||||
|
|
||||||
mintmenu (6.0.5) ulyana; urgency=medium
|
mintmenu (6.0.5) ulyana; urgency=medium
|
||||||
|
|
||||||
* Fix typo in file path
|
* Fix typo in file path
|
||||||
|
1
debian/control
vendored
1
debian/control
vendored
@ -15,6 +15,7 @@ Depends:
|
|||||||
python3-configobj,
|
python3-configobj,
|
||||||
python3-gi-cairo,
|
python3-gi-cairo,
|
||||||
python3-setproctitle,
|
python3-setproctitle,
|
||||||
|
python3-unidecode,
|
||||||
python3-xlib,
|
python3-xlib,
|
||||||
python3-xdg,
|
python3-xdg,
|
||||||
python3-xapp,
|
python3-xapp,
|
||||||
|
@ -12,7 +12,8 @@ import urllib.request, urllib.parse, urllib.error
|
|||||||
import gi
|
import gi
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
gi.require_version("MateMenu", "2.0")
|
gi.require_version("MateMenu", "2.0")
|
||||||
from gi.repository import Gtk, Gdk, GdkPixbuf, Gio, GLib, MateMenu
|
gi.require_version("XApp", "1.0")
|
||||||
|
from gi.repository import Gtk, Gdk, GdkPixbuf, Gio, GLib, MateMenu, XApp
|
||||||
|
|
||||||
import plugins.recentHelper as RecentHelper
|
import plugins.recentHelper as RecentHelper
|
||||||
from plugins.easybuttons import (ApplicationLauncher, CategoryButton,
|
from plugins.easybuttons import (ApplicationLauncher, CategoryButton,
|
||||||
@ -173,11 +174,11 @@ class pluginclass(object):
|
|||||||
toButton = (Gtk.TargetEntry.new("text/uri-list", 0, TARGET_TYPE_TEXT),
|
toButton = (Gtk.TargetEntry.new("text/uri-list", 0, TARGET_TYPE_TEXT),
|
||||||
Gtk.TargetEntry.new("text/uri-list", 0, TARGET_TYPE_TEXT))
|
Gtk.TargetEntry.new("text/uri-list", 0, TARGET_TYPE_TEXT))
|
||||||
TARGET_TYPE_FAV = 81
|
TARGET_TYPE_FAV = 81
|
||||||
toFav = (Gtk.TargetEntry.new("FAVORITES", Gtk.TargetFlags.SAME_APP, 81),
|
toFav = (Gtk.TargetEntry.new("text/plain", Gtk.TargetFlags.SAME_APP, 81),
|
||||||
Gtk.TargetEntry.new("text/plain", 0, 100),
|
Gtk.TargetEntry.new("text/plain", 0, 100),
|
||||||
Gtk.TargetEntry.new("text/uri-list", 0, 101))
|
Gtk.TargetEntry.new("text/uri-list", 0, 101))
|
||||||
fromFav = (Gtk.TargetEntry.new("FAVORITES", Gtk.TargetFlags.SAME_APP, 81),
|
fromFav = (Gtk.TargetEntry.new("text/plain", Gtk.TargetFlags.SAME_APP, 81),
|
||||||
Gtk.TargetEntry.new("FAVORITES", Gtk.TargetFlags.SAME_APP, 81))
|
Gtk.TargetEntry.new("text/plain", Gtk.TargetFlags.SAME_APP, 81))
|
||||||
|
|
||||||
#@print_timing
|
#@print_timing
|
||||||
def __init__(self, mintMenuWin, toggleButton, de):
|
def __init__(self, mintMenuWin, toggleButton, de):
|
||||||
@ -1412,12 +1413,11 @@ class pluginclass(object):
|
|||||||
def on_drag_data_get(self, widget, context, selection, info, time):
|
def on_drag_data_get(self, widget, context, selection, info, time):
|
||||||
if info == self.TARGET_TYPE_FAV:
|
if info == self.TARGET_TYPE_FAV:
|
||||||
self.drag_origin = widget.position
|
self.drag_origin = widget.position
|
||||||
# FIXME: This fails in python3:
|
selection.set_text(str(widget.position), -1)
|
||||||
selection.set(selection.get_target(), 8, str(widget.position))
|
|
||||||
|
|
||||||
def on_drag_data_received(self, widget, context, x, y, selection, info, time):
|
def on_drag_data_received(self, widget, context, x, y, selection, info, time):
|
||||||
if info == self.TARGET_TYPE_FAV:
|
if info == self.TARGET_TYPE_FAV:
|
||||||
self.favoritesReorder(int(selection.get_data()), widget.position)
|
self.favoritesReorder(int(selection.get_data().decode()), widget.position)
|
||||||
|
|
||||||
# def on_icon_theme_changed(self, theme):
|
# def on_icon_theme_changed(self, theme):
|
||||||
# print("on_icon_theme_changed")
|
# print("on_icon_theme_changed")
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
|
import unidecode
|
||||||
|
|
||||||
import xdg.DesktopEntry
|
import xdg.DesktopEntry
|
||||||
import xdg.Menu
|
import xdg.Menu
|
||||||
@ -258,10 +259,10 @@ class ApplicationLauncher(easyButton):
|
|||||||
|
|
||||||
def loadDesktopEntry(self, desktopItem):
|
def loadDesktopEntry(self, desktopItem):
|
||||||
try:
|
try:
|
||||||
self.appName = self.strip_accents(desktopItem.getName())
|
self.appName = desktopItem.getName()
|
||||||
self.appGenericName = self.strip_accents(desktopItem.getGenericName())
|
self.appGenericName = desktopItem.getGenericName()
|
||||||
self.appComment = self.strip_accents(desktopItem.getComment())
|
self.appComment = desktopItem.getComment()
|
||||||
self.appExec = self.strip_accents(desktopItem.getExec().replace('\\\\', '\\'))
|
self.appExec = desktopItem.getExec().replace('\\\\', '\\')
|
||||||
self.appIconName = desktopItem.getIcon()
|
self.appIconName = desktopItem.getIcon()
|
||||||
self.appCategories = desktopItem.getCategories()
|
self.appCategories = desktopItem.getCategories()
|
||||||
self.appMateDocPath = desktopItem.get("X-MATE-DocPath") or ""
|
self.appMateDocPath = desktopItem.get("X-MATE-DocPath") or ""
|
||||||
@ -303,30 +304,25 @@ class ApplicationLauncher(easyButton):
|
|||||||
self.addLabel(self.appName)
|
self.addLabel(self.appName)
|
||||||
|
|
||||||
def filterText(self, text):
|
def filterText(self, text):
|
||||||
keywords = text.lower().split()
|
keywords = self.strip_case_and_accents(text).split()
|
||||||
appName = self.appName.lower()
|
appName = self.strip_case_and_accents(self.appName)
|
||||||
appGenericName = self.appGenericName.lower()
|
appGenericName = self.strip_case_and_accents(self.appGenericName)
|
||||||
appComment = self.appComment.lower()
|
appComment = self.strip_case_and_accents(self.appComment)
|
||||||
appExec = self.appExec.lower()
|
appExec = self.strip_case_and_accents(self.appExec)
|
||||||
for keyword in keywords:
|
for keyword in keywords:
|
||||||
keyw = self.strip_accents(keyword)
|
if keyword != "" and appName.find(keyword) == -1 and appGenericName.find(keyword) == -1 and appComment.find(keyword) == -1 and appExec.find(keyword) == -1:
|
||||||
if keyw != "" and appName.find(keyw) == -1 and appGenericName.find(keyw) == -1 and appComment.find(keyw) == -1 and appExec.find(keyw) == -1:
|
|
||||||
self.hide()
|
self.hide()
|
||||||
return False
|
return False
|
||||||
self.show()
|
self.show()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def strip_accents(self, string):
|
def strip_case_and_accents(self, string):
|
||||||
# FIXME: Is this right??
|
if isinstance(string, str):
|
||||||
return string
|
try:
|
||||||
# value = string
|
value = unidecode.unidecode(string.lower())
|
||||||
# print(value, "...")
|
except:
|
||||||
# if isinstance(string, str):
|
pass
|
||||||
# try:
|
return value
|
||||||
# value = string.encode('UTF8', 'ignore')
|
|
||||||
# except:
|
|
||||||
# pass
|
|
||||||
# return value
|
|
||||||
|
|
||||||
def getTooltip(self):
|
def getTooltip(self):
|
||||||
tooltip = self.appName
|
tooltip = self.appName
|
||||||
|
@ -115,6 +115,10 @@ def doRecentApps():
|
|||||||
|
|
||||||
def applicationButtonClicked(widget):
|
def applicationButtonClicked(widget):
|
||||||
mintMenuWin.hide()
|
mintMenuWin.hide()
|
||||||
|
|
||||||
|
if settings == None:
|
||||||
|
return
|
||||||
|
|
||||||
recentAppsAdd(widget)
|
recentAppsAdd(widget)
|
||||||
recentAppsSave()
|
recentAppsSave()
|
||||||
doRecentApps()
|
doRecentApps()
|
||||||
|
Loading…
Reference in New Issue
Block a user