[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/utils/gwenrename
From:       Spiros Georgaras <sngeorgaras () otenet ! gr>
Date:       2009-10-21 21:18:30
Message-ID: 1256159910.386151.19351.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1038800 by sngeorgaras:

Fixed icon presentation when conflict and name is empty

 M  +4 -2      ChangeLog  
 M  +7 -7      src/namepartbase.ui  
 M  +16 -5     src/rename.cpp  


--- trunk/playground/utils/gwenrename/ChangeLog #1038799:1038800
@@ -1,9 +1,10 @@
 GwenRename 1.1-beta7:
 =====================
 - Finally got rid of the Qt3Factory include directive in the indermediate ui_*.h
-  files. Now GwenRename is truely a KDE4 application
+  files. Now GwenRename is truly a KDE4 application
 - Added options to open/view files at the list's context menu
 - Fixed a EXIF manipulation crush
+- Fixed icon presentation when conflict and name is empty
 
 GwenRename 1.1-beta6:
 =====================
@@ -34,7 +35,7 @@
   renamed, from within the program, using the ListView context menu
 - Started writing the user manual. Added help to the program dialogs
 - Layout changes
--Many more minor changes
+- Many more minor changes
 
 GwenRename 1.1-beta3:
 =====================
@@ -43,6 +44,7 @@
 - Use and manage compound extensions
 
 GwenRename 1.1-beta2: (Packagers bug fix)
+==========================================
 - Fixed icon installation problem
 
 GwenRename 1.1-beta1.1:
--- trunk/playground/utils/gwenrename/src/namepartbase.ui #1038799:1038800
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>442</width>
-    <height>467</height>
+    <width>691</width>
+    <height>495</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -553,15 +553,15 @@
  <layoutdefault spacing="6" margin="11"/>
  <customwidgets>
   <customwidget>
+   <class>KIntSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header>knuminput.h</header>
+  </customwidget>
+  <customwidget>
    <class>KComboBox</class>
    <extends>QComboBox</extends>
    <header>kcombobox.h</header>
   </customwidget>
-  <customwidget>
-   <class>KIntSpinBox</class>
-   <extends>QSpinBox</extends>
-   <header>knuminput.h</header>
-  </customwidget>
  </customwidgets>
  <tabstops>
   <tabstop>nameList</tabstop>
--- trunk/playground/utils/gwenrename/src/rename.cpp #1038799:1038800
@@ -2631,8 +2631,18 @@
 				else
 					secondColumn=g.ren[g.getSorted(i)].newName+g.ren[g.getSorted(i)].Counter+g.ren[g.getSorted(i)].newSuffix;
  }
-// 
 // 		// fix icon
+			
+			
+// 			QString tod1=g.ren[g.getSorted(i)].newName+g.ren[g.getSorted(i)].Counter+g.ren[g.getSorted(i)].newSuffix+'.'+g.ren[g.getSorted(i)].newExtension;
 +// 			QString tod2=g.ren[g.getSorted(i)].oldName+'.'+g.ren[g.getSorted(i)].oldExtension;
 +			
+// 			tod1=g.ren[g.getSorted(i)].newFileName;
+// 			tod2=g.path() + '/';
+			
+// 			tod1=g.ren[g.getSorted(i)].newFileName;
+// 			tod2=g.path() + "/." + g.ren[g.getSorted(i)].newExtension;
+			
 			if(g.ren[g.getSorted(i)].newName+g.ren[g.getSorted(i)].Counter+g.ren[g.getSorted(i \
)].newSuffix+'.'+g.ren[g.getSorted(i)].newExtension==g.ren[g.getSorted(i)].oldName+'.'+g.ren[g.getSorted(i)].oldExtension){
  g.ren[g.getSorted(i)].iconID=pix_invalid;
 			}
@@ -2650,7 +2660,6 @@
 // 				g.ren[g.getSorted(i)].iconID=icon;
 				item->setIcon(0,KIcon(ic.Icon(g.ren[g.getSorted(i)].iconID)));
 				item->setText( 0,QString(' '));
-	
 			}/*else{
 				item->setPixmap(0,null);
 				item->setText( 0,' ');
@@ -2682,7 +2691,7 @@
 int GwenRename::noDoubleNewName(){
 	QString thisItem;
 	int res=-1;
-	for (int i=0;i<g.numOfFiles;i++)
+	for (int i=0;i<g.numOfFiles;i++){
 		if(g.ren[i].selected){ // item is selected for remaming
 // 				firstColumn=g.files[g.getSorted(i)].fileName();
 				if(!g.ren[i].newExtension.isEmpty())
@@ -2690,8 +2699,9 @@
 				else
 					thisItem=g.ren[g.getSorted(i)].newName+g.ren[i].Counter+g.ren[i].newSuffix;
 				for(int k=0;k<g.numOfFiles;k++){
-					if(!g.ren[k].selected){ // item is NOT selected for remaming
-						if(thisItem==g.files[k].fileName()){
+					//if(!g.ren[k].selected){ // item is NOT selected for remaming
+					if(i!=k){
+						if(thisItem==g.files[k].fileName() || \
thisItem==g.ren[g.getSorted(k)].newName+g.ren[g.getSorted(k)].Counter+g.ren[g.getSorted(k)].newSuffix+'.'+g.ren[g.getSorted(k)].newExtension){
  g.ren[i].iconID=7;
 								res=1;
 								break;
@@ -2699,6 +2709,7 @@
 					}
 				}
 		}
+	}
 	return res;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic