From 824fa8ad782c01c1e77c0c9b8b859ad65547f128 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Heli=20Hyv=C3=A4ttinen?= Date: Tue, 24 May 2011 18:57:10 +0300 Subject: [PATCH] The state before going to scratchbox Internal version number to 0.3.0 Fix for the bug that left selection dependent buttons on when the last timer was removed from the list --- src/kitchenalertmainwindow.cpp | 8 +++++--- src/kitchenalertmainwindow.h | 4 ++-- src/main.cpp | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/kitchenalertmainwindow.cpp b/src/kitchenalertmainwindow.cpp index 33ae87a..56783c4 100644 --- a/src/kitchenalertmainwindow.cpp +++ b/src/kitchenalertmainwindow.cpp @@ -45,6 +45,7 @@ #include #include + const QString defaultSaveDirectory_ = "/home/user/MyDocs/KitchenAlert/"; KitchenAlertMainWindow::KitchenAlertMainWindow(QWidget *parent) : @@ -52,8 +53,6 @@ KitchenAlertMainWindow::KitchenAlertMainWindow(QWidget *parent) : ui(new Ui::KitchenAlertMainWindow) { - defaultSaveDirectory_ = "/home/user/MyDocs/KitchenAlert/"; - ui->setupUi(this); setWindowIcon(QIcon(":/kitchenalert.png")); @@ -388,9 +387,12 @@ void KitchenAlertMainWindow::remove() if (QMessageBox::question(this,tr("Confirm timer removal"),text,QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { model_.removeTimer(row); + ui->ComingAlertsTableView->clearSelection(); + disableSelectionDependentButtons(); + } } - ui->SnoozeButton->setDisabled(true); + } void KitchenAlertMainWindow::saveTimer() diff --git a/src/kitchenalertmainwindow.h b/src/kitchenalertmainwindow.h index 1ec3974..a2d7202 100644 --- a/src/kitchenalertmainwindow.h +++ b/src/kitchenalertmainwindow.h @@ -40,7 +40,7 @@ namespace Ui { /*! The main window class of KitchenAlert' @author Heli Hyvättinen - @date 2011-04-26 + @date 2011-01-05 @version 0.3.0 Operates the UI. @@ -150,7 +150,7 @@ private: CurrentAlertsTableModel model_; /*! The model that stores the alerts */ - QString defaultSaveDirectory_; + const QString defaultSaveDirectory_; /*! Returns a QMoldelIndex pointing to the cell in the column 0 of the row that is currently selected. diff --git a/src/main.cpp b/src/main.cpp index 1e0b10f..d09f822 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setApplicationName("KitchenAlert"); //a name is required to connect to DBus - a.setApplicationVersion("0.2.1"); + a.setApplicationVersion("0.3.0"); a.setOrganizationName("KitchenAlert"); KitchenAlertMainWindow w; #if defined(Q_WS_S60) -- 1.7.9.5