Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Nate Graham
Kid3
Commits
0cfa4495
Commit
0cfa4495
authored
Dec 20, 2018
by
Urs Fleisch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Action to unload all tags and free their used memory.
parent
70098a18
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
150 additions
and
0 deletions
+150
-0
doc/de/index.docbook
doc/de/index.docbook
+11
-0
doc/en/index.docbook
doc/en/index.docbook
+11
-0
po/cs.po
po/cs.po
+3
-0
po/da.po
po/da.po
+3
-0
po/de.po
po/de.po
+3
-0
po/es.po
po/es.po
+3
-0
po/et.po
po/et.po
+3
-0
po/fi.po
po/fi.po
+3
-0
po/fr.po
po/fr.po
+3
-0
po/it.po
po/it.po
+3
-0
po/kid3.pot
po/kid3.pot
+3
-0
po/nl.po
po/nl.po
+3
-0
po/pl.po
po/pl.po
+3
-0
po/ru.po
po/ru.po
+3
-0
po/sr.po
po/sr.po
+3
-0
po/sr@ijekavian.po
po/sr@ijekavian.po
+3
-0
po/sr@ijekavianlatin.po
po/sr@ijekavianlatin.po
+3
-0
po/sr@latin.po
po/sr@latin.po
+3
-0
po/tr.po
po/tr.po
+3
-0
po/zh_CN.po
po/zh_CN.po
+3
-0
po/zh_TW.po
po/zh_TW.po
+3
-0
src/app/kde/kdemainwindow.cpp
src/app/kde/kdemainwindow.cpp
+4
-0
src/app/qt/kid3mainwindow.cpp
src/app/qt/kid3mainwindow.cpp
+9
-0
src/core/model/kid3application.cpp
src/core/model/kid3application.cpp
+18
-0
src/core/model/kid3application.h
src/core/model/kid3application.h
+7
-0
src/core/model/net.sourceforge.Kid3.xml
src/core/model/net.sourceforge.Kid3.xml
+16
-0
src/core/model/scriptinterface.cpp
src/core/model/scriptinterface.cpp
+10
-0
src/core/model/scriptinterface.h
src/core/model/scriptinterface.h
+7
-0
No files found.
doc/de/index.docbook
View file @
0cfa4495
...
...
@@ -3593,6 +3593,16 @@ spezifiziert. Die Kid3 Schnittstelle hat die folgenden Methoden:
<para>
Wenn OK wird true zurückgegeben.
</para>
</sect2>
<sect2
id=
"dbus-unloadAllTags"
>
<title>
Entlade die Tags aller nicht selektierten oder modifizierten Dateien
</title>
<funcsynopsis>
<funcprototype>
<funcdef><function>
unloadAllTags
</function></funcdef>
<void/>
</funcprototype>
</funcsynopsis>
</sect2>
<sect2
id=
"dbus-save"
>
<title>
Speichere alle veränderten Dateien
</title>
<funcsynopsis>
...
...
@@ -4593,6 +4603,7 @@ die dortige Beschreibung verwiesen.
<programlisting>
app.openDirectory(path): Verzeichnis öffnen
app.unloadAllTags(): Entlade alle Tags
app.saveDirectory(): Speichern
app.revertFileModifications(): Zuletzt gespeicherte Fassung
app.importTags(tag, path, fmtIdx): Datei importieren
...
...
doc/en/index.docbook
View file @
0cfa4495
...
...
@@ -3406,6 +3406,16 @@ following methods:
<para>
Returns true if OK.
</para>
</sect2>
<sect2
id=
"dbus-unloadAllTags"
>
<title>
Unload the tags of all files which are not modified or selected
</title>
<funcsynopsis>
<funcprototype>
<funcdef><function>
unloadAllTags
</function></funcdef>
<void/>
</funcprototype>
</funcsynopsis>
</sect2>
<sect2
id=
"dbus-save"
>
<title>
Save all modified files
</title>
<funcsynopsis>
...
...
@@ -4394,6 +4404,7 @@ details, refer to the respective notes.
<programlisting>
app.openDirectory(path): Open directory
app.unloadAllTags(): Unload all tags
app.saveDirectory(): Save directory
app.revertFileModifications(): Revert
app.importTags(tag, path, fmtIdx): Import file
...
...
po/cs.po
View file @
0cfa4495
...
...
@@ -302,6 +302,9 @@ msgstr "O&bnovit"
msgid "Reload directory"
msgstr "Obnovit adresář"
msgid "Unload"
msgstr "Uvolnit"
msgid "&Import..."
msgstr "&Zavést..."
...
...
po/da.po
View file @
0cfa4495
...
...
@@ -297,6 +297,9 @@ msgstr "Ge&nindlæs"
msgid "Reload directory"
msgstr "Genindlæs liste"
msgid "Unload"
msgstr "Fjern"
msgid "&Import..."
msgstr "&Importér..."
...
...
po/de.po
View file @
0cfa4495
...
...
@@ -302,6 +302,9 @@ msgstr "&Neu laden"
msgid "Reload directory"
msgstr "Verzeichnis neu einlesen"
msgid "Unload"
msgstr "Entladen"
msgid "&Import..."
msgstr "&Importieren..."
...
...
po/es.po
View file @
0cfa4495
...
...
@@ -302,6 +302,9 @@ msgstr "Recar&gar"
msgid "Reload directory"
msgstr "Recargar directorio"
msgid "Unload"
msgstr "Descargar"
msgid "&Import..."
msgstr "&Importar..."
...
...
po/et.po
View file @
0cfa4495
...
...
@@ -303,6 +303,9 @@ msgstr "Laadi &uuesti"
msgid "Reload directory"
msgstr "Uuendada käesoleva kausta sisu"
msgid "Unload"
msgstr "Eemalda"
msgid "&Import..."
msgstr "&Impordi..."
...
...
po/fi.po
View file @
0cfa4495
...
...
@@ -303,6 +303,9 @@ msgstr "Lataa uu&delleen"
msgid "Reload directory"
msgstr "Lataa nykyinen kansio uudelleen"
msgid "Unload"
msgstr "Poista"
msgid "&Import..."
msgstr "T&uo..."
...
...
po/fr.po
View file @
0cfa4495
...
...
@@ -302,6 +302,9 @@ msgstr "Rechar&ger"
msgid "Reload directory"
msgstr "Recharger le répertoire"
msgid "Unload"
msgstr "Décharger"
msgid "&Import..."
msgstr "&Importer..."
...
...
po/it.po
View file @
0cfa4495
...
...
@@ -302,6 +302,9 @@ msgstr "&Ricarica"
msgid "Reload directory"
msgstr "Ricarica cartella"
msgid "Unload"
msgstr "Scarica"
msgid "&Import..."
msgstr "&Importa..."
...
...
po/kid3.pot
View file @
0cfa4495
...
...
@@ -299,6 +299,9 @@ msgstr ""
msgid "Reload directory"
msgstr ""
msgid "Unload"
msgstr ""
msgid "&Import..."
msgstr ""
...
...
po/nl.po
View file @
0cfa4495
...
...
@@ -302,6 +302,9 @@ msgstr "Her&laden"
msgid "Reload directory"
msgstr "Map herladen"
msgid "Unload"
msgstr "Ontladen"
msgid "&Import..."
msgstr "&Importeren..."
...
...
po/pl.po
View file @
0cfa4495
...
...
@@ -303,6 +303,9 @@ msgstr "O&dśwież"
msgid "Reload directory"
msgstr "Ponownie wczytaj katalog"
msgid "Unload"
msgstr "Wyłącz"
msgid "&Import..."
msgstr "&Importuj..."
...
...
po/ru.po
View file @
0cfa4495
...
...
@@ -303,6 +303,9 @@ msgstr "О&бновить"
msgid "Reload directory"
msgstr "Обновить каталог"
msgid "Unload"
msgstr "Выгрузить"
msgid "&Import..."
msgstr "&Импорт..."
...
...
po/sr.po
View file @
0cfa4495
...
...
@@ -301,6 +301,9 @@ msgstr "&Освежи"
msgid "Reload directory"
msgstr "Поново учитај списак"
msgid "Unload"
msgstr "Унлоад"
msgid "&Import..."
msgstr "&Увези..."
...
...
po/sr@ijekavian.po
View file @
0cfa4495
...
...
@@ -301,6 +301,9 @@ msgstr "&Учитај поново"
msgid "Reload directory"
msgstr "Поново учитај списак"
msgid "Unload"
msgstr "Унлоад"
msgid "&Import..."
msgstr "&Увези..."
...
...
po/sr@ijekavianlatin.po
View file @
0cfa4495
...
...
@@ -301,6 +301,9 @@ msgstr "&Učitaj ponovo"
msgid "Reload directory"
msgstr "Ponovo učitaj spisak"
msgid "Unload"
msgstr "Unload"
msgid "&Import..."
msgstr "&Uvezi..."
...
...
po/sr@latin.po
View file @
0cfa4495
...
...
@@ -301,6 +301,9 @@ msgstr "&Učitaj ponovo"
msgid "Reload directory"
msgstr "Ponovo učitaj spisak"
msgid "Unload"
msgstr "Unload"
msgid "&Import..."
msgstr "&Uvezi..."
...
...
po/tr.po
View file @
0cfa4495
...
...
@@ -302,6 +302,9 @@ msgstr "Y&eniden Yükle"
msgid "Reload directory"
msgstr "Geçerli dizini yenile"
msgid "Unload"
msgstr "Kaldır"
msgid "&Import..."
msgstr "A&l..."
...
...
po/zh_CN.po
View file @
0cfa4495
...
...
@@ -301,6 +301,9 @@ msgstr "重新装入(&L)"
msgid "Reload directory"
msgstr "重载当前文件夹"
msgid "Unload"
msgstr "卸载"
msgid "&Import..."
msgstr "导入(&I)..."
...
...
po/zh_TW.po
View file @
0cfa4495
...
...
@@ -305,6 +305,9 @@ msgstr "重新載入(&L)"
msgid "Reload directory"
msgstr "重新載入目錄"
msgid "Unload"
msgstr "卸載"
msgid "&Import..."
msgstr "匯入(&I)..."
...
...
src/app/kde/kdemainwindow.cpp
View file @
0cfa4495
...
...
@@ -193,6 +193,10 @@ void KdeMainWindow::initActions()
connect
(
action
,
&
QAction
::
triggered
,
impl
(),
&
BaseMainWindowImpl
::
slotFileReload
);
action
=
new
QAction
(
tr
(
"Unload"
),
this
);
collection
->
addAction
(
QLatin1String
(
"unload"
),
action
);
connect
(
action
,
&
QAction
::
triggered
,
app
(),
&
Kid3Application
::
unloadAllTags
);
action
=
new
QAction
(
QIcon
::
fromTheme
(
QLatin1String
(
"document-import"
)),
tr
(
"&Import..."
),
this
);
action
->
setStatusTip
(
tr
(
"Import from file or clipboard"
));
...
...
src/app/qt/kid3mainwindow.cpp
View file @
0cfa4495
...
...
@@ -154,6 +154,15 @@ void Kid3MainWindow::initActions()
connect
(
fileReload
,
&
QAction
::
triggered
,
impl
(),
&
BaseMainWindowImpl
::
slotFileReload
);
fileMenu
->
addAction
(
fileReload
);
auto
fileUnload
=
new
QAction
(
this
);
fileUnload
->
setText
(
tr
(
"Unload"
));
fileUnload
->
setObjectName
(
QLatin1String
(
"unload"
));
m_shortcutsModel
->
registerAction
(
fileUnload
,
menuTitle
);
connect
(
fileUnload
,
&
QAction
::
triggered
,
app
(),
&
Kid3Application
::
unloadAllTags
);
addAction
(
fileUnload
);
fileMenu
->
addSeparator
();
auto
fileSave
=
new
QAction
(
this
);
...
...
src/core/model/kid3application.cpp
View file @
0cfa4495
...
...
@@ -853,6 +853,24 @@ void Kid3Application::onDirectoryLoaded()
onDirectoryOpened
();
}
/**
* Unload all tags.
* The tags of all files which are not modified or selected are freed to
* reclaim their memory.
*/
void
Kid3Application
::
unloadAllTags
()
{
TaggedFileIterator
it
(
m_fileProxyModelRootIndex
);
while
(
it
.
hasNext
())
{
TaggedFile
*
taggedFile
=
it
.
next
();
if
(
taggedFile
->
isTagInformationRead
()
&&
!
taggedFile
->
isChanged
()
&&
!
m_fileSelectionModel
->
isSelected
(
taggedFile
->
getIndex
()))
{
taggedFile
->
clearTags
(
false
);
taggedFile
->
closeFileHandle
();
}
}
}
/**
* Get directory path of opened directory.
* @return directory path.
...
...
src/core/model/kid3application.h
View file @
0cfa4495
...
...
@@ -912,6 +912,13 @@ public slots:
*/
void
openDropUrls
(
const
QList
<
QUrl
>&
urlList
);
/**
* Unload all tags.
* The tags of all files which are not modified or selected are freed to
* reclaim their memory.
*/
void
unloadAllTags
();
/**
* Revert file modifications.
* Acts on selected files or all files if no file is selected.
...
...
src/core/model/net.sourceforge.Kid3.xml
View file @
0cfa4495
...
...
@@ -5,6 +5,8 @@
<arg
type=
"b"
direction=
"out"
/>
<arg
name=
"path"
type=
"s"
direction=
"in"
/>
</method>
<method
name=
"unloadAllTags"
>
</method>
<method
name=
"save"
>
<arg
type=
"b"
direction=
"out"
/>
</method>
...
...
@@ -19,6 +21,11 @@
<arg
name=
"path"
type=
"s"
direction=
"in"
/>
<arg
name=
"fmtIdx"
type=
"i"
direction=
"in"
/>
</method>
<method
name=
"importFromTags"
>
<arg
name=
"tagMask"
type=
"i"
direction=
"in"
/>
<arg
name=
"source"
type=
"s"
direction=
"in"
/>
<arg
name=
"extraction"
type=
"s"
direction=
"in"
/>
</method>
<method
name=
"batchImport"
>
<arg
type=
"b"
direction=
"out"
/>
<arg
name=
"tagMask"
type=
"i"
direction=
"in"
/>
...
...
@@ -37,6 +44,15 @@
<method
name=
"createPlaylist"
>
<arg
type=
"b"
direction=
"out"
/>
</method>
<method
name=
"getPlaylistItems"
>
<arg
type=
"as"
direction=
"out"
/>
<arg
name=
"path"
type=
"s"
direction=
"in"
/>
</method>
<method
name=
"setPlaylistItems"
>
<arg
type=
"b"
direction=
"out"
/>
<arg
name=
"path"
type=
"s"
direction=
"in"
/>
<arg
name=
"items"
type=
"as"
direction=
"in"
/>
</method>
<method
name=
"quit"
>
</method>
<method
name=
"selectAll"
>
...
...
src/core/model/scriptinterface.cpp
View file @
0cfa4495
...
...
@@ -66,6 +66,16 @@ bool ScriptInterface::openDirectory(const QString& path)
return
m_app
->
openDirectory
({
path
},
true
);
}
/**
* Unload all tags.
* The tags of all files which are not modified or selected are freed to
* reclaim their memory.
*/
void
ScriptInterface
::
unloadAllTags
()
{
m_app
->
unloadAllTags
();
}
/**
* Save all modified files.
*
...
...
src/core/model/scriptinterface.h
View file @
0cfa4495
...
...
@@ -66,6 +66,13 @@ public slots:
*/
bool
openDirectory
(
const
QString
&
path
);
/**
* Unload all tags.
* The tags of all files which are not modified or selected are freed to
* reclaim their memory.
*/
void
unloadAllTags
();
/**
* Save all modified files.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment