Re: some whishlists
Carles Pina i Estany <[email protected]> Sun, 27 Jan 2008 16:46:08 +0100
| Newsgroups | gmane.comp.kde.gwenview |
|---|---|
| Message-ID | <[email protected]> |
Hello, On Jan/13/2008, Aurélien Gâteau wrote: > Le Saturday 12 January 2008 21:28:35 Carles Pina i Estany, vous avez écrit : > > Hello, > > > > I miss some things in Gwenview 2.x: > > > > -File - Open directory/choose folder. Any reason why is not there? > > Because I didn't receive your patch :-). Seriously, no real reason other than > that I don't have a use for it. But I agree with your other mail: it's quite > standard, so it should be there. patch is now attached. As usually: feel free to change, comment or reject it :-) (I see that F6 is editting the location bar, but I still expect a File - Open). -- Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gwenview-general mailing list Gwenview-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/gwenview-general
open_directory.patch
(text/x-diff, 1.6 KB)
Index: app/mainwindow.h
===================================================================
--- app/mainwindow.h (revision 767210)
+++ app/mainwindow.h (working copy)
@@ -100,9 +100,11 @@
void saveCurrent();
void saveCurrentAs();
+ void openCurrentDirectory();
void reload();
void save(const KUrl&);
void saveAs(const KUrl&);
+ void openDirectory(const KUrl &);
void showDocumentInFullScreen(const KUrl&);
void rotateCurrentLeft();
Index: app/mainwindow.cpp
===================================================================
--- app/mainwindow.cpp (revision 767210)
+++ app/mainwindow.cpp (working copy)
@@ -253,6 +253,7 @@
KStandardAction::save(mWindow, SLOT(saveCurrent()), actionCollection);
KStandardAction::saveAs(mWindow, SLOT(saveCurrentAs()), actionCollection);
+ KStandardAction::open(mWindow, SLOT(openCurrentDirectory()), actionCollection);
KStandardAction::print(mWindow, SLOT(print()), actionCollection);
KStandardAction::quit(KApplication::kApplication(), SLOT(closeAllWindows()), actionCollection);
@@ -1045,7 +1046,24 @@
doc->save(dialog.selectedUrl(), typeList[0].toAscii());
}
+void MainWindow::openCurrentDirectory () {
+ KUrl url = d->currentUrl();
+ openDirectory(url);
+}
+
+void MainWindow::openDirectory(const KUrl& url) {
+ KFileDialog dialog(url, QString(), this);
+
+ QString directory = KFileDialog::getExistingDirectory(url,this,i18n("Select a folder"));
+
+ if (directory=="") {
+ return;
+ }
+ openDirUrl(directory);
+}
+
+
void MainWindow::showDocumentInFullScreen(const KUrl& url) {
openDocumentUrl(url);
d->mFullScreenAction->trigger();