I've written my first tray applet in C and gtk which works fine in cli.

However, although it works fine and is Swallowed in the tray, if I restart JWM from menu it starts a second instance and so on for each restart.

What am I missing to stop the multiple instances?_________________Rob
-
The moment after you press "Post" is the moment you actually see the typso Last edited by tasmod on Thu 15 Jul 2010, 14:01; edited 1 time in total

..... However, although it works fine and is Swallowed in the tray, if I restart JWM from menu it starts a second instance and so on for each restart.

What am I missing to stop the multiple instances?

I'm wild guessing that you're starting your app from jwmrc-tray as a swallow item ... Starting any gtk trayicon app as a swallow will not get into JWM swallow list and it won't be killed on restart. The swallow option is for normal windowed apps that you want to force into tray area (the swallow function relies on window name ID). Any apps that is written as a gtk trayicon should be started either in .xinitrc or the Startup folder.

I'm just going through my code just now in conjunction with the Gtk reference Barry posted.

I think I'll stick with C as it is more universal than Vala and i don't want my poor aching brain to start again with new syntax. I have enough syntax problems already.

I'm closer now to getting my applet as I want it to work. The right click menu comes up and selecting the about generates the Gtk box but it is Swallowed. Need to find what I've changed to cause that, originally it worked OK but on exit it errored. It only showed error in cli but had no effect on applet operation. I knew it was the 'exit' that was unclean as I didn't know how to close and return from Gtk window. I used 'gtk_quit' which caused the error message.

Unfortunately I was so engrossed in the program I didn't have a backup of the 'nearly' working model. So now I'm looking for the change I must have made.

I'm not using anything special to code. I use Geany for the code and syntax highlighting features. Then I run a compile command in a cli.
Sometimes it is too easy in Geany to delete a word or section of code when in fact I intended to copy.

Probably could do with an IDE to use._________________Rob
-
The moment after you press "Post" is the moment you actually see the typso

Many thanks for that. Yes I was swallowing in .jwm-tray. Now I know I can see what I can do to move it.

I'm puzzled slightly as to BKs freemem applet. Mine is based on that and Blinky as inspiration. They appear in .jwm-tray ?_________________Rob
-
The moment after you press "Post" is the moment you actually see the typso

Seems to be working very nicely for me - I am in 2.11 or 2.12 of Lucid
. . . in fact that would be a useful icon - telling which version of Puppy I am using. There is a version file kept somewhere but can not remember where . . .
What is your plan? Perhaps change to user spot as an option?

It's basic operation is simple, when firewall wizard is run it appends lines to the rc.local file. I just check for the state of those lines. If 'start' is in the line, firewall is on, if 'stop' firewall is off, if no lines firewall also off.

Now up to version 0.3.

I've added the Network Setup wizard to menu and IP Information to menu.

Hmm, version info. OK will look at it but no promises, it requires parsing the info returned.

Maybe add to tooltip so when you hover over, it shows version as well as firewall status._________________Rob
-
The moment after you press "Post" is the moment you actually see the typso

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum