Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xed for openSUSE:Factory checked in at 2021-06-22 20:44:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xed (Old) and /work/SRC/openSUSE:Factory/.xed.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xed" Tue Jun 22 20:44:52 2021 rev:29 rq:897762 version:3.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/xed/xed.changes 2021-03-06 21:19:06.917265818 +0100 +++ /work/SRC/openSUSE:Factory/.xed.new.2625/xed.changes 2021-06-22 20:44:53.874820379 +0200 @@ -1,0 +2,13 @@ +Thu Jun 3 20:51:33 UTC 2021 - andy great <andythe_gr...@pm.me> + +- Update to version 3.0.0. + * Fix various typos in index.docbook + * Fix permissions + * Implement #225: Options to render whitespace + * i18n: Don't translate gsettings strings. + * Fix crashes when no documents (tabs) are open + * Uses strtol instead of atoi so that we can properly handle errors. + * Use CLAMP macro instead + * l10n: Update POT + +------------------------------------------------------------------- Old: ---- xed-2.8.4.tar.gz New: ---- xed-3.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xed.spec ++++++ --- /var/tmp/diff_new_pack.G4PreT/_old 2021-06-22 20:44:54.538821110 +0200 +++ /var/tmp/diff_new_pack.G4PreT/_new 2021-06-22 20:44:54.538821110 +0200 @@ -17,7 +17,7 @@ Name: xed -Version: 2.8.4 +Version: 3.0.0 Release: 0 Summary: A text editor with highlighting License: GPL-2.0-or-later ++++++ xed-2.8.4.tar.gz -> xed-3.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/data/org.x.editor.gschema.xml.in new/xed-3.0.0/data/org.x.editor.gschema.xml.in --- old/xed-2.8.4/data/org.x.editor.gschema.xml.in 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/data/org.x.editor.gschema.xml.in 2021-06-01 13:56:50.000000000 +0200 @@ -167,6 +167,36 @@ <description>Whether xed will ensure that documents always end with a trailing newline.</description> </key> + <key name="draw-whitespace" type="b"> + <default>false</default> + <summary>Draw whitespace</summary> + <description>Whether xed should render whitespace</description> + </key> + + <key name="draw-whitespace-leading" type="b"> + <default>false</default> + <summary>Draw leading whitespace</summary> + <description>Whether xed should render leading whitespace</description> + </key> + + <key name="draw-whitespace-inside" type="b"> + <default>false</default> + <summary>Draw whitespace within text</summary> + <description>Whether xed should render whitespace between words and characters</description> + </key> + + <key name="draw-whitespace-trailing" type="b"> + <default>false</default> + <summary>Draw trailing whitespace</summary> + <description>Whether xed should render trailing whitespace</description> + </key> + + <key name="draw-whitespace-newline" type="b"> + <default>false</default> + <summary>Draw newline characters</summary> + <description>Whether xed should render newline characters</description> + </key> + </schema> <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.x.editor.preferences.ui" path="/org/x/editor/preferences/ui/"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/debian/changelog new/xed-3.0.0/debian/changelog --- old/xed-2.8.4/debian/changelog 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/debian/changelog 2021-06-01 13:56:50.000000000 +0200 @@ -1,3 +1,29 @@ +xed (3.0.0) uma; urgency=medium + + [ Talkashie ] + * Fix various typos in index.docbook + + [ Soapux ] + * Fix permissions + + [ okaestne ] + * Implement #225: Options to render whitespace + + [ Michael Webster ] + * i18n: Don't translate gsettings strings. + + [ okaestne ] + * Fix crashes when no documents (tabs) are open + + [ Justin Schiff ] + * Uses strtol instead of atoi so that we can properly handle errors. + * Use CLAMP macro instead + + [ Clement Lefebvre ] + * l10n: Update POT + + -- Clement Lefebvre <r...@linuxmint.com> Tue, 01 Jun 2021 12:56:22 +0100 + xed (2.8.4) ulyssa; urgency=medium [ Eli Schwartz ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/help/C/index.docbook new/xed-3.0.0/help/C/index.docbook --- old/xed-2.8.4/help/C/index.docbook 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/help/C/index.docbook 2021-06-01 13:56:50.000000000 +0200 @@ -292,7 +292,7 @@ </listitem> </orderedlist> <para>Valid types of <replaceable>URI</replaceable> include <literal>http:</literal>, <literal>ftp:</literal>, <literal>file:</literal>, and all of the methods supported by <literal>gvfs</literal>.</para> - <para>Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. HTTP only allows files to be read. Files opened from FTP are read-only because because not all FTP servers may correctly work with saving remote files.</para> + <para>Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. HTTP only allows files to be read. Files opened from FTP are read-only because not all FTP servers may correctly work with saving remote files.</para> </sect2> <!-- ============= Working with tabs ======================== --> @@ -350,7 +350,7 @@ </listitem> <listitem><para>Type the string that you want to find in the <guilabel>Search for</guilabel> field. You can include special characters such as a new line or tab: see <xref linkend="xed-find-escapes"/>.</para> </listitem> - <listitem><para>Click <guibutton>Find</guibutton> to search the file for the first occurrence of the string after your current cursor position. If <application>&app;</application> finds the string, the application selects first occurrence of the string. Other occurrences of the string are highlighted.</para> + <listitem><para>Click <guibutton>Find</guibutton> to search the file for the first occurrence of the string after your current cursor position. If <application>&app;</application> finds the string, the application selects the first occurrence of the string. Other occurrences of the string are highlighted.</para> </listitem> <listitem><para>To find the next occurrence of the string, click <guibutton>Find</guibutton> or choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Next</guimenuitem> </menuchoice>. To find the previous occurrence of the text, choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Previous</guimenuitem> </menuchoice>.</para> </listitem> @@ -1400,7 +1400,7 @@ </itemizedlist> </listitem> </orderedlist> - <para>The amount of space used, and whether tab character or space characters are used, depends on the <guilabel>Tab Stops</guilabel> settings in the Editor Preferences: see <xref linkend="xed-prefs-editor"/>.</para> + <para>The amount of space used, and whether tab characters or space characters are used, depends on the <guilabel>Tab Stops</guilabel> settings in the Editor Preferences: see <xref linkend="xed-prefs-editor"/>.</para> </sect2> @@ -1484,12 +1484,12 @@ </sect3> <sect3 id="xed-modelines-plugin-kate"> <title>Kate Modelines</title> - <para>The first and last ten lines a document are scanned for <application>Kate</application> modelines.</para> + <para>The first and last ten lines of a document are scanned for <application>Kate</application> modelines.</para> <para>The <application>Kate</application> options for tab-width, indent-width, space-indent, word-wrap and word-wrap-column are supported. For more information, see the <ulink type="http" url="http://www.kate-editor.org">Kate website</ulink>.</para> </sect3> <sect3 id="xed-modelines-plugin-vim"> <title>Vim Modelines</title> - <para>The first and last three lines a document are scanned for <application>Vim</application> modelines.</para> + <para>The first and last three lines of a document are scanned for <application>Vim</application> modelines.</para> <para>The <application>Vim</application> options for et, expandtab, ts, tabstop, sw, shiftwidth, wrap, and textwidth are supported. For more information, see the <ulink type="http" url="http://vimdoc.sourceforge.net/htmldoc/options.html#modeline">Vim website</ulink>.</para> </sect3> </sect2> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/meson.build new/xed-3.0.0/meson.build --- old/xed-2.8.4/meson.build 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/meson.build 2021-06-01 13:56:50.000000000 +0200 @@ -1,4 +1,4 @@ -project('xed', 'c', version : '2.8.4') +project('xed', 'c', version : '3.0.0') gnome = import('gnome') i18n = import('i18n') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/po/POTFILES.in new/xed-3.0.0/po/POTFILES.in --- old/xed-2.8.4/po/POTFILES.in 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/po/POTFILES.in 2021-06-01 13:56:50.000000000 +0200 @@ -1,7 +1,6 @@ # List of source files containing translatable strings. # Please keep this file sorted alphabetically. [encoding: UTF-8] -[type: gettext/gsettings]data/org.x.editor.gschema.xml.in data/xed.appdata.xml.in data/xed.desktop.in.in xed/xed-app-activatable.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/po/xed.pot new/xed-3.0.0/po/xed.pot --- old/xed-2.8.4/po/xed.pot 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/po/xed.pot 2021-06-01 13:56:50.000000000 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-11-30 11:24+0000\n" +"POT-Creation-Date: 2021-06-01 12:55+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <l...@li.org>\n" @@ -18,429 +18,6 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: ../data/org.x.editor.gschema.xml.in.h:1 -msgid "Use Default Font" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:2 -msgid "" -"Whether to use the system's default fixed width font for editing text " -"instead of a font specific to xed. If this option is turned off, then the " -"font named in the \"Editor Font\" option will be used instead of the system " -"font." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:3 -msgctxt "editor-font" -msgid "'Monospace 12'" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:4 -msgid "Editor Font" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:5 -msgid "" -"A custom font that will be used for the editing area. This will only take " -"effect if the \"Use Default Font\" option is turned off." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:6 -msgid "Prefer Dark Theme" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:7 -msgid "" -"Whether xed should prefer the dark variation of the current Gtk theme if " -"available." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:8 -msgid "Style Scheme" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:9 -msgid "The ID of a GtkSourceView Style Scheme used to color the text." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:10 -msgid "Create Backup Copies" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:11 -msgid "" -"Whether xed should create backup copies for the files it saves. You can set " -"the backup file extension with the \"Backup Copy Extension\" option." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:12 -msgid "Autosave" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:13 -msgid "" -"Whether xed should automatically save modified files after a time interval. " -"You can set the time interval with the \"Autosave Interval\" option." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:14 -msgid "Autosave Interval" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:15 -msgid "" -"Number of minutes after which xed will automatically save modified files. " -"This will only take effect if the \"Autosave\" option is turned on." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:16 -msgid "Writable VFS schemes" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:17 -msgid "" -"List of VFS schemes xed supports in write mode. The 'file' scheme is " -"writable by default." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:18 -msgid "Maximum Number of Undo Actions" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:19 -msgid "" -"Maximum number of actions that xed will be able to undo or redo. Use \"-1\" " -"for unlimited number of actions." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:20 -msgid "Line Wrapping Mode" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:21 -msgid "" -"Specifies how to wrap long lines in the editing area. Use \"none\" for no " -"wrapping, \"word\" for wrapping at word boundaries, and \"char\" for " -"wrapping at individual character boundaries. Note that the values are case-" -"sensitive, so make sure they appear exactly as mentioned here." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:22 -msgid "Tab Size" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:23 -msgid "" -"Specifies the number of spaces that should be displayed instead of Tab " -"characters." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:24 -msgid "Insert spaces" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:25 -msgid "Whether xed should insert spaces instead of tabs." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:26 -msgid "Automatic indent" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:27 -msgid "Whether xed should enable automatic indentation." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:28 -msgid "Display Line Numbers" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:29 -msgid "Whether xed should display line numbers in the editing area." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:30 -msgid "Highlight Current Line" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:31 -msgid "Whether xed should highlight the current line." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:32 -msgid "Highlight Matching Bracket" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:33 -msgid "Whether xed should highlight the bracket matching the selected one." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:34 -msgid "Display Right Margin" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:35 -msgid "Whether xed should display the right margin in the editing area." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:36 -msgid "Right Margin Position" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:37 -msgid "Specifies the position of the right margin." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:38 -msgid "Smart Home End" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:39 -msgid "" -"Specifies how the cursor moves when the HOME and END keys are pressed. Use " -"\"disabled\" to always move at the start/end of the line, \"after\" to move " -"to the start/end of the line the first time the keys are pressed and to the " -"start/end of the text ignoring whitespaces the second time the keys are " -"pressed, \"before\" to move to the start/end of the text before moving to " -"the start/end of the line and \"always\" to always move to the start/end of " -"the text instead of the start/end of the line." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:40 -msgid "Restore Previous Cursor Position" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:41 -msgid "" -"Whether xed should restore the previous cursor position when a file is " -"loaded." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:42 -msgid "Enable Search Highlighting" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:43 -msgid "Whether xed should highlight all the occurrences of the searched text." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:44 -msgid "Enable Syntax Highlighting" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:45 -msgid "Whether xed should enable syntax highlighting." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:46 -#: ../xed/resources/ui/xed-preferences-dialog.ui.h:25 -msgid "Ensure Trailing Newline" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:47 -msgid "" -"Whether xed will ensure that documents always end with a trailing newline." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:48 -msgid "Toolbar is Visible" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:49 -msgid "Whether the toolbar should be visible in editing windows." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:50 -msgid "Status Bar is Visible" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:51 -msgid "" -"Whether the status bar at the bottom of editing windows should be visible." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:52 -msgid "Side Pane is Visible" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:53 -msgid "Whether the side pane at the left of editing windows should be visible." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:54 -msgid "Bottom Panel is Visible" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:55 -msgid "" -"Whether the bottom panel at the bottom of editing windows should be visible." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:56 -msgid "Allow changing active tabs by scrolling" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:57 -msgid "Whether you can change active tabs by scrolling." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:58 -msgid "Minimap is visible" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:59 -msgid "Whether the minimap for the document should be visible." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:60 -msgid "Maximum Recent Files" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:61 -msgid "" -"Specifies the maximum number of recently opened files that will be displayed " -"in the \"Recent Files\" submenu." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:62 -msgid "Print Syntax Highlighting" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:63 -msgid "Whether xed should print syntax highlighting when printing documents." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:64 -msgid "Print Header" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:65 -msgid "Whether xed should include a document header when printing documents." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:66 -msgid "Printing Line Wrapping Mode" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:67 -msgid "" -"Specifies how to wrap long lines for printing. Use \"none\" for no wrapping, " -"\"word\" for wrapping at word boundaries, and \"char\" for wrapping at " -"individual character boundaries. Note that the values are case-sensitive, so " -"make sure they appear exactly as mentioned here." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:68 -msgid "Print Line Numbers" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:69 -msgid "" -"If this value is 0, then no line numbers will be inserted when printing a " -"document. Otherwise, xed will print line numbers every such number of lines." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:70 -msgctxt "print-font-body-pango" -msgid "'Monospace 9'" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:71 -msgid "Body Font for Printing" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:72 -msgid "" -"Specifies the font to use for a document's body when printing documents." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:73 -msgctxt "print-font-header-pango" -msgid "'Sans 11'" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:74 -msgid "Header Font for Printing" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:75 -msgid "" -"Specifies the font to use for page headers when printing a document. This " -"will only take effect if the \"Print Header\" option is turned on." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:76 -msgctxt "print-font-numbers-pango" -msgid "'Sans 8'" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:77 -msgid "Line Number Font for Printing" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:78 -msgid "" -"Specifies the font to use for line numbers when printing. This will only " -"take effect if the \"Print Line Numbers\" option is non-zero." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:79 -msgctxt "auto-detected" -msgid "[ 'UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16' ]" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:80 -msgid "Automatically Detected Encodings" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:81 -msgid "" -"Sorted list of encodings used by xed for automatically detecting the " -"encoding of a file. \"CURRENT\" represents the current locale encoding. Only " -"recognized encodings are used." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:82 -msgctxt "shown-in-menu" -msgid "[ 'ISO-8859-15' ]" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:83 -msgid "Encodings shown in menu" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:84 -msgid "" -"List of encodings shown in the Character Encoding menu in open/save file " -"selector. Only recognized encodings are used." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:85 -msgid "History for \"search for\" entries" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:86 -msgid "List of entries in \"search for\" textbox." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:87 -msgid "History for \"replace with\" entries" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:88 -msgid "List of entries in \"replace with\" textbox." -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:89 -msgid "Active plugins" -msgstr "" - -#: ../data/org.x.editor.gschema.xml.in.h:90 -msgid "" -"List of active plugins. It contains the \"Location\" of the active plugins. " -"See the .xed-plugin file for obtaining the \"Location\" of a given plugin." -msgstr "" - #: ../data/xed.appdata.xml.in.h:1 msgid "A Text Editor" msgstr "" @@ -765,12 +342,12 @@ msgstr "" #: ../xed/xed-documents-panel.c:88 ../xed/xed-documents-panel.c:99 -#: ../xed/xed-window.c:1835 ../xed/xed-window.c:1839 +#: ../xed/xed-window.c:1836 ../xed/xed-window.c:1840 msgid "Read-Only" msgstr "" -#: ../xed/xed-documents-panel.c:710 ../xed/resources/ui/xed-shortcuts.ui.h:1 -#: ../xed/xed-window.c:3085 +#: ../xed/xed-documents-panel.c:650 ../xed/resources/ui/xed-shortcuts.ui.h:1 +#: ../xed/xed-window.c:3086 msgid "Documents" msgstr "" @@ -808,7 +385,7 @@ msgid "_Encoding" msgstr "" -#: ../xed/xed-file-chooser-dialog.c:44 ../xed/xed-preferences-dialog.c:731 +#: ../xed/xed-file-chooser-dialog.c:44 ../xed/xed-preferences-dialog.c:783 msgid "All Files" msgstr "" @@ -836,7 +413,7 @@ msgid "Windows" msgstr "" -#: ../xed/xed-highlight-mode-selector.c:297 ../xed/xed-window.c:1964 +#: ../xed/xed-highlight-mode-selector.c:297 ../xed/xed-window.c:1965 msgid "Plain Text" msgstr "" @@ -1141,64 +718,64 @@ "If you continue saving this file you can corrupt the document. Save anyway?" msgstr "" -#: ../xed/xed-preferences-dialog.c:266 +#: ../xed/xed-preferences-dialog.c:280 #: ../xed/resources/ui/xed-preferences-dialog.ui.h:3 #, no-c-format msgid "Use the system fixed width font (%s)" msgstr "" -#: ../xed/xed-preferences-dialog.c:384 +#: ../xed/xed-preferences-dialog.c:436 msgid "Editor" msgstr "" -#: ../xed/xed-preferences-dialog.c:422 +#: ../xed/xed-preferences-dialog.c:474 msgid "Save" msgstr "" -#: ../xed/xed-preferences-dialog.c:535 +#: ../xed/xed-preferences-dialog.c:587 #, c-format msgid "Directory '%s' could not be created: g_mkdir_with_parents() failed: %s" msgstr "" -#: ../xed/xed-preferences-dialog.c:689 +#: ../xed/xed-preferences-dialog.c:741 msgid "The selected color scheme cannot be installed." msgstr "" -#: ../xed/xed-preferences-dialog.c:712 ../xed/xed-preferences-dialog.c:718 +#: ../xed/xed-preferences-dialog.c:764 ../xed/xed-preferences-dialog.c:770 msgid "Add Scheme" msgstr "" -#: ../xed/xed-preferences-dialog.c:715 ../xed/xed-progress-info-bar.c:61 +#: ../xed/xed-preferences-dialog.c:767 ../xed/xed-progress-info-bar.c:61 msgid "Cancel" msgstr "" -#: ../xed/xed-preferences-dialog.c:724 +#: ../xed/xed-preferences-dialog.c:776 msgid "Color Scheme Files" msgstr "" -#: ../xed/xed-preferences-dialog.c:796 +#: ../xed/xed-preferences-dialog.c:848 #, c-format msgid "Could not remove color scheme \"%s\"." msgstr "" -#: ../xed/xed-preferences-dialog.c:828 +#: ../xed/xed-preferences-dialog.c:880 msgid "Theme" msgstr "" -#: ../xed/xed-preferences-dialog.c:845 +#: ../xed/xed-preferences-dialog.c:897 msgid "Plugins" msgstr "" -#: ../xed/xed-preferences-dialog.c:853 +#: ../xed/xed-preferences-dialog.c:905 msgid "Help" msgstr "" -#: ../xed/xed-preferences-dialog.c:858 +#: ../xed/xed-preferences-dialog.c:910 #: ../xed/resources/ui/xed-searchbar.ui.h:11 msgid "Close" msgstr "" -#: ../xed/xed-preferences-dialog.c:872 +#: ../xed/xed-preferences-dialog.c:924 msgid "Xed Preferences" msgstr "" @@ -1340,82 +917,106 @@ msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:10 -msgid "Highlighting" +msgid "Draw whitespace" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:11 -msgid "Highlight the current line" +msgid "Leading whitespace" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:12 -msgid "Highlight matching brackets" +msgid "Trailing whitespace" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:13 -msgid "Indentation" +msgid "Whitespace inside of text" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:14 -msgid "Tab width" +msgid "Newline character" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:15 -msgid "Use spaces instead of tabs" +msgid "Highlighting" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:16 -msgid "Automatic indentation" +msgid "Highlight the current line" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:17 -msgid "Word wrap" +msgid "Highlight matching brackets" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:18 -msgid "Split words over two lines" +msgid "Indentation" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:19 -msgid "Tab scrolling" +msgid "Tab width" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:20 -msgid "Allow mouse wheel scrolling to change tabs" +msgid "Use spaces instead of tabs" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:21 -msgid "File saving" +msgid "Automatic indentation" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:22 -msgid "Create a backup copy of files before saving" +msgid "Word wrap" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:23 -msgid "Autosave files" +msgid "Split words over two lines" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:24 -msgid "Minutes between saving" +msgid "Tab scrolling" +msgstr "" + +#: ../xed/resources/ui/xed-preferences-dialog.ui.h:25 +msgid "Allow mouse wheel scrolling to change tabs" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:26 -msgid "Dark theme" +msgid "File saving" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:27 -msgid "Use dark theme variant (if available)" +msgid "Create a backup copy of files before saving" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:28 -msgid "Style scheme" +msgid "Autosave files" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:29 -msgid "Install scheme" +msgid "Minutes between saving" msgstr "" #: ../xed/resources/ui/xed-preferences-dialog.ui.h:30 +msgid "Ensure Trailing Newline" +msgstr "" + +#: ../xed/resources/ui/xed-preferences-dialog.ui.h:31 +msgid "Dark theme" +msgstr "" + +#: ../xed/resources/ui/xed-preferences-dialog.ui.h:32 +msgid "Use dark theme variant (if available)" +msgstr "" + +#: ../xed/resources/ui/xed-preferences-dialog.ui.h:33 +msgid "Style scheme" +msgstr "" + +#: ../xed/resources/ui/xed-preferences-dialog.ui.h:34 +msgid "Install scheme" +msgstr "" + +#: ../xed/resources/ui/xed-preferences-dialog.ui.h:35 msgid "Remove scheme" msgstr "" @@ -2204,61 +1805,61 @@ msgid "Show or hide the bottom pane in the current window" msgstr "" -#: ../xed/xed-utils.c:822 +#: ../xed/xed-utils.c:829 msgid "Please check your installation." msgstr "" -#: ../xed/xed-utils.c:890 +#: ../xed/xed-utils.c:897 #, c-format msgid "Unable to open UI file %s. Error: %s" msgstr "" -#: ../xed/xed-utils.c:910 +#: ../xed/xed-utils.c:917 #, c-format msgid "Unable to find the object '%s' inside file %s." msgstr "" #. Translators: '/ on <remote-share>' -#: ../xed/xed-utils.c:1078 +#: ../xed/xed-utils.c:1085 #, c-format msgid "/ on %s" msgstr "" -#: ../xed/xed-view.c:378 +#: ../xed/xed-view.c:388 msgid "_Display line numbers" msgstr "" #. Translators: %s is a URI -#: ../xed/xed-window.c:876 +#: ../xed/xed-window.c:878 #, c-format msgid "Open '%s'" msgstr "" #. Translators: %s is a URI -#: ../xed/xed-window.c:1225 +#: ../xed/xed-window.c:1226 #, c-format msgid "Activate '%s'" msgstr "" -#: ../xed/xed-window.c:1413 +#: ../xed/xed-window.c:1414 #, c-format msgid "Spaces: %u" msgstr "" -#: ../xed/xed-window.c:1417 +#: ../xed/xed-window.c:1418 #, c-format msgid "Tabs: %u" msgstr "" -#: ../xed/xed-window.c:1494 +#: ../xed/xed-window.c:1495 msgid "Use Spaces" msgstr "" -#: ../xed/xed-window.c:2301 +#: ../xed/xed-window.c:2302 msgid "There are unsaved documents" msgstr "" -#: ../xed/xed-window.c:3350 +#: ../xed/xed-window.c:3351 msgid "Elevated Privileges" msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/resources/ui/xed-preferences-dialog.ui new/xed-3.0.0/xed/resources/ui/xed-preferences-dialog.ui --- old/xed-2.8.4/xed/resources/ui/xed-preferences-dialog.ui 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/resources/ui/xed-preferences-dialog.ui 2021-06-01 13:56:50.000000000 +0200 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.22.2 --> <interface> <requires lib="gtk+" version="3.12"/> <requires lib="gtksourceview" version="3.0"/> @@ -309,6 +309,210 @@ <property name="position">3</property> </packing> </child> + <child> + <object class="GtkBox" id="draw_whitespace_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">6</property> + <child> + <object class="GtkLabel" id="draw_whitespace_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Draw whitespace</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="draw_whitespace_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkRevealer" id="draw_whitespace_revealer"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="transition_duration">175</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">16</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox" id="draw_whitespace_leading_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">6</property> + <child> + <object class="GtkLabel" id="draw_whitespace_leading_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Leading whitespace</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="draw_whitespace_leading_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="draw_whitespace_trailing_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">6</property> + <child> + <object class="GtkLabel" id="draw_whitespace_trailing_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Trailing whitespace</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="draw_whitespace_trailing_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="draw_whitespace_inside_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">6</property> + <child> + <object class="GtkLabel" id="draw_whitespace_inside_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Whitespace inside of text</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="draw_whitespace_inside_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkBox" id="draw_whitespace_newline_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">6</property> + <child> + <object class="GtkLabel" id="draw_whitespace_newline_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Newline character</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="draw_whitespace_newline_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-commands-view.c new/xed-3.0.0/xed/xed-commands-view.c --- old/xed-2.8.4/xed/xed-commands-view.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-commands-view.c 2021-06-01 13:56:50.000000000 +0200 @@ -155,6 +155,12 @@ xed_debug (DEBUG_COMMANDS); tab = xed_window_get_active_tab (window); + + if (tab == NULL) + { + return; + } + frame = XED_VIEW_FRAME (_xed_tab_get_view_frame (tab)); map_frame = xed_view_frame_get_map_frame (frame); visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-preferences-dialog.c new/xed-3.0.0/xed/xed-preferences-dialog.c --- old/xed-2.8.4/xed/xed-preferences-dialog.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-preferences-dialog.c 2021-06-01 13:56:50.000000000 +0200 @@ -99,6 +99,14 @@ GtkWidget *right_margin_spin; GtkWidget *right_margin_revealer; + /* Draw whitespace */ + GtkWidget *draw_whitespace_switch; + GtkWidget *draw_whitespace_revealer; + GtkWidget *draw_whitespace_leading_switch; + GtkWidget *draw_whitespace_trailing_switch; + GtkWidget *draw_whitespace_inside_switch; + GtkWidget *draw_whitespace_newline_switch; + /* Highlight current line */ GtkWidget *highlight_current_line_switch; @@ -169,6 +177,12 @@ gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, display_right_margin_switch); gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, right_margin_spin); gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, right_margin_revealer); + gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, draw_whitespace_switch); + gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, draw_whitespace_revealer); + gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, draw_whitespace_leading_switch); + gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, draw_whitespace_trailing_switch); + gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, draw_whitespace_inside_switch); + gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, draw_whitespace_newline_switch); gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, highlight_current_line_switch); gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, highlight_matching_bracket_switch); gtk_widget_class_bind_template_child (widget_class, XedPreferencesDialog, tab_width_spin); @@ -317,6 +331,44 @@ "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + /* whitespace */ + + g_settings_bind (dlg->editor_settings, + XED_SETTINGS_DRAW_WHITESPACE, + dlg->draw_whitespace_switch, + "active", + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + + g_object_bind_property (dlg->draw_whitespace_switch, + "active", + dlg->draw_whitespace_revealer, + "reveal-child", + G_BINDING_SYNC_CREATE | G_BINDING_DEFAULT); + + g_settings_bind (dlg->editor_settings, + XED_SETTINGS_DRAW_WHITESPACE_LEADING, + dlg->draw_whitespace_leading_switch, + "active", + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + + g_settings_bind (dlg->editor_settings, + XED_SETTINGS_DRAW_WHITESPACE_TRAILING, + dlg->draw_whitespace_trailing_switch, + "active", + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + + g_settings_bind (dlg->editor_settings, + XED_SETTINGS_DRAW_WHITESPACE_INSIDE, + dlg->draw_whitespace_inside_switch, + "active", + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + + g_settings_bind (dlg->editor_settings, + XED_SETTINGS_DRAW_WHITESPACE_NEWLINE, + dlg->draw_whitespace_newline_switch, + "active", + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + /* Highlighting */ g_settings_bind (dlg->editor_settings, XED_SETTINGS_HIGHLIGHT_CURRENT_LINE, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-settings.c new/xed-3.0.0/xed/xed-settings.c --- old/xed-2.8.4/xed/xed-settings.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-settings.c 2021-06-01 13:56:50.000000000 +0200 @@ -332,6 +332,32 @@ } static void +on_draw_whitespace_changed (GSettings *settings, + const gchar *key, + XedSettings *xs) +{ + GList *views; + gboolean draw_whitespace; + + views = xed_app_get_views (XED_APP (g_application_get_default ())); + draw_whitespace = g_settings_get_boolean (settings, key); + + g_list_foreach (views, (GFunc)xed_view_set_draw_whitespace, GINT_TO_POINTER (draw_whitespace)); +} + +static void +on_draw_whitespace_locations_or_types_changed (GSettings *settings, + const gchar *key, + XedSettings *xs) +{ + GList *views; + + views = xed_app_get_views (XED_APP (g_application_get_default ())); + + g_list_foreach (views, (GFunc)xed_view_update_draw_whitespace_locations_and_types, NULL); +} + +static void xed_settings_init (XedSettings *xs) { xs->priv = xed_settings_get_instance_private (xs); @@ -361,10 +387,20 @@ G_CALLBACK (on_auto_save_interval_changed), xs); g_signal_connect (xs->priv->editor, "changed::syntax-highlighting", G_CALLBACK (on_syntax_highlighting_changed), xs); - g_signal_connect (xs->priv->ui, "changed::enable-tab-scrolling", - G_CALLBACK (on_enable_tab_scrolling_changed), xs); + g_signal_connect (xs->priv->editor, "changed::draw-whitespace", + G_CALLBACK (on_draw_whitespace_changed), xs); + g_signal_connect (xs->priv->editor, "changed::draw-whitespace-leading", + G_CALLBACK (on_draw_whitespace_locations_or_types_changed), xs); + g_signal_connect (xs->priv->editor, "changed::draw-whitespace-trailing", + G_CALLBACK (on_draw_whitespace_locations_or_types_changed), xs); + g_signal_connect (xs->priv->editor, "changed::draw-whitespace-inside", + G_CALLBACK (on_draw_whitespace_locations_or_types_changed), xs); + g_signal_connect (xs->priv->editor, "changed::draw-whitespace-newline", + G_CALLBACK (on_draw_whitespace_locations_or_types_changed), xs); /* ui changes */ + g_signal_connect (xs->priv->ui, "changed::enable-tab-scrolling", + G_CALLBACK (on_enable_tab_scrolling_changed), xs); g_signal_connect (xs->priv->ui, "changed::max-recents", G_CALLBACK (on_max_recents_changed), xs); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-settings.h new/xed-3.0.0/xed/xed-settings.h --- old/xed-2.8.4/xed/xed-settings.h 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-settings.h 2021-06-01 13:56:50.000000000 +0200 @@ -88,6 +88,11 @@ #define XED_SETTINGS_BRACKET_MATCHING "bracket-matching" #define XED_SETTINGS_DISPLAY_RIGHT_MARGIN "display-right-margin" #define XED_SETTINGS_RIGHT_MARGIN_POSITION "right-margin-position" +#define XED_SETTINGS_DRAW_WHITESPACE "draw-whitespace" +#define XED_SETTINGS_DRAW_WHITESPACE_LEADING "draw-whitespace-leading" +#define XED_SETTINGS_DRAW_WHITESPACE_TRAILING "draw-whitespace-trailing" +#define XED_SETTINGS_DRAW_WHITESPACE_INSIDE "draw-whitespace-inside" +#define XED_SETTINGS_DRAW_WHITESPACE_NEWLINE "draw-whitespace-newline" #define XED_SETTINGS_SMART_HOME_END "smart-home-end" #define XED_SETTINGS_WRITABLE_VFS_SCHEMES "writable-vfs-schemes" #define XED_SETTINGS_RESTORE_CURSOR_POSITION "restore-cursor-position" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-tab.c new/xed-3.0.0/xed/xed-tab.c --- old/xed-2.8.4/xed/xed-tab.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-tab.c 2021-06-01 13:56:50.000000000 +0200 @@ -3001,5 +3001,7 @@ GtkWidget * _xed_tab_get_view_frame (XedTab *tab) { + g_return_val_if_fail (XED_IS_TAB (tab), NULL); + return GTK_WIDGET (tab->priv->frame); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-utils.c new/xed-3.0.0/xed/xed-utils.c --- old/xed-2.8.4/xed/xed-utils.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-utils.c 2021-06-01 13:56:50.000000000 +0200 @@ -61,6 +61,13 @@ return g_strdup_printf ("#%04x%04x%04x", color.red, color.green, color.blue); } +gint +xed_string_to_clamped_gint (const gchar *text) +{ + long int long_line = strtol (text, NULL, 10); + return CLAMP (long_line, INT_MIN, INT_MAX); +} + /* * n: len of the string in bytes */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-utils.h new/xed-3.0.0/xed/xed-utils.h --- old/xed-2.8.4/xed/xed-utils.h 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-utils.h 2021-06-01 13:56:50.000000000 +0200 @@ -50,6 +50,8 @@ gchar *xed_gdk_color_to_string (GdkColor color); +gint xed_string_to_clamped_gint (const gchar *text); + gchar *xed_utils_escape_underscores (const gchar *text, gssize length); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-view-frame.c new/xed-3.0.0/xed/xed-view-frame.c --- old/xed-2.8.4/xed/xed-view-frame.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-view-frame.c 2021-06-01 13:56:50.000000000 +0200 @@ -315,7 +315,7 @@ if (*(text + 1) != '\0') { - offset_line = MAX (atoi (text + 1), 0); + offset_line = MAX (xed_string_to_clamped_gint (text + 1), 0); } line = MAX (cur_line - offset_line, 0); @@ -326,19 +326,19 @@ if (*(text + 1) != '\0') { - offset_line = MAX (atoi (text + 1), 0); + offset_line = MAX (xed_string_to_clamped_gint (text + 1), 0); } line = cur_line + offset_line; } else { - line = MAX (atoi (text) - 1, 0); + line = MAX (xed_string_to_clamped_gint (text) - 1, 0); } if (split_text[1] != NULL) { - line_offset = atoi (split_text[1]); + line_offset = xed_string_to_clamped_gint (split_text[1]); } g_strfreev (split_text); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-view.c new/xed-3.0.0/xed/xed-view.c --- old/xed-2.8.4/xed/xed-view.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-view.c 2021-06-01 13:56:50.000000000 +0200 @@ -162,6 +162,7 @@ XedViewPrivate *priv; gboolean use_default_font; GtkSourceGutter *gutter; + gboolean draw_whitespace; view = XED_VIEW (object); priv = view->priv; @@ -241,6 +242,15 @@ "smart-home-end", G_SETTINGS_BIND_GET); + draw_whitespace = g_settings_get_boolean (priv->editor_settings, XED_SETTINGS_DRAW_WHITESPACE); + + if (draw_whitespace) + { + xed_view_set_draw_whitespace (view, draw_whitespace); + } + + xed_view_update_draw_whitespace_locations_and_types (view); + g_object_set (G_OBJECT (view), "indent_on_tab", TRUE, NULL); @@ -830,3 +840,79 @@ gtk_widget_modify_font (GTK_WIDGET (view), font_desc); pango_font_description_free (font_desc); } + +static guint +xed_view_get_draw_whitespace_locations_from_settings (GSettings* settings) +{ + guint locations; + + locations = 0; + + locations |= g_settings_get_boolean (settings, XED_SETTINGS_DRAW_WHITESPACE_LEADING) + ? GTK_SOURCE_SPACE_LOCATION_LEADING : 0; + locations |= g_settings_get_boolean (settings, XED_SETTINGS_DRAW_WHITESPACE_INSIDE) + ? GTK_SOURCE_SPACE_LOCATION_INSIDE_TEXT : 0; + locations |= g_settings_get_boolean (settings, XED_SETTINGS_DRAW_WHITESPACE_TRAILING) + ? GTK_SOURCE_SPACE_LOCATION_TRAILING : 0; + + return locations; +} + +static guint +xed_view_get_draw_whitespace_types_from_settings (GSettings* settings) +{ + if (!g_settings_get_boolean (settings, XED_SETTINGS_DRAW_WHITESPACE_NEWLINE)) + { + return GTK_SOURCE_SPACE_TYPE_ALL & ~GTK_SOURCE_SPACE_TYPE_NEWLINE; + } + + return GTK_SOURCE_SPACE_TYPE_ALL; +} + +/** + * xed_view_set_draw_whitespace: + * @view: a #XedView + * @enable: whether whitespace should be drawn + * + * Enables or disables rendering of any whitespace. + * The locations and types of whitespace to render is set by + * xed_view_update_draw_whitespace_locations_and_types() + * + **/ + +void +xed_view_set_draw_whitespace (XedView *view, gboolean enable) +{ + GtkSourceSpaceDrawer *spacedrawer; + + spacedrawer = gtk_source_view_get_space_drawer (GTK_SOURCE_VIEW (view)); + gtk_source_space_drawer_set_enable_matrix (spacedrawer, enable); +} + + +/** + * xed_view_update_draw_whitespace_locations_and_types: + * @view: a #XedView + * + * Updates the view to render whitespace at the locations and for types + * set in the preferences + * + **/ + +void +xed_view_update_draw_whitespace_locations_and_types (XedView *view) +{ + GtkSourceSpaceDrawer *spacedrawer; + guint locations, types; + + spacedrawer = gtk_source_view_get_space_drawer (GTK_SOURCE_VIEW (view)); + locations = xed_view_get_draw_whitespace_locations_from_settings (view->priv->editor_settings); + types = xed_view_get_draw_whitespace_types_from_settings (view->priv->editor_settings); + + // disable other locations + gtk_source_space_drawer_set_types_for_locations (spacedrawer, + GTK_SOURCE_SPACE_LOCATION_ALL & ~locations, + GTK_SOURCE_SPACE_TYPE_NONE); + // enable chosen locations and types + gtk_source_space_drawer_set_types_for_locations (spacedrawer, locations, types); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-view.h new/xed-3.0.0/xed/xed-view.h --- old/xed-2.8.4/xed/xed-view.h 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-view.h 2021-06-01 13:56:50.000000000 +0200 @@ -61,6 +61,8 @@ void xed_view_select_all (XedView *view); void xed_view_scroll_to_cursor (XedView *view); void xed_view_set_font (XedView *view, gboolean def, const gchar *font_name); +void xed_view_set_draw_whitespace (XedView *view, gboolean enable); +void xed_view_update_draw_whitespace_locations_and_types (XedView *view); G_END_DECLS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xed-2.8.4/xed/xed-window.c new/xed-3.0.0/xed/xed-window.c --- old/xed-2.8.4/xed/xed-window.c 2021-01-02 18:36:34.000000000 +0100 +++ new/xed-3.0.0/xed/xed-window.c 2021-06-01 13:56:50.000000000 +0200 @@ -115,7 +115,7 @@ g_settings_apply (window->priv->window_settings); } -static gint +static gboolean on_key_pressed (GtkWidget *widget, GdkEventKey *event, XedWindow *window) @@ -126,17 +126,19 @@ XedViewFrame *frame; tab = xed_window_get_active_tab (window); - frame = XED_VIEW_FRAME (_xed_tab_get_view_frame (tab)); - if (xed_view_frame_get_search_popup_visible (frame)) + if (tab != NULL) { - return GDK_EVENT_PROPAGATE; - } - else - { - xed_searchbar_hide (XED_SEARCHBAR (window->priv->searchbar)); - return GDK_EVENT_STOP; + frame = XED_VIEW_FRAME (_xed_tab_get_view_frame (tab)); + + if (xed_view_frame_get_search_popup_visible (frame)) + { + return GDK_EVENT_PROPAGATE; + } } + + xed_searchbar_hide (XED_SEARCHBAR (window->priv->searchbar)); + return GDK_EVENT_STOP; } return GDK_EVENT_PROPAGATE;