[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkde-baseapps=5D_konqueror/src=3A_When_a_user_select?=
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2011-06-01 18:49:37
Message-ID: 20110601184937.1EC56A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 9630213d29f8059eb4de38abc50bf960a3fd8f45 by Dawit Alemayehu.
Committed on 30/05/2011 at 09:08.
Pushed by adawit into branch 'master'.

When a user selects 'Open With...', show the open with dialog.

(cherry picked from commit e36179d6d9a34f2cbfdbc0b72348618dd468c1b5)

M  +8    -4    konqueror/src/konqmainwindow.cpp     

http://commits.kde.org/kde-baseapps/9630213d29f8059eb4de38abc50bf960a3fd8f45

diff --git a/konqueror/src/konqmainwindow.cpp b/konqueror/src/konqmainwindow.cpp
index 56aa379..017bab5 100644
--- a/konqueror/src/konqmainwindow.cpp
+++ b/konqueror/src/konqmainwindow.cpp
@@ -686,11 +686,15 @@ void KonqMainWindow::openUrl(KonqView *_view, const KUrl &_url,
                 lst.append(url);
                 //kDebug() << "Got offer" << (offer ? offer->name() : QString("0"));
                 const bool allowExecution = trustedSource || \
                KParts::BrowserRun::allowExecution( mimeType, url );
-                if ( allowExecution &&
-                     ( KonqRun::isExecutable( mimeType ) || !offer || !KRun::run( \
*offer, lst, this ) ) ) +                if ( allowExecution )
                 {
-                    setLocationBarURL( oldLocationBarURL ); // Revert to previous \
                locationbar URL
-                    (void)new KRun( url, this );
+                    // Open with no offer means the user clicked on "Open With..." \
button. +                    if (!offer) {
+                        (void) KRun::displayOpenWithDialog(lst, this);
+                    } else if (KonqRun::isExecutable( mimeType ) || !KRun::run( \
*offer, lst, this ) ) { +                        setLocationBarURL( oldLocationBarURL \
); // Revert to previous locationbar URL +                        (void)new KRun( \
url, this ); +                    }
                 }
             }
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic