The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Gtk2::AppIndicator - Perl extension for libappindicator

SYNOPSIS

  $status_icon=Gtk2::AppIndicator->new("CuePlay","cueplay_24");
  $status_icon->set_icon_theme_path("../pixmaps");
  my $menu=Gtk2::Menu->new();
  my $showcp=Gtk2::CheckMenuItem->new_with_mnemonic("_Show CuePlay");
  $showcp->set_active(1);
  $showcp->signal_connect("toggled",sub { hide_show($window,$showcp); });
  my $quit=Gtk2::MenuItem->new_with_mnemonic("_Quit");
  $quit->signal_connect("activate",sub { storesize($window,\%conf);quit($window); });
  
  $menu->append($showcp);
  $menu->append(Gtk2::SeparatorMenuItem->new());
  $menu->append($quit);
  $status_icon->set_menu($menu);
  $menu->show_all();
  $status_icon->set_active();

DESCRIPTION

This module gives an interface to the new ubuntu Unity libappindicator stuff.

FUNCTIONS

 $ind=Gtk2::AppIndicator->new($application_name,$active_icon_name)
 

Creates a new application indicator object with given name and icon name for the active icon.

 $ind->set_icon_theme_path($path)
 

Set the icon theme path to 'path'. This is where icons should be found with names like <active_icon_name>.png.

 $ind->set_icon_name_active($name)
 

Sets the icon name for the active icon.

 $ind->set_icon_name_attention($name)
 

Sets the icon name for the attention icon

  $ind->set_active()
  

Makes the application indicator active.

  $ind->set_attention()
  

Makes the application indicator show the attention icon.

  $ind->set_menu($menu)
  

Sets the popup menu for the indicator icon.

AUTHOR

Hans Oesterholt, <debian@oesterholt.net>

COPYRIGHT AND LICENSE

Copyright (C) 2012 by Hans Oesterholt

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.