applications plugin: Launch first application matching search on ENTER keypress.
This commit is contained in:
parent
4b876e7faa
commit
e12dee7b01
6
install
Executable file
6
install
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
umask 002
|
||||||
|
|
||||||
|
sudo rm -rf /usr/lib/linuxmint/mintMenu
|
||||||
|
sudo cp -R usr /
|
||||||
|
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
|
1
test
1
test
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
umask 002
|
||||||
|
|
||||||
sudo rm -rf /usr/lib/linuxmint/mintMenu
|
sudo rm -rf /usr/lib/linuxmint/mintMenu
|
||||||
sudo cp -R usr /
|
sudo cp -R usr /
|
||||||
|
@ -836,6 +836,10 @@ class pluginclass( object ):
|
|||||||
i.hide()
|
i.hide()
|
||||||
else:
|
else:
|
||||||
shownList.append(i)
|
shownList.append(i)
|
||||||
|
#if this is the first matching item
|
||||||
|
#focus it
|
||||||
|
if(not showns):
|
||||||
|
i.grab_focus()
|
||||||
showns = True
|
showns = True
|
||||||
if (not showns and os.path.exists("/usr/bin/mintinstall")):
|
if (not showns and os.path.exists("/usr/bin/mintinstall")):
|
||||||
if len(text) >= 3:
|
if len(text) >= 3:
|
||||||
@ -894,6 +898,7 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
# Forward all text to the search box
|
# Forward all text to the search box
|
||||||
def keyPress( self, widget, event ):
|
def keyPress( self, widget, event ):
|
||||||
|
|
||||||
if event.string.strip() != "" or event.keyval == Gdk.KEY_BackSpace:
|
if event.string.strip() != "" or event.keyval == Gdk.KEY_BackSpace:
|
||||||
self.searchEntry.grab_focus()
|
self.searchEntry.grab_focus()
|
||||||
gtk.gtk_editable_set_position.argtypes = [c_void_p, c_int]
|
gtk.gtk_editable_set_position.argtypes = [c_void_p, c_int]
|
||||||
@ -1313,8 +1318,15 @@ class pluginclass( object ):
|
|||||||
self.favoritesAdd( self.favoritesBuildLauncher( uri ) )
|
self.favoritesAdd( self.favoritesBuildLauncher( uri ) )
|
||||||
|
|
||||||
def Search( self, widget ):
|
def Search( self, widget ):
|
||||||
|
|
||||||
text = self.searchEntry.get_text().strip()
|
text = self.searchEntry.get_text().strip()
|
||||||
if text != "":
|
if text != "":
|
||||||
|
for app_button in self.applicationsBox.get_children():
|
||||||
|
if( isinstance(app_button, ApplicationLauncher) and app_button.filterText( text ) ):
|
||||||
|
app_button.execute()
|
||||||
|
self.mintMenuWin.hide()
|
||||||
|
return
|
||||||
|
|
||||||
self.mintMenuWin.hide()
|
self.mintMenuWin.hide()
|
||||||
fullstring = self.searchtool.replace( "%s", text )
|
fullstring = self.searchtool.replace( "%s", text )
|
||||||
os.system(fullstring + " &")
|
os.system(fullstring + " &")
|
||||||
|
Loading…
Reference in New Issue
Block a user