@@ -83,8 +83,9 @@ public class jorts.StickyView : Granite.HyperTextView {
8383
8484 this . actions = this . create_formatting_actions ();
8585 this . register_action_accelerators ();
86- this . add_formatting_options_to_text_view_context_menu (this );
87-
86+
87+ // Menu menu = this.create_formatting_menu ();
88+ // this.set_extra_menu (menu);
8889 }
8990
9091
@@ -107,7 +108,7 @@ public class jorts.StickyView : Granite.HyperTextView {
107108 );
108109 }
109110 }
110-
111+
111112 private SimpleActionGroup create_formatting_actions () {
112113 var actions_to_return = new SimpleActionGroup ();
113114
@@ -134,11 +135,6 @@ public class jorts.StickyView : Granite.HyperTextView {
134135 }
135136
136137
137- // Adapted from GTK 4 Widget Factory Demo: https://gitlab.gnome.org/GNOME/gtk/-/tree/main/demos/widget-factory
138- private void add_formatting_options_to_text_view_context_menu (Gtk .TextView text_view ) {
139- Menu menu = this . create_formatting_menu ();
140- this . set_extra_menu (menu);
141- }
142138
143139 private void handle_text_buffer_inserted_text (ref Gtk .TextIter iter , string new_text , int new_text_length ) {
144140 Gtk . TextTagTable text_buffer_tags = this . buffer. get_tag_table ();
@@ -322,17 +318,17 @@ public class jorts.StickyView : Granite.HyperTextView {
322318 }
323319
324320 private void toggle_format (SimpleAction action , Variant value ) {
325- Gtk . TextIter start_iterator, end_itrator ;
321+ Gtk . TextIter start_iterator, end_iterator ;
326322 string name = action. get_name ();
327323
328324 action. set_state (value );
329325
330- this . buffer. get_selection_bounds (out start_iterator, out end_itrator );
326+ this . buffer. get_selection_bounds (out start_iterator, out end_iterator );
331327
332328 if (value . get_boolean ()) {
333- this . buffer. apply_tag_by_name (name, start_iterator, end_itrator );
329+ this . buffer. apply_tag_by_name (name, start_iterator, end_iterator );
334330 } else {
335- this . buffer. remove_tag_by_name (name, start_iterator, end_itrator );
331+ this . buffer. remove_tag_by_name (name, start_iterator, end_iterator );
336332 }
337333 }
338334
0 commit comments