diff -Nru psnotes-0.11.8/configure psnotes-0.11.9/configure --- psnotes-0.11.8/configure 2016-03-24 00:16:26.000000000 +0000 +++ psnotes-0.11.9/configure 2016-04-01 10:26:45.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for psnotes 0.11.8. +# Generated by GNU Autoconf 2.69 for psnotes 0.11.9. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -647,8 +647,8 @@ # Identity of this package. PACKAGE_NAME='psnotes' PACKAGE_TARNAME='psnotes' -PACKAGE_VERSION='0.11.8' -PACKAGE_STRING='psnotes 0.11.8' +PACKAGE_VERSION='0.11.9' +PACKAGE_STRING='psnotes 0.11.9' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1377,7 +1377,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures psnotes 0.11.8 to adapt to many kinds of systems. +\`configure' configures psnotes 0.11.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1447,7 +1447,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of psnotes 0.11.8:";; + short | recursive ) echo "Configuration of psnotes 0.11.9:";; esac cat <<\_ACEOF @@ -1559,7 +1559,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -psnotes configure 0.11.8 +psnotes configure 0.11.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1837,7 +1837,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by psnotes $as_me 0.11.8, which was +It was created by psnotes $as_me 0.11.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2656,7 +2656,7 @@ # Define the identity of the package. PACKAGE='psnotes' - VERSION='0.11.8' + VERSION='0.11.9' cat >>confdefs.h <<_ACEOF @@ -12140,7 +12140,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by psnotes $as_me 0.11.8, which was +This file was extended by psnotes $as_me 0.11.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12206,7 +12206,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -psnotes config.status 0.11.8 +psnotes config.status 0.11.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru psnotes-0.11.8/configure.ac psnotes-0.11.9/configure.ac --- psnotes-0.11.8/configure.ac 2016-03-24 00:16:20.000000000 +0000 +++ psnotes-0.11.9/configure.ac 2016-04-01 10:26:34.000000000 +0000 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Created by Anjuta application wizard. -AC_INIT(psnotes, 0.11.8) +AC_INIT(psnotes, 0.11.9) AC_CONFIG_HEADERS([config.h]) diff -Nru psnotes-0.11.8/debian/changelog psnotes-0.11.9/debian/changelog --- psnotes-0.11.8/debian/changelog 2016-03-24 00:29:11.000000000 +0000 +++ psnotes-0.11.9/debian/changelog 2016-04-01 10:28:17.000000000 +0000 @@ -1,6 +1,6 @@ -psnotes (0.11.8-2) trusty; urgency=low +psnotes (0.11.9-1) trusty; urgency=low * Overview of Changes - - Trying again. + - Update to the secret sauce. - -- Zach Burnham Wed, 23 Mar 2016 20:17:16 -0400 + -- Zach Burnham Fri, 01 Apr 2016 06:27:52 -0400 diff -Nru psnotes-0.11.8/debian/control psnotes-0.11.9/debian/control --- psnotes-0.11.8/debian/control 2016-03-23 10:33:47.000000000 +0000 +++ psnotes-0.11.9/debian/control 2016-04-01 10:28:50.000000000 +0000 @@ -8,7 +8,7 @@ libglib2.0-dev (>= 2.32.1), libgtk-3-dev (>= 3.4.1), libgtksourceview-3.0-dev, - valac-0.28, + valac-0.22, cmake (>= 2.8.7) Standards-Version: 3.9.2 Homepage: http://burnsoftware.wordpress.com/p-s-notes/ diff -Nru psnotes-0.11.8/debian/manpage.1.ex psnotes-0.11.9/debian/manpage.1.ex --- psnotes-0.11.8/debian/manpage.1.ex 2016-03-24 00:17:17.000000000 +0000 +++ psnotes-0.11.9/debian/manpage.1.ex 2016-04-01 10:27:53.000000000 +0000 @@ -4,7 +4,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH PSNOTES SECTION "March 23, 2016" +.TH PSNOTES SECTION "April 1, 2016" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: diff -Nru psnotes-0.11.8/debian/manpage.sgml.ex psnotes-0.11.9/debian/manpage.sgml.ex --- psnotes-0.11.8/debian/manpage.sgml.ex 2016-03-24 00:17:17.000000000 +0000 +++ psnotes-0.11.9/debian/manpage.sgml.ex 2016-04-01 10:27:53.000000000 +0000 @@ -20,7 +20,7 @@ FIRSTNAME"> SURNAME"> - March 23, 2016"> + April 1, 2016"> SECTION"> diff -Nru psnotes-0.11.8/debian/README.Debian psnotes-0.11.9/debian/README.Debian --- psnotes-0.11.8/debian/README.Debian 2016-03-24 00:17:17.000000000 +0000 +++ psnotes-0.11.9/debian/README.Debian 2016-04-01 10:27:53.000000000 +0000 @@ -3,4 +3,4 @@ - -- Zach Burnham Wed, 23 Mar 2016 20:17:16 -0400 + -- Zach Burnham Fri, 01 Apr 2016 06:27:52 -0400 diff -Nru psnotes-0.11.8/debian/README.source psnotes-0.11.9/debian/README.source --- psnotes-0.11.8/debian/README.source 2016-03-24 00:17:17.000000000 +0000 +++ psnotes-0.11.9/debian/README.source 2016-04-01 10:27:53.000000000 +0000 @@ -6,5 +6,5 @@ - -- Zach Burnham Wed, 23 Mar 2016 20:17:16 -0400 + -- Zach Burnham Fri, 01 Apr 2016 06:27:52 -0400 diff -Nru psnotes-0.11.8/src/Note.c psnotes-0.11.9/src/Note.c --- psnotes-0.11.8/src/Note.c 2016-03-24 00:14:33.000000000 +0000 +++ psnotes-0.11.9/src/Note.c 2016-04-01 10:23:23.000000000 +0000 @@ -172,6 +172,7 @@ enum { CHAPTER_COMPILER_DUMMY_PROPERTY }; +#define CHAPTER_COMPILER_SCENE_SEPARATOR "÷÷÷§÷÷÷" ChapterCompiler* chapter_compiler_new (void); ChapterCompiler* chapter_compiler_construct (GType object_type); const gchar* user_data_get_bookRoot (void); @@ -1800,7 +1801,7 @@ if (_tmp54_) { _tmp53_ = ""; } else { - _tmp53_ = "\n÷÷÷§÷÷÷"; + _tmp53_ = "\n\n" CHAPTER_COMPILER_SCENE_SEPARATOR "\n"; } _tmp55_ = g_strdup (_tmp53_); replacement = _tmp55_; @@ -1888,18 +1889,24 @@ gchar* _tmp96_ = NULL; const gchar* _tmp97_ = NULL; const gchar* _tmp98_ = NULL; - gchar* _tmp99_ = NULL; + const gchar* _tmp99_ = NULL; gchar* _tmp100_ = NULL; gchar* _tmp101_ = NULL; gchar* _tmp102_ = NULL; - Note* _tmp103_ = NULL; + gchar* _tmp103_ = NULL; const gchar* _tmp104_ = NULL; - const gchar* _tmp105_ = NULL; + gchar* _tmp105_ = NULL; gchar* _tmp106_ = NULL; gchar* _tmp107_ = NULL; gchar* _tmp108_ = NULL; - const gchar* _tmp127_ = NULL; - const gchar* _tmp128_ = NULL; + Note* _tmp109_ = NULL; + const gchar* _tmp110_ = NULL; + const gchar* _tmp111_ = NULL; + gchar* _tmp112_ = NULL; + gchar* _tmp113_ = NULL; + gchar* _tmp114_ = NULL; + const gchar* _tmp133_ = NULL; + const gchar* _tmp134_ = NULL; GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); zystem_debug ("IN COMPILE EPUB"); @@ -2190,83 +2197,91 @@ _g_free0 (cmd); cmd = _tmp96_; _tmp97_ = cmd; - _tmp98_ = filename; - _tmp99_ = g_strconcat ("-t epub -o ", _tmp98_, NULL); - _tmp100_ = _tmp99_; - _tmp101_ = g_strconcat (_tmp100_, ".epub ", NULL); - _tmp102_ = _tmp101_; - _tmp103_ = titleNote; - _tmp104_ = note_get_filePath (_tmp103_); - _tmp105_ = _tmp104_; - _tmp106_ = g_strconcat (_tmp102_, _tmp105_, NULL); - _tmp107_ = _tmp106_; - _tmp108_ = g_strconcat (_tmp97_, _tmp107_, NULL); + _tmp98_ = user_data_get_notesDirPath (); + _tmp99_ = _tmp98_; + _tmp100_ = g_strconcat ("-t epub --epub-cover-image=", _tmp99_, NULL); + _tmp101_ = _tmp100_; + _tmp102_ = g_strconcat (_tmp101_, "/cover.jpg -o ", NULL); + _tmp103_ = _tmp102_; + _tmp104_ = filename; + _tmp105_ = g_strconcat (_tmp103_, _tmp104_, NULL); + _tmp106_ = _tmp105_; + _tmp107_ = g_strconcat (_tmp106_, ".epub ", NULL); + _tmp108_ = _tmp107_; + _tmp109_ = titleNote; + _tmp110_ = note_get_filePath (_tmp109_); + _tmp111_ = _tmp110_; + _tmp112_ = g_strconcat (_tmp108_, _tmp111_, NULL); + _tmp113_ = _tmp112_; + _tmp114_ = g_strconcat (_tmp97_, _tmp113_, NULL); _g_free0 (cmd); - cmd = _tmp108_; - _g_free0 (_tmp107_); - _g_free0 (_tmp102_); - _g_free0 (_tmp100_); + cmd = _tmp114_; + _g_free0 (_tmp113_); + _g_free0 (_tmp108_); + _g_free0 (_tmp106_); + _g_free0 (_tmp103_); + _g_free0 (_tmp101_); { GeeIterator* _name_it = NULL; - GeeSortedSet* _tmp109_ = NULL; - GeeIterator* _tmp110_ = NULL; - _tmp109_ = chapters; - _tmp110_ = gee_iterable_iterator ((GeeIterable*) _tmp109_); - _name_it = _tmp110_; + GeeSortedSet* _tmp115_ = NULL; + GeeIterator* _tmp116_ = NULL; + _tmp115_ = chapters; + _tmp116_ = gee_iterable_iterator ((GeeIterable*) _tmp115_); + _name_it = _tmp116_; while (TRUE) { - GeeIterator* _tmp111_ = NULL; - gboolean _tmp112_ = FALSE; + GeeIterator* _tmp117_ = NULL; + gboolean _tmp118_ = FALSE; gchar* name = NULL; - GeeIterator* _tmp113_ = NULL; - gpointer _tmp114_ = NULL; - const gchar* _tmp115_ = NULL; - Note* note = NULL; - const gchar* _tmp116_ = NULL; - Note* _tmp117_ = NULL; - const gchar* _tmp118_ = NULL; - Note* _tmp119_ = NULL; - const gchar* _tmp120_ = NULL; + GeeIterator* _tmp119_ = NULL; + gpointer _tmp120_ = NULL; const gchar* _tmp121_ = NULL; - gchar* _tmp122_ = NULL; - gchar* _tmp123_ = NULL; - gchar* _tmp124_ = NULL; - gchar* _tmp125_ = NULL; - gchar* _tmp126_ = NULL; - _tmp111_ = _name_it; - _tmp112_ = gee_iterator_next (_tmp111_); - if (!_tmp112_) { + Note* note = NULL; + const gchar* _tmp122_ = NULL; + Note* _tmp123_ = NULL; + const gchar* _tmp124_ = NULL; + Note* _tmp125_ = NULL; + const gchar* _tmp126_ = NULL; + const gchar* _tmp127_ = NULL; + gchar* _tmp128_ = NULL; + gchar* _tmp129_ = NULL; + gchar* _tmp130_ = NULL; + gchar* _tmp131_ = NULL; + gchar* _tmp132_ = NULL; + _tmp117_ = _name_it; + _tmp118_ = gee_iterator_next (_tmp117_); + if (!_tmp118_) { break; } - _tmp113_ = _name_it; - _tmp114_ = gee_iterator_get (_tmp113_); - name = (gchar*) _tmp114_; - _tmp115_ = name; - zystem_debug (_tmp115_); - _tmp116_ = name; - _tmp117_ = note_new (_tmp116_); - note = _tmp117_; - _tmp118_ = cmd; - _tmp119_ = note; - _tmp120_ = note_get_filePath (_tmp119_); - _tmp121_ = _tmp120_; - _tmp122_ = string_replace (_tmp121_, " ", "\\ "); - _tmp123_ = _tmp122_; - _tmp124_ = g_strconcat (" \\\n", _tmp123_, NULL); - _tmp125_ = _tmp124_; - _tmp126_ = g_strconcat (_tmp118_, _tmp125_, NULL); + _tmp119_ = _name_it; + _tmp120_ = gee_iterator_get (_tmp119_); + name = (gchar*) _tmp120_; + _tmp121_ = name; + zystem_debug (_tmp121_); + _tmp122_ = name; + _tmp123_ = note_new (_tmp122_); + note = _tmp123_; + _tmp124_ = cmd; + _tmp125_ = note; + _tmp126_ = note_get_filePath (_tmp125_); + _tmp127_ = _tmp126_; + _tmp128_ = string_replace (_tmp127_, " ", "\\ "); + _tmp129_ = _tmp128_; + _tmp130_ = g_strconcat (" \\\n", _tmp129_, NULL); + _tmp131_ = _tmp130_; + _tmp132_ = g_strconcat (_tmp124_, _tmp131_, NULL); _g_free0 (cmd); - cmd = _tmp126_; - _g_free0 (_tmp125_); - _g_free0 (_tmp123_); + cmd = _tmp132_; + _g_free0 (_tmp131_); + _g_free0 (_tmp129_); _g_object_unref0 (note); _g_free0 (name); } _g_object_unref0 (_name_it); } - _tmp127_ = cmd; - zystem_debug (_tmp127_); - _tmp128_ = cmd; - g_spawn_command_line_sync (_tmp128_, NULL, NULL, NULL, &_inner_error_); + _tmp133_ = cmd; + zystem_debug (_tmp133_); + _tmp134_ = cmd; + g_spawn_command_line_sync (_tmp134_, NULL, NULL, NULL, &_inner_error_); if (G_UNLIKELY (_inner_error_ != NULL)) { _g_free0 (cmd); _g_object_unref0 (titleNote); diff -Nru psnotes-0.11.8/src/Note.vala psnotes-0.11.9/src/Note.vala --- psnotes-0.11.8/src/Note.vala 2016-03-24 00:13:57.000000000 +0000 +++ psnotes-0.11.9/src/Note.vala 2016-04-01 10:23:16.000000000 +0000 @@ -183,6 +183,8 @@ public class ChapterCompiler : GLib.Object { + private static const string SCENE_SEPARATOR = "÷÷÷§÷÷÷"; + private string bookDir; private string chapDir; @@ -246,7 +248,7 @@ while (chapterText.contains(h2)) { var startIndex = chapterText.index_of(h2); var endIndex = chapterText.index_of("\n", startIndex + 1); - var replacement = first ? "" : "\n÷÷÷§÷÷÷"; // ¤ § · ÷ + var replacement = first ? "" : "\n\n" + SCENE_SEPARATOR + "\n"; // ¤ § · ÷ chapterText = chapterText.splice(startIndex, endIndex, replacement); Zystem.debug("Replaced h2 at " + startIndex.to_string() + " to " + endIndex.to_string()); first = false; @@ -304,7 +306,7 @@ GLib.Process.spawn_command_line_sync(cmd); cmd = cmdStart; - cmd += "-t epub -o " + filename + ".epub " + titleNote.filePath; + cmd += "-t epub --epub-cover-image=" + UserData.notesDirPath + "/cover.jpg -o " + filename + ".epub " + titleNote.filePath; //cmd = "pandoc -S -o " + filename + ".epub " + titleNote.filePath; diff -Nru psnotes-0.11.8/src/psnotes.c psnotes-0.11.9/src/psnotes.c --- psnotes-0.11.8/src/psnotes.c 2016-03-19 22:18:53.000000000 +0000 +++ psnotes-0.11.9/src/psnotes.c 2016-04-01 10:26:53.000000000 +0000 @@ -233,7 +233,7 @@ MAIN_DUMMY_PROPERTY }; #define MAIN_isInstalled TRUE -#define MAIN_shortcutsText "Ctrl+N: Create a new note\n" "Ctrl+F: Jump to filter box to search note titles\n" "Escape: Jump to filter box / clear filter box\n" "Ctrl+W: Toggle Write Mode" "Ctrl+O: Choose notes folder\n" "Ctrl+=: Increase font size\n" "Ctrl+-: Decrease font size\n" "Ctrl+0: Reset font size" +#define MAIN_shortcutsText "Ctrl+N: Create a new note\n" "Ctrl+F: Jump to filter box to search note titles\n" "Escape: Jump to filter box / clear filter box\n" "Ctrl+W: Toggle Write Mode\n" "Ctrl+O: Choose notes folder\n" "Ctrl+=: Increase font size\n" "Ctrl+-: Decrease font size\n" "Ctrl+0: Reset font size" Main* main_new (void); Main* main_construct (GType object_type); static Block1Data* block1_data_ref (Block1Data* _data1_); @@ -245,6 +245,7 @@ gint user_data_get_windowHeight (void); static gboolean __lambda7_ (Main* self); void zystem_debug (const gchar* s); +void main_scaleEditorForMaximize (Main* self); static gboolean ___lambda7__gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self); static void __lambda8_ (Main* self); void main_openNotesDir (Main* self); @@ -463,6 +464,7 @@ self->priv->height = _tmp3_; } else { zystem_debug ("Window maximized, no save window size!"); + main_scaleEditorForMaximize (self); } result = FALSE; return result; @@ -2337,6 +2339,43 @@ } } + +void main_scaleEditorForMaximize (Main* self) { + gint nowWidth = 0; + gint nowHeight = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gboolean _tmp2_ = FALSE; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + g_return_if_fail (self != NULL); + gtk_window_get_size ((GtkWindow*) self, &_tmp0_, &_tmp1_); + nowWidth = _tmp0_; + nowHeight = _tmp1_; + _tmp3_ = self->priv->width; + _tmp4_ = nowWidth; + if (_tmp3_ == _tmp4_) { + gint _tmp5_ = 0; + gint _tmp6_ = 0; + _tmp5_ = self->priv->height; + _tmp6_ = nowHeight; + _tmp2_ = _tmp5_ == _tmp6_; + } else { + _tmp2_ = FALSE; + } + if (_tmp2_) { + zystem_debug ("THE UNNNNN maximizedBOOOOOGABOOGA"); + } else { + GdkWindow* _tmp7_ = NULL; + GdkWindowState _tmp8_ = 0; + _tmp7_ = gtk_widget_get_window ((GtkWidget*) self); + _tmp8_ = gdk_window_get_state (_tmp7_); + if ((_tmp8_ & GDK_WINDOW_STATE_MAXIMIZED) == GDK_WINDOW_STATE_MAXIMIZED) { + zystem_debug ("EL MAXIMIZEDDD"); + } + } +} + static gchar* string_strip (const gchar* self) { gchar* result = NULL; diff -Nru psnotes-0.11.8/src/psnotes.vala psnotes-0.11.9/src/psnotes.vala --- psnotes-0.11.8/src/psnotes.vala 2016-03-19 22:18:43.000000000 +0000 +++ psnotes-0.11.9/src/psnotes.vala 2016-04-01 10:26:44.000000000 +0000 @@ -28,7 +28,7 @@ "Ctrl+N: Create a new note\n" + "Ctrl+F: Jump to filter box to search note titles\n" + "Escape: Jump to filter box / clear filter box\n" + - "Ctrl+W: Toggle Write Mode" + + "Ctrl+W: Toggle Write Mode\n" + "Ctrl+O: Choose notes folder\n" + "Ctrl+=: Increase font size\n" + "Ctrl+-: Decrease font size\n" + @@ -39,9 +39,6 @@ private Note note; -// private int startingFontSize; -// private int fontSize; - private string lastKeyName; private bool needsSave = false; @@ -50,7 +47,6 @@ private Entry txtFilter; private TreeView notesView; - //private HyperTextView noteTextView; private DocumentView noteTextView; private Paned paned; private NoteEditor editor; @@ -96,12 +92,23 @@ this.get_size(out this.width, out this.height); } else { Zystem.debug("Window maximized, no save window size!"); + this.scaleEditorForMaximize(); } return false; }); this.saveRequested = false; + /*this.window_state_event.connect((event) => { + if (event.new_window_state == Gdk.WindowState.MAXIMIZED) { + Zystem.debug("EL MAXIMOZED"); + //this.scaleEditorForMaximize(); + } else if (event.new_window_state == Gdk.WindowState.FOCUSED) { + Zystem.debug("UNNNNNNNNNNNNnnnnnnnnn MAXIMOZED"); + } + return false; + });*/ + // Do I create toolbar or menu? @@ -611,7 +618,6 @@ } public void toggleWriteMode() { -// this.menuWriteMode.active = !this.menuWriteMode.active; if (this.menuWriteMode.active) { var width = this.paned.position + 1 + (UserData.defaultMargins * 2); var margins = width % 2 == 0 ? width / 2 : (width - 1) / 2; @@ -626,6 +632,19 @@ } } + public void scaleEditorForMaximize() { + // Check size. + int nowWidth; + int nowHeight; + this.get_size(out nowWidth, out nowHeight); + + if (this.width == nowWidth && this.height == nowHeight) { + Zystem.debug("THE UNNNNN maximizedBOOOOOGABOOGA"); + } else if (Gdk.WindowState.MAXIMIZED in this.get_window().get_state()) { + Zystem.debug("EL MAXIMIZEDDD"); + } + } + //public void onTextChanged(TextBuffer buffer) { public void onTextChanged(DocumentView docView) { this.updateWordCount();