aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/indicator-messages.c24
2 files changed, 14 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 11c9bd8..5d6b190 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,14 +43,12 @@ GIO_UNIX_REQUIRED_VERSION=2.18
PANEL_REQUIRED_VERSION=2.0.0
INDICATOR_REQUIRED_VERSION=0.3.19
GLIB_REQUIRED_VERSION=2.31.20
-MENU_FACTORY_REQUIRED_VERSION=0.0
PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
glib-2.0 >= $GLIB_REQUIRED_VERSION
- gmodule-2.0 >= $GLIB_REQUIRED_VERSION
- menu-factory-gtk >= $MENU_FACTORY_REQUIRED_VERSION)
+ gmodule-2.0 >= $GLIB_REQUIRED_VERSION)
PKG_CHECK_MODULES(GIO, gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION)
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index b6707f5..eb0b1fb 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -34,8 +34,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libindicator/indicator-image-helper.h>
#include <libindicator/indicator-service-manager.h>
-#include <menu-factory-gtk.h>
-
#include "dbus-data.h"
#include "gen-messages-service.xml.h"
@@ -81,7 +79,8 @@ static void indicator_messages_init (IndicatorMessages *self);
static void indicator_messages_dispose (GObject *object);
static void indicator_messages_finalize (GObject *object);
static GtkImage * get_icon (IndicatorObject * io);
-static GtkMenu * get_menu (IndicatorObject * io);
+static GMenuModel * get_menu_model (IndicatorObject * io);
+static GActionGroup * get_actions (IndicatorObject * io);
static void indicator_messages_middle_click (IndicatorObject * io,
IndicatorObjectEntry * entry,
guint time, gpointer data);
@@ -126,7 +125,8 @@ indicator_messages_class_init (IndicatorMessagesClass *klass)
IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);
io_class->get_image = get_icon;
- io_class->get_menu = get_menu;
+ io_class->get_menu_model = get_menu_model;
+ io_class->get_actions = get_actions;
io_class->get_accessible_desc = get_accessible_desc;
io_class->get_name_hint = get_name_hint;
io_class->secondary_activate = indicator_messages_middle_click;
@@ -416,16 +416,18 @@ get_icon (IndicatorObject * io)
}
/* Builds the menu for the indicator */
-static GtkMenu *
-get_menu (IndicatorObject * io)
+static GMenuModel *
+get_menu_model (IndicatorObject * io)
{
IndicatorMessages *self = INDICATOR_MESSAGES (io);
- GtkMenu *menu;
-
- menu = menu_factory_gtk_new_menu (self->menu, self->actions);
- gtk_widget_show_all (GTK_WIDGET (menu));
+ return self->menu;
+}
- return menu;
+static GActionGroup *
+get_actions (IndicatorObject *io)
+{
+ IndicatorMessages *self = INDICATOR_MESSAGES (io);
+ return self->actions;
}
/* Returns the accessible description of the indicator */