Skip to content

Commit

Permalink
Replace GtkSourceView with GtkTextView
Browse files Browse the repository at this point in the history
As Stickynotes doesn't seem to work with GtkSourceView anymore
  • Loading branch information
lukefromdc committed Nov 22, 2024
1 parent 925c0cd commit 2e0685c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions stickynotes/sticky-notes-note.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<requires lib="gtksourceview" version="4.0"/>
<object class="GtkSourceBuffer" id="body_buffer">
<property name="max_undo_levels">-1</property>
<requires lib="GtkTextView" version="4.0"/>
<object class="GtkTextBuffer" id="body_buffer">
</object>
<object class="GtkMenu" id="stickynote_menu">
<child>
Expand Down Expand Up @@ -129,7 +128,7 @@
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<child>
<object class="GtkSourceView" id="body_text">
<object class="GtkTextView" id="body_text">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="wrap_mode">word</property>
Expand Down
2 changes: 1 addition & 1 deletion stickynotes/stickynotes.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ stickynote_new_aux (GdkScreen *screen,
gtk_widget_add_events (note->w_lock, GDK_BUTTON_PRESS_MASK);

note->buffer =
GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (note->w_body)));
GTK_TEXT_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (note->w_body)));

note->w_close =
GTK_WIDGET (gtk_builder_get_object (builder, "close_button"));
Expand Down
2 changes: 1 addition & 1 deletion stickynotes/stickynotes.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ typedef struct
GtkWidget *w_resize_se; /* Sticky Note resize button (south east) */
GtkWidget *w_resize_sw; /* Sticky Note resize button (south west) */

GtkSourceBuffer *buffer; /* Sticky Note text buffer for undo/redo */
GtkTextBuffer *buffer; /* Sticky Note text buffer for undo/redo */

GtkCheckMenuItem *w_lock_toggle_item; /* Lock item in the popup menu */

Expand Down

0 comments on commit 2e0685c

Please sign in to comment.