Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorvald Natvig <slicer@users.sourceforge.net>2009-12-01 18:55:53 +0300
committerThorvald Natvig <slicer@users.sourceforge.net>2009-12-01 18:55:53 +0300
commit7b30399e58460ce2f9d59ac6aebc837561fa6677 (patch)
tree271b0e925a67b7b188eb3bb3ee0dbc7a73fc193c /src
parentad9c7258a6025d6f024d026e4bbc53a68bf3fed3 (diff)
Commit shortcut editor before adding/removing
Diffstat (limited to 'src')
-rw-r--r--src/mumble/GlobalShortcut.cpp7
-rw-r--r--src/mumble/GlobalShortcut.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mumble/GlobalShortcut.cpp b/src/mumble/GlobalShortcut.cpp
index 12947cfcd..dc196b444 100644
--- a/src/mumble/GlobalShortcut.cpp
+++ b/src/mumble/GlobalShortcut.cpp
@@ -608,7 +608,12 @@ GlobalShortcutConfig::GlobalShortcutConfig(Settings &st) : ConfigWidget(st) {
}
}
+void GlobalShortcutConfig::commit() {
+ qtwShortcuts->closePersistentEditor(qtwShortcuts->currentItem(), qtwShortcuts->currentColumn());
+}
+
void GlobalShortcutConfig::on_qpbAdd_clicked(bool) {
+ commit();
Shortcut sc;
sc.iIndex = -1;
sc.bSuppress = false;
@@ -617,6 +622,7 @@ void GlobalShortcutConfig::on_qpbAdd_clicked(bool) {
}
void GlobalShortcutConfig::on_qpbRemove_clicked(bool) {
+ commit();
QTreeWidgetItem *qtwi = qtwShortcuts->currentItem();
if (! qtwi)
return;
@@ -631,6 +637,7 @@ void GlobalShortcutConfig::on_qtwShortcuts_currentItemChanged(QTreeWidgetItem *i
void GlobalShortcutConfig::on_qtwShortcuts_itemChanged(QTreeWidgetItem *item, int) {
int idx = qtwShortcuts->indexOfTopLevelItem(item);
+
Shortcut &sc = qlShortcuts[idx];
sc.iIndex = item->data(0, Qt::DisplayRole).toInt();
sc.qvData = item->data(1, Qt::DisplayRole);
diff --git a/src/mumble/GlobalShortcut.h b/src/mumble/GlobalShortcut.h
index 982a8f5f9..be1103ede 100644
--- a/src/mumble/GlobalShortcut.h
+++ b/src/mumble/GlobalShortcut.h
@@ -174,6 +174,7 @@ class GlobalShortcutConfig : public ConfigWidget, public Ui::GlobalShortcut {
void load(const Settings &r);
void reload();
bool expert(bool);
+ void commit();
void on_qpbAdd_clicked(bool);
void on_qpbRemove_clicked(bool);
void on_qtwShortcuts_currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);