Bug 115723 - --title does not work in at least one case
Summary: --title does not work in at least one case
Status: RESOLVED FIXED
Alias: None
Product: kdialog
Classification: Applications
Component: general (show other bugs)
Version: 1.0
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-05 11:56 UTC by Martin Bartlett
Modified: 2006-09-08 07:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Bartlett 2005-11-05 11:56:22 UTC
Version:           1.0 (using KDE KDE 3.4.2)
Installed from:    Mandriva RPMs
OS:                Linux

kdialog --title "User Chooser" --menu "Choose a user" martin martin lisa lisa

doesn't display "User Chooser" in the dialog title

kdialog --title "yes no" --yesno what

DOES display "yes no" in the dialog title
Comment 1 Kurt Hindenburg 2006-04-27 07:35:02 UTC
SVN commit 534438 by hindenburg:

Fix such that --title works.

BUG: 115723


 M  +3 -3      widgets.cpp  


--- branches/KDE/3.5/kdebase/kdialog/widgets.cpp #534437:534438
@@ -176,8 +176,8 @@
 {
   KListBoxDialog box(text,parent);
 
+  kapp->setTopWidget( &box );
   box.setCaption(title);
-  kapp->setTopWidget( &box );
 
   for (unsigned int i = 0; i+1<args.count(); i += 2) {
     box.insertItem(args[i+1]);
@@ -204,8 +204,8 @@
 
   QListBox &table = box.getTable();
 
+  kapp->setTopWidget( &box );
   box.setCaption(title);
-  kapp->setTopWidget( &box );
 
   for (unsigned int i=0; i+2<args.count(); i += 3) {
     tags.append(args[i]);
@@ -248,8 +248,8 @@
 
   QListBox &table = box.getTable();
 
+  kapp->setTopWidget( &box );
   box.setCaption(title);
-  kapp->setTopWidget( &box );
 
   for (unsigned int i=0; i+2<args.count(); i += 3) {
     tags.append(args[i]);
Comment 2 Kurt Hindenburg 2006-04-27 07:38:39 UTC
SVN commit 534439 by hindenburg:

Fix such that --title works.

CCBUG: 115723


 M  +3 -3      widgets.cpp  


--- trunk/KDE/kdebase/apps/kdialog/widgets.cpp #534438:534439
@@ -190,8 +190,8 @@
 {
   KListBoxDialog box(text,parent);
 
+  kapp->setTopWidget( &box );
   box.setCaption(title);
-  kapp->setTopWidget( &box );
 
   for (int i = 0; i+1<args.count(); i += 2) {
     box.insertItem(args[i+1]);
@@ -218,8 +218,8 @@
 
   Q3ListBox &table = box.getTable();
 
+  kapp->setTopWidget( &box );
   box.setCaption(title);
-  kapp->setTopWidget( &box );
 
   for (int i=0; i+2<args.count(); i += 3) {
     tags.append(args[i]);
@@ -262,8 +262,8 @@
 
   Q3ListBox &table = box.getTable();
 
+  kapp->setTopWidget( &box );
   box.setCaption(title);
-  kapp->setTopWidget( &box );
 
   for (int i=0; i+2<args.count(); i += 3) {
     tags.append(args[i]);
Comment 3 Juan Luis Baptiste 2006-09-08 02:58:12 UTC
Tested in 3.5.4, kdialog doesn't set the title for this options:

kdialog --title "my title" --combobox "please select one option"  aaa bbb ccc
kdialog --title "my title" --menu "Select one option" 1 "option 1" 2 "option 2"
kdialog --title "my title" --checklist "select option" aaa bbb ccc
kdialog --title "my title" --radiolist "text" aaa bbb ccc
kdialog --title "my title" --getopenfilename /
kdialog --title "my title" --getsavefilename /
kdialog --title "my title" --getsaveurl / *
Comment 4 Juan Luis Baptiste 2006-09-08 06:41:45 UTC
The problem is only with --combobox, the other ones work fine. I tested the other ones in a 3.5.1 box that I thought it had 3.5.4 installed.

Sorry for that.
Comment 5 Juan Luis Baptiste 2006-09-08 07:01:14 UTC
SVN commit 581974 by jbaptiste:

show title with --combobox

CCBUG: 115723



 M  +1 -0      widgets.cpp  


--- branches/KDE/3.5/kdebase/kdialog/widgets.cpp #581973:581974
@@ -153,6 +153,7 @@
                    KDialogBase::Ok );
 
   kapp->setTopWidget( &dlg );
+  dlg.setCaption(title);
   QVBox* vbox = dlg.makeVBoxMainWidget();
 
   QLabel label (vbox);
Comment 6 Juan Luis Baptiste 2006-09-08 07:06:47 UTC
*** Bug has been marked as fixed ***.