Hello community, here is the log from the commit of package notejot for openSUSE:Factory checked in at 2020-05-07 14:56:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/notejot (Old) and /work/SRC/openSUSE:Factory/.notejot.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "notejot" Thu May 7 14:56:47 2020 rev:14 rq:800971 version:1.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/notejot/notejot.changes 2020-01-21 21:01:27.340879449 +0100 +++ /work/SRC/openSUSE:Factory/.notejot.new.2738/notejot.changes 2020-05-07 14:56:48.618543364 +0200 @@ -1,0 +2,10 @@ +Thu Apr 30 07:35:19 UTC 2020 - Alexei Podvalsky <[email protected]> + +- Update to 1.6.3: + notejot.changes notejot.spec + * Merge pull request #147 from Justinzobel/patch-1 + * Update README.md + * 1.6.2 - UI minor fixes + * 1.6.1 - GLib.Settings + +------------------------------------------------------------------- Old: ---- notejot-1.6.0.tar.gz New: ---- notejot-1.6.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ notejot.spec ++++++ --- /var/tmp/diff_new_pack.9TALdn/_old 2020-05-07 14:56:49.170544359 +0200 +++ /var/tmp/diff_new_pack.9TALdn/_new 2020-05-07 14:56:49.174544366 +0200 @@ -17,7 +17,7 @@ Name: notejot -Version: 1.6.0 +Version: 1.6.3 Release: 0 Summary: A Sticky Note App License: GPL-3.0-only ++++++ notejot-1.6.0.tar.gz -> notejot-1.6.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/.travis.yml new/notejot-1.6.3/.travis.yml --- old/notejot-1.6.0/.travis.yml 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/.travis.yml 2020-04-12 03:09:34.000000000 +0200 @@ -3,7 +3,7 @@ language: node_js node_js: - - 10/* + - 10.17.0 sudo: required diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/README.md new/notejot-1.6.3/README.md --- old/notejot-1.6.0/README.md 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/README.md 2020-04-12 03:09:34.000000000 +0200 @@ -26,6 +26,7 @@ libjson-glib libgee-0.8 meson +vala ``` ## Building @@ -37,3 +38,6 @@ meson configure -Dprefix=/usr sudo ninja install ``` + +## Notes Storage +Notes are stored in `~/.local/share/com.github.lainsce.notejot/` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/data/com.github.lainsce.notejot.appdata.xml.in new/notejot-1.6.3/data/com.github.lainsce.notejot.appdata.xml.in --- old/notejot-1.6.0/data/com.github.lainsce.notejot.appdata.xml.in 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/data/com.github.lainsce.notejot.appdata.xml.in 2020-04-12 03:09:34.000000000 +0200 @@ -52,6 +52,30 @@ <content_attribute id="money-gambling">none</content_attribute> </content_rating> <releases> + <release version="1.6.3" date="2020-04-17"> + <description> + <p>Release: Small Fixes</p> + <ul> + <li>UI Fix: Window Close button replaced by Delete Note button. (does the same action but prevents note loss)</li> + </ul> + </description> + </release> + <release version="1.6.2" date="2020-02-07"> + <description> + <p>Release: Aesthetics</p> + <ul> + <li>Some UI minor fixes.</li> + </ul> + </description> + </release> + <release version="1.6.1" date="2020-01-24"> + <description> + <p>Release: Minor Bump</p> + <ul> + <li>Some backend fixes.</li> + </ul> + </description> + </release> <release version="1.6.0" date="2020-01-13"> <description> <p>Release: Translations & Searches</p> Binary files old/notejot-1.6.0/data/shot.png and new/notejot-1.6.3/data/shot.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/meson.build new/notejot-1.6.3/meson.build --- old/notejot-1.6.0/meson.build 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/meson.build 2020-04-12 03:09:34.000000000 +0200 @@ -1,6 +1,6 @@ # Name our project project('com.github.lainsce.notejot', ['vala', 'c'], - version: '1.6.0' + version: '1.6.3' ) # Import main lib files @@ -40,7 +40,6 @@ 'src/EditableLabel.vala', 'src/Services/NoteManager.vala', 'src/Services/Storage.vala', - 'src/Constants/AppSettings.vala', c_args: c_args, dependencies: [ dependency('granite'), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/src/Application.vala new/notejot-1.6.3/src/Application.vala --- old/notejot-1.6.0/src/Application.vala 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/src/Application.vala 2020-04-12 03:09:34.000000000 +0200 @@ -21,22 +21,27 @@ public Gee.ArrayList<MainWindow> open_notes = new Gee.ArrayList<MainWindow>(); private NoteManager note_manager = new NoteManager(); private static bool create_new_window = false; - + public static GLib.Settings gsettings; + public Application () { Object (flags: ApplicationFlags.HANDLES_COMMAND_LINE, - application_id: "com.github.lainsce.notejot"); - } - + application_id: "com.github.lainsce.notejot"); + } + + static construct { + gsettings = new GLib.Settings ("com.github.lainsce.notejot"); + } + construct { var quit_action = new SimpleAction ("quit", null); set_accels_for_action ("app.quit", {"<Control>q"}); add_action (quit_action); quit_action.activate.connect (() => { - foreach (MainWindow windows in open_notes) { + foreach (MainWindow windows in open_notes) { debug ("Quitting all notes…\n"); - update_storage(); - windows.close(); - } + update_storage(); + windows.close(); + } }); var new_action = new SimpleAction ("new", null); set_accels_for_action ("app.new", {"<Control>n"}); @@ -53,7 +58,7 @@ note.destroy(); }); } - + protected override void activate () { if (get_windows ().length () > 0) { foreach (var window in open_notes) { @@ -63,7 +68,7 @@ } } else { var list = note_manager.load_from_file(); - + if (list.size == 0) { create_note(null); } else { @@ -72,51 +77,50 @@ } } } - } - - public void create_note(Storage? storage) { + } + + public void create_note(Storage? storage) { debug ("Creating a note…\n"); - var note = new MainWindow(this, storage); + var note = new MainWindow(this, storage); open_notes.add(note); update_storage(); - } - + } + public void remove_note(MainWindow note) { debug ("Removing a note…\n"); open_notes.remove (note); update_storage(); - } - - public void update_storage() { + } + + public void update_storage() { debug ("Updating the storage…\n"); - Gee.ArrayList<Storage> storage = new Gee.ArrayList<Storage>(); - - foreach (MainWindow w in open_notes) { + Gee.ArrayList<Storage> storage = new Gee.ArrayList<Storage>(); + + foreach (MainWindow w in open_notes) { storage.add(w.get_storage_note()); + note_manager.save_notes(storage); } - - note_manager.save_notes(storage); - } - + } + protected override int command_line (ApplicationCommandLine command_line) { var context = new OptionContext ("File"); context.add_main_entries (entries, Build.GETTEXT_PACKAGE); context.add_group (Gtk.get_option_group (true)); - + string[] args = command_line.get_arguments (); int unclaimed_args; - + activate (); - + try { context.parse_strv (ref args); unclaimed_args = args.length - 1; } catch(Error e) { print (e.message + "\n"); - + return 1; } - + // Create a next window if requested and it's not the app launch if (create_new_window) { create_new_window = false; @@ -124,16 +128,16 @@ } return 0; } - + const OptionEntry[] entries = { { "new-note", 'n', 0, OptionArg.NONE, out create_new_window, "New Note", null }, { null } }; - + public static int main (string[] args) { Intl.setlocale (LocaleCategory.ALL, ""); Intl.textdomain (Build.GETTEXT_PACKAGE); - + var app = new Application(); return app.run(args); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/src/Constants/AppSettings.vala new/notejot-1.6.3/src/Constants/AppSettings.vala --- old/notejot-1.6.0/src/Constants/AppSettings.vala 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/src/Constants/AppSettings.vala 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -/*- - * Copyright (c) 2017 Lains - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -namespace Notejot { - public class AppSettings : Granite.Services.Settings { - private static AppSettings? instance; - public int window_x { get; set; } - public int window_y { get; set; } - - public static unowned AppSettings get_default () { - if (instance == null) { - instance = new AppSettings (); - } - return instance; - } - - private AppSettings () { - base ("com.github.lainsce.notejot"); - } - } -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/src/MainWindow.vala new/notejot-1.6.3/src/MainWindow.vala --- old/notejot-1.6.0/src/MainWindow.vala 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/src/MainWindow.vala 2020-04-12 03:09:34.000000000 +0200 @@ -81,7 +81,12 @@ header.get_style_context().add_class("notejot-title"); header.has_subtitle = false; header.set_show_close_button (true); - header.decoration_layout = "close:"; + header.decoration_layout = ":"; + + delete_item = new Gtk.Button (); + delete_item.tooltip_text = (_("Delete note")); + delete_item.set_image (new Gtk.Image.from_icon_name ("edit-delete-symbolic", Gtk.IconSize.SMALL_TOOLBAR)); + delete_item.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_DELETE; var applet_button = new Gtk.ToggleButton (); applet_button.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT); @@ -115,6 +120,7 @@ label = new Notejot.EditableLabel (this.title_name); header.set_custom_title(label); header.pack_end (applet_button); + header.pack_start (delete_item); this.set_titlebar(header); actionbar = new Gtk.ActionBar (); @@ -266,7 +272,7 @@ .color-button { border-radius: 50%; background-image: none; - border: 1px solid alpha(@BLACK_300, 0.25); + border: 1px solid alpha(#333, 0.25); box-shadow: inset 0 1px 0 0 alpha (@inset_dark_color, 0.7), inset 0 0 0 1px alpha (@inset_dark_color, 0.3), @@ -275,7 +281,7 @@ .color-button:hover, .color_button:focus { - border: 1px solid @BLACK_300; + border: 1px solid @inset_dark_color; } .color-slate { @@ -313,6 +319,29 @@ .color-cocoa { background-color: #a3907c; } + + .notejot-bar box { + border: none; + } + + .image-button, + .titlebutton { + background-color: transparent; + background-image: none; + border: 1px solid transparent; + padding: 3px; + box-shadow: none; + } + + .image-button:hover, + .image-button:focus, + .titlebutton:hover, + .titlebutton:focus { + background-color: alpha(@fg_color, 0.3); + background-image: none; + border: 1px solid transparent; + box-shadow: none; + } """)).printf(uid, selected_color, uid, selected_color, selected_color, uid, selected_color, selected_color, selected_color, selected_color_text, uid, uid, selected_color_text, uid, selected_color_text, selected_color, selected_color, uid, selected_color_text, uid, uid, uid, selected_color, selected_color, selected_color_text, uid); try { @@ -334,13 +363,7 @@ new_item.set_image (new Gtk.Image.from_icon_name ("list-add-symbolic", Gtk.IconSize.SMALL_TOOLBAR)); new_item.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_NEW; - delete_item = new Gtk.Button (); - delete_item.tooltip_text = (_("Delete note")); - delete_item.set_image (new Gtk.Image.from_icon_name ("edit-delete-symbolic", Gtk.IconSize.SMALL_TOOLBAR)); - delete_item.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_DELETE; - actionbar.pack_start (new_item); - actionbar.pack_start (delete_item); } private void create_app_menu () { @@ -605,12 +628,10 @@ } public override bool delete_event (Gdk.EventAny event) { - var settings = AppSettings.get_default (); - int x, y; this.get_position (out x, out y); - settings.window_x = x; - settings.window_y = y; + Notejot.Application.gsettings.set_int("window-x", x); + Notejot.Application.gsettings.set_int("window-y", y); return false; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notejot-1.6.0/src/Services/NoteManager.vala new/notejot-1.6.3/src/Services/NoteManager.vala --- old/notejot-1.6.0/src/Services/NoteManager.vala 2020-01-11 19:28:02.000000000 +0100 +++ new/notejot-1.6.3/src/Services/NoteManager.vala 2020-04-12 03:09:34.000000000 +0200 @@ -21,38 +21,38 @@ public class NoteManager { private string app_dir = Environment.get_user_data_dir () + "/com.github.lainsce.notejot"; private string file_name; - + public NoteManager () { file_name = this.app_dir + "/saved_notes.json"; debug ("%s".printf(file_name)); } - + public void save_notes(Gee.ArrayList<Storage> notes) { string json_string = prepare_json_from_notes(notes); var dir = File.new_for_path(app_dir); var file = File.new_for_path (file_name); - + try { if (!dir.query_exists()) { dir.make_directory(); } - + if (file.query_exists ()) { file.delete (); } - + var file_stream = file.create (FileCreateFlags.REPLACE_DESTINATION); var data_stream = new DataOutputStream (file_stream); data_stream.put_string(json_string); } catch (Error e) { warning ("Failed to save notes %s\n", e.message); } - + } - + private string prepare_json_from_notes (Gee.ArrayList<Storage> notes) { Json.Builder builder = new Json.Builder (); - + builder.begin_array (); foreach (Storage note in notes) { builder.begin_object (); @@ -77,32 +77,32 @@ builder.end_object (); }; builder.end_array (); - + Json.Generator generator = new Json.Generator (); Json.Node root = builder.get_root (); generator.set_root (root); - + string str = generator.to_data (null); return str; } - + public Gee.ArrayList<Storage> load_from_file() { Gee.ArrayList<Storage> stored_notes = new Gee.ArrayList<Storage>(); - + try { var file = File.new_for_path(file_name); var json_string = ""; if (file.query_exists()) { string line; var dis = new DataInputStream (file.read ()); - + while ((line = dis.read_line (null)) != null) { json_string += line; } - + var parser = new Json.Parser(); parser.load_from_data(json_string); - + var root = parser.get_root(); var array = root.get_array(); foreach (var item in array.get_elements()) { @@ -119,13 +119,13 @@ Storage stored_note = new Storage.from_storage(x, y, w, h, color, selected_color_text, pinned, content, title); stored_notes.add(stored_note); } - + } - + } catch (Error e) { warning ("Failed to load file: %s\n", e.message); } - + return stored_notes; } }
