All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xconfig: set title bar
@ 2007-10-19 21:55 Randy Dunlap
  2007-10-20 17:14 ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2007-10-19 21:55 UTC (permalink / raw)
  To: lkml; +Cc: zippel, sam

From: Randy Dunlap <randy.dunlap@oracle.com>

menuconfig and gconfig already place a title (or caption) on the top
bar of their window (or whatever that is properly called).  However,
qconf (xconfig) just says "qconf".  I tried to find a Qt API to set
the title but did not find one, so set the program title (caption)
by using the "-title <caption>" command line option instead.

This can be useful when someone has multiple qconf instances running,
to help differentiate which one is which.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 scripts/kconfig/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.23-git13.orig/scripts/kconfig/Makefile
+++ linux-2.6.23-git13/scripts/kconfig/Makefile
@@ -5,7 +5,7 @@
 PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
 
 xconfig: $(obj)/qconf
-	$< arch/$(ARCH)/Kconfig
+	$< arch/$(ARCH)/Kconfig -title "Linux v${KERNELVERSION} qconf"
 
 gconfig: $(obj)/gconf
 	$< arch/$(ARCH)/Kconfig

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xconfig: set title bar
  2007-10-19 21:55 [PATCH] xconfig: set title bar Randy Dunlap
@ 2007-10-20 17:14 ` Sam Ravnborg
  2007-10-20 18:12   ` Sam Ravnborg
  2007-10-20 18:18   ` Randy Dunlap
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Ravnborg @ 2007-10-20 17:14 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, zippel

On Fri, Oct 19, 2007 at 02:55:28PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> menuconfig and gconfig already place a title (or caption) on the top
> bar of their window (or whatever that is properly called).  However,
> qconf (xconfig) just says "qconf".  I tried to find a Qt API to set
> the title but did not find one, so set the program title (caption)
> by using the "-title <caption>" command line option instead.

I found this one to work:
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index e4eeb59..4905cd1 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1277,6 +1277,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 
        QWidget *d = configApp->desktop();
 
+       setCaption("hello my little world");
        width = configSettings->readNumEntry("/window width", d->width() - 64);
        height = configSettings->readNumEntry("/window height", d->height() - 64);
        resize(width, height);

We should show the prompt associated with mainmenu here.

	Sam

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] xconfig: set title bar
  2007-10-20 17:14 ` Sam Ravnborg
@ 2007-10-20 18:12   ` Sam Ravnborg
  2007-10-20 18:14     ` Randy Dunlap
  2007-10-20 18:18   ` Randy Dunlap
  1 sibling, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2007-10-20 18:12 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, zippel, linux-kbuild

On Sat, Oct 20, 2007 at 07:14:03PM +0200, Sam Ravnborg wrote:
> On Fri, Oct 19, 2007 at 02:55:28PM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > menuconfig and gconfig already place a title (or caption) on the top
> > bar of their window (or whatever that is properly called).  However,
> > qconf (xconfig) just says "qconf".  I tried to find a Qt API to set
> > the title but did not find one, so set the program title (caption)
> > by using the "-title <caption>" command line option instead.
> 
> I found this one to work:
> diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> index e4eeb59..4905cd1 100644
> --- a/scripts/kconfig/qconf.cc
> +++ b/scripts/kconfig/qconf.cc
> @@ -1277,6 +1277,7 @@ ConfigMainWindow::ConfigMainWindow(void)
>  
>         QWidget *d = configApp->desktop();
>  
> +       setCaption("hello my little world");
>         width = configSettings->readNumEntry("/window width", d->width() - 64);
>         height = configSettings->readNumEntry("/window height", d->height() - 64);
>         resize(width, height);
> 
> We should show the prompt associated with mainmenu here.

After a closer looks it revealed that kconfig does not even save
the mainmenu prompt?!??!
See following snippet from zconf.y:

stmt_list:
	  /* empty */
	| stmt_list common_stmt
	| stmt_list choice_stmt
	| stmt_list menu_stmt
	| stmt_list T_MAINMENU prompt nl

So it seems no frontend displays the mainmenu prompt.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xconfig: set title bar
  2007-10-20 18:12   ` Sam Ravnborg
@ 2007-10-20 18:14     ` Randy Dunlap
  0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2007-10-20 18:14 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: lkml, zippel, linux-kbuild

On Sat, 20 Oct 2007 20:12:02 +0200 Sam Ravnborg wrote:

> On Sat, Oct 20, 2007 at 07:14:03PM +0200, Sam Ravnborg wrote:
> > On Fri, Oct 19, 2007 at 02:55:28PM -0700, Randy Dunlap wrote:
> > > From: Randy Dunlap <randy.dunlap@oracle.com>
> > > 
> > > menuconfig and gconfig already place a title (or caption) on the top
> > > bar of their window (or whatever that is properly called).  However,
> > > qconf (xconfig) just says "qconf".  I tried to find a Qt API to set
> > > the title but did not find one, so set the program title (caption)
> > > by using the "-title <caption>" command line option instead.
> > 
> > I found this one to work:
> > diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> > index e4eeb59..4905cd1 100644
> > --- a/scripts/kconfig/qconf.cc
> > +++ b/scripts/kconfig/qconf.cc
> > @@ -1277,6 +1277,7 @@ ConfigMainWindow::ConfigMainWindow(void)
> >  
> >         QWidget *d = configApp->desktop();
> >  
> > +       setCaption("hello my little world");
> >         width = configSettings->readNumEntry("/window width", d->width() - 64);
> >         height = configSettings->readNumEntry("/window height", d->height() - 64);
> >         resize(width, height);
> > 
> > We should show the prompt associated with mainmenu here.
> 
> After a closer looks it revealed that kconfig does not even save
> the mainmenu prompt?!??!
> See following snippet from zconf.y:
> 
> stmt_list:
> 	  /* empty */
> 	| stmt_list common_stmt
> 	| stmt_list choice_stmt
> 	| stmt_list menu_stmt
> 	| stmt_list T_MAINMENU prompt nl
> 
> So it seems no frontend displays the mainmenu prompt.

Yes, I was going to make that same comment.
I'll have qconf.cc using the same title as gconfig and menuconfig
soon...


---
~Randy
[switched email addr due to some odd mail server problem]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xconfig: set title bar
  2007-10-20 17:14 ` Sam Ravnborg
  2007-10-20 18:12   ` Sam Ravnborg
@ 2007-10-20 18:18   ` Randy Dunlap
  2007-10-20 18:30     ` Sam Ravnborg
  1 sibling, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2007-10-20 18:18 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: lkml, zippel

On Sat, 20 Oct 2007 19:14:03 +0200 Sam Ravnborg wrote:

> I found this one to work:
> +       setCaption("hello my little world");

Thanks, your search expressions were better than mine.

> We should show the prompt associated with mainmenu here.

You want all 3 of them converted to
	symbol_value(mainmenu) + $KERNELVERSION
?

---
From: Randy Dunlap <randy.dunlap@oracle.com>

Put kernel version info on title bar in xconfig (qconf) instead of
defaulting to "qconf".

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 scripts/kconfig/qconf.cc |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.23-git13.orig/scripts/kconfig/qconf.cc
+++ linux-2.6.23-git13/scripts/kconfig/qconf.cc
@@ -1274,8 +1274,12 @@ ConfigMainWindow::ConfigMainWindow(void)
 	QMenuBar* menu;
 	bool ok;
 	int x, y, width, height;
+	char title[256];
 
 	QWidget *d = configApp->desktop();
+	sprintf(title, _("Linux Kernel v%s Configuration"),
+		getenv("KERNELVERSION"));
+	setCaption(title);
 
 	width = configSettings->readNumEntry("/window width", d->width() - 64);
 	height = configSettings->readNumEntry("/window height", d->height() - 64);


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xconfig: set title bar
  2007-10-20 18:18   ` Randy Dunlap
@ 2007-10-20 18:30     ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2007-10-20 18:30 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, zippel, linux-kbuild

On Sat, Oct 20, 2007 at 11:18:47AM -0700, Randy Dunlap wrote:
> On Sat, 20 Oct 2007 19:14:03 +0200 Sam Ravnborg wrote:
> 
> > I found this one to work:
> > +       setCaption("hello my little world");
> 
> Thanks, your search expressions were better than mine.
> 
> > We should show the prompt associated with mainmenu here.
> 
> You want all 3 of them converted to
> 	symbol_value(mainmenu) + $KERNELVERSION

Well - if mainmenu should serve any purpose then yes.


> ?
> 
> ---
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Put kernel version info on title bar in xconfig (qconf) instead of
> defaulting to "qconf".
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  scripts/kconfig/qconf.cc |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- linux-2.6.23-git13.orig/scripts/kconfig/qconf.cc
> +++ linux-2.6.23-git13/scripts/kconfig/qconf.cc
> @@ -1274,8 +1274,12 @@ ConfigMainWindow::ConfigMainWindow(void)
>  	QMenuBar* menu;
>  	bool ok;
>  	int x, y, width, height;
> +	char title[256];
>  
>  	QWidget *d = configApp->desktop();
> +	sprintf(title, _("Linux Kernel v%s Configuration"),

I made this look like this:
> +	snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"),

because we may append to the KERNELVERSION using EXTRAVERSION and people could go insane.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-20 18:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-19 21:55 [PATCH] xconfig: set title bar Randy Dunlap
2007-10-20 17:14 ` Sam Ravnborg
2007-10-20 18:12   ` Sam Ravnborg
2007-10-20 18:14     ` Randy Dunlap
2007-10-20 18:18   ` Randy Dunlap
2007-10-20 18:30     ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.