diff options
author | Jason Conti <jason.conti@gmail.com> | 2014-05-31 14:21:33 -0400 |
---|---|---|
committer | Jason Conti <jason.conti@gmail.com> | 2014-05-31 14:21:33 -0400 |
commit | 32a2a7adf0b651a25f98f576a6657707507df5ec (patch) | |
tree | 4257f09afa6b40341cc96d69e8c91bd9d011cbe7 /src | |
parent | c8af626d50880e365fbb07f14c69b843152975ca (diff) | |
download | ayatana-indicator-notifications-32a2a7adf0b651a25f98f576a6657707507df5ec.tar.gz ayatana-indicator-notifications-32a2a7adf0b651a25f98f576a6657707507df5ec.tar.bz2 ayatana-indicator-notifications-32a2a7adf0b651a25f98f576a6657707507df5ec.zip |
* Add button argument to notification menuitem clicked signal
* Replace deprecated stock icon api
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-notifications.c | 4 | ||||
-rw-r--r-- | src/notification-menuitem.c | 8 | ||||
-rw-r--r-- | src/notification-menuitem.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/indicator-notifications.c b/src/indicator-notifications.c index f78fb10..5cf9497 100644 --- a/src/indicator-notifications.c +++ b/src/indicator-notifications.c @@ -125,7 +125,7 @@ static void update_indicator_visibility(IndicatorNotifications *self); static void clear_item_activated_cb(GtkMenuItem *menuitem, gpointer user_data); static void menu_visible_notify_cb(GtkWidget *menu, GParamSpec *pspec, gpointer user_data); static void message_received_cb(DBusSpy *spy, Notification *note, gpointer user_data); -static void notification_clicked_cb(NotificationMenuItem *menuitem, gpointer user_data); +static void notification_clicked_cb(NotificationMenuItem *menuitem, guint button, gpointer user_data); static void setting_changed_cb(GSettings *settings, gchar *key, gpointer user_data); /* Indicator Module Config */ @@ -597,7 +597,7 @@ message_received_cb(DBusSpy *spy, Notification *note, gpointer user_data) * Remove the menuitem when clicked. **/ static void -notification_clicked_cb(NotificationMenuItem *menuitem, gpointer user_data) +notification_clicked_cb(NotificationMenuItem *menuitem, guint button, gpointer user_data) { g_return_if_fail(IS_NOTIFICATION_MENUITEM(menuitem)); g_return_if_fail(IS_INDICATOR_NOTIFICATIONS(user_data)); diff --git a/src/notification-menuitem.c b/src/notification-menuitem.c index df510bd..ecf760c 100644 --- a/src/notification-menuitem.c +++ b/src/notification-menuitem.c @@ -42,8 +42,8 @@ notification_menuitem_class_init(NotificationMenuItemClass *klass) G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(NotificationMenuItemClass, clicked), NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); + g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, 1, G_TYPE_UINT); } static void @@ -63,7 +63,7 @@ notification_menuitem_init(NotificationMenuItem *self) gtk_box_pack_start(GTK_BOX(hbox), self->priv->label, TRUE, TRUE, 0); gtk_widget_show(self->priv->label); - self->priv->close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); + self->priv->close_image = gtk_image_new_from_icon_name("gtk-close", GTK_ICON_SIZE_MENU); gtk_widget_show(self->priv->close_image); gtk_box_pack_start(GTK_BOX(hbox), self->priv->close_image, FALSE, FALSE, 0); @@ -151,6 +151,6 @@ notification_button_release_cb(GtkWidget *widget, GdkEventButton *event, gpointe { g_return_val_if_fail(IS_NOTIFICATION_MENUITEM(widget), FALSE); - g_signal_emit(NOTIFICATION_MENUITEM(widget), notification_menuitem_signals[CLICKED], 0); + g_signal_emit(NOTIFICATION_MENUITEM(widget), notification_menuitem_signals[CLICKED], 0, event->button); return TRUE; } diff --git a/src/notification-menuitem.h b/src/notification-menuitem.h index 11421c1..b13d8aa 100644 --- a/src/notification-menuitem.h +++ b/src/notification-menuitem.h @@ -30,7 +30,7 @@ struct _NotificationMenuItemClass { GtkMenuItemClass parent_class; - void (* clicked) (NotificationMenuItem *menuitem); + void (* clicked) (NotificationMenuItem *menuitem, guint button); }; struct _NotificationMenuItemPrivate { |