Browse Source

When saving a project for the first time, if it is still named "Project1", set a name based on the .tpr file name (as in TIGCC IDE).

git-svn-id: file:///var/svn/tigccpp/trunk@923 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 17 years ago
parent
commit
91c4e16efb
2 changed files with 5 additions and 1 deletions
  1. 3 1
      ktigcc/NEWS
  2. 2 0
      ktigcc/mainform.ui.h

+ 3 - 1
ktigcc/NEWS

@@ -1,6 +1,6 @@
 This is a summary of the changes in KTIGCC since the first alpha release:
 
-CVS HEAD (2006-11-21):
+CVS HEAD (2006-11-23):
 
 * Added Anjuta 2 project, removed Anjuta 1 project.
 * Fixed missing layout in the Operating System tab of the Program Options
@@ -11,6 +11,8 @@ CVS HEAD (2006-11-21):
 * Added tas to the default Integer Arithmetic instructions.
 * Added xdef, globl, altmacro and noaltmacro to the default GNU as directives.
 * Ctrl+Tab/Ctrl+G now skips the project root and the categories.
+* When saving a project for the first time, if it is still named "Project1", a
+  name based on the .tpr file name is now set (as in TIGCC IDE).
 
 
 KTIGCC 1.05 (2006-10-24):

+ 2 - 0
ktigcc/mainform.ui.h

@@ -2374,6 +2374,8 @@ void MainForm::fileSave_fromto(const QString &lastProj,const QString &nextProj)
   fileSave_loadList(aFilesListItem,&TPRData.a_files,base_dir,&new_dir,&open_file);
   fileSave_loadList(txtFilesListItem,&TPRData.txt_files,base_dir,&new_dir,&open_file);
   fileSave_loadList(othFilesListItem,&TPRData.oth_files,base_dir,&new_dir,&open_file);
+  if (projectFileName.isEmpty() && rootListItem->text(0)=="Project1")
+    fileTreeItemRenamed(rootListItem,QFileInfo(nextProj).baseName(),0);
   TPRData.prj_name=rootListItem->text(0);
   TPRData.open_file=open_file;
   TPRData.settings=settings;