Branch: refs/heads/master Author: Thomas Martitz thomas.martitz@mailbox.org Committer: Thomas Martitz thomas.martitz@mailbox.org Date: Wed, 04 Oct 2023 20:42:26 UTC Commit: 63e31a3ec2c8ceae27fcaeb1522320643c3886f8 https://github.com/geany/geany/commit/63e31a3ec2c8ceae27fcaeb1522320643c3886...
Log Message: ----------- Enable new Scintilla "Change History"
Makes Geany feel a litttle bit more modern.
Can be enabled/disabled via Prefs. Default is to show the change history in the markers margin.
Note: Scintilla tracks only its own change history and is not connected to any VCS, unlike the git-changebar plugin. Also, change history is lost when the document is closed and re-opened.
Modified Paths: -------------- data/geany.glade src/editor.c src/editor.h src/keyfile.c
Modified: data/geany.glade 63 lines changed, 63 insertions(+), 0 deletions(-) =================================================================== @@ -4294,6 +4294,69 @@ <property name="position">2</property> </packing> </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> + <child> + <object class="GtkAlignment"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="left-padding">12</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="check_change_history_markers"> + <property name="label" translatable="yes">Show in markers margin</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="check_change_history_indicators"> + <property name="label" translatable="yes">Show as underline indicators</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label252"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes"><b>Change History</b></property> + <property name="use-markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> </object> <packing> <property name="position">3</property>
Modified: src/editor.c 9 lines changed, 9 insertions(+), 0 deletions(-) =================================================================== @@ -5205,6 +5205,15 @@ void editor_apply_update_prefs(GeanyEditor *editor) /* virtual space */ SSM(sci, SCI_SETVIRTUALSPACEOPTIONS, editor_prefs.show_virtual_space, 0);
+ /* Change history */ + guint change_history_mask; + change_history_mask = SC_CHANGE_HISTORY_DISABLED; + if (editor_prefs.change_history_markers) + change_history_mask |= SC_CHANGE_HISTORY_ENABLED|SC_CHANGE_HISTORY_MARKERS; + if (editor_prefs.change_history_indicators) + change_history_mask |= SC_CHANGE_HISTORY_ENABLED|SC_CHANGE_HISTORY_INDICATORS; + SSM(sci, SCI_SETCHANGEHISTORY, change_history_mask, 0); + /* caret Y policy */ caret_y_policy = CARET_EVEN; if (editor_prefs.scroll_lines_around_cursor > 0)
Modified: src/editor.h 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -140,6 +140,8 @@ typedef struct GeanyEditorPrefs gint scroll_lines_around_cursor; gint ime_interaction; /* input method editor's candidate window behaviour */ gboolean show_line_endings_only_when_differ; + gboolean change_history_markers; + gboolean change_history_indicators; } GeanyEditorPrefs;
Modified: src/keyfile.c 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -273,6 +273,10 @@ static void init_pref_groups(void) "radio_virtualspace_selection", GEANY_VIRTUAL_SPACE_SELECTION, "radio_virtualspace_always", GEANY_VIRTUAL_SPACE_ALWAYS, NULL); + stash_group_add_toggle_button(group, &editor_prefs.change_history_markers, + "change_history_markers", TRUE, "check_change_history_markers"); + stash_group_add_toggle_button(group, &editor_prefs.change_history_indicators, + "change_history_indicators", FALSE, "check_change_history_indicators"); stash_group_add_toggle_button(group, &editor_prefs.autocomplete_doc_words, "autocomplete_doc_words", FALSE, "check_autocomplete_doc_words"); stash_group_add_toggle_button(group, &editor_prefs.completion_drops_rest_of_word,
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).