From d3527344f928d0352e6ec92e6e6d954374664e71 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 7 Oct 2021 18:42:36 +0200 Subject: stickynotes: Restore note popup menu that got lost in 37a85e35448f8 --- stickynotes/sticky-notes-note.ui | 36 ++++++++++++++++++++++++++++++++++++ stickynotes/stickynotes.c | 10 +++++----- stickynotes/stickynotes.h | 2 +- stickynotes/stickynotes_callbacks.c | 6 +++--- stickynotes/stickynotes_callbacks.h | 4 ++-- 5 files changed, 47 insertions(+), 11 deletions(-) (limited to 'stickynotes') diff --git a/stickynotes/sticky-notes-note.ui b/stickynotes/sticky-notes-note.ui index 4426c659..d8a69587 100644 --- a/stickynotes/sticky-notes-note.ui +++ b/stickynotes/sticky-notes-note.ui @@ -6,6 +6,42 @@ -1 + + + + True + True + _New Note + + + + + True + True + _Delete Note... + + + + + + + + True + True + _Lock Note + + + + + + + + True + True + _Properties + + + False Sticky Note diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index 978e731e..698a83d7 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -163,9 +163,9 @@ stickynote_new_aux (GdkScreen *screen, note->w_menu = GTK_WIDGET (gtk_builder_get_object (builder, "stickynote_menu")); - note->ta_lock_toggle_item = - GTK_TOGGLE_ACTION (gtk_builder_get_object (builder, - "popup_toggle_lock")); + note->w_lock_toggle_item = + GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, + "popup_toggle_lock")); note->w_properties = GTK_WIDGET (gtk_builder_get_object (builder, @@ -715,8 +715,8 @@ stickynote_set_locked (StickyNote *note, gtk_image_set_pixel_size (note->img_lock, STICKYNOTES_ICON_SIZE); - gtk_toggle_action_set_active (note->ta_lock_toggle_item, - locked); + gtk_check_menu_item_set_active (note->w_lock_toggle_item, + locked); stickynotes_applet_update_menus (); } diff --git a/stickynotes/stickynotes.h b/stickynotes/stickynotes.h index bee35bad..3a524189 100644 --- a/stickynotes/stickynotes.h +++ b/stickynotes/stickynotes.h @@ -52,7 +52,7 @@ typedef struct GtkSourceBuffer *buffer; /* Sticky Note text buffer for undo/redo */ - GtkToggleAction *ta_lock_toggle_item; /* Lock item in the popup menu */ + GtkCheckMenuItem *w_lock_toggle_item; /* Lock item in the popup menu */ GtkImage *img_lock; /* Lock image */ GtkImage *img_close; /* Close image */ diff --git a/stickynotes/stickynotes_callbacks.c b/stickynotes/stickynotes_callbacks.c index b80f34e4..3e849131 100644 --- a/stickynotes/stickynotes_callbacks.c +++ b/stickynotes/stickynotes_callbacks.c @@ -163,11 +163,11 @@ popup_destroy_cb (GtkWidget *widget, /* Popup Menu Callback : Lock/Unlock selected sticky note */ void -popup_toggle_lock_cb (GtkToggleAction *action, - StickyNote *note) +popup_toggle_lock_cb (GtkCheckMenuItem *item, + StickyNote *note) { stickynote_set_locked (note, - gtk_toggle_action_get_active (action)); + gtk_check_menu_item_get_active (item)); } /* Popup Menu Callback : Change sticky note properties */ diff --git a/stickynotes/stickynotes_callbacks.h b/stickynotes/stickynotes_callbacks.h index 8934011f..a155d812 100644 --- a/stickynotes/stickynotes_callbacks.h +++ b/stickynotes/stickynotes_callbacks.h @@ -62,8 +62,8 @@ void popup_destroy_cb (GtkWidget *widget, StickyNote *note); void -popup_toggle_lock_cb (GtkToggleAction *action, - StickyNote *note); +popup_toggle_lock_cb (GtkCheckMenuItem *item, + StickyNote *note); void popup_properties_cb (GtkWidget *widget, StickyNote *note); -- cgit v1.2.1