commit quilter for openSUSE:Factory
Hello community, here is the log from the commit of package quilter for openSUSE:Factory checked in at 2018-09-25 15:43:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/quilter (Old) and /work/SRC/openSUSE:Factory/.quilter.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "quilter" Tue Sep 25 15:43:39 2018 rev:10 rq:637752 version:1.6.5 Changes: -------- --- /work/SRC/openSUSE:Factory/quilter/quilter.changes 2018-08-31 10:41:24.306987478 +0200 +++ /work/SRC/openSUSE:Factory/.quilter.new/quilter.changes 2018-09-25 15:43:43.345207202 +0200 @@ -1,0 +2,10 @@ +Mon Sep 17 18:02:34 UTC 2018 - Alexei Podvalsky <avvissu@yandex.by> + +- Update to 1.6.5: + * Track words, chars or lines. + * meson: cleanup post_install script + * meson: drop lib prefix for libmarkdown + * CLI option to start with view page shown + * Fix: view page did not show on start + +------------------------------------------------------------------- Old: ---- quilter-1.6.3.tar.gz New: ---- quilter-1.6.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ quilter.spec ++++++ --- /var/tmp/diff_new_pack.dPEpx1/_old 2018-09-25 15:43:43.733206787 +0200 +++ /var/tmp/diff_new_pack.dPEpx1/_new 2018-09-25 15:43:43.737206783 +0200 @@ -17,7 +17,7 @@ Name: quilter -Version: 1.6.3 +Version: 1.6.5 Release: 0 Summary: Writing application License: GPL-3.0-only ++++++ quilter-1.6.3.tar.gz -> quilter-1.6.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/data/com.github.lainsce.quilter.appdata.xml new/quilter-1.6.5/data/com.github.lainsce.quilter.appdata.xml --- old/quilter-1.6.3/data/com.github.lainsce.quilter.appdata.xml 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/data/com.github.lainsce.quilter.appdata.xml 2018-09-16 23:15:39.000000000 +0200 @@ -56,6 +56,14 @@ <content_attribute id="money-gambling">none</content_attribute> </content_rating> <releases> + <release version="1.6.2" date="2018-09-21"> + <description> + <p>Release: Track Your Stuff Up</p> + <ul> + <li>You can now set what to track in the document: Characters, Words, or Lines.</li> + </ul> + </description> + </release> <release version="1.6.1" date="2018-08-17"> <description> <p>Release: Font Forgery</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/data/com.github.lainsce.quilter.gschema.xml new/quilter-1.6.5/data/com.github.lainsce.quilter.gschema.xml --- old/quilter-1.6.3/data/com.github.lainsce.quilter.gschema.xml 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/data/com.github.lainsce.quilter.gschema.xml 2018-09-16 23:15:39.000000000 +0200 @@ -60,6 +60,11 @@ <summary>Font used on Preview View</summary> <description>The user-preferred font to use in Preview in Quilter</description> </key> + <key name="track-type" type="s"> + <default>''</default> + <summary>Tracking type for the Statusbar</summary> + <description>The user-preferred tracking to use in Edit in Quilter</description> + </key> <key name="shown-view" type="b"> <default>true</default> <summary>Font button for Preview</summary> Binary files old/quilter-1.6.3/data/images/shot-dark.png and new/quilter-1.6.5/data/images/shot-dark.png differ Binary files old/quilter-1.6.3/data/images/shot-focused.png and new/quilter-1.6.5/data/images/shot-focused.png differ Binary files old/quilter-1.6.3/data/images/shot-preview.png and new/quilter-1.6.5/data/images/shot-preview.png differ Binary files old/quilter-1.6.3/data/images/shot-sepia.png and new/quilter-1.6.5/data/images/shot-sepia.png differ Binary files old/quilter-1.6.3/data/images/shot.png and new/quilter-1.6.5/data/images/shot.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/data/styles/app-main-stylesheet.css new/quilter-1.6.5/data/styles/app-main-stylesheet.css --- old/quilter-1.6.3/data/styles/app-main-stylesheet.css 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/data/styles/app-main-stylesheet.css 2018-09-16 23:15:39.000000000 +0200 @@ -60,7 +60,7 @@ } .color-light:focus { - border-color: #52ADF8; + border-color: #8ac9fc; box-shadow: inset 0 1px 0 0 alpha (#dddddd, 0.45), inset 0 -1px 0 0 alpha (#dddddd, 0.15), @@ -113,3 +113,15 @@ box-shadow: 0 1px transparent inset; padding: 6px; } + +.quilter-menu { + background: @colorPrimary; + color: @textColorPrimary; + border: 1px solid alpha (@textColorPrimary, 0.15); + background-image: none; + padding: 3px; +} + +.quilter-menu:hover { + border: 1px solid alpha (@textColorPrimary, 0.35); +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/data/styles/app-stylesheet-dark.css new/quilter-1.6.5/data/styles/app-stylesheet-dark.css --- old/quilter-1.6.3/data/styles/app-stylesheet-dark.css 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/data/styles/app-stylesheet-dark.css 2018-09-16 23:15:39.000000000 +0200 @@ -16,3 +16,8 @@ color: @textColorPrimary; box-shadow: 0 1px transparent inset; } + +.quilter-menu:hover, +.quilter-menu:backdrop:active { + background-color: alpha (#52ADF8, 0.35); +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/data/styles/app-stylesheet-sepia.css new/quilter-1.6.5/data/styles/app-stylesheet-sepia.css --- old/quilter-1.6.3/data/styles/app-stylesheet-sepia.css 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/data/styles/app-stylesheet-sepia.css 2018-09-16 23:15:39.000000000 +0200 @@ -15,4 +15,9 @@ background: @colorPrimary; color: @textColorPrimary; box-shadow: 0 1px transparent inset; +} + +.quilter-menu:hover, +.quilter-menu:backdrop:active { + background-color: alpha (#52ADF8, 0.35); } \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/data/styles/app-stylesheet.css new/quilter-1.6.5/data/styles/app-stylesheet.css --- old/quilter-1.6.3/data/styles/app-stylesheet.css 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/data/styles/app-stylesheet.css 2018-09-16 23:15:39.000000000 +0200 @@ -16,3 +16,8 @@ color: @textColorPrimary; box-shadow: 0 1px transparent inset; } + +.quilter-menu:hover, +.quilter-menu:backdrop:active { + background-color: alpha (#8ac9fc, 0.35); +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/debian/changelog new/quilter-1.6.5/debian/changelog --- old/quilter-1.6.3/debian/changelog 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/debian/changelog 2018-09-16 23:15:39.000000000 +0200 @@ -1,3 +1,9 @@ +com.github.lainsce.quilter (1.6.2) xenial; urgency=low + + * Button to track Chars/Words/Lines. + + -- Lains <lainsce@airmail.cc> Fri, 21 Sep 2018 14:37:00 -0300 + com.github.lainsce.quilter (1.6.1) xenial; urgency=low * Preferences for the Edit View's Font Size. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/meson/post_install.py new/quilter-1.6.5/meson/post_install.py --- old/quilter-1.6.3/meson/post_install.py 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/meson/post_install.py 2018-09-16 23:15:39.000000000 +0200 @@ -2,18 +2,17 @@ import os import subprocess - -schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas') +import sys if not os.environ.get('DESTDIR'): print('Compiling gsettings schemas...') - subprocess.call(['glib-compile-schemas', schemadir], shell=False) + subprocess.call(['glib-compile-schemas', os.path.join(sys.argv[1], 'glib-2.0', 'schemas')], shell=False) print('Recaching mimetype handlers...') subprocess.call(['update-desktop-database'], shell=False) print('Rebuilding desktop icons cache...') - subprocess.call(['gtk-update-icon-cache', '/usr/share/icons/hicolor/'], shell=False) + subprocess.call(['gtk-update-icon-cache', os.path.join(sys.argv[1], 'icons', 'hicolor')], shell=False) print('Rebuilding font cache...') - subprocess.call(['fc-cache -f /usr/share/fonts/truetype/quilt/'], shell=True) + subprocess.call(['fc-cache', '-f', os.path.join(sys.argv[1], 'fonts', 'truetype', 'quilt')], shell=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/meson.build new/quilter-1.6.5/meson.build --- old/quilter-1.6.3/meson.build 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/meson.build 2018-09-16 23:15:39.000000000 +0200 @@ -1,6 +1,6 @@ # Name our project project('com.github.lainsce.quilter', ['vala', 'c'], - version: '1.6.1' + version: '1.6.2' ) # Import main lib files @@ -39,7 +39,7 @@ # Find libMarkdown cc = meson.get_compiler('c') -libmarkdown = cc.find_library('libmarkdown', required: true) +libmarkdown = cc.find_library('markdown', required: true) # Let's define our executable add_project_arguments(['--vapidir', join_paths(meson.current_source_dir(), 'vapi')], language: 'vala') @@ -85,7 +85,7 @@ ) # Add in a post install script -meson.add_install_script('meson/post_install.py') +meson.add_install_script('meson/post_install.py', join_paths(get_option('prefix'), get_option('datadir'))) # Add subfolders for Meson to look subdir('data') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/src/Application.vala new/quilter-1.6.5/src/Application.vala --- old/quilter-1.6.3/src/Application.vala 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/src/Application.vala 2018-09-16 23:15:39.000000000 +0200 @@ -20,6 +20,7 @@ namespace Quilter { public class Application : Gtk.Application { private static bool print_cr = false; + private static bool open_view = false; private static string _cwd; public static MainWindow window = null; @@ -53,6 +54,10 @@ return; } window = new MainWindow (this); + + if (open_view) { + window.stack.set_visible_child (window.preview_view); + } window.show_all (); } @@ -169,6 +174,8 @@ if (files.length > 0) { Services.FileManager.open_from_outside (files, ""); + } else { + open_view = false; } } @@ -212,7 +219,8 @@ const OptionEntry[] entries = { { "copyright", 'v', 0, OptionArg.NONE, out print_cr, ("Print copyright info and exit"), null }, + { "view", 'V', 0, OptionArg.NONE, out open_view, ("Open document for preview"), null }, { null } }; } -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/src/Constants/AppSettings.vala new/quilter-1.6.5/src/Constants/AppSettings.vala --- old/quilter-1.6.3/src/Constants/AppSettings.vala 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/src/Constants/AppSettings.vala 2018-09-16 23:15:39.000000000 +0200 @@ -58,6 +58,7 @@ public string last_file { get; set; } public string preview_font { get; set; } public string spellcheck_language { get; set; } + public string track_type { get; set; } private static AppSettings? instance; public static unowned AppSettings get_default () { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/src/MainWindow.vala new/quilter-1.6.5/src/MainWindow.vala --- old/quilter-1.6.3/src/MainWindow.vala 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/src/MainWindow.vala 2018-09-16 23:15:39.000000000 +0200 @@ -41,6 +41,9 @@ public const string ACTION_FONT_SERIF = "action_font_serif"; public const string ACTION_FONT_SANS = "action_font_sans"; public const string ACTION_FONT_MONO = "action_font_mono"; + public const string ACTION_TRACK_CHARS = "action_track_chars"; + public const string ACTION_TRACK_WORDS = "action_track_words"; + public const string ACTION_TRACK_LINES = "action_track_lines"; public static Gee.MultiMap<string, string> action_accelerators = new Gee.HashMultiMap<string, string> (); private const GLib.ActionEntry[] action_entries = { @@ -50,7 +53,10 @@ { ACTION_EXPORT_HTML, action_export_html }, { ACTION_FONT_SERIF, action_font_serif }, { ACTION_FONT_SANS, action_font_sans }, - { ACTION_FONT_MONO, action_font_mono } + { ACTION_FONT_MONO, action_font_mono }, + { ACTION_TRACK_CHARS, action_track_chars }, + { ACTION_TRACK_WORDS, action_track_words }, + { ACTION_TRACK_LINES, action_track_lines } }; public void dynamic_margins() { @@ -141,12 +147,19 @@ weak Gtk.IconTheme default_theme = Gtk.IconTheme.get_default (); default_theme.add_resource_path ("/com/github/lainsce/quilter"); - statusbar.update_wordcount (); - statusbar.update_linecount (); + var settings = AppSettings.get_default (); + + if (settings.track_type == "words") { + statusbar.update_wordcount (); + } else if (settings.track_type == "lines") { + statusbar.update_linecount (); + } else if (settings.track_type == "chars") { + statusbar.update_charcount (); + } + statusbar.update_readtimecount (); show_statusbar (); - var settings = AppSettings.get_default (); if (!settings.focus_mode) { set_font_menu.image = new Gtk.Image.from_icon_name ("set-font", Gtk.IconSize.LARGE_TOOLBAR); } else { @@ -157,6 +170,14 @@ show_statusbar (); show_searchbar (); + if (settings.track_type == "words") { + statusbar.update_wordcount (); + } else if (settings.track_type == "lines") { + statusbar.update_linecount (); + } else if (settings.track_type == "chars") { + statusbar.update_charcount (); + } + if (!settings.focus_mode) { set_font_menu.image = new Gtk.Image.from_icon_name ("set-font", Gtk.IconSize.LARGE_TOOLBAR); } else { @@ -168,6 +189,7 @@ render_func (); statusbar.update_wordcount (); statusbar.update_linecount (); + statusbar.update_charcount (); statusbar.update_readtimecount (); }); @@ -253,15 +275,15 @@ this.set_titlebar (toolbar); var set_font_sans = new Gtk.ModelButton (); - set_font_sans.text = (_("Sans-serif")); + set_font_sans.text = (_("Set Sans-serif")); set_font_sans.action_name = ACTION_PREFIX + ACTION_FONT_SANS; var set_font_serif = new Gtk.ModelButton (); - set_font_serif.text = (_("Serif")); + set_font_serif.text = (_("Set Serif")); set_font_serif.action_name = ACTION_PREFIX + ACTION_FONT_SERIF; var set_font_mono = new Gtk.ModelButton (); - set_font_mono.text = (_("Monospace")); + set_font_mono.text = (_("Set Monospace")); set_font_mono.action_name = ACTION_PREFIX + ACTION_FONT_MONO; var set_font_menu_grid = new Gtk.Grid (); @@ -331,7 +353,9 @@ int w = settings.window_width; bool v = settings.shown_view; - set_font_menu.set_visible (v); + if (v) { + this.stack.set_visible_child (this.preview_view); + } if (x != -1 && y != -1) { this.move (x, y); @@ -356,7 +380,11 @@ this.show_all (); } +#if VALA_0_42 + protected bool match_keycode (uint keyval, uint code) { +#else protected bool match_keycode (int keyval, uint code) { +#endif Gdk.KeymapKey [] keys; Gdk.Keymap keymap = Gdk.Keymap.get_for_display (Gdk.Display.get_default ()); if (keymap.get_entries_for_keyval (keyval, out keys)) { @@ -427,6 +455,21 @@ settings.preview_font = "mono"; } + private void action_track_chars () { + var settings = AppSettings.get_default (); + settings.track_type = "chars"; + } + + private void action_track_words () { + var settings = AppSettings.get_default (); + settings.track_type = "words"; + } + + private void action_track_lines () { + var settings = AppSettings.get_default (); + settings.track_type = "lines"; + } + private void render_func () { if (edit_view_content.is_modified == true) { preview_view_content.update_html_view (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/src/Widgets/Cheatsheet.vala new/quilter-1.6.5/src/Widgets/Cheatsheet.vala --- old/quilter-1.6.3/src/Widgets/Cheatsheet.vala 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/src/Widgets/Cheatsheet.vala 2018-09-16 23:15:39.000000000 +0200 @@ -169,7 +169,11 @@ } } +#if VALA_0_42 + protected bool match_keycode (uint keyval, uint code) { +#else protected bool match_keycode (int keyval, uint code) { +#endif Gdk.KeymapKey [] keys; Gdk.Keymap keymap = Gdk.Keymap.get_for_display (Gdk.Display.get_default ()); if (keymap.get_entries_for_keyval (keyval, out keys)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/quilter-1.6.3/src/Widgets/StatusBar.vala new/quilter-1.6.5/src/Widgets/StatusBar.vala --- old/quilter-1.6.3/src/Widgets/StatusBar.vala 2018-08-16 03:35:02.000000000 +0200 +++ new/quilter-1.6.5/src/Widgets/StatusBar.vala 2018-09-16 23:15:39.000000000 +0200 @@ -25,42 +25,82 @@ public Gtk.Label readtimecount_label; public MainWindow window; public Gtk.ActionBar actionbar; + public Gtk.MenuButton track_type_menu; /* Average normal reading speed is 275 WPM */ int WPM = 275; public StatusBar () { + var settings = AppSettings.get_default (); actionbar = new Gtk.ActionBar (); - wordcount_item (); - linecount_item (); + + track_type_menu_item (); + + if (settings.track_type == "words") { + update_wordcount (); + } else if (settings.track_type == "lines") { + update_linecount (); + } else if (settings.track_type == "chars") { + update_charcount (); + } + readtimecount_item (); this.transition_type = Gtk.RevealerTransitionType.SLIDE_UP; this.add (actionbar); } - public void wordcount_item () { - wordcount_label = new Gtk.Label(""); - wordcount_label.set_width_chars (12); - update_wordcount (); - actionbar.pack_start (wordcount_label); + public void track_type_menu_item () { + var track_chars = new Gtk.ModelButton (); + track_chars.text = (_("Track Characters")); + track_chars.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_TRACK_CHARS; + + var track_words = new Gtk.ModelButton (); + track_words.text = (_("Track Words")); + track_words.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_TRACK_WORDS; + + var track_lines = new Gtk.ModelButton (); + track_lines.text = (_("Track Lines")); + track_lines.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_TRACK_LINES; + + var track_type_grid = new Gtk.Grid (); + track_type_grid.margin = 6; + track_type_grid.row_spacing = 6; + track_type_grid.column_spacing = 12; + track_type_grid.orientation = Gtk.Orientation.VERTICAL; + track_type_grid.add (track_chars); + track_type_grid.add (track_words); + track_type_grid.add (track_lines); + track_type_grid.show_all (); + + var track_type_menu_pop = new Gtk.Popover (null); + track_type_menu_pop.add (track_type_grid); + + track_type_menu = new Gtk.MenuButton (); + track_type_menu.tooltip_text = _("Set Preview Font"); + track_type_menu.popover = track_type_menu_pop; + track_type_menu.label = ""; + + var menu_context = track_type_menu.get_style_context (); + menu_context.add_class ("quilter-menu"); + menu_context.add_class (Gtk.STYLE_CLASS_FLAT); + + actionbar.pack_start (track_type_menu); } public void update_wordcount () { var wc = get_count(); - wordcount_label.set_text((_("Words: ")) + wc.words.to_string()); - } - - public void linecount_item () { - linecount_label = new Gtk.Label(""); - linecount_label.set_width_chars (12); - update_linecount (); - actionbar.pack_start (linecount_label); + track_type_menu.set_label ((_("Words: ")) + wc.words.to_string()); } public void update_linecount () { var lc = get_count(); - linecount_label.set_text((_("Lines: ")) + lc.lines.to_string()); + track_type_menu.set_label ((_("Lines: ")) + lc.lines.to_string()); + } + + public void update_charcount () { + var cc = get_count(); + track_type_menu.set_label ((_("Characters: ")) + cc.chars.to_string()); } public void readtimecount_item () { @@ -86,7 +126,9 @@ var lines = buffer.get_line_count (); - return new WordCount(result.strip().split(" ").length, lines, result.length); + var chars = result.length; + + return new WordCount(result.strip().split(" ").length, lines, chars); } catch (Error e) { return new WordCount(0, 0, 0); }
participants (1)
-
root