Hello list!
As the subject line says, this is a small patch that makes Geany to minimize itself into the system tray. It has been tested on Linux/KDE and on Windows XP. One downside, it requires at least GTK 2.10. (Tested on 2.12/2.14). The code has GTK version checks so it should not break anything for GTK 2.6 (I haven't tested this though).
I've no idea whether this is useful at all to Geany users other than me. First I thought I keep this to my self but after chatting a bit with Frank, I decided to post this. So please feel free to tell me how stupid (or great) this functionality is for Geany :-)
On Linux, I previously used alltray to dock/minimize Geany to tray, but on Windows, I had nothing which could do it. Then I checked the GTK docs and realised that I could do it with GTK/GDK. And no platform specific code needed.
What the patch does: - Adds a checkbox to Preferences->General->Miscellaneous, default is OFF - Adds two callback functions for window/tray handling to main.c (This is probably a wrong place for these but I didn't know where to put them)
Following files are modified: src/interface.c, src/prefs.c, src/prefs.h, src/keyfile.c, src/main.c, geany.glade
What user sees: If user has GTK >=2.10, user sees a system tray icon with a tooltip saying 'Geany'. If the option 'Always minimize to system tray' is not checked, clicking the icon doesn't do anything. If the option is checked, then clicking the icon will minimize Geany and hide it from the window manager. Clicking a second time brings Geany up and sets the focus on it. When the option is checked, Geany will also minimize to system tray if the minimize button is pressed from the window frame.
I'm sure you'll find some things from the code that are not done 'the right way', but I'm not very familiar with the inner workings of GTK so I hope you forgive me :-)
If you don't want to include tray-functionality into Geany, that's okay. I just wanted to post this so I could get some feedback. I intent to use it myself, because I find it useful to be able to minimize Geany into the system tray. And in the future, I think I add a popup menu to the tray where I can do some useful things. (I have no idea at the moment what they would be :-)
The patch is made against SVN r2263.
Best regards, -Harri K.
On Thu, Feb 21, 2008 at 9:45 AM, Harri Koskinen geany_fi@fastmonkey.org wrote:
I've no idea whether this is useful at all to Geany users other than me.
It looks very usable for Windows users. On Linux, I'm not so sure. For example, I'm using IceWM on Linux and moving Geany (or any other app) to tray is as simple as: right click the Geany taskbar entry, select 'Tray icon' option. That's all. I didn't use KDE for a while, but I believe it has a similar option.
On Thu, Feb 21, 2008 at 11:16 AM, Milan Babuskov milan.babuskov@gmail.com wrote:
On Thu, Feb 21, 2008 at 9:45 AM, Harri Koskinen geany_fi@fastmonkey.org wrote:
I've no idea whether this is useful at all to Geany users other than me.
It looks very usable for Windows users. On Linux, I'm not so sure. For example, I'm using IceWM on Linux and moving Geany (or any other app) to tray is as simple as: right click the Geany taskbar entry, select 'Tray icon' option. That's all. I didn't use KDE for a while, but I believe it has a similar option.
It can be useful on windows (or linux too o be honest).
By the way, for the windows users:
http://www.teamcti.com/trayit/trayit.htm
Cheers,
d0ea5dd30802210216y619a0901ob717a55bbd3bda47@mail.gmail.com fe05d1540802210302p1df26909h34faae9ab3755b5b@mail.gmail.com Message-ID: 1f5262bc9b81aed8d70effb69ad24007@localhost X-Sender: h.aling@home.nl Received: from madcap.xs4all.nl [82.93.196.225] with HTTP/1.1 (POST); Thu, 21 Feb 2008 12:30:45 +0100 User-Agent: RoundCube Webmail/0.1-svn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit
On Thu, 21 Feb 2008 12:02:50 +0100, "Pierre Joye" pierre.php@gmail.com wrote:
On Thu, Feb 21, 2008 at 11:16 AM, Milan Babuskov milan.babuskov@gmail.com wrote:
On Thu, Feb 21, 2008 at 9:45 AM, Harri Koskinen
geany_fi@fastmonkey.org wrote:
I've no idea whether this is useful at all to Geany users other than
me.
It looks very usable for Windows users. On Linux, I'm not so sure. For example, I'm using IceWM on Linux and moving Geany (or any other app) to tray is as simple as: right click the Geany taskbar entry, select 'Tray icon' option. That's all. I didn't use KDE for a while, but I believe it has a similar option.
It can be useful on windows (or linux too o be honest).
By the way, for the windows users:
http://www.teamcti.com/trayit/trayit.htm
Cheers,
Pierre
IMHO, these kind of features don't belong in an application that doesn't add any extra actions to the systray icon, such as status or if you got new mail.
If you do want to minimize an app to the systray, you can use your window manager or use Alltray[1].
-H-
On Thu, 21 Feb 2008 10:45:10 +0200, Harri Koskinen geany_fi@fastmonkey.org wrote:
Hi.
As the subject line says, this is a small patch that makes Geany to minimize itself into the system tray. It has been tested on Linux/KDE and on Windows XP. One downside, it requires at least GTK 2.10. (Tested on 2.12/2.14). The code has GTK version checks so it should not break anything for GTK 2.6 (I haven't tested this though).
I've no idea whether this is useful at all to Geany users other than me.
Probably a systray icon for Geany(read: an editor) generally isn't as useful as one for instant messengers or the like.
But anyway, it doesn't hurt anyone so why not :D. But I don't want to add this functionality to Geany itself, instead this can be perfectly done as a plugin. So, users who want to use it, can install and activate it or just leave it.
It shouldn't be too hard to rewrite your code as a plugin. If you need any help just ask.
Thanks anyway!
Regards, Enrico