hi all,

I jumped on IRC today after noticing the new way that rekonq handles its quit 
action.
I talked to Felix Rohrbach about it a little and we ended up mostly agreeing 
but he wanted me to write an email here to at least get the Ok from Andrea 
Diamantini.

The issue at hand here is that rekonq now uses the user action 'quit' to 
terminate the process and this means all windows that are open will close.
This turns out to be something that KDE has discussed a lot quite some time 
ago and around the KDE3 time decided on the following;
  Each main window that is opened is seen by the user as in instance of the 
application.  So if the user presses the 'rekonq' icon in the start menu he 
gets a new application showing in front of him.

If the application developer decides to make all those windows reuse the same 
process, this will have no effect on the way that the user looks at this and 
therefore the process doesn't have to be the same as the 'application'.

So when the user quits his window, only *that* window will be closed.
Try most apps (dolphin for intance) in KDE, they behave this way.  You start 4 
dolphins, you have to call quit 4 times.

I would want to suggest rekonq follows this too. Which essentially means a 
revert of commits;
725724b15d739233c4a8fc0cd416bf602288d4b2
and
d4d034967f12b31f5a6b9274ec42d4e4fe27571c

As mentioned; Felix was Ok with this, I'm hoping others are too.  Let me know 
if its Ok to push these commits :)


Thanks!
>From e149dff2da47ba3f759e2606384f9e2744780439 Mon Sep 17 00:00:00 2001
From: Thomas Zander <[email protected]>
Date: Tue, 16 Aug 2011 09:56:31 +0200
Subject: [PATCH 1/2] Revert "Fix quit action"

This reverts commit 725724b15d739233c4a8fc0cd416bf602288d4b2.
---
 src/mainwindow.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 9d2f0ff..d6a0221 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -365,7 +365,7 @@ void MainWindow::setupActions()
     KStandardAction::open(this, SLOT(fileOpen()), actionCollection());
     KStandardAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
     KStandardAction::print(this, SLOT(printRequested()), actionCollection());
-    KStandardAction::quit(rApp, SLOT(quit()), actionCollection());
+    KStandardAction::quit(this , SLOT(close()), actionCollection());
 
     a = KStandardAction::find(m_findBar, SLOT(show()), actionCollection());
     KShortcut findShortcut = KStandardShortcut::find();
-- 
1.7.1

>From b9e2a39d55618a66290a1012af8916c32ee2cb51 Mon Sep 17 00:00:00 2001
From: Thomas Zander <[email protected]>
Date: Tue, 16 Aug 2011 15:18:02 +0200
Subject: [PATCH 2/2] Revert "This commit, available just for the master branch cause of the string changes,"

This reverts commit d4d034967f12b31f5a6b9274ec42d4e4fe27571c.

Conflicts:

	src/mainwindow.cpp
---
 src/mainwindow.cpp |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d6a0221..504c408 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1530,26 +1530,29 @@ bool MainWindow::queryClose()
     if (QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled))
         return true;
 
-    if (rApp->mainWindowList().count() > 1)
+    if (m_view->count() > 1)
     {
         int answer = KMessageBox::questionYesNoCancel(
                          this,
-                         i18n("Wanna close the window or the whole app?"),
-                         i18n("Application/Window closing..."),
-                         KGuiItem(i18n("C&lose Current Window"), KIcon("window-close")),
+                         i18np("Are you sure you want to close the window?\n" "You have 1 tab open.",
+                               "Are you sure you want to close the window?\n" "You have %1 tabs open.",
+                               m_view->count()),
+                         i18n("Are you sure you want to close the window?"),
                          KStandardGuiItem::quit(),
+                         KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")),
                          KStandardGuiItem::cancel(),
-                         "confirmClosingMultipleWindows"
+                         "confirmClosingMultipleTabs"
                      );
 
         switch (answer)
         {
         case KMessageBox::Yes:
+            // Quit
             return true;
 
         case KMessageBox::No:
-            rApp->quit();
-            return true;
+            // Close only the current tab
+            m_view->closeTab();
 
         default:
             return false;
-- 
1.7.1

_______________________________________________
rekonq mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/rekonq

Reply via email to