Browse Source

Use Ctrl+F to focus on search bar; Fix previous commit

tags/v2.1-rc1
falkTX 5 years ago
parent
commit
535cb1e596
2 changed files with 29 additions and 3 deletions
  1. +26
    -1
      resources/ui/carla_database.ui
  2. +3
    -2
      source/frontend/carla_database.py

+ 26
- 1
resources/ui/carla_database.ui View File

@@ -818,6 +818,14 @@
</widget>
</item>
</layout>
<action name="act_focus_search">
<property name="text">
<string>Focus Text Search</string>
</property>
<property name="shortcut">
<string>Ctrl+F</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>lineEdit</tabstop>
@@ -852,5 +860,22 @@
<resources>
<include location="../resources.qrc"/>
</resources>
<connections/>
<connections>
<connection>
<sender>act_focus_search</sender>
<signal>triggered()</signal>
<receiver>lineEdit</receiver>
<slot>setFocus()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>448</x>
<y>23</y>
</hint>
</hints>
</connection>
</connections>
</ui>

+ 3
- 2
source/frontend/carla_database.py View File

@@ -1414,6 +1414,7 @@ class PluginDatabaseW(QDialog):
# Set-up GUI

self.ui.b_add.setEnabled(False)
self.addAction(self.ui.act_focus_search)

if BINARY_NATIVE in (BINARY_POSIX32, BINARY_WIN32):
self.ui.ch_bridged.setText(self.tr("Bridged (64bit)"))
@@ -2083,9 +2084,9 @@ class PluginDatabaseW(QDialog):

# --------------------------------------------------------------------------------------------------------

def showEvent(self):
def showEvent(self, event):
self.ui.lineEdit.setFocus()
QDialog.showEvent(self)
QDialog.showEvent(self, event)

def done(self, r):
QDialog.done(self, r)


Loading…
Cancel
Save