Name
Context Menu -- Functions for adding and remove items from the applet's context menu.
Synopsis
#include <applet-widget.h>
void applet_widget_register_callback (AppletWidget *applet,
const char *name,
const char *menutext,
AppletCallbackFunc func,
gpointer data);
void applet_widget_register_stock_callback
(AppletWidget *applet,
const char *name,
const char *stock_type,
const char *menutext,
AppletCallbackFunc func,
gpointer data);
void applet_widget_unregister_callback
(AppletWidget *applet,
const char *name);
void applet_widget_register_callback_dir
(AppletWidget *applet,
const char *name,
const char *menutext);
void applet_widget_register_stock_callback_dir
(AppletWidget *applet,
const char *name,
const char *stock_type,
const char *menutext);
void applet_widget_unregister_callback_dir
(AppletWidget *applet,
const char *name);
void applet_widget_callback_set_sensitive
(AppletWidget *applet,
const char *name,
gboolean sensitive); |
Details
applet_widget_register_callback ()
void applet_widget_register_callback (AppletWidget *applet,
const char *name,
const char *menutext,
AppletCallbackFunc func,
gpointer data); |
Adds a menu item to the applet's context menu. The name
should be a path that is separated by '/' and ends in the name of this
item. You need to add any submenus with
applet_widget_register_callback_dir.
applet_widget_register_stock_callback ()
void applet_widget_register_stock_callback
(AppletWidget *applet,
const char *name,
const char *stock_type,
const char *menutext,
AppletCallbackFunc func,
gpointer data); |
Adds a menu item to the applet's context menu with a stock
GNOME pixmap. This works almost exactly the same as
applet_widget_register_callback.
applet_widget_unregister_callback ()
void applet_widget_unregister_callback
(AppletWidget *applet,
const char *name); |
Remove a menu item from the applet's context menu. The
name should be the full path to the menu item. This will not remove
any submenus.
applet_widget_register_callback_dir ()
void applet_widget_register_callback_dir
(AppletWidget *applet,
const char *name,
const char *menutext); |
Adds a submenu to the applet's context menu. The name
should be the full path of the new submenu with the name of the new
submenu as the last part of the path. The name can, but doesn't
have to be terminated with a '/'.
applet_widget_register_stock_callback_dir ()
void applet_widget_register_stock_callback_dir
(AppletWidget *applet,
const char *name,
const char *stock_type,
const char *menutext); |
Adds a submenu to the applet's context menu with a stock
GNOME pixmap. This is similiar to applet_widget_register_callback_dir.
applet_widget_unregister_callback_dir ()
void applet_widget_unregister_callback_dir
(AppletWidget *applet,
const char *name); |
Removes a submenu from the applet's context menu. Use
this instead of applet_widget_unregister_callback to remove submenus.
The name can be, but doesn't have to be terminated with a '/'. If you
have not removed the subitems of this menu, it will still be shown but
without it's title or icon. So make sure to first remove any items and
submenus before calling this function.
applet_widget_callback_set_sensitive ()
void applet_widget_callback_set_sensitive
(AppletWidget *applet,
const char *name,
gboolean sensitive); |
Sets the sensitivity of a menu item in the applet's
context menu.