projects
/
pierogi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Several GUI fixes
[pierogi]
/
mainwindow.cpp
diff --git
a/mainwindow.cpp
b/mainwindow.cpp
index
fb07829
..
cbc276b
100644
(file)
--- a/
mainwindow.cpp
+++ b/
mainwindow.cpp
@@
-72,8
+72,7
@@
MainWindow::MainWindow(QWidget *parent)
connect(
ui->favoriteKeysetsWidget,
connect(
ui->favoriteKeysetsWidget,
-// SIGNAL(itemActivated(QListWidgetItem *)),
- SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
+ SIGNAL(itemActivated(QListWidgetItem *)),
this,
SLOT(keysetSelectionChanged(QListWidgetItem *)),
Qt::QueuedConnection);
this,
SLOT(keysetSelectionChanged(QListWidgetItem *)),
Qt::QueuedConnection);
@@
-893,6
+892,12
@@
void MainWindow::keysetSelectionChanged(
PIRKeysetWidgetItem *kwi = dynamic_cast<PIRKeysetWidgetItem *>(item);
if (!kwi) return; // Also need to say something here
PIRKeysetWidgetItem *kwi = dynamic_cast<PIRKeysetWidgetItem *>(item);
if (!kwi) return; // Also need to say something here
+
+ if (currentKeyset == kwi->getID())
+ {
+ // We're already on that keyset, so nothing to do:
+ return;
+ }
currentKeyset = kwi->getID();
currentKeyset = kwi->getID();
@@
-1093,6
+1098,8
@@
void MainWindow::selectPrevFavKeyset()
position,
QItemSelectionModel::ClearAndSelect);
position,
QItemSelectionModel::ClearAndSelect);
+ keysetSelectionChanged(ui->favoriteKeysetsWidget->currentItem());
+
// Tell the user about the change:
QMaemo5InformationBox::information(
0,
// Tell the user about the change:
QMaemo5InformationBox::information(
0,
@@
-1122,6
+1129,8
@@
void MainWindow::selectNextFavKeyset()
position,
QItemSelectionModel::ClearAndSelect);
position,
QItemSelectionModel::ClearAndSelect);
+ keysetSelectionChanged(ui->favoriteKeysetsWidget->currentItem());
+
// Tell the user about the change:
QMaemo5InformationBox::information(
0,
// Tell the user about the change:
QMaemo5InformationBox::information(
0,