Przeglądaj źródła

Bump version to 1.01.
Find and Replace dialogs now remember history (but only for the current KTIGCC session).


git-svn-id: file:///var/svn/tigccpp/trunk@872 9552661e-59e3-4036-b4f2-dbe53926924f

kevinkofler 17 lat temu
rodzic
commit
dd6adffa3c
6 zmienionych plików z 32 dodań i 8 usunięć
  1. 6 0
      ktigcc/NEWS
  2. 3 0
      ktigcc/fedora/ktigcc.spec
  3. 1 1
      ktigcc/ktigcc.cpp
  4. 1 0
      ktigcc/ktigcc.h
  5. 9 3
      ktigcc/mainform.ui.h
  6. 12 4
      ktigcc/srcfilewin.ui.h

+ 6 - 0
ktigcc/NEWS

@@ -1,5 +1,11 @@
 This is a summary of the changes in KTIGCC since the first alpha release:
 
+KTIGCC 1.01 (2006-08-21):
+
+* Find and Replace dialogs now remember history (but only for the current KTIGCC
+  session).
+
+
 KTIGCC 1.00 (2006-08-20):
 
 * Added NEWS file containing the history information previously published in the

+ 3 - 0
ktigcc/fedora/ktigcc.spec

@@ -114,6 +114,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{tigccdir}/doc/ktigcc
 
 %changelog
+* Mon Aug 21 2006 Kevin Kofler <Kevin@tigcc.ticalc.org>
+Bump version to 1.01.
+
 * Sun Aug 20 2006 Kevin Kofler <Kevin@tigcc.ticalc.org>
 Drop date from version and bump to 1.00.
 Don't use macros to define nvr.

+ 1 - 1
ktigcc/ktigcc.cpp

@@ -62,7 +62,7 @@ int main( int argc, char *argv[] )
   // characters lost converting!
   QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
 
-  KAboutData about("ktigcc","TIGCC IDE for KDE","1.00",
+  KAboutData about("ktigcc","TIGCC IDE for KDE","1.01",
   "TIGCC C and ASM SDK", KAboutData::License_GPL,
   "Copyright (C) 2004-2006 Kevin Kofler and Joey Adams. All rights reserved.\n"
   "TIGCC Copyright (C) 1999-2006 The TIGCC Team.",

+ 1 - 0
ktigcc/ktigcc.h

@@ -47,6 +47,7 @@ extern KAboutData *pabout;
 extern const char *parg;
 extern AssistantClient *assistant;
 extern QClipboard *clipboard;
+extern QStringList findHistory, replacementHistory;
 extern QPtrList<SourceFile> sourceFiles;
 extern tprSettings settings;
 extern tprLibOpts libopts;

+ 9 - 3
ktigcc/mainform.ui.h

@@ -405,6 +405,7 @@ static QString lastDirectory;
 QClipboard *clipboard;
 static QAccel *accel, *fileTreeAccel;
 static KFindDialog *kfinddialog;
+QStringList findHistory, replacementHistory;
 static QListViewItem *findCurrentDocument;
 static unsigned findCurrentLine;
 QPtrList<SourceFile> sourceFiles;
@@ -2682,7 +2683,7 @@ void MainForm::findFind()
   else {
     // Never set hasSelection because finding in selection doesn't really make
     // sense with my non-modal find dialog setup.
-    kfinddialog=new KFindDialog(false,this,0,KFindDialog::FromCursor);
+    kfinddialog=new KFindDialog(false,this,0,KFindDialog::FromCursor,findHistory);
     connect(kfinddialog, SIGNAL(okClicked()), this, SLOT(findFind_next()));
     connect(kfinddialog, SIGNAL(cancelClicked()), this, SLOT(findFind_stop()));
     kfinddialog->show();
@@ -2864,7 +2865,10 @@ void MainForm::findFind_highlight(const QString &unused_text, int matchingindex,
 
 void MainForm::findFind_stop()
 {
-  if (kfinddialog) kfinddialog->deleteLater();
+  if (kfinddialog) {
+    findHistory=kfinddialog->findHistory();
+    kfinddialog->deleteLater();
+  }
   kfinddialog=static_cast<KFindDialog *>(NULL);
 }
 
@@ -2879,10 +2883,12 @@ void MainForm::findReplace()
   KReplaceDialog kreplacedialog(this,0,((CURRENT_VIEW&&CURRENT_VIEW->getDoc()->hasSelection()
                                         &&CURRENT_VIEW->getDoc()->selStartLine()!=CURRENT_VIEW->getDoc()->selEndLine())?
                                         KFindDialog::SelectedText:0)|KFindDialog::FromCursor,
-                                       QStringList(),QStringList(),
+                                       findHistory,replacementHistory,
                                        CURRENT_VIEW&&CURRENT_VIEW->getDoc()->hasSelection());
   if (kreplacedialog.exec()!=QDialog::Accepted)
     return;
+  findHistory=kreplacedialog.findHistory();
+  replacementHistory=kreplacedialog.replacementHistory();
   kreplace=new KReplaceWithSelection(kreplacedialog.pattern(),kreplacedialog.replacement(),
                                      kreplacedialog.options(),this);
   // Connect signals to code which handles highlighting of found text, and

+ 12 - 4
ktigcc/srcfilewin.ui.h

@@ -283,7 +283,10 @@ void SourceFileWindow::destroy()
 {
   MainForm::deleteErrorsForSrcFile(this);
   if (THIS->kreplace) delete THIS->kreplace;
-  if (THIS->kfinddialog) delete THIS->kfinddialog;
+  if (THIS->kfinddialog) {
+    findHistory=THIS->kfinddialog->findHistory();
+    delete THIS->kfinddialog;
+  }
   delete THIS->accel;
   delete THIS->te_popup;
   delete THIS->rowStatusLabel;
@@ -685,7 +688,7 @@ void SourceFileWindow::findFind()
   else {
     // Never set hasSelection because finding in selection doesn't really make
     // sense with my non-modal find dialog setup.
-    THIS->kfinddialog=new KFindDialog(false,this,0,KFindDialog::FromCursor);
+    THIS->kfinddialog=new KFindDialog(false,this,0,KFindDialog::FromCursor,findHistory);
     connect(THIS->kfinddialog, SIGNAL(okClicked()), this, SLOT(findFind_next()));
     connect(THIS->kfinddialog, SIGNAL(cancelClicked()), this, SLOT(findFind_stop()));
     THIS->kfinddialog->show();
@@ -771,7 +774,10 @@ void SourceFileWindow::findFind_highlight(const QString &unused_text, int matchi
 
 void SourceFileWindow::findFind_stop()
 {
-  if (THIS->kfinddialog) THIS->kfinddialog->deleteLater();
+  if (THIS->kfinddialog) {
+    findHistory=THIS->kfinddialog->findHistory();
+    THIS->kfinddialog->deleteLater();
+  }
   THIS->kfinddialog=static_cast<KFindDialog *>(NULL);
 }
 
@@ -786,10 +792,12 @@ void SourceFileWindow::findReplace()
   KReplaceDialog kreplacedialog(this,0,((CURRENT_VIEW&&CURRENT_VIEW->getDoc()->hasSelection()
                                         &&CURRENT_VIEW->getDoc()->selStartLine()!=CURRENT_VIEW->getDoc()->selEndLine())?
                                         KFindDialog::SelectedText:0)|KFindDialog::FromCursor,
-                                       QStringList(),QStringList(),
+                                       findHistory,replacementHistory,
                                        CURRENT_VIEW&&CURRENT_VIEW->getDoc()->hasSelection());
   if (kreplacedialog.exec()!=QDialog::Accepted)
     return;
+  findHistory=kreplacedialog.findHistory();
+  replacementHistory=kreplacedialog.replacementHistory();
   THIS->kreplace=new KReplaceWithSelectionS(kreplacedialog.pattern(),kreplacedialog.replacement(),
                                             kreplacedialog.options(),this);
   // Connect signals to code which handles highlighting of found text, and