diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-08-20 21:32:33 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-08-20 21:32:33 +0200 |
commit | 004314963a36bb48473ae58eccc9f5532225ab9b (patch) | |
tree | 9747d0a1af2ef75805654c393f2d241caee75bcf /src/indicator-messages.c | |
parent | 8be3201de7ac246e759f74bfe35e53f742908800 (diff) | |
download | ayatana-indicator-messages-004314963a36bb48473ae58eccc9f5532225ab9b.tar.gz ayatana-indicator-messages-004314963a36bb48473ae58eccc9f5532225ab9b.tar.bz2 ayatana-indicator-messages-004314963a36bb48473ae58eccc9f5532225ab9b.zip |
Use a custom menu item for application items
This introduces ImAppMenuItem: a menu item which shows a small triangle next to
an application's name if the associated app is running.
The running state is communicated to the menu by giving the "launch" action a
boolean state.
This depends on a patch to gtk which creates custom menu items from
gtk_menu_new_from_model when the x-canonical-type attribute is set on a menu
item in the model.
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r-- | src/indicator-messages.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 14833fd..67a28e9 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -36,6 +36,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "dbus-data.h" +#include "im-app-menu-item.h" + #define INDICATOR_MESSAGES_TYPE (indicator_messages_get_type ()) #define INDICATOR_MESSAGES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_MESSAGES_TYPE, IndicatorMessages)) #define INDICATOR_MESSAGES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_MESSAGES_TYPE, IndicatorMessagesClass)) @@ -140,6 +142,10 @@ indicator_messages_init (IndicatorMessages *self) update_menu (self); g_object_unref (bus); + + /* make sure custom menu item types are registered (so that + * gtk_model_new_from_menu can pick them up */ + im_app_menu_item_get_type (); } /* Unref stuff */ |