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

List:       kde-core-devel
Subject:    [PATCH] Tip-Window
From:       Dirk Mueller <mueller () kde ! org>
Date:       2002-01-29 23:11:33
[Download RAW message or body]

Hi,

the patch below makes the Tip-Window modal and changes the OK-Button into a 
"Close" button. 

I'm not sure why the dialog is nonmodal. does anybody know a reason ?


Dirk

["ktip.diff" (text/plain)]

Index: ktip.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/ktip.cpp,v
retrieving revision 1.8
diff -u -5 -d -p -b -r1.8 ktip.cpp
--- ktip.cpp	2002/01/14 12:49:44	1.8
+++ ktip.cpp	2002/01/29 23:09:20
@@ -137,11 +137,11 @@ QString KTipDatabase::tip() const
 
 KTipDialog *KTipDialog::_instance = 0;
 
 
 KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
-  : KDialog(parent, name)
+  : KDialog(parent, name, true)
 {
   _database = db;
 
   setCaption(i18n("Tip of the Day"));
   setIcon(KGlobal::iconLoader()->loadIcon("ktip", KIcon::Small));
@@ -174,11 +174,11 @@ KTipDialog::KTipDialog(KTipDatabase *db,
   hbox->addStretch();
 
   QPushButton *next = new QPushButton(i18n("&Next"), this);
   hbox->addWidget(next);
 
-  QPushButton *ok = new QPushButton(i18n("&OK"), this);
+  QPushButton *ok = new QPushButton(i18n("&Close"), this);
   hbox->addWidget(ok);
   ok->setDefault(true);
 
   connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
   connect(next, SIGNAL(clicked()), this, SLOT(nextTip()));


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

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