Skip to content

tsayen/ruby-libappindicator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby-libappindicator

Summary

Ruby bindings for libappindicator used by Ubuntu’s Application Indicators released under the LGPLv3 license

This is my first C extension and my first gem so please consider this as beta version. It works on my computer, but I can’t guarantee it will on yours. Any help will of course be appreciated, especially for proper gem packaging.

Versioning

This gem uses the same version numbering than libappindicator itself for major and minor, micro is used for bugfixes and gem enhancements. Right now libappindicator-0.1 is available which means it will be supported by ruby-libappindicator-0.1.x .

Minimal “hello world”

require "rubygems"
require "ruby-libappindicator"

ai = AppIndicator::AppIndicator.new("test", "indicator-messages", AppIndicator::Category::APPLICATION_STATUS);

ai.set_menu(Gtk::Menu.new)
ai.set_status(AppIndicator::Status::ACTIVE)

Gtk.main

The two necessary steps to make your application indicator visible are:

  • setting a menu (even empty, but you need one)

  • setting the status as active or requiring attention

Installation

In order to build ruby-libappindicator you need to have the GTK+ and libappindicator development headers

$ sudo apt-get install libgtk-directfb-2.0-dev libappindicator-dev
$ gem install ruby-libappindicator

TODO

  • Write/generate some documentation

About

Ruby bindings for libappindicator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 79.5%
  • Ruby 20.5%