File: hello-applet.rb

package info (click to toggle)
ruby-gnome2 0.15.0-1.1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,704 kB
  • ctags: 8,558
  • sloc: ansic: 69,912; ruby: 19,511; makefile: 97; xml: 35; sql: 13
file content (24 lines) | stat: -rwxr-xr-x 527 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/ruby
=begin
  hello-applet.rb 

  Copyright (c) 2004 Ruby-GNOME2 Project Team
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: hello-applet.rb,v 1.1 2004/06/06 17:23:04 mutoh Exp $
=end


require 'panelapplet2'

PanelApplet.main("OAFIID:GNOME_HelloApplet_Factory",
                 "The Hello World Applet", "0.1") do |applet, iid|
  if iid == "OAFIID:GNOME_HelloApplet"
    label = Gtk::Label.new("Hello World")
    applet.add(label)
    applet.show_all
    true
  else
    false
  end
end