librelist archives

« back to archive

Systray

Systray

From:
Régis d'Aubarède
Date:
2011-07-21 @ 16:54
Hello,

Here a propositition for a systray API . demo :


---------------------------------------------------------------------------------------------------
require 'green_shoes'
require './gs_gtk2_util.rb'  # binding some gtk2 stuf >> green-shoes

ICONE_HAPPY  ="d:/usr/icons/vrac/face-smile-big.png"
ICONE_UNHAPPY="d:/usr/icons/vrac/face-crying.png"

def edit()      system("gedit",__FILE__) end
def doit()      @text.text= "done!" ; @st.file= ICONE_UNHAPPY  end

Shoes.app :title=>"Shoes Systray" do
  title "Bonjour;"

  @st=systray_setup(
    :icon => ICONE_HAPPY,
    "Edit..." => proc {|state| edit() } ,
    "Test..." => proc {|state| doit() },
    :quit => true
  )
  para   "Systray icon should be visible"
  @text= para
end

---------------------------------------------------------------------------------------------------

it is implemented with gtk2/ green_shoes, see :
   https://gist.github.com/1097613

by

-- 

- - - - - - - - - - - - - - - - -
 __   ___  __     __
|__) |__  / _` | /__`
|  \ |___ \__> | .__/

- - - - - - - - - - - - - - - - -

Re: [shoes] Systray

From:
ashbb
Date:
2011-07-24 @ 03:49
Hi Régis,

Awesome!!

Your code works pretty well on my Windows 7.
Look at a tiny flash demo recorded by CamStudio:
http://www.rin-shun.com/shoes/systray_demo_on_green_shoes.swf.html

In this flash demo, I've edited (or added) your code just only the following
lines. Because I don't have the face-smile-big.png and gedit.

   ICONE_HAPPY  = File.join(DIR, "../static/gshoes-icon.png")
   def edit() @edit.show end
   @edit = edit_box(text: 'input here..').hide

I'd love to add your systray_setup() method into Green Shoes.
Could you send me a pull request on GitHub?

Cheers,
ashbb

Re: [shoes] Systray

From:
Régis d'Aubarède
Date:
2011-07-24 @ 18:43
Hello Ashbb,

I don't know how to "send me a pull request on GitHub?"
But I will try...

by


-- 

- - - - - - - - - - - - - - - - -
 __   ___  __     __
|__) |__  / _` | /__`
|  \ |___ \__> | .__/

- - - - - - - - - - - - - - - - -

Re: [shoes] Systray

From:
serialhex
Date:
2011-07-24 @ 14:12
spiffy!!! :D

On Sat, Jul 23, 2011 at 11:49 PM, ashbb <ashbbb@gmail.com> wrote:

> Hi Régis,
>
> Awesome!!
>
> Your code works pretty well on my Windows 7.
> Look at a tiny flash demo recorded by CamStudio:
> http://www.rin-shun.com/shoes/systray_demo_on_green_shoes.swf.html
>
> In this flash demo, I've edited (or added) your code just only the
> following lines. Because I don't have the face-smile-big.png and gedit.
>
>    ICONE_HAPPY  = File.join(DIR, "../static/gshoes-icon.png")
>    def edit() @edit.show end
>    @edit = edit_box(text: 'input here..').hide
>
> I'd love to add your systray_setup() method into Green Shoes.
> Could you send me a pull request on GitHub?
>
> Cheers,
> ashbb
>
>


-- 
my blog is cooler than yours: serialhex.github.com

> > Other than the fact Linux has a cool name, could someone explain why I
> > should use Linux over BSD?
>
> No.  That's it.  The cool name, that is.  We worked very hard on
> creating a name that would appeal to the majority of people, and it
> certainly paid off: thousands of people are using linux just to be able
> to say "OS/2? Hah.  I've got Linux.  What a cool name".  386BSD made the
> mistake of putting a lot of numbers and weird abbreviations into the
> name, and is scaring away a lot of people just because it sounds too
> technical.
	-- Linus Torvalds' follow-up to a question about Linux