[yast-devel] yast2-qt Title Bar Enhancements
I've added some enhancements to the title bar shown by the window manager in yast2-qt. Until now yast2-qt windows had names like YaST, YaST <2>, YaST <3>... That made it difficult to keep an overview of the open YaST modules. Most modules with wizards have there own desktop file with an icon and a list of localized names. The icon has been displayed in the title bar for a long time. The localized name can be used for the window title by now (libyui 2.17.12, qt 2.17.12, yast2 2.17.34). The command to make this happen is pretty simple. Similar to SetDesktopIcon you can use SetDesktopTitle to set the window title of a wizard. Example: Wizard::SetDesktopTitle("lan"); SetDesktopTitle searches for the desktop file in the directory /usr/share/applications/YaST2 and retrieves the localized name. This string is shown in the window title with a prepended "YaST2". If we want to benefit from this enhancement I'd like to ask the maintainers who use wizards to add this single line. Please let me know if you have any objections, suggestions or questions. Thanks Thomas -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Thomas Goettlicher wrote: [...]
If we want to benefit from this enhancement I'd like to ask the maintainers who use wizards to add this single line.
Is there any fate/bnc number for that improvement? I'd like to write it to *.changes file... Thanks! -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Mon, 2008-09-29 at 15:32 +0200, Ladislav Slezak wrote:
Thomas Goettlicher wrote: [...]
If we want to benefit from this enhancement I'd like to ask the maintainers who use wizards to add this single line.
Is there any fate/bnc number for that improvement? I'd like to write it to *.changes file... bnc #418443
Thomas -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Hi, Thomas,
SetDesktopTitle searches for the desktop file in the directory /usr/share/applications/YaST2 and retrieves the localized name. This string is shown in the window title with a prepended "YaST2".
Please let me know if you have any objections, suggestions or questions.
Few comments: * What happens to ncurses dialog title? I assume nothing (it'll be not overwritten), as ncurses use YCP version of Wizard and do not inherit from YWizard. In any case, Wizard::SetDesktopTitle should, instead of failing silently in UI where UI::WizardCommand is not implemented (in this case ncurses), either log a warning (as the very minimum) or provide some fallback functionality * As setDialogTitle function is purely virtual in YWizard, yast2-gtk currently does not build because YGWizard (which inherits from YWizard) does not reimplement it. * Is there any special reason, why .yast2.desktop agent configuration is copy-pasted to Wizard? * In Wizard::SetDesktopTitle: it is a good practice, once you register agent (SCR::RegisterAgent), to unregister it, once you don't need it anymore. Or is it not unregistered on purpose? B. Nuisance of the Year -- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter
Update:
In any case, Wizard::SetDesktopTitle should, instead of failing silently
I meant Wizard::SetDialogTitle, which uses UI::WizardCommand(`SetDialogTitle internally
* As setDialogTitle function is purely virtual in YWizard, yast2-gtk currently does not build because YGWizard (which inherits from YWizard) does not reimplement it.
This is clarified now - the reimplementation of setDialogTitle in YGWizard has been checked into svn yesterday by Ricardo. It's just the package has not been submitted to autobuild yet. I'm going to do it in a minute ... B. -- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter
On Tue, 2008-09-30 at 13:41 +0200, Katarina Machalkova wrote: Hi Katarina, thank you for your feedback.
* What happens to ncurses dialog title? I assume nothing (it'll be not overwritten), as ncurses use YCP version of Wizard and do not inherit from YWizard. In any case, Wizard::SetDesktopTitle should, instead of failing silently in UI where UI::WizardCommand is not implemented (in this case ncurses), either log a warning (as the very minimum) or provide some fallback functionality We can't set the titlebar in ncurses, as we we don't have a titlebar. But that's not a problem as we don't have multiple windows that could cause confusion. That's the reason why I think we don't need this functionality in ncurses.
* Is there any special reason, why .yast2.desktop agent configuration is copy-pasted to Wizard? I did it analog to SetDesktopIcon. Is there a cleaner way?
* In Wizard::SetDesktopTitle: it is a good practice, once you register agent (SCR::RegisterAgent), to unregister it, once you don't need it anymore. Or is it not unregistered on purpose?
I forgot to unregister. Fixed now. Thanks Thomas -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Is there any special reason, why .yast2.desktop agent configuration is copy-pasted to Wizard?
I did it analog to SetDesktopIcon. Is there a cleaner way?
Ah, I see, there is one more place in Wizard where .yast2.desktop agent is invoked in this way. I did some code archaeology and found this: ---cut--- r32132 | mvidner | 2006-08-03 14:54:07 +0200 (Čt, 03 srp 2006) | 3 lines Start-up speed-up: don't read all deskt-up files to find our icon. Thanks to Michael Meeks for profiling. ---/cut--- :-) :-) So we don't use ini-agent here because it reads all available desktop files to find a specific bit of information from a single one of them ... shouldn't we fix the agent instead? B. -- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter
On Tue, 2008-09-30 at 17:13 +0200, Katarina Machalkova wrote:
* Is there any special reason, why .yast2.desktop agent configuration is copy-pasted to Wizard?
I did it analog to SetDesktopIcon. Is there a cleaner way?
Ah, I see, there is one more place in Wizard where .yast2.desktop agent is invoked in this way. I did some code archaeology and found this:
---cut--- r32132 | mvidner | 2006-08-03 14:54:07 +0200 (Čt, 03 srp 2006) | 3 lines
Start-up speed-up: don't read all deskt-up files to find our icon. Thanks to Michael Meeks for profiling.
---/cut---
:-) :-) So we don't use ini-agent here because it reads all available desktop files to find a specific bit of information from a single one of them ... shouldn't we fix the agent instead? That might be the cleaner way. What do our SCR experts think?
Thomas -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Thomas Goettlicher wrote:
On Tue, 2008-09-30 at 17:13 +0200, Katarina Machalkova wrote:
So we don't use ini-agent here because it reads all available desktop files to find a specific bit of information from a single one of them ... shouldn't we fix the agent instead? That might be the cleaner way. What do our SCR experts think?
I've already seen one expert commenting it. It's usually better to fix a problem to workaround it on several places. L.
participants (4)
-
Katarina Machalkova
-
Ladislav Slezak
-
Lukas Ocilka
-
Thomas Goettlicher