diff --git a/src/lang/qphotorec.ca.ts b/src/lang/qphotorec.ca.ts
index 79ced4e6..b4baa7de 100644
--- a/src/lang/qphotorec.ca.ts
+++ b/src/lang/qphotorec.ca.ts
@@ -257,11 +257,16 @@ Hauríeu d'haver rebut una còpia de la Llicència Pública General GNU jun
+ Search formats
+ Cerca formats
+
+
+ &Reset&Reinicialitzar
-
+ Res&tore
Res&taura
diff --git a/src/lang/qphotorec.cs.ts b/src/lang/qphotorec.cs.ts
index 33a38df4..a4d0585a 100644
--- a/src/lang/qphotorec.cs.ts
+++ b/src/lang/qphotorec.cs.ts
@@ -256,11 +256,16 @@ Společně s QPhotoRec byste měli obdržet text znění GNU General Public Lice
+ Search formats
+ Hledat formáty
+
+
+ &ResetV&rátit na výchozí
-
+ Res&toreObnovi&t
diff --git a/src/lang/qphotorec.el.ts b/src/lang/qphotorec.el.ts
index d9d233f0..edc937c4 100644
--- a/src/lang/qphotorec.el.ts
+++ b/src/lang/qphotorec.el.ts
@@ -257,11 +257,16 @@ You should have received a copy of the GNU General Public License along with QPh
+ Search formats
+ Αναζήτηση μορφών
+
+
+ &Reset&Επαναφορά
-
+ Res&toreΑνά&κτηση
diff --git a/src/lang/qphotorec.es.ts b/src/lang/qphotorec.es.ts
index 03627100..d716b268 100644
--- a/src/lang/qphotorec.es.ts
+++ b/src/lang/qphotorec.es.ts
@@ -257,11 +257,16 @@ Debería haber recibido una copia de la Licencia Pública General de GNU junto c
+ Search formats
+ Buscar formatos
+
+
+ &Reset&Reiniciar
-
+ Res&toreRes&tore
diff --git a/src/lang/qphotorec.fi.ts b/src/lang/qphotorec.fi.ts
index e2e0d8ba..24f1e857 100644
--- a/src/lang/qphotorec.fi.ts
+++ b/src/lang/qphotorec.fi.ts
@@ -257,11 +257,16 @@ QPhotoRec:in mukana tulisi olla sinulle toimitettuna tuo GNU-yleisluvan selontek
+ Search formats
+ Etsi formaatteja
+
+
+ &Reset&Nollaa
-
+ Res&torePalau&ta
diff --git a/src/lang/qphotorec.fr.ts b/src/lang/qphotorec.fr.ts
index 0516518d..ca0a6e17 100644
--- a/src/lang/qphotorec.fr.ts
+++ b/src/lang/qphotorec.fr.ts
@@ -256,11 +256,16 @@ Vous avez du recevoir un exemplaire de la Licence Publique Générale GNU avec c
+ Search formats
+ Rechercher des formats
+
+
+ &Reset&Réinitialiser
-
+ Res&toreRes&taurer
diff --git a/src/lang/qphotorec.it.ts b/src/lang/qphotorec.it.ts
index eb705d98..42fb6090 100644
--- a/src/lang/qphotorec.it.ts
+++ b/src/lang/qphotorec.it.ts
@@ -258,11 +258,16 @@ Una copia della GNU General Public License è distribuita con QPhotoRec. In caso
+ Search formats
+ Cerca formati
+
+
+ &Reset&Resettare
-
+ Res&toreRipri&stinare
diff --git a/src/lang/qphotorec.ja.ts b/src/lang/qphotorec.ja.ts
index bd172d0a..45476794 100644
--- a/src/lang/qphotorec.ja.ts
+++ b/src/lang/qphotorec.ja.ts
@@ -252,11 +252,16 @@ You should have received a copy of the GNU General Public License along with QPh
+ Search formats
+ フォーマットを検索
+
+
+ &Reset&リセット
-
+ Res&tore
diff --git a/src/lang/qphotorec.pl.ts b/src/lang/qphotorec.pl.ts
index 9f7ea8af..457c21d2 100644
--- a/src/lang/qphotorec.pl.ts
+++ b/src/lang/qphotorec.pl.ts
@@ -258,11 +258,16 @@ Powinieneś otrzymać kopię licencji GNU General Public License wraz z QPhotoRe
+ Search formats
+ Szukaj formatów
+
+
+ &Reset&Resetuj
-
+ Res&torePr&zywróć
diff --git a/src/lang/qphotorec.pt.ts b/src/lang/qphotorec.pt.ts
index 9e2d668f..dbda63cc 100644
--- a/src/lang/qphotorec.pt.ts
+++ b/src/lang/qphotorec.pt.ts
@@ -257,11 +257,16 @@ Você deve receber uma cópia do licença GNU durante o uso de QPhotoRec. Se nã
+ Search formats
+ Pesquisar formatos
+
+
+ &Reset&Reconfigurar
-
+ Res&tore&Restaurar
diff --git a/src/lang/qphotorec.ru.ts b/src/lang/qphotorec.ru.ts
index 3e68507a..465c95e2 100644
--- a/src/lang/qphotorec.ru.ts
+++ b/src/lang/qphotorec.ru.ts
@@ -257,11 +257,16 @@ PhotoRec распространяется в надежде, что она бу
+ Search formats
+ Поиск форматов
+
+
+ &ResetСб&росить
-
+ Res&tore&Вернуть
diff --git a/src/lang/qphotorec.sv_SE.ts b/src/lang/qphotorec.sv_SE.ts
index 4d008170..bb87c628 100644
--- a/src/lang/qphotorec.sv_SE.ts
+++ b/src/lang/qphotorec.sv_SE.ts
@@ -248,11 +248,16 @@ You should have received a copy of the GNU General Public License along with QPh
+ Search formats
+ Sök format
+
+
+ &Reset&Rensa
-
+ Res&toreÅter%ställ
diff --git a/src/lang/qphotorec.tr.ts b/src/lang/qphotorec.tr.ts
index 4abbb7f0..1a20c812 100644
--- a/src/lang/qphotorec.tr.ts
+++ b/src/lang/qphotorec.tr.ts
@@ -257,11 +257,16 @@ QPhotoRec ile birlikte GNU Genel Kamu Lisansı'nın bir kopyasını almış
+ Search formats
+ Formatları ara
+
+
+ &Reset&Hiçbiri
-
+ Res&tore&Tümü
diff --git a/src/lang/qphotorec.zh_CN.ts b/src/lang/qphotorec.zh_CN.ts
index 080f34fa..275a161c 100644
--- a/src/lang/qphotorec.zh_CN.ts
+++ b/src/lang/qphotorec.zh_CN.ts
@@ -257,11 +257,16 @@ You should have received a copy of the GNU General Public License along with QPh
+ Search formats
+ 搜索格式
+
+
+ &Reset重置(&R)
-
+ Res&tore恢复(&T)
diff --git a/src/lang/qphotorec.zh_TW.ts b/src/lang/qphotorec.zh_TW.ts
index ad2afb15..ae5ed10e 100644
--- a/src/lang/qphotorec.zh_TW.ts
+++ b/src/lang/qphotorec.zh_TW.ts
@@ -257,11 +257,16 @@ You should have received a copy of the GNU General Public License along with QPh
+ Search formats
+ 搜尋格式
+
+
+ &Reset重設(&R)
-
+ Res&tore還原(&T)
diff --git a/src/qphotorec.cpp b/src/qphotorec.cpp
index 3771ef41..7d1a06a2 100644
--- a/src/qphotorec.cpp
+++ b/src/qphotorec.cpp
@@ -955,6 +955,11 @@ void QPhotorec::qphotorec_formats()
QDialog fenetre3;
fenetre3.setWindowTitle("QPhotoRec: "+tr("File Formats"));
+
+ QLineEdit *ed_search = new QLineEdit();
+ ed_search->setPlaceholderText(tr("Search formats"));
+ ed_search->setClearButtonEnabled(true);
+
QDialogButtonBox buttonBox(Qt::Horizontal);
QPushButton *bt_reset= new QPushButton(tr("&Reset"));
@@ -963,14 +968,18 @@ void QPhotorec::qphotorec_formats()
buttonBox.addButton(bt_reset, QDialogButtonBox::ResetRole);
buttonBox.addButton(bt_restore, QDialogButtonBox::ResetRole);
buttonBox.addButton(QDialogButtonBox::Ok);
+
QVBoxLayout vbox;
+ vbox.addWidget(ed_search);
vbox.addWidget(formats);
vbox.addWidget(&buttonBox);
fenetre3.setLayout(&vbox);
+ connect(ed_search, SIGNAL(textChanged(QString)), this, SLOT(formats_search(QString)));
connect(&buttonBox, SIGNAL(accepted()), &fenetre3, SLOT(accept()));
connect(bt_reset, SIGNAL(clicked()), this, SLOT(formats_reset()));
connect(bt_restore, SIGNAL(clicked()), this, SLOT(formats_restore()));
fenetre3.exec();
+
int i;
for (i = 0, file_enable=array_file_enable;
i < formats->count() && file_enable->file_hint!=NULL;
@@ -1004,3 +1013,18 @@ void QPhotorec::formats_restore()
item->setCheckState (Qt::Unchecked);
}
}
+
+void QPhotorec::formats_search(const QString &format)
+{
+ file_enable_t *file_enable;
+ int i;
+ for (i = 0, file_enable=array_file_enable;
+ i < formats->count() && file_enable->file_hint!=NULL;
+ i++, file_enable++)
+ {
+ QListWidgetItem *item = formats->item(i);
+ QString descr = item->text();
+ bool hide = descr.contains(format, Qt::CaseInsensitive)?false:true;
+ item->setHidden(hide);
+ }
+}
diff --git a/src/qphotorec.h b/src/qphotorec.h
index d7600e32..9bd0188f 100644
--- a/src/qphotorec.h
+++ b/src/qphotorec.h
@@ -52,6 +52,7 @@ class QPhotorec: public QWidget
/* Formats */
void formats_reset();
void formats_restore();
+ void formats_search(const QString &format);
protected:
void setupUI();
void clearWidgets();