[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] Re: Bug#38716: [patch] Fix for bug 38716
From: Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date: 2002-03-09 23:11:02
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 27 February 2002 00:27, Richard Newton wrote:
<snip>
> This patch fixes bug 38716 as describe in my original post. Apply in
> the kmail directory.
<snip>
... and introduces a mem leak ;-)
- - Better keep the dialog on the stack and
- - no need to disconnect, as that's done automatically on object
destruction :-)
(for the newcomers: bugno:38716 in konq; kmail doesn't apply toolbar
changes on "Apply")
Attached patch is tested to work for me. I wasn't sure if
slotUpdateToolbars() needs to be called on dlg.exec() == true, but
that's not necessary since newToolbarConfig() is also emitted on OK.
BTW: IMO the KEditToolbar kdoc then gets the examples wrong.
Marc
- --
Marc Mutz <mutz@kde.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8ipaQ3oWD+L2/6DgRAonnAKDxfuwt3eVdZERxbKUPJKi7z2wSwQCZAeAH
9Mdpg4KwrB7yvjXkKePEMD0=
=tUL7
-----END PGP SIGNATURE-----
["kmail-apply-toolbar-config-on-apply.diff" (text/x-diff)]
Index: kmmainwin.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmainwin.h,v
retrieving revision 1.110
diff -u -3 -p -r1.110 kmmainwin.h
--- kmmainwin.h 2002/02/28 14:39:49 1.110
+++ kmmainwin.h 2002/03/09 23:10:53
@@ -254,6 +254,7 @@ protected slots:
void slotToggleToolBar();
void slotToggleStatusBar();
void slotEditToolbars();
+ void slotUpdateToolbars();
void slotEditKeys();
protected:
Index: kmmainwin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmainwin.cpp,v
retrieving revision 1.423
diff -u -3 -p -r1.423 kmmainwin.cpp
--- kmmainwin.cpp 2002/03/02 12:03:16 1.423
+++ kmmainwin.cpp 2002/03/09 23:10:54
@@ -2272,11 +2272,16 @@ void KMMainWin::slotEditToolbars()
{
KEditToolbar dlg(actionCollection(), "kmmainwin.rc");
- if (dlg.exec() == true)
- {
- createGUI("kmmainwin.rc");
- toolbarAction->setChecked(!toolBar()->isHidden());
- }
+ connect( &dlg, SIGNAL(newToolbarConfig()),
+ SLOT(slotUpdateToolbars()) );
+
+ dlg.exec();
+}
+
+void KMMainWin::slotUpdateToolbars()
+{
+ createGUI("kmmainwin.rc");
+ toolbarAction->setChecked(!toolBar()->isHidden());
}
void KMMainWin::slotEditKeys()
Index: kmcomposewin.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.h,v
retrieving revision 1.146
diff -u -3 -p -r1.146 kmcomposewin.h
--- kmcomposewin.h 2002/01/30 08:36:22 1.146
+++ kmcomposewin.h 2002/03/09 23:10:55
@@ -266,7 +266,7 @@ public slots:
void slotPaste();
void slotMarkAll();
- void slotFolderRemoved(KMFolder*);
+ void slotFolderRemoved(KMFolder*);
/**
* toggle fixed width font.
@@ -295,6 +295,7 @@ public slots:
void slotToggleToolBar();
void slotToggleStatusBar();
void slotEditToolbars();
+ void slotUpdateToolbars();
void slotEditKeys();
/**
* Read settings from app's config file.
Index: kmcomposewin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.cpp,v
retrieving revision 1.478
diff -u -3 -p -r1.478 kmcomposewin.cpp
--- kmcomposewin.cpp 2002/03/07 22:48:57 1.478
+++ kmcomposewin.cpp 2002/03/09 23:10:57
@@ -2616,11 +2616,16 @@ void KMComposeWin::slotEditToolbars()
{
KEditToolbar dlg(actionCollection(), "kmcomposerui.rc");
- if (dlg.exec() == true)
- {
- createGUI("kmcomposerui.rc");
- toolbarAction->setChecked(!toolBar()->isHidden());
- }
+ connect( &dlg, SIGNAL(newToolbarConfig()),
+ SLOT(slotUpdateToolbars()) );
+
+ dlg.exec();
+}
+
+void KMComposeWin::slotUpdateToolbars()
+{
+ createGUI("kmcomposerui.rc");
+ toolbarAction->setChecked(!toolBar()->isHidden());
}
void KMComposeWin::slotEditKeys()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic