summaryrefslogtreecommitdiff
path: root/stickynotes
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2021-10-07 18:42:36 +0200
committerraveit65 <[email protected]>2021-10-26 16:00:45 +0200
commitd3527344f928d0352e6ec92e6e6d954374664e71 (patch)
treeeeaf2f2aeeb2d4e21713ded6f6488e554022b8a5 /stickynotes
parent130e2e12a7d5e54165b25effee5fadb1693a096a (diff)
downloadmate-applets-d3527344f928d0352e6ec92e6e6d954374664e71.tar.bz2
mate-applets-d3527344f928d0352e6ec92e6e6d954374664e71.tar.xz
stickynotes: Restore note popup menu that got lost in 37a85e35448f8
Diffstat (limited to 'stickynotes')
-rw-r--r--stickynotes/sticky-notes-note.ui36
-rw-r--r--stickynotes/stickynotes.c10
-rw-r--r--stickynotes/stickynotes.h2
-rw-r--r--stickynotes/stickynotes_callbacks.c6
-rw-r--r--stickynotes/stickynotes_callbacks.h4
5 files changed, 47 insertions, 11 deletions
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 @@
<object class="GtkSourceBuffer" id="body_buffer">
<property name="max_undo_levels">-1</property>
</object>
+ <object class="GtkMenu" id="stickynote_menu">
+ <child>
+ <object class="GtkMenuItem" id="popup_create">
+ <property name="visible">True</property>
+ <property name="use-underline">True</property>
+ <property name="label" translatable="yes">_New Note</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="popup_destroy">
+ <property name="visible">True</property>
+ <property name="use-underline">True</property>
+ <property name="label" translatable="yes">_Delete Note...</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem"/>
+ </child>
+ <child>
+ <object class="GtkCheckMenuItem" id="popup_toggle_lock">
+ <property name="visible">True</property>
+ <property name="use-underline">True</property>
+ <property name="label" translatable="yes">_Lock Note</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem"/>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="popup_properties">
+ <property name="visible">True</property>
+ <property name="use-underline">True</property>
+ <property name="label" translatable="yes">_Properties</property>
+ </object>
+ </child>
+ </object>
<object class="GtkWindow" id="stickynote_window">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Sticky Note</property>
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);