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

List:       kde-devel
Subject:    KSysTray not exiting and various programming questions
From:       Nathan Toone <nathan () toonetown ! com>
Date:       2004-03-31 3:54:40
Message-ID: 200403302054.40809.nathan () toonetown ! com
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

WARNING:  I know next to nothing about c++ - I'm going through this exercise 
to help me better understand it so I could potentially help out with KDE 
bugfixing/development someday.  So please simplify your answers 
accordingly...

I am trying to write a small application that uses a KSysTray.  Basically the 
code in my main method is this:

int main(int argc, char *argv[])
{
  KApplication app;
  KSystemTray sysTray;
  KWin::setSystemTrayWindowFor(sysTray.winId(), 0);
  sysTray.setPixmap( sysTray.loadIcon("./green_icon"));
  sysTray.show();
  app.setTopWidget(&sysTray);
  KStartupInfo::appStarted();
  return app.exec();
}

This works fine - and it displays my icon.  When I right click, I get the menu 
option for "Quit".  However, when I click on "Quit", the icon disappears, but 
the process continues running.

What do I need to do?

On a completely different note, here are some questions I have about setting 
up the Makefiles, configure scripts, etc.:

How do I set up my build system (Makefiles, configure, etc)?  I'm just 
compiling stuff by hand (well, with a shell script) but all my paths are 
hard-coded etc.
How do I use the build system to automatically install icons?  I've just 
copied them to $KDE_DIR/share/icons/crystalsvg/...
Any other hints for a guy who's new to KDE programming (and C++ programming in 
general...I'm VERY familiar with Java, but now I've seen the light :) )

Thanks!

- -Nathan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAakEA+lPSZRR0T30RAoF3AKDLsdto+VftctNEnx2+9GXMsjIEHwCgvdI5
sr3JTUEaEQuuDS05IRNs87M=
=k7bE
-----END PGP SIGNATURE-----
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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