Merge branch 'master' into google
authorJakub Jaszczynski <j.j.jaszczynski@gmail.com>
Thu, 26 Aug 2010 06:47:46 +0000 (08:47 +0200)
committerJakub Jaszczynski <j.j.jaszczynski@gmail.com>
Thu, 26 Aug 2010 06:47:46 +0000 (08:47 +0200)
Conflicts:
trunk/src/base/backbone/backbone.cpp
trunk/src/base/gui/DictManagerWidget.cpp
trunk/src/base/gui/SearchBarWidget.cpp

12 files changed:
1  2 
trunk/src/base/backbone/backbone.cpp
trunk/src/base/backbone/backbone.h
trunk/src/base/gui/BookmarksWidget.h
trunk/src/base/gui/DictManagerWidget.cpp
trunk/src/base/gui/DictManagerWidget.h
trunk/src/base/gui/MainWindow.cpp
trunk/src/base/gui/MainWindow.h
trunk/src/base/gui/SearchBarWidget.cpp
trunk/src/base/gui/SettingsWidget.cpp
trunk/src/base/gui/SettingsWidget.h
trunk/src/base/gui/TranslationWidget.cpp
trunk/src/plugins/xdxf/src/xdxfplugin.cpp

Simple merge
@@@ -208,9 -208,9 +208,9 @@@ public Q_SLOTS
  
  
  
 -    /*! Remove all bookmarks
 +    /*! Removes all bookmarks
        */
-     void removeAllBookmark(){
+     void removeAllBookmarks(){
          _bookmarks.clear();
      }
  
Simple merge
@@@ -117,18 -133,32 +133,31 @@@ void DictManagerWidget::showEvent(QShow
      QWidget::showEvent(e);
  }
  
- void DictManagerWidget::hideEvent(QHideEvent *e)
- {
-     QList<CommonDictInterface*> checkedDicts;
+ void DictManagerWidget::saveChanges() {
+     #ifndef Q_WS_MAEMO_5
+     if(_save) {
+     #else
+     if(_changed &&
+             QMessageBox::question(this, "Save", "Do you want to save changes?",
+             QMessageBox::Save, QMessageBox::Cancel) == QMessageBox::Save) {
+     #endif
+         QList<CommonDictInterface*> checkedDicts;
  
-     for(int i=0; i<dictListWidget->count(); i++) {
-         QListWidgetItem* item = dictListWidget->item(i);
-         if(item->checkState() == Qt::Checked) {
-             checkedDicts.push_back(dictsHash[item]);
+         for(int i=0; i<dictListWidget->count(); i++) {
+             QListWidgetItem* item = dictListWidget->item(i);
+             if(item->checkState() == Qt::Checked) {
+                 checkedDicts.push_back(dictsHash[item]);
+             }
          }
+         emit selectedDictionaries(checkedDicts);
      }
-     Q_EMIT selectedDictionaries(checkedDicts);
 -
+     _changed = false;
+ }
  
+ void DictManagerWidget::hideEvent(QHideEvent *e)
+ {
+     saveChanges();
      QWidget::hideEvent(e);
  }
  
Simple merge
@@@ -191,9 -191,12 +191,12 @@@ private Q_SLOTS
      //! disabled
      void breakSearching();
  
+     //! Asks for confirmation when user click on "delete all bookmarks"
+     void removeBookmarks();
  
  protected:
 -    /*! When user wants to close application, we first sends signal to stop all
 +    /*! When user wants to close application, we first send signal to stop all
          ongoing searches.
      */
      void closeEvent(QCloseEvent *);
@@@ -185,8 -187,9 +187,8 @@@ void SearchBarWidget::initializeUI() 
                  fullScreenToolButton->sizeHint().height()*2);
      #endif*/
  
-     searchingProgressBar = new QProgressBar(this);
-     //progress bar has minimum and maximum values set to 0, which will effect
 -
+     searchingProgressBar = new QProgressBar();
+     //progress bar have minimum and maximum values set to 0, which will effect
      //with "I'm alive" bar
      searchingProgressBar->setMinimum(0);
      searchingProgressBar->setMaximum(0);
Simple merge
Simple merge
@@@ -360,12 -372,8 +371,8 @@@ void XdxfPlugin::getDictionaryInfo() 
  
      QString format = "png";
      QString initialPath = QDir::currentPath() + tr("/xdxf.") + format;
- //  qDebug()<<initialPath;
- //  QPixmap test(":/icons/xdxf.png");
- //  qDebug()<<QPixmap(test).save(initialPath,format.toAscii());
- //  qDebug()<<QPixmap("/home/jakub/star.jpg").save(initialPath,format.toAscii());
  
 -    _infoNote="path=\""+initialPath+"\">"+"\n" + _name + " [" + _langFrom + "-" + _langTo + "] "+ "(" + _type + ")";
 +    _infoNote="path=\""+initialPath+"\"> \n" + _name + " [" + _langFrom + "-" + _langTo + "] (" + _type + ")";
  
      dictionaryFile.close();
  }