Compare commits

...

14 Commits

Author SHA1 Message Date
Clement Lefebvre
4c2de8d78b Merge pull request #100 from monsta/backports
[Backports] Revert "Simple fix for the flickering."
2015-09-20 14:40:48 +01:00
Clement Lefebvre
96f4e2c784 Merge pull request #101 from monsta/patch-2
[Backports] Escape ampersand in app names and comments
2014-11-08 13:48:08 +01:00
Clement Lefebvre
5c3df9252d Merge pull request #102 from monsta/patch-3
[Backports] Applications: Don't show duplicates by default (prior to applying filters)
2014-11-08 13:47:51 +01:00
Clement Lefebvre
71f3bf9765 Merge pull request #105 from monsta/patch-6
[Backports] Fixed a typo which led to loading non-localized string
2014-11-08 13:47:28 +01:00
monsta
327011aae8 [Backports] Fixed a typo which led to loading non-localized string 2014-08-02 10:51:01 +04:00
monsta
5bc55925ef Applications: Don't show duplicates by default (prior to applying filters) 2014-07-28 11:21:20 +04:00
monsta
ff2f169ed3 Escape ampersand in app names and comments 2014-07-28 11:09:15 +04:00
monsta
5f9ba4655d Revert "Simple fix for the flickering."
This reverts commit 7df225c81f.
2014-07-25 13:43:03 +04:00
Clement Lefebvre
d977c73223 5.5.3.1 2014-05-22 11:06:34 +01:00
hordepfo
c2275c4f4f Fixes an event cycle on the search entry
When pasting a string on the search entry that triggers suggestions
(google, etc) and this is done on the favorites tab, a cycle of changed
events occurs. It throws an exception, although everything still seems
to work.
With this fix the search entry isn't modified when changing tabs.
2014-05-22 11:05:19 +01:00
hordepfo
1b8e8b05fc Fixed search button
The search button was clearing the search entry when clicked.
2014-05-22 11:05:14 +01:00
hordepfo
7df225c81f Simple fix for the flickering. 2014-05-22 11:05:10 +01:00
hordepfo
10da188af6 Use current time for events that might not have a timestamp. 2014-05-22 11:04:57 +01:00
hordepfo
6a81d20019 Fixes reported issues with the mouse pointer. 2014-05-22 11:01:26 +01:00
5 changed files with 31 additions and 31 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
mintmenu (5.5.3.1) maya; urgency=medium
* Backported version of 5.5.6 for Maya and Petra
-- Clement Lefebvre <root@linuxmint.com> Thu, 22 May 2014 11:05:45 +0100
mintmenu (5.5.3) qiana; urgency=medium
* 5.5.3

View File

@ -58,7 +58,7 @@ class mintMenuConfig( object ):
self.builder.get_object("swapGeneric").set_label(_("Swap name and generic name"))
self.builder.get_object("label11").set_text(_("Border width:"))
self.builder.get_object("label2").set_text(_("pixels"))
self.builder.get_object("label25").set_text(_("pixels"))
self.builder.get_object("label8").set_text(_("Opacity:"))
self.builder.get_object("label9").set_text("%")

View File

@ -561,14 +561,14 @@ class pluginclass( object ):
def onHideMenu( self ):
self.settings.set( "int", "last-active-tab", self.lastActiveTab )
def changeTab( self, tabNum ):
def changeTab( self, tabNum, clear = True ):
notebook = self.builder.get_object( "notebook2" )
if tabNum == 0:
notebook.set_current_page( 0 )
elif tabNum == 1:
notebook.set_current_page( 1 )
self.focusSearchEntry()
self.focusSearchEntry(clear)
self.lastActiveTab = tabNum
@ -590,12 +590,12 @@ class pluginclass( object ):
self.mintMenuWin.stopHiding()
return False
def focusSearchEntry( self ):
def focusSearchEntry( self, clear = True ):
# grab_focus() does select all text,
# restoring the original selection is somehow broken, so just select the end
# of the existing text, that's the most likely candidate anyhow
self.searchEntry.grab_focus()
if self.rememberFilter:
if self.rememberFilter or not clear:
gtk.gtk_editable_set_position(hash(self.searchEntry), -1)
else:
self.searchEntry.set_text("")
@ -818,8 +818,7 @@ class pluginclass( object ):
else:
text = widget.get_text()
if self.lastActiveTab != 1:
self.changeTab( 1 )
widget.set_text( text )
self.changeTab( 1, clear = False )
text = widget.get_text()
showns = False # Are any app shown?
shownList = []
@ -1124,7 +1123,7 @@ class pluginclass( object ):
#menu.reposition()
#menu.reposition()
#self.mintMenuWin.grab()
self.focusSearchEntry()
self.focusSearchEntry(clear = False)
return True
def pos_func(self, menu=None):
@ -1755,9 +1754,16 @@ class pluginclass( object ):
item["button"].destroy()
sortedApplicationList.sort()
sortedApplicationList.sort()
launcherNames = [] # Keep track of launcher names so we don't add them twice in the list..
for item in sortedApplicationList:
self.applicationsBox.pack_start( item[1], False, False, 0 )
launcherName = item[0]
button = item[1]
self.applicationsBox.pack_start( button, False, False, 0 )
if launcherName in launcherNames:
button.hide()
else:
launcherNames.append(launcherName)
self.rebuildLock = False

View File

@ -176,7 +176,7 @@ class easyButton( Gtk.Button ):
def addLabel( self, text, styles = None ):
label = Gtk.Label()
if "<b>" in text or "<span" in text:
label.set_markup(text) # don't remove our pango
label.set_markup(text.replace('&', '&amp;')) # don't remove our pango
else:
label.set_text(text)

View File

@ -25,20 +25,11 @@ class PointerMonitor(GObject.GObject, threading.Thread):
self.display = Display()
self.root = self.display.screen().root
self.windows = []
self.topWindows = []
# Receives GDK windows
def addWindowToMonitor(self, window):
xWindow = self.display.create_resource_object("window", gdk.gdk_x11_drawable_get_xid(hash(window)))
self.windows.append(xWindow)
self.topWindows.append(self.getToplevelParent(xWindow))
def getToplevelParent(self, window):
parent = window.query_tree().parent
if parent == self.root:
return window
else:
return self.getToplevelParent(parent)
def grabPointer(self):
self.root.grab_button(X.AnyButton, X.AnyModifier, True, X.ButtonPressMask, X.GrabModeSync, X.GrabModeAsync, 0, 0)
@ -62,20 +53,17 @@ class PointerMonitor(GObject.GObject, threading.Thread):
try:
if event.type == X.ButtonPress:
# Check if pointer is inside monitored windows
for w, topW in zip(self.windows, self.topWindows):
if event.child == topW:
if topW == w:
break
else:
p = w.query_pointer()
g = w.get_geometry()
if p.win_x >= 0 and p.win_y >= 0 and p.win_x <= g.width and p.win_y <= g.height:
break
for w in self.windows:
p = w.query_pointer()
g = w.get_geometry()
if p.win_x >= 0 and p.win_y >= 0 and p.win_x <= g.width and p.win_y <= g.height:
break
else:
# Is outside, so activate
GLib.idle_add(self.idle)
self.display.allow_events(X.ReplayPointer, event.time)
self.display.allow_events(X.ReplayPointer, event.time)
else:
self.display.allow_events(X.ReplayPointer, X.CurrentTime)
except Exception as e:
print "Unexpected error: " + str(e)