Hello community, here is the log from the commit of package quilter for openSUSE:Factory checked in at 2019-11-11 21:38:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/quilter (Old) and /work/SRC/openSUSE:Factory/.quilter.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "quilter" Mon Nov 11 21:38:51 2019 rev:21 rq:747380 version:2.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/quilter/quilter.changes 2019-10-09 15:19:33.640482335 +0200 +++ /work/SRC/openSUSE:Factory/.quilter.new.2990/quilter.changes 2019-11-11 21:38:52.696689403 +0100 @@ -1,0 +2,7 @@ +Mon Nov 4 14:12:59 UTC 2019 - Alexei Podvalsky <[email protected]> + +- Update to 2.0.3: + * Update com.github.lainsce.quilter.appdata.xml.in + * 2.0.2 - Many fixes of issues on this release + +------------------------------------------------------------------- Old: ---- quilter-2.0.1.tar.gz New: ---- quilter-2.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ quilter.spec ++++++ --- /var/tmp/diff_new_pack.Qd5Ln8/_old 2019-11-11 21:38:53.916690612 +0100 +++ /var/tmp/diff_new_pack.Qd5Ln8/_new 2019-11-11 21:38:53.928690624 +0100 @@ -17,7 +17,7 @@ Name: quilter -Version: 2.0.1 +Version: 2.0.3 Release: 0 Summary: Writing application License: GPL-3.0-only ++++++ quilter-2.0.1.tar.gz -> quilter-2.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/data/com.github.lainsce.quilter.appdata.xml.in new/quilter-2.0.3/data/com.github.lainsce.quilter.appdata.xml.in --- old/quilter-2.0.1/data/com.github.lainsce.quilter.appdata.xml.in 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/data/com.github.lainsce.quilter.appdata.xml.in 2019-11-03 05:45:03.000000000 +0100 @@ -55,6 +55,27 @@ <content_attribute id="money-gambling">none</content_attribute> </content_rating> <releases> + <release version="2.0.3" date="2019-11-07"> + <description> + <p>Release: Kling Klang</p> + <ul> + <li>Fixed: Outline tab shouldn't make the sidebar grow in size anymore.</li> + <li>Fixed: A rogue file in your Home folder shouldn't happen anymore.</li> + </ul> + </description> + </release> + <release version="2.0.2" date="2019-11-07"> + <description> + <p>Release: Let's Make It Whirr</p> + <ul> + <li>Fixed: Save As for a file will update the UI accordingly after usage.</li> + <li>Fixed: Outline tab is cleaned when pressing the Remove All Files button.</li> + <li>Fixed: File names of deleted files are not reused.</li> + <li>Fixed: Reading Time is properly reset when pressing the Remove All Files button.</li> + <li>Fixed: Reading Time is properly updated as text is typed.</li> + </ul> + </description> + </release> <release version="2.0.1" date="2019-09-30"> <description> <p>Release: Minimal Maximize Madness</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/meson.build new/quilter-2.0.3/meson.build --- old/quilter-2.0.1/meson.build 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/meson.build 2019-11-03 05:45:03.000000000 +0100 @@ -1,6 +1,6 @@ # Name our project project('com.github.lainsce.quilter', ['vala', 'c'], - version: '2.0.1' + version: '2.0.2' ) # Import main lib files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/src/MainWindow.vala new/quilter-2.0.3/src/MainWindow.vala --- old/quilter-2.0.1/src/MainWindow.vala 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/src/MainWindow.vala 2019-11-03 05:45:03.000000000 +0100 @@ -65,7 +65,7 @@ if (settings.fullscreen) { fullscreen (); settings.statusbar = false; - settings.sidebar = false; + settings.sidebar = false; var buffer_context = edit_view_content.get_style_context (); buffer_context.add_class ("full-text"); buffer_context.remove_class ("small-text"); @@ -94,7 +94,10 @@ Services.FileManager.get_cache_path (); sidebar.store.clear (); - sidebar.get_file_contents_as_items (); + if (settings.current_file != _("No Documents Open")) { + sidebar.get_file_contents_as_items (); + } + sidebar.view.expand_all (); if (settings.current_file == "" || toolbar.get_subtitle () == (_("No Documents Open"))) { edit_view_content.buffer.text = ""; @@ -351,7 +354,9 @@ } update_title (); - on_sidebar_row_selected (sidebar.get_selected_row ()); + if (settings.current_file != _("No Documents Open")) { + on_sidebar_row_selected (sidebar.get_selected_row ()); + } try { this.icon = IconTheme.get_default ().load_icon ("com.github.lainsce.quilter", Gtk.IconSize.DIALOG, 0); @@ -396,7 +401,8 @@ string[] files = {}; foreach (unowned Widgets.SideBarBox row in sidebar.get_rows ()) { - files += row.path; + if (row.path != _("No Documents Open")) + files += row.path; } settings.last_files = files; @@ -427,6 +433,7 @@ statusbar.update_charcount (); settings.track_type = "chars"; } + statusbar.update_readtimecount (); } private void action_preferences () { @@ -489,9 +496,9 @@ private void set_prev_workfile () { unowned Widgets.SideBarBox? row = sidebar.get_selected_row (); - if (row != null) { - var settings = AppSettings.get_default (); - settings.current_file = row.title; + var settings = AppSettings.get_default (); + if (row != null && settings.current_file != _("No Documents Open")) { + settings.current_file = row.path; } } @@ -509,7 +516,7 @@ set_font_menu.image = new Gtk.Image.from_icon_name ("font-select-symbolic", Gtk.IconSize.SMALL_TOOLBAR); } - if (settings.current_file != "") { + if (settings.current_file != "" && settings.current_file != _("No Documents Open")) { sidebar.store.clear (); sidebar.get_file_contents_as_items (); sidebar.view.expand_all (); @@ -519,7 +526,8 @@ settings.current_file = Services.FileManager.get_cache_path (); edit_view_content.buffer.text = ""; sidebar.store.clear (); - sidebar.get_file_contents_as_items (); + if (settings.current_file != _("No Documents Open")) + sidebar.get_file_contents_as_items (); sidebar.view.expand_all (); } @@ -597,7 +605,14 @@ string path = Services.FileManager.open (out contents); edit_view_content.text = contents; - sidebar.add_file (path); + + var settings = AppSettings.get_default (); + if (settings.last_files != null && path != _("No Documents Open")) { + sidebar.add_file (path); + } else { + sidebar.delete_row (); + sidebar.add_file (path); + } } private void on_save () { @@ -613,11 +628,23 @@ } private void on_save_as () { - try { - Services.FileManager.save_as (edit_view_content.text); - edit_view_content.modified = false; - } catch (Error e) { - warning ("Unexpected error during open: " + e.message); + unowned Widgets.SideBarBox? row = sidebar.get_selected_row (); + if (row != null) { + try { + var settings = AppSettings.get_default (); + string path; + Services.FileManager.save_as (edit_view_content.text, out path); + edit_view_content.modified = false; + if (settings.last_files != null) { + sidebar.delete_row_with_name (); + sidebar.add_file (path); + } else { + sidebar.delete_row (); + sidebar.add_file (path); + } + } catch (Error e) { + warning ("Unexpected error during save: " + e.message); + } } } @@ -631,6 +658,12 @@ string text; GLib.FileUtils.get_contents (file_path, out text); + if (settings.current_file != file_path) { + Services.FileManager.save_file (file_path, text); + } else if (settings.current_file == _("No Documents Open")) { + return; + } + if (edit_view_content.modified) { Services.FileManager.save_file (file_path, text); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/src/Services/FileManager.vala new/quilter-2.0.3/src/Services/FileManager.vala --- old/quilter-2.0.1/src/Services/FileManager.vala 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/src/Services/FileManager.vala 2019-11-03 05:45:03.000000000 +0100 @@ -33,7 +33,6 @@ if (!cachedir.query_exists()) { cachedir.make_directory_with_parents (); } - } catch (Error e) { warning ("Error writing file: " + e.message); } @@ -100,7 +99,7 @@ return file.get_path (); } - public void save_as (string contents) throws Error { + public void save_as (string contents, out string path) throws Error { debug ("Save as button pressed."); var chooser = Services.DialogUtils.create_file_chooser (_("Save file"), Gtk.FileChooserAction.SAVE); @@ -111,7 +110,7 @@ file = File.new_for_path (file.get_path () + ".md"); } - string path = file.get_path (); + path = file.get_path (); try { debug ("Saving file..."); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/src/Widgets/HeaderBar.vala new/quilter-2.0.3/src/Widgets/HeaderBar.vala --- old/quilter-2.0.1/src/Widgets/HeaderBar.vala 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/src/Widgets/HeaderBar.vala 2019-11-03 05:45:03.000000000 +0100 @@ -61,6 +61,8 @@ set_subtitle (_("No Documents Open")); } else if (settings.current_file == null) { set_subtitle (_("No Documents Open")); + } else if (this.subtitle == Services.FileManager.get_temp_document_path ()) { + set_subtitle (_("No Documents Open")); } new_button = new Gtk.Button (); new_button.has_tooltip = true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/src/Widgets/SideBar.vala new/quilter-2.0.3/src/Widgets/SideBar.vala --- old/quilter-2.0.1/src/Widgets/SideBar.vala 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/src/Widgets/SideBar.vala 2019-11-03 05:45:03.000000000 +0100 @@ -111,6 +111,8 @@ win.edit_view_content.buffer.text = ""; Services.FileManager.file = null; win.toolbar.set_subtitle (_("No Documents Open")); + store.clear (); + win.statusbar.readtimecount_label.set_text((_("Reading Time: ")) + "0m"); }); var grid = new Gtk.Grid (); @@ -179,7 +181,7 @@ var settings = AppSettings.get_default (); view = new Gtk.TreeView (); view.expand = true; - view.hexpand = false; + view.hexpand = true; view.headers_visible = false; view.margin_top = 6; view.set_activate_on_single_click (true); @@ -220,39 +222,42 @@ public void get_file_contents_as_items () { var settings = AppSettings.get_default (); - file = GLib.File.new_for_path (settings.current_file); - if (file.query_exists ()) { - try { - var reg = new Regex("(?m)^(?<header>\\#{1,6})\\s(?<text>.+)"); - string buffer = ""; - GLib.FileUtils.get_contents (file.get_path (), out buffer, null); - GLib.MatchInfo match; - - if (reg.match (buffer, 0, out match)) { - do { - if (match.fetch_named ("header") == "#") { - store.insert (out root, null, -1); - store.set (root, 0, match.fetch_named ("header") + " " + match.fetch_named ("text"), -1); - } else if (match.fetch_named ("header") == "##") { - store.insert (out subheader, root, -1); - store.set (subheader, 0, match.fetch_named ("header") + " " + match.fetch_named ("text"), -1); - } else if (match.fetch_named ("header") == "###") { - store.insert (out section, subheader, -1); - store.set (section, 0, match.fetch_named ("header") + " " + match.fetch_named ("text"), -1); - } else if (match.fetch_named ("header") == "####") { - store.insert (out subsection, section, -1); - store.set (subsection, 0, match.fetch_named ("header") + " " + match.fetch_named ("text"), -1); - } else if (match.fetch_named ("header") == "#####") { - store.insert (out subsubsection, subsection, -1); - store.set (subsubsection, 0, match.fetch_named ("header") + " " + match.fetch_named ("text"), -1); - } else if (match.fetch_named ("header") == "######") { - store.insert (out paragraph, subsubsection, -1); - store.set (paragraph, 0, match.fetch_named ("header") + " " + match.fetch_named ("text"), -1); - } - } while (match.next ()); + if (settings.current_file != _("No Documents Open")) { + file = GLib.File.new_for_path (settings.current_file); + + if (file.query_exists ()) { + try { + var reg = new Regex("(?m)^(?<header>\\#{1,6})\\s(?<text>.{26})"); + string buffer = ""; + GLib.FileUtils.get_contents (file.get_path (), out buffer, null); + GLib.MatchInfo match; + + if (reg.match (buffer, 0, out match)) { + do { + if (match.fetch_named ("header") == "#") { + store.insert (out root, null, -1); + store.set (root, 0, match.fetch_named ("header") + " " + match.fetch_named ("text") + "…", -1); + } else if (match.fetch_named ("header") == "##") { + store.insert (out subheader, root, -1); + store.set (subheader, 0, match.fetch_named ("header") + " " + match.fetch_named ("text") + "…", -1); + } else if (match.fetch_named ("header") == "###") { + store.insert (out section, subheader, -1); + store.set (section, 0, match.fetch_named ("header") + " " + match.fetch_named ("text") + "…", -1); + } else if (match.fetch_named ("header") == "####") { + store.insert (out subsection, section, -1); + store.set (subsection, 0, match.fetch_named ("header") + " " + match.fetch_named ("text") + "…", -1); + } else if (match.fetch_named ("header") == "#####") { + store.insert (out subsubsection, subsection, -1); + store.set (subsubsection, 0, match.fetch_named ("header") + " " + match.fetch_named ("text") + "…", -1); + } else if (match.fetch_named ("header") == "######") { + store.insert (out paragraph, subsubsection, -1); + store.set (paragraph, 0, match.fetch_named ("header") + " " + match.fetch_named ("text") + "…", -1); + } + } while (match.next ()); + } + } catch (GLib.Error e) { + warning ("ERR: %s", e.message); } - } catch (GLib.Error e) { - warning ("ERR: %s", e.message); } } } @@ -287,6 +292,14 @@ } } + public void delete_row_with_name () { + foreach (SideBarBox item in get_rows ()) { + if (Services.FileManager.is_temp_file (item.path)) { + item.destroy (); + } + } + } + public int list_sort (Gtk.ListBoxRow first_row, Gtk.ListBoxRow second_row) { var row_1 = first_row; var row_2 = second_row; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/src/Widgets/SideBarBox.vala new/quilter-2.0.3/src/Widgets/SideBarBox.vala --- old/quilter-2.0.1/src/Widgets/SideBarBox.vala 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/src/Widgets/SideBarBox.vala 2019-11-03 05:45:03.000000000 +0100 @@ -32,8 +32,8 @@ set { _path = value; if (Services.FileManager.is_temp_file (_path)) { - file_name_label.label = "New Document"; - file_label.label = "New File"; + file_name_label.label = _("New Document"); + file_label.label = _("New File"); } else { file_name_label.label = Path.get_basename (_path); file_label.label = path; @@ -43,10 +43,11 @@ public string title { owned get { - if (Services.FileManager.is_temp_file (path)) - return "New File"; - else + if (Services.FileManager.is_temp_file (path)) { + return _("No Documents Open"); + } else { return file_label.label; + } } } @@ -64,7 +65,7 @@ file_name_label.halign = Gtk.Align.START; file_name_label.hexpand = false; file_name_label.ellipsize = Pango.EllipsizeMode.END; - file_name_label.max_width_chars = 27; + file_name_label.max_width_chars = 25; var fnl_context = file_name_label.get_style_context (); fnl_context.add_class (Granite.STYLE_CLASS_H3_LABEL); @@ -74,7 +75,7 @@ file_label.max_width_chars = 25; file_label.hexpand = false; - var file_icon = new Gtk.Image.from_icon_name ("text-markdown", Gtk.IconSize.LARGE_TOOLBAR); + var file_icon = new Gtk.Image.from_icon_name ("text-markdown", Gtk.IconSize.DND); file_grid = new Gtk.Grid (); file_grid.hexpand = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-2.0.1/src/Widgets/SourceView.vala new/quilter-2.0.3/src/Widgets/SourceView.vala --- old/quilter-2.0.1/src/Widgets/SourceView.vala 2019-09-28 06:59:58.000000000 +0200 +++ new/quilter-2.0.3/src/Widgets/SourceView.vala 2019-11-03 05:45:03.000000000 +0100 @@ -114,12 +114,12 @@ try { string text = ""; string file_path = settings.current_file; - + var file = File.new_for_path (file_path); if (!file.query_exists ()) { Services.FileManager.save_file (file_path, ""); } - + GLib.FileUtils.get_contents (file.get_path (), out text); buffer.text = text; modified = false; @@ -173,7 +173,7 @@ } if (settings.autosave == true) { - Timeout.add (10000, () => { + Timeout.add (1000, () => { save (); modified = false; return true;
