------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=135442 Summary: Add 'rename' entry to album RMB menu Product: digikam Version: 0.9.0-beta1 Platform: Gentoo Packages OS/Version: Linux Status: NEW Severity: wishlist Priority: NOR Component: general AssignedTo: digikam-devel kde org ReportedBy: d.h.j.takken phys uu nl Version: 0.9.0-beta1 (using KDE KDE 3.5.4) Installed from: Gentoo Packages OS: Linux Almost any directory-like object in KDE has a 'rename' entry in its RMB menu. In the DigiKam collection browser, this is not the case. it is hidden one level deeper in album properties. Please add a 'rename' entry, for the sake of consistency. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=135442 caulier.gilles free fr changed: What |Removed |Added ---------------------------------------------------------------------------- Component|general |Usability _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Dik Takken
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=135442 ------- Additional Comments From caulier.gilles kdemail net 2006-12-12 14:32 ------- Dik, Are you talking about to add "Rename option" to Album RMB menu ? Gilles Caulier _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Dik Takken
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=135442 caulier.gilles kdemail net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From caulier.gilles kdemail net 2006-12-12 15:04 ------- SVN commit 612743 by cgilles: digiKam from trunk : Added missing "Rename..." option on Album RMB menu. BUG: 135442 M +55 -0 albumfolderview.cpp M +2 -0 albumfolderview.h --- trunk/extragear/graphics/digikam/digikam/albumfolderview.cpp #612742:612743 @ -40,6 +40,13 @ #include <kaction.h> #include <kfiledialog.h> +#include <kdeversion.h> +#if KDE_IS_VERSION(3,2,0) +#include <kinputdialog.h> +#else +#include <klineeditdlg.h> +#endif + // Local includes. #include "ddebug.h" @ -431,6 +438,7 @ // Root folder only shows "New Album..." if(item && item->parent()) { + popmenu.insertItem(SmallIcon("pencil"), i18n("Rename..."), 14); popmenu.insertItem(SmallIcon("albumfoldercomment"), i18n("Edit Album Properties..."), 11); popmenu.insertItem(SmallIcon("reload_page"), i18n("Reset Album Icon"), 13); popmenu.insertSeparator(); @ -528,6 +536,11 @ AlbumManager::instance()->updatePAlbumIcon(item->getAlbum(), 0, err); break; } + case 14: + { + albumRename(item); + break; + } default: break; } @ -678,6 +691,48 @ job->showErrorDialog(this); } +void AlbumFolderView::albumRename() +{ + AlbumFolderViewItem *item = dynamic_cast<AlbumFolderViewItem*>(selectedItem()); + if(!item) + return; + + albumRename(item); +} + +void AlbumFolderView::albumRename(AlbumFolderViewItem* item) +{ + PAlbum *album = item->getAlbum(); + + if (!album) + return; + + QString oldTitle(album->title()); + bool ok; + +#if KDE_IS_VERSION(3,2,0) + QString title = KInputDialog::getText(i18n("Rename Album (%1)").arg(oldTitle), + i18n("Enter new album name:"), + oldTitle, &ok, this); +#else + QString title = KLineEditDlg::getText(i18n("Rename Item (%1)").arg(oldTitle), + i18n("Enter new album name:"), + oldTitle, &ok, this); +#endif + + if (!ok) + return; + + if(title != oldTitle) + { + QString errMsg; + if (!d->albumMan->renamePAlbum(album, title, errMsg)) + KMessageBox::error(0, errMsg); + } + + emit signalAlbumModified(); +} + void AlbumFolderView::albumEdit() { AlbumFolderViewItem *item = dynamic_cast<AlbumFolderViewItem*>(selectedItem()); --- trunk/extragear/graphics/digikam/digikam/albumfolderview.h #612742:612743 @ -58,6 +58,7 @ void albumNew(); void albumDelete(); void albumEdit(); + void albumRename(); void setAlbumThumbnail(PAlbum *album); @ -93,6 +94,7 @ void albumNew(AlbumFolderViewItem *item); void albumEdit(AlbumFolderViewItem *item); + void albumRename(AlbumFolderViewItem *item); void albumDelete(AlbumFolderViewItem *item); void addAlbumChildrenToList(KURL::List &list, Album *album); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Dik Takken
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=135442 ------- Additional Comments From d.h.j.takken phys uu nl 2006-12-12 22:37 ------- Wow. thanks a lot! _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |