mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
generic: proper support for icon and caption in .desktop files
This commit is contained in:
parent
00975278a4
commit
a8a54f0484
6 changed files with 12 additions and 12 deletions
|
@ -87,24 +87,24 @@
|
|||
class KCmdLineParsedOptions : public QHash<QByteArray,QByteArray>
|
||||
{
|
||||
public:
|
||||
KCmdLineParsedOptions() { }
|
||||
KCmdLineParsedOptions() { }
|
||||
};
|
||||
|
||||
class KCmdLineParsedArgs : public QList<QByteArray>
|
||||
{
|
||||
public:
|
||||
KCmdLineParsedArgs() { }
|
||||
KCmdLineParsedArgs() { }
|
||||
};
|
||||
|
||||
|
||||
class KCmdLineArgsList: public QList<KCmdLineArgs*>
|
||||
{
|
||||
public:
|
||||
KCmdLineArgsList() { }
|
||||
~KCmdLineArgsList() {
|
||||
while (count())
|
||||
delete takeFirst();
|
||||
}
|
||||
KCmdLineArgsList() { }
|
||||
~KCmdLineArgsList() {
|
||||
while (count())
|
||||
delete takeFirst();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
@ -292,7 +292,7 @@ QString KGlobal::caption()
|
|||
PRIVATE_DATA;
|
||||
// Caption set from command line ?
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kde");
|
||||
if (args && args->isSet("caption")) {
|
||||
if (args && args->isSet("caption") && !args->getOption("caption").trimmed().isEmpty()) {
|
||||
return args->getOption("caption");
|
||||
} else {
|
||||
// We have some about data ?
|
||||
|
|
|
@ -501,7 +501,7 @@ namespace KGlobal
|
|||
* Returns a text for the window caption.
|
||||
*
|
||||
* This may be set by
|
||||
* "-caption", otherwise it will be equivalent to the name of the
|
||||
* "--caption", otherwise it will be equivalent to the name of the
|
||||
* executable.
|
||||
* @return the text for the window caption
|
||||
*/
|
||||
|
|
|
@ -802,7 +802,7 @@ void KApplicationPrivate::parseCommandLine( )
|
|||
}
|
||||
|
||||
if ( q->type() != KApplication::Tty ) {
|
||||
if (args && args->isSet("icon"))
|
||||
if (args && args->isSet("icon") && !args->getOption("icon").trimmed().isEmpty())
|
||||
{
|
||||
q->setWindowIcon(KIcon(args->getOption("icon")));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=kmailservice %u
|
||||
Exec=kmailservice --icon '%i' --caption '%c' %u
|
||||
Icon=mail-message-new
|
||||
MimeType=x-scheme-handler/mailto;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=ktelnetservice %u
|
||||
Exec=ktelnetservice --icon '%i' --caption '%c' %u
|
||||
Icon=utilities-terminal
|
||||
MimeType=x-scheme-handler/telnet;x-scheme-handler/rlogin;x-scheme-handler/ssh;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue