From eda55d25b59b4ed7c373f37eb9004832f9e26367 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 12 Jan 2012 17:04:30 +0100 Subject: Move menu related code into a separate class Also removes the "System Settings" menu item (according to spec). Printer menu items are hardcoded for now. --- src/indicator-printers-menu.h | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/indicator-printers-menu.h (limited to 'src/indicator-printers-menu.h') diff --git a/src/indicator-printers-menu.h b/src/indicator-printers-menu.h new file mode 100644 index 0000000..bca9b0c --- /dev/null +++ b/src/indicator-printers-menu.h @@ -0,0 +1,53 @@ +#ifndef INDICATOR_PRINTERS_MENU_H +#define INDICATOR_PRINTERS_MENU_H + +#include +#include + +G_BEGIN_DECLS + +#define INDICATOR_TYPE_PRINTERS_MENU indicator_printers_menu_get_type() + +#define INDICATOR_PRINTERS_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + INDICATOR_TYPE_PRINTERS_MENU, IndicatorPrintersMenu)) + +#define INDICATOR_PRINTERS_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + INDICATOR_TYPE_PRINTERS_MENU, IndicatorPrintersMenuClass)) + +#define INDICATOR_IS_PRINTERS_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + INDICATOR_TYPE_PRINTERS_MENU)) + +#define INDICATOR_IS_PRINTERS_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), \ + INDICATOR_TYPE_PRINTERS_MENU)) + +#define INDICATOR_PRINTERS_MENU_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + INDICATOR_TYPE_PRINTERS_MENU, IndicatorPrintersMenuClass)) + +typedef struct _IndicatorPrintersMenu IndicatorPrintersMenu; +typedef struct _IndicatorPrintersMenuClass IndicatorPrintersMenuClass; +typedef struct _IndicatorPrintersMenuPrivate IndicatorPrintersMenuPrivate; + +struct _IndicatorPrintersMenu +{ + GObject parent; +}; + +struct _IndicatorPrintersMenuClass +{ + GObjectClass parent_class; +}; + +GType indicator_printers_menu_get_type (void) G_GNUC_CONST; + +IndicatorPrintersMenu *indicator_printers_menu_new (void); +DbusmenuMenuitem * indicator_printers_menu_get_root (IndicatorPrintersMenu *menu); + +G_END_DECLS + +#endif + -- cgit v1.2.3