Thread: [Java-gnome-developer] Add tray support
Brought to you by:
afcowie
From: Yuedong Du <yue...@su...> - 2003-12-27 03:02:22
|
Hi All, I want to implement the java-gnome binding for tray( in libegg). With this feature I hope java application can be more tightly integrated into gnome desktop. For example, a java mail client will launch a tray icon in the notification area when startup. I think it is very useful. Is there any document point me how to do this? Thanks. York |
From: Andrew <ac...@on...> - 2003-12-27 10:04:14
|
Hi, I have looked through the examples, and I am silly enough not to work out how to get the current row selected in a treeview/listview. Is there actually an example, if not, could someone show me how this is done? Also, is the cromagnon application included in the 0.82 release? I have it on my pc at home which is an older release (0.8 or 081 I think), however the file structure seems to have changed A LOT in this more recent release. Thanks :) -- [ A n d r e w ] -------|------- |
From: Luca De R. <pie...@li...> - 2003-12-27 15:06:30
|
Il sab, 2003-12-27 alle 11:02, Andrew ha scritto: > Hi, > > I have looked through the examples, and I am silly enough not to work > out how to get the current row selected in a treeview/listview. > Is there actually an example, if not, could someone show me how this is > done? What do you mean exactly? When you have a treeview widget it should just select a row with a mouse click. Maybe are you asking how to catch the row selected event? > Also, is the cromagnon application included in the 0.82 release? No, it was removed from the distribution in order to become a standalone project. > I have > it on my pc at home which is an older release (0.8 or 081 I think), Last time I've touched CroMagnon it was version 0.2. If you want I'll send you an updated CroMagnon tarball, let me know. -- Luca De Rugeriis <pie...@li...> |
From: Mark H. <mh...@ca...> - 2003-12-28 05:15:45
|
Hi, When creating a new topic please hit new, not reply. When you hit reply, an In-Reply-To header is added to your message. Many email clients will group together related messages in a threaded view based on this information. On Sat, Dec 27, 2003 at 10:02:33AM +0000, Andrew wrote: > I have looked through the examples, and I am silly enough not to work > out how to get the current row selected in a treeview/listview. > Is there actually an example, if not, could someone show me how this is > done? We should probably add a method for this to java-gnome. Please file a bug report for it. In my applications, I have added a listener to the selection of the treeview: pkgView.getSelection().addListener( watchSelectionChange ); private TreeSelectionListener watchSelectionChange = new TreeSelectionListener(){ public void selectionChangedEvent(TreeSelectionEvent event){ TreeSelectionForEach fe = new TreeSelectionForEach(){ public void forEach(TreeModel model, TreePath path, TreeIter iter){ ... } }; pkgView.getSelection().forEachSelected(fe); } }; > Also, is the cromagnon application included in the 0.82 release? I have > it on my pc at home which is an older release (0.8 or 081 I think), > however the file structure seems to have changed A LOT in this more > recent release. Are you subscribed to java-gnome-announce? I did explain the file structure changes in an announcement of 0.8.2 release. cromagnon is not included in 0.8.2. It is a little too big for an example app; and if it is to survive, it should be developed in it's own project. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Mark H. <mh...@ca...> - 2003-12-28 05:15:37
|
Hi, Java-Gnome does not have any support for libegg at the moment. It is unlikely that we will add it in the future either, since libegg changes very quickly. However, the best bits of libegg always move into standard gtk/gnome once they become stable and are accepted as being useful. Once they are there, java-gnome will support them. Our new release schedule means that our support for them will be very shortly after gnome supports them. (For those reading this who don't know, libegg is a library for new widgets which are being developed. It changes very quickly and so is not usually supported by many applications. However, once widgets in libegg are proven to be useful, they are moved into core gtk/gnome libraries) If you do want to add support for this part of libegg yourself, the only documentation that is available is the java-gnome source code itself. you would have to create a new java-gnome module containing jni and java code. This would require quite detailed knowledge of java, jni and of course the libegg api. If you have this, then we would be glad to help out with any problems you encounter (although java-gnome developers are currently very busy adding support for gnome 2.5, so we might be a little slow in responding at the moment) -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Yuedong Du <yue...@su...> - 2003-12-30 11:12:18
|
Hi Mark and all, My tray icon now working very well in java application. Thanks java-gnome developer team! However, some small problem leaved unresolved. 1. I use tools/DesProcessor to generate jni/java code. But the generated jni default prefix to org_gnu_gnome_XXX. How can I control it? For example, I want to prefix them to org_gnu_egg. 2. The function egg_tray_icon_new has parameter of char * , so in my defs: (define-func egg_tray_icon_new EggTrayIcon ((string name))) The generated java code, the native interface is defined as: ... ... native static final protected int egg_tray_icon_new (byte[] name); ... ... Thus 'String' in defs is convert to 'byte[]' in java. But I found in some gtk functions, ('string name') in defs is convert to 'String' in java. I like this way. But how can I generate 'String' instead of 'byte[]'? Thanks Yuedong Du Mark Howard wrote: >Hi, > Java-Gnome does not have any support for libegg at the moment. It is >unlikely that we will add it in the future either, since libegg changes >very quickly. However, the best bits of libegg always move into standard >gtk/gnome once they become stable and are accepted as being useful. Once >they are there, java-gnome will support them. Our new release schedule >means that our support for them will be very shortly after gnome >supports them. > >(For those reading this who don't know, libegg is a library for new >widgets which are being developed. It changes very quickly and so is >not usually supported by many applications. However, once widgets in >libegg are proven to be useful, they are moved into core gtk/gnome >libraries) > >If you do want to add support for this part of libegg yourself, the only >documentation that is available is the java-gnome source code itself. >you would have to create a new java-gnome module containing jni and java >code. This would require quite detailed knowledge of java, jni and of >course the libegg api. If you have this, then we would be glad to help >out with any problems you encounter (although java-gnome developers are >currently very busy adding support for gnome 2.5, so we might be a >little slow in responding at the moment) > > > > |
From: Mark H. <mh...@ca...> - 2004-01-03 19:01:30
|
On Tue, Dec 30, 2003 at 07:11:58PM +0800, Yuedong Du wrote: > Hi Mark and all, Hi, > My tray icon now working very well in java application. Thanks > java-gnome developer team! Great news! > 1. I use tools/DesProcessor to generate jni/java code. But the > generated jni default prefix to Afraid I can't help with this one - Jeff might know more. I wasn't in the project then the defsProcessor wwas being written. A simple sed line would change them all though. > 2. The function egg_tray_icon_new has parameter of char * , so in my defs: We don't actually use the defs processor any more. We now more or less write everything by hand. We completely changed the way we handled strings, but never updated the defs processor. Please take a look at the gtk/TextView for an example of how we handle strings now - it is a lot simpler (and more efficient) than using byte[]. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |