[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-22 19:48:38
Message-ID: 1256240918.469558.13608.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1039134 by sngeorgaras:
- Config entries are now saved as soon as the save button is pressed \
- Fixed compound expressions removal procedure
M +4 -2 ChangeLog
M +10 -10 src/namepartbase.cpp
M +13 -6 src/rename.cpp
--- trunk/playground/utils/gwenrename/ChangeLog #1039133:1039134
@@ -3,8 +3,10 @@
- Finally got rid of the Qt3Factory include directive in the indermediate ui_*.h
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
+- Config entries are now saved as soon as the save button is pressed
+- Fixed a EXIF manipulation crush condition
- Fixed icon presentation when conflict and name is empty
+- Fixed compound expressions removal procedure
GwenRename 1.1-beta6:
=====================
@@ -27,7 +29,7 @@
GwenRename 1.1-beta4:
=====================
- GwenRename can now be executed without parameters. In this case the user will
- have to select the folder cotaining the files to be renamed, through the
+ have to select the folder cotaining the files to be renamed, through the
"Folder selection" dialog.
- A mode selection dialog was added. It will be presented to the user, when a
single folder is passed to GwenRename.
--- trunk/playground/utils/gwenrename/src/namepartbase.cpp #1039133:1039134
@@ -153,10 +153,10 @@
// use original name
if(chkFixed->isChecked())
// use fixed original name
- outPattern=":ORIG_NAME_ALL:"+nameList->currentText()+':';
+ outPattern=":O"+nameList->currentText()+':';
else
// use each item's original name
- outPattern=":ORIG_NAME:";
+ outPattern=":D:";
}else{
// replace str,str
if(partOfFilename->isChecked()){
@@ -166,32 +166,32 @@
QDialog::reject();
return;
}
- outPattern=":S1:"+matchedText+','+replace->currentText()+':';
+ outPattern=":S"+matchedText+','+replace->currentText()+':';
}else{
// search is x,y
- outPattern=QString(":P:%1,%2,%3:").arg(startInt->value()).arg(lengthInt->value()).arg(replace->currentText());
+ outPattern=QString(":P%1,%2,%3:").arg(startInt->value()).arg(lengthInt->value()).arg(replace->currentText());
}
}else{
// search is str
// setting use fixed makes no difference here
if(chkFixed->isChecked())
- outPattern=":S2:"+matchedText+','+replace->currentText()+':';
+ outPattern=":N"+matchedText+','+replace->currentText()+':';
else
- outPattern=":S3:"+search->currentText()+','+replace->currentText()+':';
+ outPattern=":B"+search->currentText()+','+replace->currentText()+':';
}
}
}else{
// replace is off
if(chkFixed->isChecked()){
if(partOfFilename->isChecked())
- outPattern=":ORIG_NAME_ALL:"+matchedText+':';
+ outPattern=":O"+matchedText+':';
else
- outPattern=":X1:"+search->currentText()+':';
+ outPattern=":X"+search->currentText()+':';
}else{
if(partOfFilename->isChecked())
- outPattern=QString(":Z:%1,%2:").arg(startInt->value()).arg(lengthInt->value());
+ outPattern=QString(":Z%1,%2:").arg(startInt->value()).arg(lengthInt->value());
else
- outPattern=":X2:"+search->currentText()+':';
+ outPattern=":V"+search->currentText()+':';
}
}
QDialog::accept();
--- trunk/playground/utils/gwenrename/src/rename.cpp #1039133:1039134
@@ -461,10 +461,12 @@
for(i=0;i<cmbExt->count();i++)
grp.writeEntry(QString("Ext%1").arg(i),cmbExt->itemText(i));
// delete extra extensions if any
- if(i<compoundExtensions){
- i--;
- for(int k=1;k+i<compoundExtensions;k++)
- grp.deleteEntry(QString("Ext%1").arg(compoundExtensions-k));
+
+
+ QStringList keys=grp.keyList();
+ while(i<keys.count()){
+ grp.deleteEntry(QString("Ext%1").arg(i));
+ i++;
}
config.sync();
}
@@ -1504,6 +1506,7 @@
compoundExtensions--;
btNewExt->setEnabled(true);
btSaveExt->setEnabled(false);
+ writeConfig();
}
//================================
void GwenRename::cmbExtChanged(){
@@ -1540,6 +1543,7 @@
cmbExt->setCurrentIndex(activeExtension);
compoundExtensions++;
}
+ writeConfig();
}
//================================
void GwenRename::AdjustExtension(){
@@ -2174,6 +2178,7 @@
}
cmbProfileChanged(cmbProfile->currentIndex());
cmbProfile->setFocus();
+ writeConfig();
}
//================================
void GwenRename::fill_cmbProfile(){
@@ -2237,6 +2242,7 @@
QString tmp;
if(pr.enteredName.isEmpty()) tmp=cmbProfile->currentText();
else tmp=pr.enteredName;
+
pr.enteredName="";
if(tmp.isEmpty()) return;
int ind;
@@ -2286,6 +2292,7 @@
}
cmbProfileChanged( cmbProfile->currentIndex() );
cmbProfile->setFocus();
+ writeConfig();
}
//================================
bool GwenRename::reAllocateConfigData( int items ){
@@ -3009,7 +3016,7 @@
// Do I need that check?
//
- if(itemsSkipped<itemsToManipulate || ( itemsSkipped+itemsToManipulate==0 )){
+// if(itemsSkipped<itemsToManipulate || ( itemsSkipped+itemsToManipulate==0 )){
updateViewEnabled=false;
g.resetHasbeenSorted();
sortToggled(sort->isChecked());
@@ -3025,7 +3032,7 @@
updateCounterView();
updateViewEnabled=true;
updateView();
- }
+// }
}
void GwenRename::contextMenuRequested(QPoint point){
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic