diff -up bijiben-3.21.2/configure.ac.webkit2 bijiben-3.21.2/configure.ac --- bijiben-3.21.2/configure.ac.webkit2 2016-05-23 21:55:26.000000000 +0200 +++ bijiben-3.21.2/configure.ac 2017-05-05 08:04:53.065352322 +0200 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(bijiben, 3.21.2) +AC_INIT([bijiben], [3.21.2]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) dnl _FOR_DOC @@ -14,9 +14,6 @@ AM_MAINTAINER_MODE AC_PROG_CC -GNOME_DOC_PREPARE - - YELP_HELP_INIT @@ -24,34 +21,34 @@ dnl ************************************ dnl Internatinalization dnl *************************************************************************** GETTEXT_PACKAGE=bijiben -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) -AM_GLIB_GNU_GETTEXT +AC_SUBST([GETTEXT_PACKAGE]) +AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"], [GETTEXT package name]) IT_PROG_INTLTOOL([0.50.1]) - - - - - +# Compiler warnings +AX_COMPILER_FLAGS() # # Check if we should update the mime database # -AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no) +AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no]) -AC_ARG_ENABLE(update-mimedb, - AC_HELP_STRING([--disable-update-mimedb], - [disable the update-mime-database after install [default=no]]),, - enable_update_mimedb=yes) -AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, (test x$enable_update_mimedb = xyes) && (test x$UPDATE_MIME_DATABASE != xno)) +AC_ARG_ENABLE([update-mimedb], + [AS_HELP_STRING([--disable-update-mimedb], + [disable the update-mime-database after install [default=no]])],, + [enable_update_mimedb=yes]) +AM_CONDITIONAL([ENABLE_UPDATE_MIMEDB], + [test "$enable_update_mimedb" = "yes" && test "$UPDATE_MIME_DATABASE" != "no"]) -AC_PATH_PROG(DESKTOP_FILE_VALIDATE, desktop-file-validate) +AC_PATH_PROG([DESKTOP_FILE_VALIDATE], [desktop-file-validate]) +# Utility programs +AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources]) +AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen]) -AM_PROG_LIBTOOL +LT_INIT # Requirements @@ -63,26 +60,28 @@ APPSTREAM_XML GLIB_REQUIRED_VERSION=2.28 GTK_REQUIRED_VERSION=3.11.4 EDS_REQUIRED_VERSION=3.13.90 +WEBKITGTK_REQUIRED_VERSION=2.10.0 PKG_CHECK_MODULES([TRACKER], [tracker-sparql-1.0], [sparql_version="tracker-sparql-1.0"], [PKG_CHECK_MODULES([TRACKER], [tracker-sparql-0.18], [sparql_version="tracker-sparql-0.18"]) ]) -PKG_CHECK_MODULES(BIJIBEN, - [ libecal-1.2 >= $EDS_REQUIRED_VERSION - libedataserver-1.2 >= $EDS_REQUIRED_VERSION - libedataserverui-1.2 >= $EDS_REQUIRED_VERSION - gio-unix-2.0 - glib-2.0 >= $GLIB_REQUIRED_VERSION - goa-1.0 - gtk+-3.0 >= $GTK_REQUIRED_VERSION - libecal-1.2 - libxml-2.0 - $sparql_version - uuid - webkitgtk-3.0]) +PKG_CHECK_MODULES([BIJIBEN], + [libecal-1.2 >= $EDS_REQUIRED_VERSION + libedataserver-1.2 >= $EDS_REQUIRED_VERSION + gio-unix-2.0 + glib-2.0 >= $GLIB_REQUIRED_VERSION + goa-1.0 + gtk+-3.0 >= $GTK_REQUIRED_VERSION + libecal-1.2 + libxml-2.0 + $sparql_version + uuid + webkit2gtk-4.0 >= $WEBKITGTK_REQUIRED_VERSION]) +AC_CHECK_LIBM +AC_SUBST([LIBM]) # check for zeitgeist AC_ARG_ENABLE([zeitgeist], diff -up bijiben-3.21.2/data/bijiben.js.webkit2 bijiben-3.21.2/data/bijiben.js --- bijiben-3.21.2/data/bijiben.js.webkit2 2017-05-05 08:04:53.065352322 +0200 +++ bijiben-3.21.2/data/bijiben.js 2017-05-05 08:04:53.065352322 +0200 @@ -0,0 +1,80 @@ +window.onload = function () { + document.getElementById('editable').focus(); +}; + +var domModifiedTimerID = -1; +document.addEventListener("DOMSubtreeModified", function () { + if (domModifiedTimerID == -1) { + domModifiedTimerID = setTimeout(function () { + domModifiedTimerID = -1; + doc = document.documentElement; + window.webkit.messageHandlers.bijiben.postMessage({ + messageName: 'ContentsUpdate', + outerHTML: doc.outerHTML, + innerText: doc.innerText + }); + }, 0); + } +}, false); + +function rangeHasText(range) { + if (range.startContainer.nodeType == Node.TEXT_NODE) + return true; + if (range.endContainer.nodeType == Node.TEXT_NODE) + return true; + + node = range.cloneContents(); + while (node) { + if (node.nodeType == Node.TEXT_NODE) + return true; + + if (node.hasChildNodes()) + node = node.firstChild; + else if (node.nextSlibling) + node = node.nextSlibling; + else { + node = node.parentNode; + if (node) + node = node.nextSlibling; + } + } + + return false; +}; + +function findParent(node, tag) { + var element = node; + if (node.nodeType != Node.ELEMENT_NODE) + element = node.parentElement; + if (element) + return element.closest(tag); + return null; +} + +function rangeBlockFormat(range) { + node = range.startContainer; + if (findParent(node, "ul")) + return "UL"; + if (findParent(node, "ol")) + return "OL"; + return "NONE"; +}; + +var selectionChangeTimerID = -1; +document.addEventListener('selectionchange', function () { + if (selectionChangeTimerID == -1) { + selectionChangeTimerID = setTimeout(function () { + selectionChangeTimerID = -1; + selection = window.getSelection(); + if (selection.rangeCount < 1) + return; + range = selection.getRangeAt(0); + window.webkit.messageHandlers.bijiben.postMessage({ + messageName: 'SelectionChange', + hasText: rangeHasText(range), + text: range.toString(), + blockFormat: rangeBlockFormat(range) + }); + }, 0); + } +}, false); diff -up bijiben-3.21.2/data/Default.css.webkit2 bijiben-3.21.2/data/Default.css --- bijiben-3.21.2/data/Default.css.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/data/Default.css 2017-05-05 08:04:53.065352322 +0200 @@ -5,7 +5,7 @@ body { margin-bottom: 8em; word-wrap: break-word; - color: _BIJI_TEXT_COLOR; + color: black; background-size: 2.0em 2.0em; line-height: 1.5em; padding: 2.0em; diff -up bijiben-3.21.2/data/Makefile.am.webkit2 bijiben-3.21.2/data/Makefile.am --- bijiben-3.21.2/data/Makefile.am.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/data/Makefile.am 2017-05-05 08:04:53.065352322 +0200 @@ -44,17 +44,17 @@ org.gnome.bijiben.SearchProvider.service searchproviderdir = $(datadir)/gnome-shell/search-providers searchprovider_DATA = org.gnome.bijiben-search-provider.ini -css_files = Default.css +web_files = Default.css bijiben.js -cssdir = $(pkgdatadir) -css_DATA = $(css_files) +webdir = $(pkgdatadir) +web_DATA = $(web_files) gsettings_SCHEMAS = org.gnome.bijiben.gschema.xml @GSETTINGS_RULES@ EXTRA_DIST = \ $(desktop_in_files) \ - $(css_files) \ + $(web_files) \ $(gsettings_SCHEMAS) \ shell-search-provider-dbus-interfaces.xml \ $(service_in_files) \ diff -up bijiben-3.21.2/data/org.gnome.bijiben-search-provider.ini.webkit2 bijiben-3.21.2/data/org.gnome.bijiben-search-provider.ini --- bijiben-3.21.2/data/org.gnome.bijiben-search-provider.ini.webkit2 2016-05-20 21:38:33.000000000 +0200 +++ bijiben-3.21.2/data/org.gnome.bijiben-search-provider.ini 2017-05-05 08:04:53.065352322 +0200 @@ -1,5 +1,5 @@ [Shell Search Provider] -DesktopId=bijiben.desktop +DesktopId=org.gnome.bijiben.desktop BusName=org.gnome.bijiben.SearchProvider ObjectPath=/org/gnome/bijiben/SearchProvider -Version=2 \ No newline at end of file +Version=2 diff -up bijiben-3.21.2/help/cs/cs.po.webkit2 bijiben-3.21.2/help/cs/cs.po --- bijiben-3.21.2/help/cs/cs.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/help/cs/cs.po 2017-05-05 08:04:53.065352322 +0200 @@ -1,13 +1,13 @@ # Czech translation for bijiben. # Copyright (C) 2014 bijiben's COPYRIGHT HOLDER # This file is distributed under the same license as the bijiben package. -# Marek Černocký , 2014, 2015. +# Marek Černocký , 2014, 2015, 2016. # msgid "" msgstr "" "Project-Id-Version: bijiben\n" -"POT-Creation-Date: 2015-04-24 14:59+0000\n" -"PO-Revision-Date: 2015-04-24 22:17+0200\n" +"POT-Creation-Date: 2016-05-19 15:03+0000\n" +"PO-Revision-Date: 2016-09-04 23:14+0200\n" "Last-Translator: Marek Černocký \n" "Language-Team: Czech \n" "Language: cs\n" @@ -75,12 +75,11 @@ msgstr "Michael Hill" #. (itstool) path: credit/years #: C/colors.page:29 C/create.page:22 C/create.page:27 C/cut-copy-paste.page:13 #: C/cut-copy-paste.page:18 C/cut-copy-paste.page:23 C/delete.page:27 -#: C/delete-permanent.page:13 C/delete-restore.page:13 -#: C/delete-restore.page:18 C/format-list.page:27 C/format-text.page:22 -#: C/format-text.page:27 C/introduction.page:23 C/introduction.page:28 -#: C/new-window.page:13 C/notebooks.page:22 C/notebooks.page:27 -#: C/rename.page:18 C/search.page:27 C/search.page:32 C/share.page:22 -#: C/share.page:27 +#: C/delete-permanent.page:13 C/delete-restore.page:13 C/delete-restore.page:18 +#: C/format-list.page:27 C/format-text.page:22 C/format-text.page:27 +#: C/introduction.page:23 C/introduction.page:28 C/new-window.page:13 +#: C/notebooks.page:22 C/notebooks.page:27 C/rename.page:18 C/search.page:27 +#: C/search.page:32 C/share.page:22 C/share.page:27 msgid "2014" msgstr "2014" @@ -329,39 +328,42 @@ msgstr "Když chcete trvale smazat všec #. (itstool) path: item/p #: C/delete-permanent.page:30 -msgid "Click on the Notes icon near Activities." -msgstr "Klikněte na ikonu Poznámky vedle Činnosti." +msgid "" +"Click on the Notes icon near Activities." +msgstr "Klikněte na ikonu Poznámky vedle Činnosti." #. (itstool) path: item/p -#: C/delete-permanent.page:33 +#: C/delete-permanent.page:34 msgid "Select View Trash." msgstr "Vyberte Zobrazit koš." #. (itstool) path: item/p -#: C/delete-permanent.page:36 +#: C/delete-permanent.page:37 msgid "Click on Empty button in the toolbar." msgstr "" "Klikněte na tlačítko Vyprázdnit na nástrojové " "liště." #. (itstool) path: steps/title -#: C/delete-permanent.page:41 +#: C/delete-permanent.page:42 msgid "To delete selected notes from Trash:" msgstr "Když chcete z koše smazat vybrané poznámky:" #. (itstool) path: item/p -#: C/delete-permanent.page:43 +#: C/delete-permanent.page:44 msgid "In the Trash view click Selection mode button." msgstr "" "V zobrazení koše klikněte na tlačítko Režim výběru." #. (itstool) path: item/p -#: C/delete-permanent.page:47 +#: C/delete-permanent.page:48 msgid "Select all the notes that you want to delete permanently." msgstr "Vyberte všechny poznámky, které chcete trvale smazat." #. (itstool) path: item/p -#: C/delete-permanent.page:50 +#: C/delete-permanent.page:51 msgid "Click on Permanently Delete button." msgstr "Klikněte na tlačítko Smazat trvale." @@ -379,7 +381,7 @@ msgstr "Obnovení poznámek" #: C/delete-restore.page:28 msgid "" "If you think that you have accidentally deleted a note, you can view and " -"restore it from Trash" +"restore it from Trash." msgstr "" "Když zjistíte, že jste některou poznámku smazali nechtěně, můžete si ji " "zobrazit v koši a obnovit ji z něj." @@ -407,7 +409,7 @@ msgstr "Klikněte na tlačítko Notes is a simple application for creating, editing, and viewing " -"notes. You can also search for a note from the Activities " -"overview. Notes integrates easily with Online Accounts." +"notes. You can also search for a note from the Activities overview. Notes integrates " +"easily with Online Accounts." msgstr "" "Poznámky jsou jednoduchá aplikace pro vytváření, úpravy a " "prohlížení poznámek. Poznámky můžete také vyhledávat v přehledu " -"Činností. Poznámky umí jednoduše spolupracovat s " -"Účty on-line." +"Činností. " +"Poznámky umí jednoduše spolupracovat s Účty on-line." #. (itstool) path: credit/name #: C/new-window.page:11 diff -up bijiben-3.21.2/help/de/de.po.webkit2 bijiben-3.21.2/help/de/de.po --- bijiben-3.21.2/help/de/de.po.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/help/de/de.po 2017-05-05 08:04:53.065352322 +0200 @@ -3,27 +3,29 @@ # This file is distributed under the same license as the bijiben package. # Benjamin Steinwender , 2014. # Christian Kirbach , 2014. +# Mario Blättermann , 2016. # msgid "" msgstr "" "Project-Id-Version: bijiben gnome-3-14\n" -"POT-Creation-Date: 2015-10-09 03:03+0000\n" -"PO-Revision-Date: 2015-10-09 13:14+0200\n" -"Last-Translator: Christian Kirbach \n" +"POT-Creation-Date: 2016-05-19 15:03+0000\n" +"PO-Revision-Date: 2016-09-05 13:55+0200\n" +"Last-Translator: Mario Blättermann \n" "Language-Team: \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.8.4\n" +"X-Generator: Poedit 1.8.9\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "" "Benjamin Steinwender , 2014\n" -"Christian Kirbach , 2014, 2015" +"Christian Kirbach , 2014, 2015\n" +"Mario Blättermann , 2016" #. (itstool) path: credit/name #: C/colors.page:13 C/create.page:11 C/delete.page:11 C/format-list.page:11 @@ -78,12 +80,11 @@ msgstr "Michael Hill" #. (itstool) path: credit/years #: C/colors.page:29 C/create.page:22 C/create.page:27 C/cut-copy-paste.page:13 #: C/cut-copy-paste.page:18 C/cut-copy-paste.page:23 C/delete.page:27 -#: C/delete-permanent.page:13 C/delete-restore.page:13 -#: C/delete-restore.page:18 C/format-list.page:27 C/format-text.page:22 -#: C/format-text.page:27 C/introduction.page:23 C/introduction.page:28 -#: C/new-window.page:13 C/notebooks.page:22 C/notebooks.page:27 -#: C/rename.page:18 C/search.page:27 C/search.page:32 C/share.page:22 -#: C/share.page:27 +#: C/delete-permanent.page:13 C/delete-restore.page:13 C/delete-restore.page:18 +#: C/format-list.page:27 C/format-text.page:22 C/format-text.page:27 +#: C/introduction.page:23 C/introduction.page:28 C/new-window.page:13 +#: C/notebooks.page:22 C/notebooks.page:27 C/rename.page:18 C/search.page:27 +#: C/search.page:32 C/share.page:22 C/share.page:27 msgid "2014" msgstr "2014" @@ -163,7 +164,7 @@ msgid "" "from another note." msgstr "" "Erstellen einer neuen Notiz durch Verwenden von Text aus einer anderen " -"Anwendung oder einer andere Notiz." +"Anwendung oder einer anderen Notiz." #. (itstool) path: page/title #: C/create.page:36 @@ -173,7 +174,7 @@ msgstr "Eine Notiz erstellen" #. (itstool) path: page/p #: C/create.page:38 msgid "You can create a new note in three different ways:" -msgstr "Sie können eine neue Notiz auf drei verschiedene Wege erstellen:" +msgstr "Sie können eine neue Notiz auf drei verschiedenen Wegen erstellen:" #. (itstool) path: item/p #: C/create.page:41 @@ -240,15 +241,15 @@ msgstr "So können Sie in Notizen aussch #. (itstool) path: item/p #: C/cut-copy-paste.page:39 msgid "Select the text." -msgstr "Wählen Sie den Text." +msgstr "Wählen Sie den Text aus." #. (itstool) path: item/p #: C/cut-copy-paste.page:42 msgid "" "Press Cut or Copy." msgstr "" -"Klicken Sie Ausschneiden oder Kopieren." +"Klicken Sie auf Ausschneiden oder Kopieren." #. (itstool) path: item/p #: C/cut-copy-paste.page:46 @@ -332,46 +333,48 @@ msgstr "Sie können Notizen im Papi #. (itstool) path: steps/title #: C/delete-permanent.page:28 msgid "To permanently delete all the notes in Trash:" -msgstr "So löschen Sie alle Notizen im Papierkorb endgültig." +msgstr "So löschen Sie alle Notizen im Papierkorb endgültig:" #. (itstool) path: item/p #: C/delete-permanent.page:30 -msgid "Click on the Notes icon near Activities." +msgid "" +"Click on the Notes icon near Activities." msgstr "" -"Klicken Sie auf das Notizen-Symbol in der Nähe von " -"Aktivitäten." +"Klicken Sie auf das Notizen-Symbol in der Nähe von Aktivitäten." #. (itstool) path: item/p -#: C/delete-permanent.page:33 +#: C/delete-permanent.page:34 msgid "Select View Trash." msgstr "Wählen Sie Papierkorb ansehen." #. (itstool) path: item/p -#: C/delete-permanent.page:36 +#: C/delete-permanent.page:37 msgid "Click on Empty button in the toolbar." msgstr "" "Klicken Sie auf den Leeren-Knopf in der " "Werkzeugleiste." #. (itstool) path: steps/title -#: C/delete-permanent.page:41 +#: C/delete-permanent.page:42 msgid "To delete selected notes from Trash:" -msgstr "So löschen Sie ausgewählte Notizen aus dem Papierkorb." +msgstr "So löschen Sie ausgewählte Notizen aus dem Papierkorb:" #. (itstool) path: item/p -#: C/delete-permanent.page:43 +#: C/delete-permanent.page:44 msgid "In the Trash view click Selection mode button." msgstr "" "Klicken Sie auf den Auswahlmodus-Knopf in der Papierkorb-Ansicht." #. (itstool) path: item/p -#: C/delete-permanent.page:47 +#: C/delete-permanent.page:48 msgid "Select all the notes that you want to delete permanently." msgstr "Wählen Sie alle Notizen, die Sie endgültig löschen möchten." #. (itstool) path: item/p -#: C/delete-permanent.page:50 +#: C/delete-permanent.page:51 msgid "Click on Permanently Delete button." msgstr "" "Klicken Sie auf den Knopf Endgültig löschen." @@ -390,7 +393,7 @@ msgstr "Notizen wiederherstellen" #: C/delete-restore.page:28 msgid "" "If you think that you have accidentally deleted a note, you can view and " -"restore it from Trash" +"restore it from Trash." msgstr "" "Wenn Sie irrtümlicherweise eine Notiz gelöscht haben, können Sie diese im " "Papierkorb betrachten und wieder herstellen." @@ -419,7 +422,7 @@ msgstr "Klicken Sie den Notes is a simple application for creating, editing, and viewing " -"notes. You can also search for a note from the Activities " -"overview. Notes integrates easily with Online Accounts." +"notes. You can also search for a note from the Activities overview. Notes integrates " +"easily with Online Accounts." msgstr "" "Notizen ist eine einfache Anwendung zum Erstellen, Bearbeiten und " -"Betrachten von Notizen. Sie können auch nach Notizen in der " -"Aktivitäten-Übersicht suchen. Notizen integriert auch " -"einfach mit Online-Konten." +"Betrachten von Notizen. Sie können auch nach Notizen in der Aktivitäten-Übersicht suchen. " +"Notizen integriert sich auch einfach in die Online-Konten." #. (itstool) path: credit/name #: C/new-window.page:11 @@ -601,7 +605,7 @@ msgstr "" #: C/notebooks.page:32 msgid "Add a note to a notebook to make sorting and searching notes easier." msgstr "" -"Geben Sie eine Notiz in eine Notizsammlung, um Sortieren und Suchen " +"Fügen Sie eine Notiz zu einer Notizsammlung hinzu, um Sortieren und Suchen " "einfacher zu gestalten." #. (itstool) path: page/title @@ -780,38 +784,10 @@ msgstr "Senden Sie die Notiz per E-Mail. #. (itstool) path: p/link #: C/legal.xml:5 msgid "Creative Commons Attribution-ShareAlike 3.0 Unported License" -msgstr "" -"Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 " -"nicht angepasst" +msgstr "Creative Commons Attribution-ShareAlike 3.0 Unported License" #. (itstool) path: license/p #: C/legal.xml:4 msgid "This work is licensed under a <_:link-1/>." msgstr "Dieses Werk ist unter <_:link-1/> lizenziert." -#~ msgid "2013, 3014" -#~ msgstr "2013, 3014" - -#~ msgid "31 Aug 2014" -#~ msgstr "31. Aug. 2014" - -#~ msgid "The default New and Recent view shows recently used notes." -#~ msgstr "" -#~ "Die Vorgabeansicht Neu und kürzlich verwendet zeigt kürzlich " -#~ "verwendete Notizen." - -#~ msgid "" -#~ "You can also search for notes from the Activities overview." -#~ msgstr "" -#~ "Sie können auch in der Aktivitäten-Übersicht nach Notizen " -#~ "suchen." - -#~ msgid "Cut, copy and paste is simple to use." -#~ msgstr "Ausschneiden, kopieren und einfügen ist einfach anzuwenden." - -#~ msgid "View Trash to delete or restore notes." -#~ msgstr "" -#~ "Den Papierkorb zum Löschen oder Wiederherstellen von Notizen betrachten." - -#~ msgid "Access trashed notes" -#~ msgstr "Auf Notizen im Papierkorb zugreifen" diff -up bijiben-3.21.2/help/fr/figures/notes-3-12.png.webkit2 bijiben-3.21.2/help/fr/figures/notes-3-12.png diff -up bijiben-3.21.2/help/fr/fr.po.webkit2 bijiben-3.21.2/help/fr/fr.po --- bijiben-3.21.2/help/fr/fr.po.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/help/fr/fr.po 2017-05-05 08:05:14.919352019 +0200 @@ -3,20 +3,21 @@ # This file is distributed under the same license as the bijiben package. # naybnet , 2014. # Myriam Economou , 2015. +# Charles Monzat , 2016. # msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"POT-Creation-Date: 2015-09-20 10:18+0000\n" -"PO-Revision-Date: 2015-09-20 16:34+0200\n" -"Last-Translator: Myriam Economou \n" -"Language-Team: GNOME French Team \n" +"POT-Creation-Date: 2017-02-25 22:29+0000\n" +"PO-Revision-Date: 2016-10-29 16:53+0200\n" +"Last-Translator: Charles Monzat \n" +"Language-Team: français \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 1.7.5\n" +"X-Generator: Gtranslator 2.91.7\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" @@ -337,41 +338,45 @@ msgstr "Pour supprimer définitivement t #. (itstool) path: item/p #: C/delete-permanent.page:30 -msgid "Click on the Notes icon near Activities." -msgstr "Cliquez sur l'icône Notes à côté de Activités." +msgid "" +"Click on the Notes icon near Activities." +msgstr "" +"Cliquez sur l'icône Notes à côté de Activités." #. (itstool) path: item/p -#: C/delete-permanent.page:33 +#: C/delete-permanent.page:34 msgid "Select View Trash." msgstr "Sélectionnez Voir la Corbeille." #. (itstool) path: item/p -#: C/delete-permanent.page:36 +#: C/delete-permanent.page:37 msgid "Click on Empty button in the toolbar." msgstr "" "Cliquez sur le bouton Vider dans la barre " "d'outils." #. (itstool) path: steps/title -#: C/delete-permanent.page:41 +#: C/delete-permanent.page:42 msgid "To delete selected notes from Trash:" msgstr "Pour supprimer les notes sélectionnées de la Corbeille :" #. (itstool) path: item/p -#: C/delete-permanent.page:43 +#: C/delete-permanent.page:44 msgid "In the Trash view click Selection mode button." msgstr "" "Dans la vue Corbeille, cliquez sur le bouton Mode de " "sélection." #. (itstool) path: item/p -#: C/delete-permanent.page:47 +#: C/delete-permanent.page:48 msgid "Select all the notes that you want to delete permanently." msgstr "" "Sélectionnez toutes les notes que vous souhaitez supprimer définitivement." #. (itstool) path: item/p -#: C/delete-permanent.page:50 +#: C/delete-permanent.page:51 msgid "Click on Permanently Delete button." msgstr "" "Cliquez sur le bouton Supprimer définitivement." @@ -390,10 +395,10 @@ msgstr "Restaurer des notes" #: C/delete-restore.page:28 msgid "" "If you think that you have accidentally deleted a note, you can view and " -"restore it from Trash" +"restore it from Trash." msgstr "" "Si vous pensez que vous avez accidentellement supprimé une note, vous pouvez " -"la voir et la restaurer via Corbeille" +"la voir et la restaurer via Corbeille." #. (itstool) path: steps/title #: C/delete-restore.page:32 @@ -419,8 +424,8 @@ msgstr "Cliquez sur le bouton Notes is a simple application for creating, editing, and viewing " -"notes. You can also search for a note from the Activities " -"overview. Notes integrates easily with Online Accounts." +"notes. You can also search for a note from the Activities overview. Notes integrates " +"easily with Online Accounts." msgstr "" "Notes est une application simple pour créer, modifier et " "visualiser des notes. Vous pouvez également rechercher une note dans la vue " -"d'ensemble des Activités. Notes s'intègre facilement " -"dans l'application Comptes en ligne." +"d'ensemble des Activités. Notes s'intègre facilement dans l'application Comptes " +"en ligne." + +#. (itstool) path: page/media +#. This is a reference to an external file such as an image or video. When +#. the file changes, the md5 hash will change to let you know you need to +#. update your localized copy. The msgstr is not used at all. Set it to +#. whatever you like once you have updated your copy of the file. +#: C/introduction.page:44 +msgctxt "_" +msgid "" +"external ref='figures/notes-3-12.png' md5='94bd08317f7087f4012b2efd954e3b66'" +msgstr "" +"external ref='figures/notes-3-12.png' md5='94bd08317f7087f4012b2efd954e3b66'" #. (itstool) path: credit/name #: C/new-window.page:11 diff -up bijiben-3.21.2/help/hu/hu.po.webkit2 bijiben-3.21.2/help/hu/hu.po --- bijiben-3.21.2/help/hu/hu.po.webkit2 2016-05-20 21:44:14.000000000 +0200 +++ bijiben-3.21.2/help/hu/hu.po 2017-05-05 08:05:14.920352019 +0200 @@ -1,29 +1,29 @@ -# Hungarian translation of bijiben_help -# Copyright (C) 2014, 2015. Free Software Foundation, Inc. +# Hungarian translation for bijiben help. +# Copyright (C) 2014-2016 Free Software Foundation, Inc. # This file is distributed under the same license as the bijiben user help. # # Gabor Kelemen , 2014, 2015, 2016. -# Balázs Úr , 2014. +# Balázs Úr , 2014, 2016. msgid "" msgstr "" "Project-Id-Version: bijiben_help master\n" -"POT-Creation-Date: 2015-08-18 14:59+0000\n" -"PO-Revision-Date: 2016-03-19 09:09+0100\n" -"Last-Translator: Gabor Kelemen \n" +"POT-Creation-Date: 2016-06-27 14:13+0000\n" +"PO-Revision-Date: 2016-08-19 22:31+0200\n" +"Last-Translator: Balázs Úr \n" "Language-Team: Hungarian \n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 1.5\n" +"X-Generator: Lokalize 1.2\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "" -"Kelemen Gábor , 2014, 2015" -"Úr Balázs , 2014" +"Kelemen Gábor , 2014, 2015.\n" +"Úr Balázs , 2014, 2016." #. (itstool) path: credit/name #: C/colors.page:13 C/create.page:11 C/delete.page:11 C/format-list.page:11 @@ -78,12 +78,11 @@ msgstr "Michael Hill" #. (itstool) path: credit/years #: C/colors.page:29 C/create.page:22 C/create.page:27 C/cut-copy-paste.page:13 #: C/cut-copy-paste.page:18 C/cut-copy-paste.page:23 C/delete.page:27 -#: C/delete-permanent.page:13 C/delete-restore.page:13 -#: C/delete-restore.page:18 C/format-list.page:27 C/format-text.page:22 -#: C/format-text.page:27 C/introduction.page:23 C/introduction.page:28 -#: C/new-window.page:13 C/notebooks.page:22 C/notebooks.page:27 -#: C/rename.page:18 C/search.page:27 C/search.page:32 C/share.page:22 -#: C/share.page:27 +#: C/delete-permanent.page:13 C/delete-restore.page:13 C/delete-restore.page:18 +#: C/format-list.page:27 C/format-text.page:22 C/format-text.page:27 +#: C/introduction.page:23 C/introduction.page:28 C/new-window.page:13 +#: C/notebooks.page:22 C/notebooks.page:27 C/rename.page:18 C/search.page:27 +#: C/search.page:32 C/share.page:22 C/share.page:27 msgid "2014" msgstr "2014" @@ -332,39 +331,42 @@ msgstr "A Kukában lévő összes jegyze #. (itstool) path: item/p #: C/delete-permanent.page:30 -msgid "Click on the Notes icon near Activities." +#| msgid "Click on the Notes icon near Activities." +msgid "" +"Click on the Notes icon near Activities." msgstr "" -"Kattintson a Tevékenységek közelében lévő Jegyzetek " -"ikonra." +"Kattintson a Tevékenységek<" +"/gui> közelében lévő Jegyzetek ikonra." #. (itstool) path: item/p -#: C/delete-permanent.page:33 +#: C/delete-permanent.page:34 msgid "Select View Trash." msgstr "Válassza a Kuka megtekintése menüpontot." #. (itstool) path: item/p -#: C/delete-permanent.page:36 +#: C/delete-permanent.page:37 msgid "Click on Empty button in the toolbar." msgstr "Kattintson a Ürítés gombra az eszköztáron." #. (itstool) path: steps/title -#: C/delete-permanent.page:41 +#: C/delete-permanent.page:42 msgid "To delete selected notes from Trash:" msgstr "A kijelölt jegyzetek törléséhez a Kukából:" #. (itstool) path: item/p -#: C/delete-permanent.page:43 +#: C/delete-permanent.page:44 msgid "In the Trash view click Selection mode button." msgstr "" "A Kuka nézetben kattintson a Kijelölési mód gombra." #. (itstool) path: item/p -#: C/delete-permanent.page:47 +#: C/delete-permanent.page:48 msgid "Select all the notes that you want to delete permanently." msgstr "Jelölje ki az összes jegyzetet, amelyeket véglegesen törölni szeretne." #. (itstool) path: item/p -#: C/delete-permanent.page:50 +#: C/delete-permanent.page:51 msgid "Click on Permanently Delete button." msgstr "Kattintson a Végleges törlés gombra." @@ -380,9 +382,12 @@ msgstr "Jegyzetek visszaállítása" #. (itstool) path: page/p #: C/delete-restore.page:28 +#| msgid "" +#| "If you think that you have accidentally deleted a note, you can view and " +#| "restore it from Trash" msgid "" "If you think that you have accidentally deleted a note, you can view and " -"restore it from Trash" +"restore it from Trash." msgstr "" "Ha úgy érzi, véletlenül törölt egy jegyzetet, akkor a Kukában " "megnézheti és visszaállíthatja." @@ -410,7 +415,8 @@ msgstr "Kattintson a Notes is a simple application for creating, editing, and " +#| "viewing notes. You can also search for a note from the Activities overview. Notes integrates easily with Online " +#| "Accounts." msgid "" "Notes is a simple application for creating, editing, and viewing " -"notes. You can also search for a note from the Activities " -"overview. Notes integrates easily with Online Accounts." +"notes. You can also search for a note from the Activities overview. Notes integrates " +"easily with Online Accounts." msgstr "" "A Jegyzetek egy egyszerű alkalmazás jegyzetek létrehozásához, " -"szerkesztéséhez és megjelenítéséhez. A jegyzetek közt a Tevékenységek áttekintésből is kereshet. A Jegyzetek egyszerűen " -"integrálódik az Online fiókokkal." +"szerkesztéséhez és megjelenítéséhez. A jegyzetek közt a Tevékenységek áttekintőből " +"is kereshet. A Jegyzetek egyszerűen integrálódik az Online " +"fiókokkal." #. (itstool) path: credit/name #: C/new-window.page:11 @@ -690,10 +703,6 @@ msgstr "Jegyzet keresése" #. (itstool) path: page/p #: C/search.page:42 -#| msgid "" -#| "You can search your note in the New and Recent view in " -#| "Notes or find them from your Activities overview." msgid "" "You can search your notes in the New and Recent view in " "Notes or find notes from your Jegyzetek Új és legutóbbi " "nézetében, vagy a Tevékenységek áttekintésben is." +"\">Tevékenységek áttekintőben is." #. (itstool) path: steps/title #: C/search.page:47 diff -up bijiben-3.21.2/help/ko/ko.po.webkit2 bijiben-3.21.2/help/ko/ko.po --- bijiben-3.21.2/help/ko/ko.po.webkit2 2016-05-20 21:44:14.000000000 +0200 +++ bijiben-3.21.2/help/ko/ko.po 2017-05-05 08:05:14.920352019 +0200 @@ -5,16 +5,16 @@ msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"POT-Creation-Date: 2016-03-11 04:02+0000\n" -"PO-Revision-Date: 2016-03-13 03:27+0900\n" -"Last-Translator: Seong-ho Cho \n" +"POT-Creation-Date: 2016-06-27 14:13+0000\n" +"PO-Revision-Date: 2016-09-03 05:20+0900\n" +"Last-Translator: Seong-ho Cho \n" "Language-Team: GNOME Korea \n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Gtranslator 2.91.7\n" +"X-Generator: Poedit 1.8.7\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" @@ -320,36 +320,40 @@ msgstr "휴지통에 있는 모든 메 #. (itstool) path: item/p #: C/delete-permanent.page:30 -msgid "Click on the Notes icon near Activities." -msgstr "현재 활동에 있는 메모를 누르십시오." +msgid "" +"Click on the Notes icon near Activities." +msgstr "" +"현재 활동에 있는 " +"메모를 누르십시오." #. (itstool) path: item/p -#: C/delete-permanent.page:33 +#: C/delete-permanent.page:34 msgid "Select View Trash." msgstr "휴지통 보기를 선택하십시오." #. (itstool) path: item/p -#: C/delete-permanent.page:36 +#: C/delete-permanent.page:37 msgid "Click on Empty button in the toolbar." msgstr "도구 모음에서 비우기 단추를 누르십시오." #. (itstool) path: steps/title -#: C/delete-permanent.page:41 +#: C/delete-permanent.page:42 msgid "To delete selected notes from Trash:" msgstr "선택한 메모를 휴지통에서 삭제하려면:" #. (itstool) path: item/p -#: C/delete-permanent.page:43 +#: C/delete-permanent.page:44 msgid "In the Trash view click Selection mode button." msgstr "휴지통 보기에서 선택 모드 단추를 누르십시오." #. (itstool) path: item/p -#: C/delete-permanent.page:47 +#: C/delete-permanent.page:48 msgid "Select all the notes that you want to delete permanently." msgstr "완전히 삭제할 모든 메모를 선택하십시오." #. (itstool) path: item/p -#: C/delete-permanent.page:50 +#: C/delete-permanent.page:51 msgid "Click on Permanently Delete button." msgstr "완전히 삭제 단추를 누르십시오." @@ -367,10 +371,10 @@ msgstr "메모 복원" #: C/delete-restore.page:28 msgid "" "If you think that you have accidentally deleted a note, you can view and " -"restore it from Trash" +"restore it from Trash." msgstr "" -"실수로 삭제한 메모가 있는 것 같다면 휴지통에서 메모를 보고 복원할 " -"수 있습니다." +"실수로 삭제한 메모가 있는 것 같다면, 휴지통에서 메모를 보고 복원" +"할 수 있습니다." #. (itstool) path: steps/title #: C/delete-restore.page:32 @@ -394,7 +398,7 @@ msgstr "복원Notes is a simple application for creating, editing, and viewing " -"notes. You can also search for a note from the Activities " -"overview. Notes integrates easily with Online Accounts." +"notes. You can also search for a note from the Activities overview. Notes integrates " +"easily with Online Accounts." msgstr "" "메모는 메모를 새로 만들고, 편집하고, 보는 간단한 프로그램입니다. " -"현재 활동 개요에서 메모를 검색할 수도 있습니다. 메모는 " -"온라인 계정 프로그램과 쉽게 연동됩니다." +"현재 활동 개요에서 메모" +"를 검색할 수도 있습니다. 메모온라인 계정 프로그램과 " +"쉽게 연동됩니다." #. (itstool) path: credit/name #: C/new-window.page:11 diff -up bijiben-3.21.2/help/pt_BR/pt_BR.po.webkit2 bijiben-3.21.2/help/pt_BR/pt_BR.po --- bijiben-3.21.2/help/pt_BR/pt_BR.po.webkit2 2016-05-20 21:44:14.000000000 +0200 +++ bijiben-3.21.2/help/pt_BR/pt_BR.po 2017-05-05 08:05:14.921352019 +0200 @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: bijiben gnome-3-12\n" -"POT-Creation-Date: 2016-04-18 21:23+0000\n" -"PO-Revision-Date: 2016-04-18 18:25-0200\n" +"POT-Creation-Date: 2016-05-19 15:03+0000\n" +"PO-Revision-Date: 2016-09-06 02:05-0200\n" "Last-Translator: Rafael Fontenelle \n" "Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" @@ -333,40 +333,44 @@ msgstr "Para excluir permanentemente tod #. (itstool) path: item/p #: C/delete-permanent.page:30 -msgid "Click on the Notes icon near Activities." +#| msgid "Click on the Notes icon near Activities." +msgid "" +"Click on the Notes icon near Activities." msgstr "" -"Clique no ícone Notas próximo do panorama de Atividades para abrir o menu da aplicação." +"Clique no ícone Notas próximo do panorama de Atividades para abrir o menu da " +"aplicação." #. (itstool) path: item/p -#: C/delete-permanent.page:33 +#: C/delete-permanent.page:34 msgid "Select View Trash." msgstr "Selecione Visualizar lixeira." #. (itstool) path: item/p -#: C/delete-permanent.page:36 +#: C/delete-permanent.page:37 msgid "Click on Empty button in the toolbar." msgstr "" "Clique no botão Esvaziar da barra de ferramentas." #. (itstool) path: steps/title -#: C/delete-permanent.page:41 +#: C/delete-permanent.page:42 msgid "To delete selected notes from Trash:" msgstr "Para excluir as notas selecionadas da lixeira:" #. (itstool) path: item/p -#: C/delete-permanent.page:43 +#: C/delete-permanent.page:44 msgid "In the Trash view click Selection mode button." msgstr "" "Na visão da Lixeira, clique no botão Modo seleção." #. (itstool) path: item/p -#: C/delete-permanent.page:47 +#: C/delete-permanent.page:48 msgid "Select all the notes that you want to delete permanently." msgstr "Selecione as notas que você deseja excluir permanentemente." #. (itstool) path: item/p -#: C/delete-permanent.page:50 +#: C/delete-permanent.page:51 msgid "Click on Permanently Delete button." msgstr "Clique no botão Excluir permanentemente." @@ -382,12 +386,15 @@ msgstr "Restaurando notas" #. (itstool) path: page/p #: C/delete-restore.page:28 +#| msgid "" +#| "If you think that you have accidentally deleted a note, you can view and " +#| "restore it from Trash" msgid "" "If you think that you have accidentally deleted a note, you can view and " -"restore it from Trash" +"restore it from Trash." msgstr "" "Se você tiver apagado acidentalmente uma nota, você pode visualizá-la e " -"restaurá-la a partir da Lixeira" +"restaurá-la a partir da Lixeira." #. (itstool) path: steps/title #: C/delete-restore.page:32 @@ -412,7 +419,8 @@ msgstr "Clique no botão Notes is a simple application for creating, editing, and " +#| "viewing notes. You can also search for a note from the Activities overview. Notes integrates easily with Online " +#| "Accounts." msgid "" "Notes is a simple application for creating, editing, and viewing " -"notes. You can also search for a note from the Activities " -"overview. Notes integrates easily with Online Accounts." +"notes. You can also search for a note from the Activities overview. Notes integrates " +"easily with Online Accounts." msgstr "" "Notas é um aplicativo simples para criar, editar e ver notas. " -"Você também pode pesquisar por uma nota a partir do panorama de " -"Atividades. Notas integra facilmente com Contas " -"on-line." +"Você também pode pesquisar por uma nota a partir do panorama de Atividades. Notas " +"integra facilmente com Contas on-line." #. (itstool) path: credit/name #: C/new-window.page:11 @@ -692,18 +706,14 @@ msgstr "Encontrando uma nota" #. (itstool) path: page/p #: C/search.page:42 -#| msgid "" -#| "You can search your note in the New and Recent view in " -#| "Notes or find them from your Activities overview." msgid "" "You can search your notes in the New and Recent view in " "Notes or find notes from your Activities overview." msgstr "" "Você pode procurar suas notas na visão Novas e recentes do " -"Notas ou encontrá-las a partir do panorama de Atividades." +"Notas ou encontrá-las a partir do panorama de Atividades." #. (itstool) path: steps/title #: C/search.page:47 diff -up bijiben-3.21.2/po/ca@valencia.po.webkit2 bijiben-3.21.2/po/ca@valencia.po --- bijiben-3.21.2/po/ca@valencia.po.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/po/ca@valencia.po 2017-05-05 08:05:14.921352019 +0200 @@ -13,7 +13,7 @@ msgstr "" "PO-Revision-Date: 2014-09-06 23:08+0200\n" "Last-Translator: Gil Forcada \n" "Language-Team: Catalan \n" -"Language: ca-XV\n" +"Language: ca@valencia\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bits\n" diff -up bijiben-3.21.2/po/cs.po.webkit2 bijiben-3.21.2/po/cs.po --- bijiben-3.21.2/po/cs.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/cs.po 2017-05-05 08:05:14.921352019 +0200 @@ -1,49 +1,49 @@ # Czech translation for bijiben. # Copyright (C) 2013 bijiben's COPYRIGHT HOLDER # This file is distributed under the same license as the bijiben package. -# -# Marek Černocký , 2013, 2014, 2015. +# Marek Černocký , 2013, 2014, 2015, 2017. # msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" "product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-03-02 15:55+0000\n" -"PO-Revision-Date: 2015-03-02 21:40+0100\n" +"POT-Creation-Date: 2017-02-26 00:58+0000\n" +"PO-Revision-Date: 2017-03-23 20:03+0100\n" "Last-Translator: Marek Černocký \n" -"Language-Team: Czech \n" +"Language-Team: čeština \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Gtranslator 2.91.6\n" +"X-Generator: Gtranslator 2.91.7\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "" "Aplikace Poznámky je editor pro vytváření jednoduchých zápisů, které se vám " "mohou později hodit." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "Umožňuje využívat ownCloud jako místo pro ukládání a on-line editor." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Poznámky" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "poznámka;poznámky;připomenutí;blbníček;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Vylepujte si poznámky, štítkujte soubory!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Poznámky" @@ -104,6 +104,10 @@ msgstr "Poloha okna" msgid "Window position (x and y)." msgstr "Poloha okna (X a Y)." +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Bez názvu" + #: ../src/bjb-app-menu.c:46 msgid "Simple notebook for GNOME" msgstr "Jednoduchý poznámkový sešit pro GNOME" @@ -112,33 +116,35 @@ msgstr "Jednoduchý poznámkový sešit msgid "translator-credits" msgstr "Marek Černocký, " -#: ../src/bjb-bijiben.c:454 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Zobrazit verzi aplikace" -#: ../src/bjb-bijiben.c:456 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Vytvořit novou poznámku" -#: ../src/bjb-bijiben.c:458 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[SOUBOR…]" -#: ../src/bjb-bijiben.c:465 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Pořídit poznámku a exportovat ji na všechna místa." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:476 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Nelze zpracovat argumenty" -#: ../src/bjb-bijiben.c:485 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "Poznámky GNOME" -#: ../src/bjb-bijiben.c:498 +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Nelze zaregistrovat aplikaci" @@ -146,64 +152,19 @@ msgstr "Nelze zaregistrovat aplikaci" msgid "Note Color" msgstr "Barva poznámky" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Vyjmout" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Kopírovat" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Vložit" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Tučné" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Kurzíva" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Přeškrtnuté" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Kopírovat výběr do nové poznámky" - -#: ../src/bjb-empty-results-box.c:101 +#: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Žádné poznámky" -#: ../src/bjb-empty-results-box.c:145 +#: ../src/bjb-empty-results-box.c:130 msgid "Press the New button to create a note." msgstr "Zmáčknutím tlačítka Nová vytvoříte novou poznámku." -#: ../src/bjb-empty-results-box.c:167 +#: ../src/bjb-empty-results-box.c:152 msgid "Oops" msgstr "Problém" -#: ../src/bjb-empty-results-box.c:173 +#: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "nainstalujte prosím „Tracker“ a po té aplikaci restartujte." @@ -304,10 +265,6 @@ msgstr "Koš" msgid "Empty" msgstr "Vyprázdnit" -#: ../src/bjb-main-toolbar.c:659 -msgid "Untitled" -msgstr "Bez názvu" - #. #. * Open the current note in a new window #. * in order to be able to see it and others at the same time @@ -363,7 +320,7 @@ msgstr "Poznámka" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:190 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Naposledy aktualizováno %s" @@ -426,7 +383,7 @@ msgstr "Předvolby" msgid "Note Edition" msgstr "Vzhled poznámky" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Hlavní sešit" @@ -454,7 +411,7 @@ msgstr "tento rok" msgid "Unknown" msgstr "neznámo kdy" -#: ../src/libbiji/biji-notebook.c:262 +#: ../src/libbiji/biji-notebook.c:264 msgid "Local" msgstr "Místní" @@ -485,3 +442,47 @@ msgstr "O _aplikaci" #: ../src/resources/app-menu.ui.h:6 msgid "_Quit" msgstr "U_končit" + +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Vyjmout" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Kopírovat" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Vložit" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Tučné" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Kurzíva" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Přeškrtnuté" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Odrážky" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Seznam" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Kopírovat výběr do nové poznámky" diff -up bijiben-3.21.2/po/da.po.webkit2 bijiben-3.21.2/po/da.po --- bijiben-3.21.2/po/da.po.webkit2 2016-05-20 21:44:14.000000000 +0200 +++ bijiben-3.21.2/po/da.po 2017-05-05 08:05:14.922352019 +0200 @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2016-03-18 16:03+0000\n" +"Report-Msgid-Bugs-To: " +"http://bugzilla.gnome.org/enter_bug.cgi?product=bijiben&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2017-01-26 03:25+0000\n" "PO-Revision-Date: 2015-03-14 03:40+0100\n" "Last-Translator: Ask Hjorth Larsen \n" "Language-Team: Danish \n" @@ -63,7 +63,7 @@ msgstr "Hvorvidt systemets fastbredde-sk #: ../data/org.gnome.bijiben.gschema.xml.h:4 msgid "New notes color." -msgstr "Farve for nye noter" +msgstr "Farve for nye noter." #: ../data/org.gnome.bijiben.gschema.xml.h:5 msgid "" @@ -131,7 +131,7 @@ msgstr "Opret en ny note" #: ../src/bjb-bijiben.c:399 msgid "[FILE...]" -msgstr "[FIL...]" +msgstr "[FIL …]" #: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." @@ -147,6 +147,8 @@ msgstr "Kunne ikke fortolke argumenter" msgid "GNOME Notes" msgstr "GNOME Noter" +#. Translators: this is a fatal error quit message +#. * printed on the command line #: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Kunne ikke registrere programmet" @@ -246,7 +248,7 @@ msgstr "Indlæs mere" #: ../src/bjb-load-more-button.c:98 msgid "Loading..." -msgstr "Indlæser..." +msgstr "Indlæser …" #: ../src/bjb-main-toolbar.c:142 msgid "Click on items to select them" @@ -348,7 +350,7 @@ msgstr "Flyt til papirkurv" #: ../src/bjb-main-toolbar.c:872 msgid "More options…" -msgstr "Flere indstillinger…" +msgstr "Flere indstillinger …" #: ../src/bjb-main-toolbar.c:895 ../src/bjb-selection-toolbar.c:392 msgid "Note color" @@ -430,7 +432,7 @@ msgstr "Indstillinger" msgid "Note Edition" msgstr "Noteudgave" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Primær bog" @@ -490,3 +492,4 @@ msgstr "_Om" #: ../src/resources/app-menu.ui.h:6 msgid "_Quit" msgstr "_Afslut" + diff -up bijiben-3.21.2/po/en_AU.po.webkit2 bijiben-3.21.2/po/en_AU.po --- bijiben-3.21.2/po/en_AU.po.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/po/en_AU.po 2017-05-05 08:05:14.922352019 +0200 @@ -7,7 +7,7 @@ msgstr "" "PO-Revision-Date: 2015-10-07 02:08+0000\n" "Last-Translator: Michael Findlay \n" "Language-Team: Australian English en_AU\n" -"Language: \n" +"Language: en_AU\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -up bijiben-3.21.2/po/en_GB.po.webkit2 bijiben-3.21.2/po/en_GB.po --- bijiben-3.21.2/po/en_GB.po.webkit2 2017-05-05 08:05:14.922352019 +0200 +++ bijiben-3.21.2/po/en_GB.po 2017-05-05 08:05:14.922352019 +0200 @@ -0,0 +1,481 @@ +# British English translation for bijiben. +# Copyright (C) 2016 bijiben's COPYRIGHT HOLDER +# This file is distributed under the same license as the bijiben package. +# Bruce Cowan , 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: bijiben master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=bijiben&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2016-08-26 01:43+0000\n" +"PO-Revision-Date: 2016-08-29 13:08+0100\n" +"Last-Translator: Bruce Cowan \n" +"Language-Team: British English \n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Gtranslator 2.91.7\n" + +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 +msgid "Notes is an editor allowing to make simple lists for later use." +msgstr "Notes is an editor allowing to make simple lists for later use." + +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 +msgid "It allows to use ownCloud as a storage location and online editor." +msgstr "It allows to use ownCloud as a storage location and online editor." + +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 +msgid "Notes" +msgstr "Notes" + +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 +msgid "notes;reminder;" +msgstr "notes;reminder;" + +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 +msgid "Post notes, tag files!" +msgstr "Post notes, tag files!" + +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 +msgid "Note-taker" +msgstr "Note-taker" + +#: ../data/org.gnome.bijiben.gschema.xml.h:1 +msgid "Custom Font" +msgstr "Custom Font" + +#: ../data/org.gnome.bijiben.gschema.xml.h:2 +msgid "The font name set here will be used as the font when displaying notes." +msgstr "The font name set here will be used as the font when displaying notes." + +#: ../data/org.gnome.bijiben.gschema.xml.h:3 +msgid "Whether to use the system monospace font" +msgstr "Whether to use the system monospace font" + +#: ../data/org.gnome.bijiben.gschema.xml.h:4 +msgid "New notes color." +msgstr "New notes colour." + +#: ../data/org.gnome.bijiben.gschema.xml.h:5 +msgid "" +"The color name set here will be used as the color when creating new notes." +msgstr "" +"The colour name set here will be used as the colour when creating new notes." + +#: ../data/org.gnome.bijiben.gschema.xml.h:6 +msgid "Primary notes provider to use for new notes." +msgstr "Primary notes provider to use for new notes." + +#: ../data/org.gnome.bijiben.gschema.xml.h:7 +msgid "The primary notebook is the place where new notes are created." +msgstr "The primary notebook is the place where new notes are created." + +#: ../data/org.gnome.bijiben.gschema.xml.h:8 +msgid "Window maximized" +msgstr "Window maximised" + +#: ../data/org.gnome.bijiben.gschema.xml.h:9 +msgid "Window maximized state." +msgstr "Window maximised state." + +#: ../data/org.gnome.bijiben.gschema.xml.h:10 +msgid "Window size" +msgstr "Window size" + +#: ../data/org.gnome.bijiben.gschema.xml.h:11 +msgid "Window size (width and height)." +msgstr "Window size (width and height)." + +#: ../data/org.gnome.bijiben.gschema.xml.h:12 +msgid "Window position" +msgstr "Window position" + +#: ../data/org.gnome.bijiben.gschema.xml.h:13 +msgid "Window position (x and y)." +msgstr "Window position (x and y)." + +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Untitled" + +#: ../src/bjb-app-menu.c:46 +msgid "Simple notebook for GNOME" +msgstr "Simple notebook for GNOME" + +#: ../src/bjb-app-menu.c:52 +msgid "translator-credits" +msgstr "Bruce Cowan " + +#: ../src/bjb-bijiben.c:395 +msgid "Show the application's version" +msgstr "Show the application's version" + +#: ../src/bjb-bijiben.c:397 +msgid "Create a new note" +msgstr "Create a new note" + +#: ../src/bjb-bijiben.c:399 +msgid "[FILE...]" +msgstr "[FILE...]" + +#: ../src/bjb-bijiben.c:406 +msgid "Take notes and export them everywhere." +msgstr "Take notes and export them everywhere." + +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:417 +msgid "Could not parse arguments" +msgstr "Could not parse arguments" + +#: ../src/bjb-bijiben.c:426 +msgid "GNOME Notes" +msgstr "GNOME Notes" + +#: ../src/bjb-bijiben.c:439 +msgid "Could not register the application" +msgstr "Could not register the application" + +#: ../src/bjb-color-button.c:146 +msgid "Note Color" +msgstr "Note Colour" + +#. Cut +#: ../src/bjb-editor-toolbar.c:381 +msgid "Cut" +msgstr "Cut" + +#. Copy +#: ../src/bjb-editor-toolbar.c:388 +msgid "Copy" +msgstr "Copy" + +#. 'n paste +#: ../src/bjb-editor-toolbar.c:394 +msgid "Paste" +msgstr "Paste" + +#. Bullet +#. * Translator : "* " stands for a bullet list. +#. * This is displayed inside a button. +#: ../src/bjb-editor-toolbar.c:405 +msgid "* " +msgstr "* " + +#. List +#. * Translator : this "1." temporarilly stands for ordered list. +#. * This is displayed inside a button. +#: ../src/bjb-editor-toolbar.c:413 +msgid "1." +msgstr "1." + +#: ../src/bjb-editor-toolbar.c:426 +msgid "Bold" +msgstr "Bold" + +#: ../src/bjb-editor-toolbar.c:436 +msgid "Italic" +msgstr "Italic" + +#: ../src/bjb-editor-toolbar.c:446 +msgid "Strike" +msgstr "Strike" + +#: ../src/bjb-editor-toolbar.c:474 +msgid "Copy selection to a new note" +msgstr "Copy selection to a new note" + +#: ../src/bjb-empty-results-box.c:86 +msgid "No notes" +msgstr "No notes" + +#: ../src/bjb-empty-results-box.c:130 +msgid "Press the New button to create a note." +msgstr "Press the New button to create a note." + +#: ../src/bjb-empty-results-box.c:152 +msgid "Oops" +msgstr "Oops" + +#: ../src/bjb-empty-results-box.c:158 +msgid "Please install 'Tracker' then restart the application." +msgstr "Please install 'Tracker' then restart the application." + +#: ../src/bjb-import-dialog.c:309 +msgid "Custom Location" +msgstr "Custom Location" + +#: ../src/bjb-import-dialog.c:404 +msgid "Import Notes" +msgstr "Import Notes" + +#: ../src/bjb-import-dialog.c:411 +msgid "Import" +msgstr "Import" + +#: ../src/bjb-import-dialog.c:422 +msgid "Select import location" +msgstr "Select import location" + +#: ../src/bjb-import-dialog.c:443 +msgid "Tomboy application" +msgstr "Tomboy application" + +#: ../src/bjb-import-dialog.c:449 +msgid "Gnote application" +msgstr "Gnote application" + +#: ../src/bjb-load-more-button.c:72 ../src/bjb-load-more-button.c:171 +msgid "Load More" +msgstr "Load More" + +#: ../src/bjb-load-more-button.c:98 +msgid "Loading..." +msgstr "Loading..." + +#: ../src/bjb-main-toolbar.c:142 +msgid "Click on items to select them" +msgstr "Click on items to select them" + +#: ../src/bjb-main-toolbar.c:144 +#, c-format +msgid "%d selected" +msgid_plural "%d selected" +msgstr[0] "%d selected" +msgstr[1] "%d selected" + +#: ../src/bjb-main-toolbar.c:264 +msgid "Search note titles, content and notebooks" +msgstr "Search note titles, content and notebooks" + +#. Select +#: ../src/bjb-main-toolbar.c:306 +msgid "Cancel" +msgstr "Cancel" + +#: ../src/bjb-main-toolbar.c:320 +msgid "Exit selection mode" +msgstr "Exit selection mode" + +#: ../src/bjb-main-toolbar.c:350 +#, c-format +msgid "Results for %s" +msgstr "Results for %s" + +#: ../src/bjb-main-toolbar.c:353 +msgid "New and Recent" +msgstr "New and Recent" + +#. +#. * Translators : <_New> refers to new note creation. +#. * User clicks new, which opens a new blank note. +#. +#: ../src/bjb-main-toolbar.c:441 +msgid "_New" +msgstr "_New" + +#: ../src/bjb-main-toolbar.c:460 ../src/bjb-main-toolbar.c:558 +msgid "Selection mode" +msgstr "Selection mode" + +#: ../src/bjb-main-toolbar.c:495 +msgid "View notes and notebooks in a list" +msgstr "View notes and notebooks in a list" + +#: ../src/bjb-main-toolbar.c:519 +msgid "View notes and notebooks in a grid" +msgstr "View notes and notebooks in a grid" + +#: ../src/bjb-main-toolbar.c:538 +msgid "Trash" +msgstr "Wastebasket" + +#. Add Empty-Bin +#. * translators : Empty is the verb. +#. * This action permanently deletes notes +#: ../src/bjb-main-toolbar.c:577 +msgid "Empty" +msgstr "Empty" + +#. +#. * Open the current note in a new window +#. * in order to be able to see it and others at the same time +#. +#: ../src/bjb-main-toolbar.c:757 +msgid "Open in New Window" +msgstr "Open in New Window" + +#. Undo Redo separator +#: ../src/bjb-main-toolbar.c:768 +msgid "Undo" +msgstr "Undo" + +#: ../src/bjb-main-toolbar.c:776 +msgid "Redo" +msgstr "Redo" + +#. Notes tags +#: ../src/bjb-main-toolbar.c:791 ../src/bjb-organize-dialog.c:370 +#: ../src/bjb-selection-toolbar.c:381 +msgid "Notebooks" +msgstr "Notebooks" + +#. Share +#: ../src/bjb-main-toolbar.c:799 +msgid "Email this Note" +msgstr "E-mail this Note" + +#. Delete Note +#. Trash notes +#: ../src/bjb-main-toolbar.c:812 ../src/bjb-selection-toolbar.c:415 +msgid "Move to Trash" +msgstr "Move to Wastebasket" + +#: ../src/bjb-main-toolbar.c:872 +msgid "More options…" +msgstr "More options…" + +#: ../src/bjb-main-toolbar.c:895 ../src/bjb-selection-toolbar.c:392 +msgid "Note color" +msgstr "Note colour" + +#: ../src/bjb-main-view.c:516 +msgid "Notebook" +msgstr "Notebook" + +#: ../src/bjb-main-view.c:519 +msgid "Note" +msgstr "Note" + +#. Translators: %s is the note last recency description. +#. * Last updated is placed as in left to right language +#. * right to left languages might move %s +#. * '%s Last Updated' +#. +#: ../src/bjb-note-view.c:191 +#, c-format +msgid "Last updated %s" +msgstr "Last updated %s" + +#: ../src/bjb-organize-dialog.c:396 +msgid "Enter a name to create a notebook" +msgstr "Enter a name to create a notebook" + +#: ../src/bjb-organize-dialog.c:406 +msgid "New notebook" +msgstr "New notebook" + +#: ../src/bjb-rename-note.c:17 +msgid "_Cancel" +msgstr "_Cancel" + +#: ../src/bjb-rename-note.c:19 +msgid "_OK" +msgstr "_OK" + +#. Restore (do not show) +#: ../src/bjb-selection-toolbar.c:386 +msgid "Restore" +msgstr "Restore" + +#: ../src/bjb-selection-toolbar.c:403 +msgid "Share note" +msgstr "Share note" + +#. Detach +#: ../src/bjb-selection-toolbar.c:409 +msgid "Open in another window" +msgstr "Open in another window" + +#. Permanently delete (do not show ) +#: ../src/bjb-selection-toolbar.c:423 +msgid "Permanently Delete" +msgstr "Permanently Delete" + +#. Use System Font +#: ../src/bjb-settings-dialog.c:394 +msgid "Use System Font" +msgstr "Use System Font" + +#. Default font +#: ../src/bjb-settings-dialog.c:408 +msgid "Note Font" +msgstr "Note Font" + +#. Default color +#: ../src/bjb-settings-dialog.c:420 +msgid "Default Color" +msgstr "Default Colour" + +#: ../src/bjb-settings-dialog.c:466 +msgid "Preferences" +msgstr "Preferences" + +#: ../src/bjb-settings-dialog.c:498 +msgid "Note Edition" +msgstr "Note Edition" + +#: ../src/bjb-settings-dialog.c:506 +msgid "Primary Book" +msgstr "Primary Book" + +#: ../src/libbiji/biji-date-time.c:32 +msgid "Today" +msgstr "Today" + +#: ../src/libbiji/biji-date-time.c:35 +msgid "Yesterday" +msgstr "Yesterday" + +#: ../src/libbiji/biji-date-time.c:38 +msgid "This week" +msgstr "This week" + +#: ../src/libbiji/biji-date-time.c:41 +msgid "This month" +msgstr "This month" + +#: ../src/libbiji/biji-date-time.c:44 +msgid "This year" +msgstr "This year" + +#: ../src/libbiji/biji-date-time.c:46 +msgid "Unknown" +msgstr "Unknown" + +#: ../src/libbiji/biji-notebook.c:264 +msgid "Local" +msgstr "Local" + +#: ../src/libbiji/provider/biji-local-provider.c:363 +msgid "Local storage" +msgstr "Local storage" + +#: ../src/resources/app-menu.ui.h:1 +msgid "_Import Notes" +msgstr "_Import Notes" + +#: ../src/resources/app-menu.ui.h:2 +msgid "_View Trash" +msgstr "_View Wastebasket" + +#: ../src/resources/app-menu.ui.h:3 +msgid "_Preferences" +msgstr "_Preferences" + +#: ../src/resources/app-menu.ui.h:4 +msgid "_Help" +msgstr "_Help" + +#: ../src/resources/app-menu.ui.h:5 +msgid "_About" +msgstr "_About" + +#: ../src/resources/app-menu.ui.h:6 +msgid "_Quit" +msgstr "_Quit" diff -up bijiben-3.21.2/po/es.po.webkit2 bijiben-3.21.2/po/es.po --- bijiben-3.21.2/po/es.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/es.po 2017-05-05 08:05:14.923352019 +0200 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: bijiben master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-02-23 15:54+0000\n" +"POT-Creation-Date: 2016-05-19 15:03+0000\n" "PO-Revision-Date: 2015-02-23 18:50+0100\n" "Last-Translator: Daniel Mustieles \n" "Language-Team: Español; Castellano \n" @@ -20,90 +20,95 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Gtranslator 2.91.6\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "" "Notas es un editor que permite hacer listas sencillas para usarlas más tarde." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "Permite usar ownCloud como almacenamiento y editor en línea." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Notas" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "notas;recordatorio;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Publique notas y etiquete archivos" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Para tomar notas" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:1 +#: ../data/org.gnome.bijiben.gschema.xml.h:1 msgid "Custom Font" msgstr "Tipografía personalizada" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:2 +#: ../data/org.gnome.bijiben.gschema.xml.h:2 msgid "The font name set here will be used as the font when displaying notes." msgstr "" "El nombre de la tipografía aquí establecido se usará como tipografía al " "mostrar las notas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:3 +#: ../data/org.gnome.bijiben.gschema.xml.h:3 msgid "Whether to use the system monospace font" msgstr "Indica si se debe usar la tipografía monoespaciada del sistema" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:4 +#: ../data/org.gnome.bijiben.gschema.xml.h:4 msgid "New notes color." msgstr "Nuevo color de las notas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:5 +#: ../data/org.gnome.bijiben.gschema.xml.h:5 msgid "" "The color name set here will be used as the color when creating new notes." msgstr "" "El nombre del color aquí establecido se usará como el color al crear las " "notas nuevas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:6 +#: ../data/org.gnome.bijiben.gschema.xml.h:6 msgid "Primary notes provider to use for new notes." msgstr "Proveedor de notas primario que usar para las notas nuevas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:7 +#: ../data/org.gnome.bijiben.gschema.xml.h:7 msgid "The primary notebook is the place where new notes are created." msgstr "" "El cuaderno de notas primario es el lugar donde se crean las notas nuevas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:8 +#: ../data/org.gnome.bijiben.gschema.xml.h:8 msgid "Window maximized" msgstr "Ventana maximizada" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:9 +#: ../data/org.gnome.bijiben.gschema.xml.h:9 msgid "Window maximized state." msgstr "Estado maximizado de la ventana." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:10 +#: ../data/org.gnome.bijiben.gschema.xml.h:10 msgid "Window size" msgstr "Tamaño de la ventana" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:11 +#: ../data/org.gnome.bijiben.gschema.xml.h:11 msgid "Window size (width and height)." msgstr "Tamaño de la ventana (anchura y altura)." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:12 +#: ../data/org.gnome.bijiben.gschema.xml.h:12 msgid "Window position" msgstr "Posición de la ventana" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:13 +#: ../data/org.gnome.bijiben.gschema.xml.h:13 msgid "Window position (x and y)." msgstr "Posición de la ventana (X e Y)." +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Sin título" + #: ../src/bjb-app-menu.c:46 msgid "Simple notebook for GNOME" msgstr "Cuaderno de notas sencillo para GNOME" @@ -112,33 +117,33 @@ msgstr "Cuaderno de notas sencillo para msgid "translator-credits" msgstr "Daniel Mustieles , 2012, 2013" -#: ../src/bjb-bijiben.c:454 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Mostrar la versión de la aplicación" -#: ../src/bjb-bijiben.c:456 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Crear una nota nueva" -#: ../src/bjb-bijiben.c:458 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[ARCHIVO…]" -#: ../src/bjb-bijiben.c:465 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Tomar notas y exportarlas a cualquier parte." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:476 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "No se pudieron analizar los argumentos" -#: ../src/bjb-bijiben.c:485 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "Notas de GNOME" -#: ../src/bjb-bijiben.c:498 +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "No se pudo registrar la aplicación" @@ -191,19 +196,19 @@ msgstr "Tachada" msgid "Copy selection to a new note" msgstr "Copiar selección a una nota nueva" -#: ../src/bjb-empty-results-box.c:101 +#: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "No hay notas" -#: ../src/bjb-empty-results-box.c:145 +#: ../src/bjb-empty-results-box.c:130 msgid "Press the New button to create a note." msgstr "Pulse el botón «Nueva» para crear una nota." -#: ../src/bjb-empty-results-box.c:167 +#: ../src/bjb-empty-results-box.c:152 msgid "Oops" msgstr "Vaya" -#: ../src/bjb-empty-results-box.c:173 +#: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "Instale «Tracker» y reinicie la aplicación." @@ -303,10 +308,6 @@ msgstr "Papelera" msgid "Empty" msgstr "Vaciar" -#: ../src/bjb-main-toolbar.c:659 -msgid "Untitled" -msgstr "Sin título" - #. #. * Open the current note in a new window #. * in order to be able to see it and others at the same time @@ -362,7 +363,7 @@ msgstr "Nota" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:190 +#: ../src/bjb-note-view.c:191 #, c-format msgid "Last updated %s" msgstr "Última actualización %s" @@ -425,7 +426,7 @@ msgstr "Preferencias" msgid "Note Edition" msgstr "Edición de la nota" -#: ../src/bjb-settings-dialog.c:501 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Libro principal" @@ -453,7 +454,7 @@ msgstr "Este año" msgid "Unknown" msgstr "Desconocida" -#: ../src/libbiji/biji-notebook.c:262 +#: ../src/libbiji/biji-notebook.c:264 msgid "Local" msgstr "Local" diff -up bijiben-3.21.2/po/fa.po.webkit2 bijiben-3.21.2/po/fa.po --- bijiben-3.21.2/po/fa.po.webkit2 2017-05-05 08:05:14.924352019 +0200 +++ bijiben-3.21.2/po/fa.po 2017-05-05 08:05:14.924352019 +0200 @@ -0,0 +1,485 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Arash Mousavi , 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=bijiben&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2016-09-09 16:42+0430\n" +"PO-Revision-Date: 2016-09-09 16:59+0430\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 1.8.8\n" +"Last-Translator: Arash Mousavi \n" +"Language: fa_IR\n" + +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 +msgid "Notes is an editor allowing to make simple lists for later use." +msgstr "" +"«یادداشت‌ها» یک ویرایشگر است که به شما اجازه ذخیره فهرست‌های ساده برای " +"استفاده در آینده را می‌دهد." + +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 +msgid "It allows to use ownCloud as a storage location and online editor." +msgstr "" +"به شما امکان استفاده از ownCloud به عنوان فضای ذخیره‌سازی و ویرایشگر برخط را " +"می‌دهد." + +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 +msgid "Notes" +msgstr "یادداشت‌ها" + +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 +msgid "notes;reminder;" +msgstr "notes;reminder;یادداشت‌ها;یادآوری;" + +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 +msgid "Post notes, tag files!" +msgstr "یادداشت ارسال کنید، پرونده‌ها را برچست بزنید!" + +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 +msgid "Note-taker" +msgstr "یادداشت گیر" + +#: ../data/org.gnome.bijiben.gschema.xml.h:1 +msgid "Custom Font" +msgstr "قلم سفارشی" + +#: ../data/org.gnome.bijiben.gschema.xml.h:2 +msgid "The font name set here will be used as the font when displaying notes." +msgstr "نام قلمی که اینجا تنظیم شود برای نمایش یادداشت‌ها استفاده می‌شود." + +#: ../data/org.gnome.bijiben.gschema.xml.h:3 +msgid "Whether to use the system monospace font" +msgstr "اینکه آیا از قلم monospace سیستم استفاده شود یا خیر" + +#: ../data/org.gnome.bijiben.gschema.xml.h:4 +msgid "New notes color." +msgstr "رنگ یادداشت‌های جدید." + +#: ../data/org.gnome.bijiben.gschema.xml.h:5 +msgid "" +"The color name set here will be used as the color when creating new notes." +msgstr "" +"نام رنگی که اینجا ثبت شود برای رنگ یادداشت‌هایی جدیدی که ساخته می‌شوند " +"استفاده خواهد شد." + +#: ../data/org.gnome.bijiben.gschema.xml.h:6 +msgid "Primary notes provider to use for new notes." +msgstr "فراهم‌کننده یادداشت اصلی برای استفاده در یادداشت‌های جدید" + +#: ../data/org.gnome.bijiben.gschema.xml.h:7 +msgid "The primary notebook is the place where new notes are created." +msgstr "دفترچه اصلی که یادداشت‌های جدید ساخته شده در آن قرار گیرند." + +#: ../data/org.gnome.bijiben.gschema.xml.h:8 +msgid "Window maximized" +msgstr "پنجره بیشینه شد" + +#: ../data/org.gnome.bijiben.gschema.xml.h:9 +msgid "Window maximized state." +msgstr "حالت بیشینه پنجره" + +#: ../data/org.gnome.bijiben.gschema.xml.h:10 +msgid "Window size" +msgstr "اندازه پنجره" + +#: ../data/org.gnome.bijiben.gschema.xml.h:11 +msgid "Window size (width and height)." +msgstr "اندازه پنجره (طول و ارتفاع)" + +#: ../data/org.gnome.bijiben.gschema.xml.h:12 +msgid "Window position" +msgstr "مکان پنجره" + +#: ../data/org.gnome.bijiben.gschema.xml.h:13 +msgid "Window position (x and y)." +msgstr "مکان پنجره (x و y)" + +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "بدون عنوان" + +#: ../src/bjb-app-menu.c:46 +msgid "Simple notebook for GNOME" +msgstr "یک دفترچه یادداشت ساده برای گنوم" + +#: ../src/bjb-app-menu.c:52 +msgid "translator-credits" +msgstr "آرش موسوی " + +#: ../src/bjb-bijiben.c:395 +msgid "Show the application's version" +msgstr "نمایش نسخه برنامه‌ها" + +#: ../src/bjb-bijiben.c:397 +msgid "Create a new note" +msgstr "ساخت یا یادداشت جدید" + +#: ../src/bjb-bijiben.c:399 +msgid "[FILE...]" +msgstr "[FILE...]" + +#: ../src/bjb-bijiben.c:406 +msgid "Take notes and export them everywhere." +msgstr "یادداشت کنید و خروجی آنها را هرجایی با خود داشته باشید." + +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:417 +msgid "Could not parse arguments" +msgstr "امکان تجزیه متغیرها نبود" + +#: ../src/bjb-bijiben.c:426 +msgid "GNOME Notes" +msgstr "یادداشت‌های گنوم" + +#: ../src/bjb-bijiben.c:439 +msgid "Could not register the application" +msgstr "امکان ثبت برنامه نبود" + +#: ../src/bjb-color-button.c:146 +msgid "Note Color" +msgstr "رنگ یادداشت" + +#. Cut +#: ../src/bjb-editor-toolbar.c:381 +msgid "Cut" +msgstr "برش" + +#. Copy +#: ../src/bjb-editor-toolbar.c:388 +msgid "Copy" +msgstr "رونوشت" + +#. 'n paste +#: ../src/bjb-editor-toolbar.c:394 +msgid "Paste" +msgstr "چسباندن" + +#. Bullet +#. * Translator : "* " stands for a bullet list. +#. * This is displayed inside a button. +#: ../src/bjb-editor-toolbar.c:405 +msgid "* " +msgstr "* " + +#. List +#. * Translator : this "1." temporarilly stands for ordered list. +#. * This is displayed inside a button. +#: ../src/bjb-editor-toolbar.c:413 +msgid "1." +msgstr "۱." + +#: ../src/bjb-editor-toolbar.c:426 +msgid "Bold" +msgstr "پررنگ" + +#: ../src/bjb-editor-toolbar.c:436 +msgid "Italic" +msgstr "مورب" + +#: ../src/bjb-editor-toolbar.c:446 +msgid "Strike" +msgstr "زیرخط" + +#: ../src/bjb-editor-toolbar.c:474 +msgid "Copy selection to a new note" +msgstr "رونوشت انتخاب شده به یک یادداشت جدید" + +#: ../src/bjb-empty-results-box.c:86 +msgid "No notes" +msgstr "هیچ یادداشتی موجود نیست" + +#: ../src/bjb-empty-results-box.c:130 +msgid "Press the New button to create a note." +msgstr "دکمه یادداشت جدید را برای ساخت یک یادداشت فشار دهید." + +#: ../src/bjb-empty-results-box.c:152 +msgid "Oops" +msgstr "اُخ!" + +#: ../src/bjb-empty-results-box.c:158 +msgid "Please install 'Tracker' then restart the application." +msgstr "لطفا ابتدا «Tracker» را نصب کنید سپس برنامه را دوباره باز کنید." + +#: ../src/bjb-import-dialog.c:309 +msgid "Custom Location" +msgstr "مکان‌های سفارشی" + +#: ../src/bjb-import-dialog.c:404 +msgid "Import Notes" +msgstr "وارد کردن یادداشت‌ها" + +#: ../src/bjb-import-dialog.c:411 +msgid "Import" +msgstr "وارد کردن" + +#: ../src/bjb-import-dialog.c:422 +msgid "Select import location" +msgstr "انتخاب مکان برای وارد کردن" + +#: ../src/bjb-import-dialog.c:443 +msgid "Tomboy application" +msgstr "برنامه Tomboy" + +#: ../src/bjb-import-dialog.c:449 +msgid "Gnote application" +msgstr "برنامه Gnote" + +#: ../src/bjb-load-more-button.c:72 ../src/bjb-load-more-button.c:171 +msgid "Load More" +msgstr "بارگیری بیشتر" + +#: ../src/bjb-load-more-button.c:98 +msgid "Loading..." +msgstr "در حال بار کردن…" + +#: ../src/bjb-main-toolbar.c:142 +msgid "Click on items to select them" +msgstr "بر روی موارد کلیک کنید تا انتخاب شوند" + +#: ../src/bjb-main-toolbar.c:144 +#, c-format +msgid "%d selected" +msgid_plural "%d selected" +msgstr[0] "تعداد %Id مورد انتخاب شدند" + +#: ../src/bjb-main-toolbar.c:264 +msgid "Search note titles, content and notebooks" +msgstr "جست‌وجو عنوان، متن و دفترچه‌های یادداشت" + +#. Select +#: ../src/bjb-main-toolbar.c:306 +msgid "Cancel" +msgstr "لغو" + +#: ../src/bjb-main-toolbar.c:320 +msgid "Exit selection mode" +msgstr "خروج از حالت انتخاب" + +#: ../src/bjb-main-toolbar.c:350 +#, c-format +msgid "Results for %s" +msgstr "نتایج برای %s" + +#: ../src/bjb-main-toolbar.c:353 +msgid "New and Recent" +msgstr "موارد جدید و اخیر" + +#. +#. * Translators : <_New> refers to new note creation. +#. * User clicks new, which opens a new blank note. +#. +#: ../src/bjb-main-toolbar.c:441 +msgid "_New" +msgstr "_جدید" + +#: ../src/bjb-main-toolbar.c:460 ../src/bjb-main-toolbar.c:558 +msgid "Selection mode" +msgstr "حالت انتخاب" + +#: ../src/bjb-main-toolbar.c:495 +msgid "View notes and notebooks in a list" +msgstr "نمایش یادداشت‌ها و دفترچه‌ها در یک فهرست" + +#: ../src/bjb-main-toolbar.c:519 +msgid "View notes and notebooks in a grid" +msgstr "نمایش یادداشت‌ها و دفترچه‌ها در یک شبکه" + +#: ../src/bjb-main-toolbar.c:538 +msgid "Trash" +msgstr "زباله‌دان" + +#. Add Empty-Bin +#. * translators : Empty is the verb. +#. * This action permanently deletes notes +#: ../src/bjb-main-toolbar.c:577 +msgid "Empty" +msgstr "تخلیه" + +#. +#. * Open the current note in a new window +#. * in order to be able to see it and others at the same time +#. +#: ../src/bjb-main-toolbar.c:757 +msgid "Open in New Window" +msgstr "باز کردن در یک پنجره جدید" + +#. Undo Redo separator +#: ../src/bjb-main-toolbar.c:768 +msgid "Undo" +msgstr "برگردان" + +#: ../src/bjb-main-toolbar.c:776 +msgid "Redo" +msgstr "انجام دوباره" + +#. Notes tags +#: ../src/bjb-main-toolbar.c:791 ../src/bjb-organize-dialog.c:370 +#: ../src/bjb-selection-toolbar.c:381 +msgid "Notebooks" +msgstr "دفترچه‌ها" + +#. Share +#: ../src/bjb-main-toolbar.c:799 +msgid "Email this Note" +msgstr "ارسال پست‌الکترونیکی این یادداشت" + +#. Delete Note +#. Trash notes +#: ../src/bjb-main-toolbar.c:812 ../src/bjb-selection-toolbar.c:415 +msgid "Move to Trash" +msgstr "انداختن در زباله‌دان" + +#: ../src/bjb-main-toolbar.c:872 +msgid "More options…" +msgstr "گزینه‌های بیشتر…" + +#: ../src/bjb-main-toolbar.c:895 ../src/bjb-selection-toolbar.c:392 +msgid "Note color" +msgstr "رنگ یادداشت" + +#: ../src/bjb-main-view.c:516 +msgid "Notebook" +msgstr "دفترچه" + +#: ../src/bjb-main-view.c:519 +msgid "Note" +msgstr "یادداشت" + +#. Translators: %s is the note last recency description. +#. * Last updated is placed as in left to right language +#. * right to left languages might move %s +#. * '%s Last Updated' +#. +#: ../src/bjb-note-view.c:191 +#, c-format +msgid "Last updated %s" +msgstr "آخرین بروزرسانی %s" + +#: ../src/bjb-organize-dialog.c:396 +msgid "Enter a name to create a notebook" +msgstr "یک نام وارد کنید تا یادداشت را بسازید" + +#: ../src/bjb-organize-dialog.c:406 +msgid "New notebook" +msgstr "یادداشت جدید" + +#: ../src/bjb-rename-note.c:17 +msgid "_Cancel" +msgstr "_لغو" + +#: ../src/bjb-rename-note.c:19 +msgid "_OK" +msgstr "_تایید" + +#. Restore (do not show) +#: ../src/bjb-selection-toolbar.c:386 +msgid "Restore" +msgstr "بازآوری" + +#: ../src/bjb-selection-toolbar.c:403 +msgid "Share note" +msgstr "اشتراک‌گذاری یادداشت" + +#. Detach +#: ../src/bjb-selection-toolbar.c:409 +msgid "Open in another window" +msgstr "بازکردن در یک پنجره دیگر" + +#. Permanently delete (do not show ) +#: ../src/bjb-selection-toolbar.c:423 +msgid "Permanently Delete" +msgstr "حذف برای همیشه" + +#. Use System Font +#: ../src/bjb-settings-dialog.c:394 +msgid "Use System Font" +msgstr "استفاده از قلم سیستم" + +#. Default font +#: ../src/bjb-settings-dialog.c:408 +msgid "Note Font" +msgstr "قلم یادداشت‌ها" + +#. Default color +#: ../src/bjb-settings-dialog.c:420 +msgid "Default Color" +msgstr "رنگ پیش‌فرض" + +#: ../src/bjb-settings-dialog.c:466 +msgid "Preferences" +msgstr "ترجیحات" + +#: ../src/bjb-settings-dialog.c:498 +msgid "Note Edition" +msgstr "ویرایش یادداشت" + +#: ../src/bjb-settings-dialog.c:506 +msgid "Primary Book" +msgstr "کتاب اصلی" + +#: ../src/libbiji/biji-date-time.c:32 +msgid "Today" +msgstr "امروز" + +#: ../src/libbiji/biji-date-time.c:35 +msgid "Yesterday" +msgstr "دیروز" + +#: ../src/libbiji/biji-date-time.c:38 +msgid "This week" +msgstr "این هفته" + +#: ../src/libbiji/biji-date-time.c:41 +msgid "This month" +msgstr "این ماه" + +#: ../src/libbiji/biji-date-time.c:44 +msgid "This year" +msgstr "امسال" + +#: ../src/libbiji/biji-date-time.c:46 +msgid "Unknown" +msgstr "نامعلوم" + +#: ../src/libbiji/biji-notebook.c:264 +msgid "Local" +msgstr "محلی" + +#: ../src/libbiji/provider/biji-local-provider.c:363 +msgid "Local storage" +msgstr "ذخیره‌سازی محلی" + +#: ../src/resources/app-menu.ui.h:1 +msgid "_Import Notes" +msgstr "_وارد کردن یادداشت‌ها" + +#: ../src/resources/app-menu.ui.h:2 +msgid "_View Trash" +msgstr "_نمایش زباله‌دان" + +#: ../src/resources/app-menu.ui.h:3 +msgid "_Preferences" +msgstr "_ترجیحات" + +#: ../src/resources/app-menu.ui.h:4 +msgid "_Help" +msgstr "_راهنما" + +#: ../src/resources/app-menu.ui.h:5 +msgid "_About" +msgstr "_درباره" + +#: ../src/resources/app-menu.ui.h:6 +msgid "_Quit" +msgstr "_خروج" diff -up bijiben-3.21.2/po/id.po.webkit2 bijiben-3.21.2/po/id.po --- bijiben-3.21.2/po/id.po.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/po/id.po 2017-05-05 08:05:14.924352019 +0200 @@ -6,10 +6,10 @@ msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" "product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-09-01 02:59+0000\n" -"PO-Revision-Date: 2015-09-01 15:47+0700\n" +"POT-Creation-Date: 2017-02-26 00:58+0000\n" +"PO-Revision-Date: 2017-03-20 00:19+0700\n" "Last-Translator: Andika Triwidada \n" "Language-Team: Indonesian \n" "Language: id\n" @@ -17,34 +17,35 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 1.6.10\n" +"X-Generator: Poedit 1.8.12\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "" "Catatan adalah suatu penyunting yang memungkinkan membuat daftar sederhana " "untuk dipakai nanti." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "" "Itu mengijinkan penggunaan ownCloud sebagai lokasi penyimpanan dan " "penyunting daring." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Catatan" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "catatan;pengingat;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Kirim catatan, tag berkas!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Perekam catatan" @@ -117,33 +118,35 @@ msgstr "Buku catatan sederhana bagi GNOM msgid "translator-credits" msgstr "Andika Triwidada , 2013, 2014" -#: ../src/bjb-bijiben.c:409 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Tampilkan versi aplikasi" -#: ../src/bjb-bijiben.c:411 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Buat catatan baru" -#: ../src/bjb-bijiben.c:413 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[BERKAS...]" -#: ../src/bjb-bijiben.c:420 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Merekam catatan dan mengekspor mereka kemana-mana." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:431 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Tak bisa mengurai argumen" -#: ../src/bjb-bijiben.c:440 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "GNOME Catatan" -#: ../src/bjb-bijiben.c:453 +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Tak bisa mendaftarkan aplikasi" @@ -151,51 +154,6 @@ msgstr "Tak bisa mendaftarkan aplikasi" msgid "Note Color" msgstr "Warna Catatan" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Potong" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Salin" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Tempel" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Tebal" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Miring" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Coret" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Salin pilihan ke catatan baru" - #: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Tiada catatan" @@ -362,7 +320,7 @@ msgstr "Catatan" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:191 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Terakhir diperbarui %s" @@ -425,7 +383,7 @@ msgstr "Preferensi" msgid "Note Edition" msgstr "Edisi Catatan" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Buku Primer" @@ -484,3 +442,47 @@ msgstr "Tent_ang" #: ../src/resources/app-menu.ui.h:6 msgid "_Quit" msgstr "_Keluar" + +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Potong" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Salin" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Tempel" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Tebal" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Miring" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Coret" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Bulet" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Daftar" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Salin pilihan ke catatan baru" diff -up bijiben-3.21.2/po/kk.po.webkit2 bijiben-3.21.2/po/kk.po --- bijiben-3.21.2/po/kk.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/kk.po 2017-05-05 08:05:14.924352019 +0200 @@ -1,15 +1,15 @@ # Kazakh translation for bijiben. # Copyright (C) 2014 bijiben's COPYRIGHT HOLDER # This file is distributed under the same license as the bijiben package. -# Baurzhan Muftakhidinov , 2014. +# Baurzhan Muftakhidinov , 2014-2017. # msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" "product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-03-02 03:55+0000\n" -"PO-Revision-Date: 2015-03-02 12:10+0500\n" +"POT-Creation-Date: 2017-02-26 00:58+0000\n" +"PO-Revision-Date: 2017-03-12 08:23+0500\n" "Last-Translator: Baurzhan Muftakhidinov \n" "Language-Team: Kazakh \n" "Language: kk\n" @@ -17,32 +17,33 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 1.7.4\n" +"X-Generator: Poedit 1.8.12\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "Естеліктер қарапайым тізімдерді жасауға келетін түзеткіш қолданбасы." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "" "Ол ownCloud сияқты қызметтерді сақтау жері және онлайн түзеткіші ретінде " "қолдануға рұқсат етеді." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Естеліктер" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" -msgstr "естеліктер;еске салу;" +msgstr "notes;reminder;естеліктер;еске салу;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Естеліктерді жариялау, файлдарға тегтерді беру!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Естеліктерді сақтау" @@ -99,6 +100,10 @@ msgstr "Терезе орны" msgid "Window position (x and y)." msgstr "Терезе орны (x және y)." +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Атаусыз" + #: ../src/bjb-app-menu.c:46 msgid "Simple notebook for GNOME" msgstr "GNOME үшін қарапайым блокнот" @@ -107,33 +112,35 @@ msgstr "GNOME үшін қарапайы msgid "translator-credits" msgstr "Baurzhan Muftakhidinov " -#: ../src/bjb-bijiben.c:454 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Қолданба нұсқасын көрсету" -#: ../src/bjb-bijiben.c:456 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Жаңа жазбаны жасау" -#: ../src/bjb-bijiben.c:458 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[ФАЙЛ...]" -#: ../src/bjb-bijiben.c:465 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Естеліктерді жасап, оларды экспорттаңыз." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:476 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Аргументтерді талдау мүмкін емес" -#: ../src/bjb-bijiben.c:485 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "GNOME естеліктері" -#: ../src/bjb-bijiben.c:498 +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Қолданбаны тіркеу мүмкін емес" @@ -141,64 +148,19 @@ msgstr "Қолданбаны тірке msgid "Note Color" msgstr "Естелік түсі" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Қиып алу" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Көшіріп алу" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Кірістіру" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Жуан" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Көлбеу" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Сызылған" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Таңдалғанды жаңа естелікке көшіріп алу" - -#: ../src/bjb-empty-results-box.c:101 +#: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Естеліктер жоқ" -#: ../src/bjb-empty-results-box.c:145 +#: ../src/bjb-empty-results-box.c:130 msgid "Press the New button to create a note." msgstr "Естелікті жасау үшін Жаңа батырмасын басыңыз." -#: ../src/bjb-empty-results-box.c:167 +#: ../src/bjb-empty-results-box.c:152 msgid "Oops" msgstr "Қап" -#: ../src/bjb-empty-results-box.c:173 +#: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "'Tracker' қолданбасын орнатып, бұл қолданбаны қайта іске қосыңыз." @@ -297,10 +259,6 @@ msgstr "Қоқыс шелегі" msgid "Empty" msgstr "Бос" -#: ../src/bjb-main-toolbar.c:659 -msgid "Untitled" -msgstr "Атаусыз" - #. #. * Open the current note in a new window #. * in order to be able to see it and others at the same time @@ -356,7 +314,7 @@ msgstr "Естелік" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:190 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Соңғы жаңартылған %s" @@ -419,7 +377,7 @@ msgstr "Баптаулар" msgid "Note Edition" msgstr "Естелік нұсқасы" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Басты кітап" @@ -447,7 +405,7 @@ msgstr "Биыл" msgid "Unknown" msgstr "Белгісіз" -#: ../src/libbiji/biji-notebook.c:262 +#: ../src/libbiji/biji-notebook.c:264 msgid "Local" msgstr "Жергілікті" @@ -479,8 +437,49 @@ msgstr "О_сы туралы" msgid "_Quit" msgstr "_Шығу" -#~ msgid "Bullets" -#~ msgstr "Тізім маркерлері" +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Қиып алу" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Көшіріп алу" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Кірістіру" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Жуан" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Көлбеу" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Сызылған" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Тізім маркерлері" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Тізім" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Таңдалғанды жаңа естелікке көшіріп алу" #~ msgid "Numbered List" #~ msgstr "Нөмірленген тізім" diff -up bijiben-3.21.2/po/LINGUAS.webkit2 bijiben-3.21.2/po/LINGUAS --- bijiben-3.21.2/po/LINGUAS.webkit2 2016-05-23 21:52:20.000000000 +0200 +++ bijiben-3.21.2/po/LINGUAS 2017-05-05 08:05:14.921352019 +0200 @@ -10,10 +10,12 @@ da de el en_AU +en_GB eo es et eu +fa fi fr fur diff -up bijiben-3.21.2/po/lt.po.webkit2 bijiben-3.21.2/po/lt.po --- bijiben-3.21.2/po/lt.po.webkit2 2016-02-01 22:06:10.000000000 +0100 +++ bijiben-3.21.2/po/lt.po 2017-05-05 08:05:14.924352019 +0200 @@ -1,15 +1,15 @@ # Lithuanian translation for bijiben. # Copyright (C) 2013 bijiben's COPYRIGHT HOLDER # This file is distributed under the same license as the bijiben package. -# Aurimas Černius , 2013, 2014, 2015. +# Aurimas Černius , 2013, 2014, 2015, 2017. # msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" "product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2016-01-05 04:03+0000\n" -"PO-Revision-Date: 2016-01-05 12:47+0200\n" +"POT-Creation-Date: 2017-02-26 00:58+0000\n" +"PO-Revision-Date: 2017-03-10 22:19+0200\n" "Last-Translator: Aurimas Černius \n" "Language-Team: Lietuvių \n" "Language: lt\n" @@ -18,33 +18,34 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Poedit 1.8.6\n" +"X-Generator: Gtranslator 2.91.7\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "" "Rašteliai yra redaktorius, leidžiantis sukurti paprastus sąrašus vėlesniam " "panaudojimui." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "" "Jis leidžia naudoti ownCloud kaip saugyklos vietą ir internetinį redaktorių." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Rašteliai" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "rašteliai;priminimai;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Rašykite raštelius, žymėkite failus!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Užrašinė" @@ -115,33 +116,35 @@ msgstr "" "išvertė:\n" "Aurimas Černius " -#: ../src/bjb-bijiben.c:409 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Rodyti programos versiją" -#: ../src/bjb-bijiben.c:411 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Sukurti naują raštelį" -#: ../src/bjb-bijiben.c:413 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[FAILAS...]" -#: ../src/bjb-bijiben.c:420 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Imkite raštelius ir eksportuokite juos visur." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:431 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Nepavyko perskaityti argumentų" -#: ../src/bjb-bijiben.c:440 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "GNOME rašteliai" -#: ../src/bjb-bijiben.c:453 +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Nepavyko priregistruoti programos" @@ -149,51 +152,6 @@ msgstr "Nepavyko priregistruoti programo msgid "Note Color" msgstr "Raštelio spalva" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Iškirpti" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Kopijuoti" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Įdėti" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Pusjuodis" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Kursyvas" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Perbrauktas" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Kopijuoti žymėjimą į naują raštelį" - #: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Nėra raštelių" @@ -362,7 +320,7 @@ msgstr "Raštelis" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:191 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Paskutinis atnaujinimas %s" @@ -425,7 +383,7 @@ msgstr "Nuostatos" msgid "Note Edition" msgstr "Raštelio redakcija" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Pirminė knyga" @@ -485,8 +443,49 @@ msgstr "_Apie" msgid "_Quit" msgstr "Iš_eiti" -#~ msgid "Bullets" -#~ msgstr "Punktai" +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Iškirpti" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Kopijuoti" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Įdėti" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Pusjuodis" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Kursyvas" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Perbrauktas" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Punktai" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Sąrašas" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Kopijuoti žymėjimą į naują raštelį" #~ msgid "Numbered List" #~ msgstr "Numeruotas sąrašas" diff -up bijiben-3.21.2/po/nb.po.webkit2 bijiben-3.21.2/po/nb.po --- bijiben-3.21.2/po/nb.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/nb.po 2017-05-05 08:05:14.924352019 +0200 @@ -11,7 +11,7 @@ msgstr "" "PO-Revision-Date: 2015-03-09 19:34+0100\n" "Last-Translator: Kjartan Maraas \n" "Language-Team: Norwegian bokmål \n" -"Language: \n" +"Language: nb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -up bijiben-3.21.2/po/ne.po.webkit2 bijiben-3.21.2/po/ne.po --- bijiben-3.21.2/po/ne.po.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/po/ne.po 2017-05-05 08:05:14.924352019 +0200 @@ -11,7 +11,7 @@ msgstr "" "PO-Revision-Date: 2014-09-22 05:21+0400\n" "Last-Translator: Pawan Chitrakar \n" "Language-Team: Nepali Translation Team \n" -"Language: \n" +"Language: ne\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -up bijiben-3.21.2/po/pl.po.webkit2 bijiben-3.21.2/po/pl.po --- bijiben-3.21.2/po/pl.po.webkit2 2016-05-20 21:44:14.000000000 +0200 +++ bijiben-3.21.2/po/pl.po 2017-05-05 08:05:14.924352019 +0200 @@ -1,28 +1,24 @@ -# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -# Aviary.pl -# Jeśli masz jakiekolwiek uwagi odnoszące się do tłumaczenia lub chcesz -# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas: -# gnomepl@aviary.pl -# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -# Piotr Drąg , 2012-2016. +# Polish translation for bijiben. +# Copyright © 2012-2017 the bijiben authors. +# This file is distributed under the same license as the bijiben package. +# Piotr Drąg , 2012-2017. # Paweł Żołnowski , 2014-2015. -# Aviary.pl , 2012-2016. +# Aviary.pl , 2012-2017. +# msgid "" msgstr "" "Project-Id-Version: bijiben\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-07 20:11+0200\n" -"PO-Revision-Date: 2016-04-07 20:12+0200\n" +"POT-Creation-Date: 2017-02-26 17:50+0100\n" +"PO-Revision-Date: 2017-02-26 17:51+0100\n" "Last-Translator: Piotr Drąg \n" -"Language-Team: Polish \n" +"Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -"X-Poedit-Language: Polish\n" -"X-Poedit-Country: Poland\n" #: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." @@ -32,7 +28,7 @@ msgstr "" #: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "" -"Umożliwia używanie usługi ownCloud do przechowywania i modyfikowania notatek." +"Umożliwia używanie usługi ownCloud do przechowywania i modyfikowania notatek." #: ../data/org.gnome.bijiben.desktop.in.in.h:1 #: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 @@ -58,11 +54,11 @@ msgstr "Własna czcionka" #: ../data/org.gnome.bijiben.gschema.xml.h:2 msgid "The font name set here will be used as the font when displaying notes." -msgstr "Podana tutaj czcionka zostanie użyta w wyświetlanych notatkach." +msgstr "Podana tutaj czcionka zostanie użyta w wyświetlanych notatkach." #: ../data/org.gnome.bijiben.gschema.xml.h:3 msgid "Whether to use the system monospace font" -msgstr "Użycie systemowej czcionki o stałej szerokości" +msgstr "Użycie systemowej czcionki o stałej szerokości" #: ../data/org.gnome.bijiben.gschema.xml.h:4 msgid "New notes color." @@ -79,7 +75,7 @@ msgstr "Główny notatnik dla nowych not #: ../data/org.gnome.bijiben.gschema.xml.h:7 msgid "The primary notebook is the place where new notes are created." -msgstr "W głównym notatniku tworzone są nowe notatki." +msgstr "W głównym notatniku tworzone są nowe notatki." #: ../data/org.gnome.bijiben.gschema.xml.h:8 msgid "Window maximized" @@ -95,7 +91,7 @@ msgstr "Rozmiar okna" #: ../data/org.gnome.bijiben.gschema.xml.h:11 msgid "Window size (width and height)." -msgstr "Rozmiar okna (szerokość i wysokość)." +msgstr "Rozmiar okna (szerokość i wysokość)." #: ../data/org.gnome.bijiben.gschema.xml.h:12 msgid "Window position" @@ -103,7 +99,7 @@ msgstr "Położenie okna" #: ../data/org.gnome.bijiben.gschema.xml.h:13 msgid "Window position (x and y)." -msgstr "Położenie okna (na osi X i Y)." +msgstr "Położenie okna (na osi X i Y)." #: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 msgid "Untitled" @@ -116,9 +112,9 @@ msgstr "Prosty notatnik dla środowiska #: ../src/bjb-app-menu.c:52 msgid "translator-credits" msgstr "" -"Piotr Drąg , 2012-2016\n" +"Piotr Drąg , 2012-2017\n" "Paweł Żołnowski , 2014-2015\n" -"Aviary.pl , 2012-2016" +"Aviary.pl , 2012-2017" #: ../src/bjb-bijiben.c:395 msgid "Show the application's version" @@ -134,7 +130,7 @@ msgstr "[PLIK…]" #: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." -msgstr "Umożliwia robienie i eksportowanie notatek." +msgstr "Umożliwia robienie i eksportowanie notatek." #. Translators: this is a fatal error quit message #. * printed on the command line @@ -146,6 +142,8 @@ msgstr "Nie można przetworzyć parametr msgid "GNOME Notes" msgstr "Notatki GNOME" +#. Translators: this is a fatal error quit message +#. * printed on the command line #: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Nie można zarejestrować programu" @@ -154,51 +152,6 @@ msgstr "Nie można zarejestrować progra msgid "Note Color" msgstr "Kolor notatki" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Wytnij" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Skopiuj" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Wklej" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Pogrubienie" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Pochylenie" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Przekreślenie" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Skopiuj zaznaczenie do nowej notatki" - #: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Brak notatek" @@ -214,7 +167,7 @@ msgstr "Ups" #: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "" -"Proszę zainstalować program „Tracker”, a następnie ponownie uruchomić ten " +"Proszę zainstalować program „Tracker”, a następnie ponownie uruchomić ten " "program." #: ../src/bjb-import-dialog.c:309 @@ -251,7 +204,7 @@ msgstr "Wczytywanie…" #: ../src/bjb-main-toolbar.c:142 msgid "Click on items to select them" -msgstr "Kliknięcie na elementach zaznacza je" +msgstr "Kliknięcie elementów zaznacza je" #: ../src/bjb-main-toolbar.c:144 #, c-format @@ -263,7 +216,7 @@ msgstr[2] "Zaznaczono: %d" #: ../src/bjb-main-toolbar.c:264 msgid "Search note titles, content and notebooks" -msgstr "Przeszukiwanie tytułów i treści notatek oraz notatników" +msgstr "Przeszukiwanie tytułów i treści notatek oraz notatników" #. Select #: ../src/bjb-main-toolbar.c:306 @@ -272,7 +225,7 @@ msgstr "Anuluj" #: ../src/bjb-main-toolbar.c:320 msgid "Exit selection mode" -msgstr "Wyjście z trybu zaznaczania" +msgstr "Wyjście z trybu zaznaczania" #: ../src/bjb-main-toolbar.c:350 #, c-format @@ -281,7 +234,7 @@ msgstr "Wyniki dla „%s”" #: ../src/bjb-main-toolbar.c:353 msgid "New and Recent" -msgstr "Nowe i ostatnie" +msgstr "Nowe i ostatnio używane" #. #. * Translators : <_New> refers to new note creation. @@ -297,11 +250,11 @@ msgstr "Tryb zaznaczania" #: ../src/bjb-main-toolbar.c:495 msgid "View notes and notebooks in a list" -msgstr "Wyświetla notatki i notatniki jako listę" +msgstr "Wyświetla notatki i notatniki jako listę" #: ../src/bjb-main-toolbar.c:519 msgid "View notes and notebooks in a grid" -msgstr "Wyświetla notatki i notatniki w siatce" +msgstr "Wyświetla notatki i notatniki w siatce" #: ../src/bjb-main-toolbar.c:538 msgid "Trash" @@ -320,7 +273,7 @@ msgstr "Opróżnij" #. #: ../src/bjb-main-toolbar.c:757 msgid "Open in New Window" -msgstr "Otwórz w nowym oknie" +msgstr "Otwórz w nowym oknie" #. Undo Redo separator #: ../src/bjb-main-toolbar.c:768 @@ -369,7 +322,7 @@ msgstr "Notatka" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:191 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Ostatnio zaktualizowano %s" @@ -402,7 +355,7 @@ msgstr "Udostępnij notatkę" #. Detach #: ../src/bjb-selection-toolbar.c:409 msgid "Open in another window" -msgstr "Otwórz w osobnym oknie" +msgstr "Otwórz w osobnym oknie" #. Permanently delete (do not show ) #: ../src/bjb-selection-toolbar.c:423 @@ -432,7 +385,7 @@ msgstr "Preferencje" msgid "Note Edition" msgstr "Edycja notatki" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Główna książka" @@ -486,8 +439,52 @@ msgstr "Pomo_c" #: ../src/resources/app-menu.ui.h:5 msgid "_About" -msgstr "_O programie" +msgstr "_O programie" #: ../src/resources/app-menu.ui.h:6 msgid "_Quit" msgstr "Za_kończ" + +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Wytnij" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Skopiuj" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Wklej" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Pogrubia" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Pochyla" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Przekreśla" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Wypunktowanie" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Lista" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Kopiuje zaznaczenie do nowej notatki" diff -up bijiben-3.21.2/po/POTFILES.in.webkit2 bijiben-3.21.2/po/POTFILES.in --- bijiben-3.21.2/po/POTFILES.in.webkit2 2016-05-20 21:38:33.000000000 +0200 +++ bijiben-3.21.2/po/POTFILES.in 2017-05-05 08:05:14.921352019 +0200 @@ -24,3 +24,4 @@ src/libbiji/biji-date-time.c src/libbiji/biji-notebook.c src/libbiji/provider/biji-local-provider.c [type: gettext/glade]src/resources/app-menu.ui +[type: gettext/glade]src/resources/editor-toolbar.ui diff -up bijiben-3.21.2/po/ru.po.webkit2 bijiben-3.21.2/po/ru.po --- bijiben-3.21.2/po/ru.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/ru.po 2017-05-05 08:05:14.925352019 +0200 @@ -11,16 +11,16 @@ msgstr "" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=bijiben&keywords=I18N+L10N&component=general\n" "POT-Creation-Date: 2015-02-20 09:14+0000\n" -"PO-Revision-Date: 2015-02-20 13:55+0300\n" -"Last-Translator: Ivan Komaritsyn \n" +"PO-Revision-Date: 2016-09-28 11:18+0300\n" +"Last-Translator: Yuri Myasoedov \n" "Language-Team: Русский \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -"X-Generator: Gtranslator 2.91.6\n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 1.8.7.1\n" #: ../data/bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." @@ -187,7 +187,7 @@ msgstr "Курсив" #: ../src/bjb-editor-toolbar.c:446 msgid "Strike" -msgstr "Подчёркнутый" +msgstr "Перечёркнутый" #: ../src/bjb-editor-toolbar.c:474 msgid "Copy selection to a new note" @@ -199,7 +199,7 @@ msgstr "Нет заметок" #: ../src/bjb-empty-results-box.c:145 msgid "Press the New button to create a note." -msgstr "Нажмите кнопку Создать, чтобы создать заметку." +msgstr "Нажмите кнопку «Создать», чтобы создать заметку." #: ../src/bjb-empty-results-box.c:167 msgid "Oops" diff -up bijiben-3.21.2/po/sl.po.webkit2 bijiben-3.21.2/po/sl.po --- bijiben-3.21.2/po/sl.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/sl.po 2017-05-05 08:05:14.925352019 +0200 @@ -13,7 +13,7 @@ msgstr "" "PO-Revision-Date: 2015-02-21 21:28+0100\n" "Last-Translator: Matej Urbančič \n" "Language-Team: Slovenian GNOME Translation Team \n" -"Language: sl_SI\n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -up bijiben-3.21.2/po/sr@latin.po.webkit2 bijiben-3.21.2/po/sr@latin.po --- bijiben-3.21.2/po/sr@latin.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/sr@latin.po 2017-05-05 08:05:14.925352019 +0200 @@ -1,50 +1,51 @@ # Serbian translation for bijiben. # Copyright (C) 2012 bijiben's COPYRIGHT HOLDER # This file is distributed under the same license as the bijiben package. -# Miroslav Nikolić , 2012—2014, 2015. +# Miroslav Nikolić , 2012—2017. msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=bijiben" -"&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-03-02 15:55+0000\n" -"PO-Revision-Date: 2015-03-02 19:57+0200\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=bijiben&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2017-02-26 00:58+0000\n" +"PO-Revision-Date: 2017-02-26 14:57+0200\n" "Last-Translator: Miroslav Nikolić \n" "Language-Team: Serbian \n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : " -"n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Project-Style: gnome\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "" "Beleško je uređivač koji omogućava stvaranje jednostavnih spiskova za kasniju " "upotrebu." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "" "Omogućava korišćenje Vlastitog oblaka kao mesto skladištenja i uređivača na " "mreži." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Beleško" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "beleške;podsetnik;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Postavite beleške, naznačite datoteke!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Hvatač beleški" @@ -102,6 +103,10 @@ msgstr "Položaj prozora" msgid "Window position (x and y)." msgstr "Položaj prozora (položeno i uspravno)." +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Neimenovana" + #: ../src/bjb-app-menu.c:46 msgid "Simple notebook for GNOME" msgstr "Jednostavna beležnica za Gnom" @@ -113,33 +118,35 @@ msgstr "" "\n" " http://prevod.org — prevod na srpski jezik" -#: ../src/bjb-bijiben.c:454 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Prikazuje izdanje programa" -#: ../src/bjb-bijiben.c:456 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Pravi novu belešku" -#: ../src/bjb-bijiben.c:458 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[DATOTEKA...]" -#: ../src/bjb-bijiben.c:465 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Hvatajte beleške i izvozite ih svuda." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:476 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Ne mogu da obradim argumente" -#: ../src/bjb-bijiben.c:485 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "Gnomove beleške" -#: ../src/bjb-bijiben.c:498 +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Ne mogu da zabeležim program" @@ -147,65 +154,19 @@ msgstr "Ne mogu da zabeležim program" msgid "Note Color" msgstr "Boja beleške" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Iseci" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Umnoži" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Ubaci" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Podebljano" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Iskošeno" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Precrtano" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Umnoži izbor u novu belešku" - -#: ../src/bjb-empty-results-box.c:101 +#: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Nema beleški" -#: ../src/bjb-empty-results-box.c:145 -#| msgid "Press the new button to create a note." +#: ../src/bjb-empty-results-box.c:130 msgid "Press the New button to create a note." msgstr "Pritisnite dugme „Novo“ da napravite belešku." -#: ../src/bjb-empty-results-box.c:167 +#: ../src/bjb-empty-results-box.c:152 msgid "Oops" msgstr "Ups" -#: ../src/bjb-empty-results-box.c:173 +#: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "Instalirajte „Tragača“ zatim ponovo pokrenite program." @@ -307,10 +268,6 @@ msgstr "Smeće" msgid "Empty" msgstr "Isprazni" -#: ../src/bjb-main-toolbar.c:659 -msgid "Untitled" -msgstr "Neimenovana" - #. #. * Open the current note in a new window #. * in order to be able to see it and others at the same time @@ -366,7 +323,7 @@ msgstr "Beleška" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:190 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Poslednje ažuriranje %s" @@ -429,7 +386,7 @@ msgstr "Postavke" msgid "Note Edition" msgstr "Uređivanje beleške" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Osnovna knjiga" @@ -457,7 +414,7 @@ msgstr "Ove godine" msgid "Unknown" msgstr "Nepoznato" -#: ../src/libbiji/biji-notebook.c:262 +#: ../src/libbiji/biji-notebook.c:264 msgid "Local" msgstr "Mesno" @@ -489,8 +446,49 @@ msgstr "_O programu" msgid "_Quit" msgstr "_Izađi" -#~ msgid "Bullets" -#~ msgstr "Tačkasti spisak" +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Iseci" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Umnoži" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Ubaci" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Podebljano" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Iskošeno" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Precrtano" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Tačkasti spisak" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Spisak" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Umnoži izbor u novu belešku" #~ msgid "Numbered List" #~ msgstr "Brojni spisak" diff -up bijiben-3.21.2/po/sr.po.webkit2 bijiben-3.21.2/po/sr.po --- bijiben-3.21.2/po/sr.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/sr.po 2017-05-05 08:05:14.925352019 +0200 @@ -1,50 +1,51 @@ # Serbian translation for bijiben. # Copyright (C) 2012 bijiben's COPYRIGHT HOLDER # This file is distributed under the same license as the bijiben package. -# Мирослав Николић , 2012—2014, 2015. +# Мирослав Николић , 2012—2017. msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=bijiben" -"&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-03-02 15:55+0000\n" -"PO-Revision-Date: 2015-03-02 19:57+0200\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=bijiben&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2017-02-26 00:58+0000\n" +"PO-Revision-Date: 2017-02-26 14:57+0200\n" "Last-Translator: Мирослав Николић \n" "Language-Team: Serbian \n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : " -"n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Project-Style: gnome\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "" "Белешко је уређивач који омогућава стварање једноставних спискова за каснију " "употребу." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "" "Омогућава коришћење Властитог облака као место складиштења и уређивача на " "мрежи." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Белешко" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "белешке;подсетник;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Поставите белешке, назначите датотеке!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Хватач белешки" @@ -102,6 +103,10 @@ msgstr "Положај прозора" msgid "Window position (x and y)." msgstr "Положај прозора (положено и усправно)." +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Неименована" + #: ../src/bjb-app-menu.c:46 msgid "Simple notebook for GNOME" msgstr "Једноставна бележница за Гном" @@ -113,33 +118,35 @@ msgstr "" "\n" " http://prevod.org — превод на српски језик" -#: ../src/bjb-bijiben.c:454 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Приказује издање програма" -#: ../src/bjb-bijiben.c:456 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Прави нову белешку" -#: ../src/bjb-bijiben.c:458 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[ДАТОТЕКА...]" -#: ../src/bjb-bijiben.c:465 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Хватајте белешке и извозите их свуда." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:476 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Не могу да обрадим аргументе" -#: ../src/bjb-bijiben.c:485 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "Гномове белешке" -#: ../src/bjb-bijiben.c:498 +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Не могу да забележим програм" @@ -147,65 +154,19 @@ msgstr "Не могу да забеле msgid "Note Color" msgstr "Боја белешке" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Исеци" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Умножи" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Убаци" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Подебљано" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Искошено" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Прецртано" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Умножи избор у нову белешку" - -#: ../src/bjb-empty-results-box.c:101 +#: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Нема белешки" -#: ../src/bjb-empty-results-box.c:145 -#| msgid "Press the new button to create a note." +#: ../src/bjb-empty-results-box.c:130 msgid "Press the New button to create a note." msgstr "Притисните дугме „Ново“ да направите белешку." -#: ../src/bjb-empty-results-box.c:167 +#: ../src/bjb-empty-results-box.c:152 msgid "Oops" msgstr "Упс" -#: ../src/bjb-empty-results-box.c:173 +#: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "Инсталирајте „Трагача“ затим поново покрените програм." @@ -307,10 +268,6 @@ msgstr "Смеће" msgid "Empty" msgstr "Испразни" -#: ../src/bjb-main-toolbar.c:659 -msgid "Untitled" -msgstr "Неименована" - #. #. * Open the current note in a new window #. * in order to be able to see it and others at the same time @@ -366,7 +323,7 @@ msgstr "Белешка" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:190 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Последње ажурирање %s" @@ -429,7 +386,7 @@ msgstr "Поставке" msgid "Note Edition" msgstr "Уређивање белешке" -#: ../src/bjb-settings-dialog.c:505 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Основна књига" @@ -457,7 +414,7 @@ msgstr "Ове године" msgid "Unknown" msgstr "Непознато" -#: ../src/libbiji/biji-notebook.c:262 +#: ../src/libbiji/biji-notebook.c:264 msgid "Local" msgstr "Месно" @@ -489,8 +446,49 @@ msgstr "_О програму" msgid "_Quit" msgstr "_Изађи" -#~ msgid "Bullets" -#~ msgstr "Тачкасти списак" +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Исеци" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Умножи" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Убаци" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Подебљано" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Искошено" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Прецртано" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Тачкасти списак" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Списак" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Умножи избор у нову белешку" #~ msgid "Numbered List" #~ msgstr "Бројни списак" diff -up bijiben-3.21.2/po/sv.po.webkit2 bijiben-3.21.2/po/sv.po --- bijiben-3.21.2/po/sv.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/sv.po 2017-05-05 08:05:14.925352019 +0200 @@ -1,102 +1,115 @@ # Swedish translations for bijiben package # Svenska översättningar för paket bijiben. -# Copyright © 2014, 2015 Bijiben's COPYRIGHT HOLDER +# Copyright © 2014, 2015, 2017 Bijiben's COPYRIGHT HOLDER # This file is distributed under the same license as the bijiben package. # Marcus Lundblad , 2014. -# Anders Jonsson , 2015. +# Anders Jonsson , 2015, 2017. # msgid "" msgstr "" "Project-Id-Version: bijiben master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-02-25 15:55+0000\n" -"PO-Revision-Date: 2015-02-25 23:31+0100\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=bijiben&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2017-02-26 00:58+0000\n" +"PO-Revision-Date: 2017-03-01 11:32+0100\n" "Last-Translator: Anders Jonsson \n" -"Language-Team: svenska \n" +"Language-Team: Swedish \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.7.3\n" +"X-Generator: Poedit 1.8.11\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." -msgstr "Anteckningar är en redigerare som låter dig göra enkla listor för senare bruk." +msgstr "" +"Anteckningar är en redigerare som låter dig göra enkla listor för senare " +"bruk." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "Den låter dig använda ownCloud för online-lagring och webbredigering." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Anteckningar" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "anteckningar;påminnelse;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Gör anteckningar, tagga filer!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Anteckningsprogram" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:1 +#: ../data/org.gnome.bijiben.gschema.xml.h:1 msgid "Custom Font" msgstr "Anpassat typsnitt" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:2 +#: ../data/org.gnome.bijiben.gschema.xml.h:2 msgid "The font name set here will be used as the font when displaying notes." -msgstr "Typsnittet som anges här kommer att användas som typsnitt när anteckningar visas." +msgstr "" +"Typsnittet som anges här kommer att användas som typsnitt när anteckningar " +"visas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:3 +#: ../data/org.gnome.bijiben.gschema.xml.h:3 msgid "Whether to use the system monospace font" msgstr "Huruvida systemets typsnitt med fast bredd ska användas" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:4 +#: ../data/org.gnome.bijiben.gschema.xml.h:4 msgid "New notes color." msgstr "Färg för nya anteckningar." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:5 -msgid "The color name set here will be used as the color when creating new notes." -msgstr "Färgen som anges här kommer att användas som färg när nya anteckningar skapas." +#: ../data/org.gnome.bijiben.gschema.xml.h:5 +msgid "" +"The color name set here will be used as the color when creating new notes." +msgstr "" +"Färgen som anges här kommer att användas som färg när nya anteckningar " +"skapas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:6 +#: ../data/org.gnome.bijiben.gschema.xml.h:6 msgid "Primary notes provider to use for new notes." msgstr "Primär anteckningsleverantör att använda för nya anteckningar." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:7 +#: ../data/org.gnome.bijiben.gschema.xml.h:7 msgid "The primary notebook is the place where new notes are created." msgstr "Den primära anteckningsboken är den plats där nya anteckningar skapas." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:8 +#: ../data/org.gnome.bijiben.gschema.xml.h:8 msgid "Window maximized" msgstr "Fönster maximerat" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:9 +#: ../data/org.gnome.bijiben.gschema.xml.h:9 msgid "Window maximized state." msgstr "Tillstånd för maximerat fönster." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:10 +#: ../data/org.gnome.bijiben.gschema.xml.h:10 msgid "Window size" msgstr "Fönsterstorlek" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:11 +#: ../data/org.gnome.bijiben.gschema.xml.h:11 msgid "Window size (width and height)." msgstr "Fönsterstorlek (bredd och höjd)." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:12 +#: ../data/org.gnome.bijiben.gschema.xml.h:12 msgid "Window position" msgstr "Fönsterposition" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:13 +#: ../data/org.gnome.bijiben.gschema.xml.h:13 msgid "Window position (x and y)." msgstr "Fönsterposition (x och y)." +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Namnlös" + #: ../src/bjb-app-menu.c:46 msgid "Simple notebook for GNOME" msgstr "Enkel anteckningsbok för GNOME" @@ -109,33 +122,35 @@ msgstr "" "Skicka synpunkter på översättningen till\n" "." -#: ../src/bjb-bijiben.c:454 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Visa programversion" -#: ../src/bjb-bijiben.c:456 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Skapa en ny anteckning" -#: ../src/bjb-bijiben.c:458 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[FIL...]" -#: ../src/bjb-bijiben.c:465 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Ta anteckningar och exportera dem överallt." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:476 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Kunde inte tolka argument" -#: ../src/bjb-bijiben.c:485 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "GNOME Anteckningar" -#: ../src/bjb-bijiben.c:498 +#. Translators: this is a fatal error quit message +#. * printed on the command line +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Kunde inte registrera programmet" @@ -143,64 +158,19 @@ msgstr "Kunde inte registrera programmet msgid "Note Color" msgstr "Anteckningsfärg" -#. Cut -#: ../src/bjb-editor-toolbar.c:381 -msgid "Cut" -msgstr "Klipp ut" - -#. Copy -#: ../src/bjb-editor-toolbar.c:388 -msgid "Copy" -msgstr "Kopiera" - -#. 'n paste -#: ../src/bjb-editor-toolbar.c:394 -msgid "Paste" -msgstr "Klistra in" - -#. Bullet -#. * Translator : "* " stands for a bullet list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:405 -msgid "* " -msgstr "* " - -#. List -#. * Translator : this "1." temporarilly stands for ordered list. -#. * This is displayed inside a button. -#: ../src/bjb-editor-toolbar.c:413 -msgid "1." -msgstr "1." - -#: ../src/bjb-editor-toolbar.c:426 -msgid "Bold" -msgstr "Fet" - -#: ../src/bjb-editor-toolbar.c:436 -msgid "Italic" -msgstr "Kursiv" - -#: ../src/bjb-editor-toolbar.c:446 -msgid "Strike" -msgstr "Genomstruken" - -#: ../src/bjb-editor-toolbar.c:474 -msgid "Copy selection to a new note" -msgstr "Kopiera markering till en ny anteckning" - -#: ../src/bjb-empty-results-box.c:101 +#: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Inga anteckningar" -#: ../src/bjb-empty-results-box.c:145 +#: ../src/bjb-empty-results-box.c:130 msgid "Press the New button to create a note." msgstr "Tryck på knappen ”Ny” för att skapa en ny anteckning." -#: ../src/bjb-empty-results-box.c:167 +#: ../src/bjb-empty-results-box.c:152 msgid "Oops" msgstr "Hoppsan" -#: ../src/bjb-empty-results-box.c:173 +#: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "Var vänlig installera ”Tracker” och starta sedan om programmet." @@ -300,10 +270,6 @@ msgstr "Papperskorg" msgid "Empty" msgstr "Töm" -#: ../src/bjb-main-toolbar.c:659 -msgid "Untitled" -msgstr "Namnlös" - #. #. * Open the current note in a new window #. * in order to be able to see it and others at the same time @@ -359,7 +325,7 @@ msgstr "Anteckning" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:190 +#: ../src/bjb-note-view.c:192 #, c-format msgid "Last updated %s" msgstr "Senast uppdaterad %s" @@ -422,7 +388,7 @@ msgstr "Inställningar" msgid "Note Edition" msgstr "Anteckningsversion" -#: ../src/bjb-settings-dialog.c:501 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Huvudbok" @@ -450,7 +416,7 @@ msgstr "I år" msgid "Unknown" msgstr "Okänd" -#: ../src/libbiji/biji-notebook.c:262 +#: ../src/libbiji/biji-notebook.c:264 msgid "Local" msgstr "Lokal" @@ -482,3 +448,46 @@ msgstr "_Om" msgid "_Quit" msgstr "_Avsluta" +#: ../src/resources/editor-toolbar.ui.h:1 +msgid "Cut" +msgstr "Klipp ut" + +#: ../src/resources/editor-toolbar.ui.h:2 +msgid "Copy" +msgstr "Kopiera" + +#: ../src/resources/editor-toolbar.ui.h:3 +msgid "Paste" +msgstr "Klistra in" + +#: ../src/resources/editor-toolbar.ui.h:4 +msgid "Bold" +msgstr "Fet" + +#: ../src/resources/editor-toolbar.ui.h:5 +msgid "Italic" +msgstr "Kursiv" + +#: ../src/resources/editor-toolbar.ui.h:6 +msgid "Strike" +msgstr "Genomstruken" + +#: ../src/resources/editor-toolbar.ui.h:7 +msgid "* " +msgstr "* " + +#: ../src/resources/editor-toolbar.ui.h:8 +msgid "Bullets" +msgstr "Punkter" + +#: ../src/resources/editor-toolbar.ui.h:9 +msgid "1." +msgstr "1." + +#: ../src/resources/editor-toolbar.ui.h:10 +msgid "List" +msgstr "Lista" + +#: ../src/resources/editor-toolbar.ui.h:11 +msgid "Copy selection to a new note" +msgstr "Kopiera markering till en ny anteckning" diff -up bijiben-3.21.2/po/tr.po.webkit2 bijiben-3.21.2/po/tr.po --- bijiben-3.21.2/po/tr.po.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/po/tr.po 2017-05-05 08:05:14.925352019 +0200 @@ -5,105 +5,111 @@ # Osman Karagöz , 2013, 2014. # Gökhan Gurbetoğlu , 2013, 2014. # Muhammet Kara , 2013, 2014, 2015. +# Emin Tufan Çetin , 2016. # msgid "" msgstr "" "Project-Id-Version: bijiben master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=bijiben&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2015-02-20 09:14+0000\n" -"PO-Revision-Date: 2015-02-20 15:52+0200\n" -"Last-Translator: Muhammet Kara \n" -"Language-Team: Turkish \n" -"Language: tr_TR\n" +"POT-Creation-Date: 2016-07-14 18:49+0000\n" +"PO-Revision-Date: 2016-09-12 00:35+0300\n" +"Last-Translator: Emin Tufan Çetin \n" +"Language-Team: Türkçe \n" +"Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Gtranslator 2.91.6\n" +"X-Generator: Gtranslator 2.91.7\n" -#: ../data/bijiben.appdata.xml.in.h:1 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:1 msgid "Notes is an editor allowing to make simple lists for later use." msgstr "" "Notlar, sonradan kullanmak üzere basit listeler oluşturmaya izin veren bir " "düzenleyicidir." -#: ../data/bijiben.appdata.xml.in.h:2 +#: ../data/org.gnome.bijiben.appdata.xml.in.h:2 msgid "It allows to use ownCloud as a storage location and online editor." msgstr "" "ownCloud'u bir depolama konumu ve çevrimiçi düzenleyici olarak kullanmaya " "izin verir." -#: ../data/bijiben.desktop.in.in.h:1 ../data/bijiben.xml.in.h:1 -#: ../src/bjb-app-menu.c:45 ../src/bjb-window-base.c:18 +#: ../data/org.gnome.bijiben.desktop.in.in.h:1 +#: ../data/org.gnome.bijiben.xml.in.h:1 ../src/bjb-app-menu.c:45 +#: ../src/bjb-window-base.c:18 msgid "Notes" msgstr "Notlar" -#: ../data/bijiben.desktop.in.in.h:2 +#: ../data/org.gnome.bijiben.desktop.in.in.h:2 msgid "notes;reminder;" msgstr "notlar;hatırlatma;" -#: ../data/bijiben.desktop.in.in.h:3 +#: ../data/org.gnome.bijiben.desktop.in.in.h:3 msgid "Post notes, tag files!" msgstr "Not bırak, dosyaları etiketle!" -#: ../data/bijiben.desktop.in.in.h:4 +#: ../data/org.gnome.bijiben.desktop.in.in.h:4 msgid "Note-taker" msgstr "Not-tutucu" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:1 +#: ../data/org.gnome.bijiben.gschema.xml.h:1 msgid "Custom Font" msgstr "Özel Yazıtipi" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:2 +#: ../data/org.gnome.bijiben.gschema.xml.h:2 msgid "The font name set here will be used as the font when displaying notes." msgstr "Burada ayarlanan yazıtipi, notları gösterirken kullanılacak." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:3 +#: ../data/org.gnome.bijiben.gschema.xml.h:3 msgid "Whether to use the system monospace font" msgstr "Sistemin sabit aralıklı yazıtipinin kullanılıp kullanılmayacağı" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:4 +#: ../data/org.gnome.bijiben.gschema.xml.h:4 msgid "New notes color." msgstr "Yeni not rengi." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:5 +#: ../data/org.gnome.bijiben.gschema.xml.h:5 msgid "" "The color name set here will be used as the color when creating new notes." msgstr "Yeni notlar oluşturulurken burada ayarlanan renk adı kullanılacak." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:6 +#: ../data/org.gnome.bijiben.gschema.xml.h:6 msgid "Primary notes provider to use for new notes." msgstr "Yeni notlarda kullanmak için birincil not sağlayıcısı." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:7 +#: ../data/org.gnome.bijiben.gschema.xml.h:7 msgid "The primary notebook is the place where new notes are created." msgstr "Birincil not defteri, yeni notların oluşturulduğu yerdir." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:8 +#: ../data/org.gnome.bijiben.gschema.xml.h:8 msgid "Window maximized" msgstr "Pencere büyültüldü" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:9 +#: ../data/org.gnome.bijiben.gschema.xml.h:9 msgid "Window maximized state." msgstr "Pencere büyültülme durumu." -#: ../data/org.gnome.bijiben.gschema.xml.in.h:10 +#: ../data/org.gnome.bijiben.gschema.xml.h:10 msgid "Window size" msgstr "Pencere boyutu" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:11 +#: ../data/org.gnome.bijiben.gschema.xml.h:11 msgid "Window size (width and height)." msgstr "Pencere boyutu (genişlik ve yükseklik)" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:12 +#: ../data/org.gnome.bijiben.gschema.xml.h:12 msgid "Window position" msgstr "Pencere konumu" -#: ../data/org.gnome.bijiben.gschema.xml.in.h:13 +#: ../data/org.gnome.bijiben.gschema.xml.h:13 msgid "Window position (x and y)." msgstr "Pencere konumu (x ve y)." +#: ../src/bijiben-shell-search-provider.c:275 ../src/bjb-main-toolbar.c:659 +msgid "Untitled" +msgstr "Başlıksız" + #: ../src/bjb-app-menu.c:46 msgid "Simple notebook for GNOME" msgstr "GNOME için basit not defteri" @@ -114,33 +120,33 @@ msgstr "" "Osman Karagöz \n" "Muhammet Kara " -#: ../src/bjb-bijiben.c:454 +#: ../src/bjb-bijiben.c:395 msgid "Show the application's version" msgstr "Uygulamanın sürümünü göster" -#: ../src/bjb-bijiben.c:456 +#: ../src/bjb-bijiben.c:397 msgid "Create a new note" msgstr "Yeni not oluştur" -#: ../src/bjb-bijiben.c:458 +#: ../src/bjb-bijiben.c:399 msgid "[FILE...]" msgstr "[DOSYA...]" -#: ../src/bjb-bijiben.c:465 +#: ../src/bjb-bijiben.c:406 msgid "Take notes and export them everywhere." msgstr "Notlar alın ve notları her yerde dışa aktarın." #. Translators: this is a fatal error quit message #. * printed on the command line -#: ../src/bjb-bijiben.c:476 +#: ../src/bjb-bijiben.c:417 msgid "Could not parse arguments" msgstr "Argümanlar ayrıştırılamadı" -#: ../src/bjb-bijiben.c:485 +#: ../src/bjb-bijiben.c:426 msgid "GNOME Notes" msgstr "GNOME Notlar" -#: ../src/bjb-bijiben.c:498 +#: ../src/bjb-bijiben.c:439 msgid "Could not register the application" msgstr "Uygulama kaydedilemedi" @@ -183,7 +189,7 @@ msgstr "Kalın" #: ../src/bjb-editor-toolbar.c:436 msgid "Italic" -msgstr "İtalik" +msgstr "Eğik" #: ../src/bjb-editor-toolbar.c:446 msgid "Strike" @@ -193,19 +199,19 @@ msgstr "Üstü Çizili" msgid "Copy selection to a new note" msgstr "Seçimi yeni bir nota kopyala" -#: ../src/bjb-empty-results-box.c:101 +#: ../src/bjb-empty-results-box.c:86 msgid "No notes" msgstr "Not yok" -#: ../src/bjb-empty-results-box.c:145 +#: ../src/bjb-empty-results-box.c:130 msgid "Press the New button to create a note." msgstr "Not oluşturmak için Yeni düğmesine basın" -#: ../src/bjb-empty-results-box.c:167 +#: ../src/bjb-empty-results-box.c:152 msgid "Oops" msgstr "Aman" -#: ../src/bjb-empty-results-box.c:173 +#: ../src/bjb-empty-results-box.c:158 msgid "Please install 'Tracker' then restart the application." msgstr "Lütfen 'Tracker' kurup uygulamayı tekrar başlatın." @@ -243,7 +249,7 @@ msgstr "Yükleniyor..." #: ../src/bjb-main-toolbar.c:142 msgid "Click on items to select them" -msgstr "Öğeleri seçmek için tıklayın" +msgstr "Ögeleri seçmek için tıklayın" #: ../src/bjb-main-toolbar.c:144 #, c-format @@ -304,10 +310,6 @@ msgstr "Çöp" msgid "Empty" msgstr "Boşalt" -#: ../src/bjb-main-toolbar.c:659 -msgid "Untitled" -msgstr "Başlıksız" - #. #. * Open the current note in a new window #. * in order to be able to see it and others at the same time @@ -363,10 +365,10 @@ msgstr "Not" #. * right to left languages might move %s #. * '%s Last Updated' #. -#: ../src/bjb-note-view.c:190 +#: ../src/bjb-note-view.c:191 #, c-format msgid "Last updated %s" -msgstr "Son güncellenen %s" +msgstr "Son güncelleme %s" #: ../src/bjb-organize-dialog.c:396 msgid "Enter a name to create a notebook" @@ -426,7 +428,7 @@ msgstr "Tercihler" msgid "Note Edition" msgstr "Not Sürümü" -#: ../src/bjb-settings-dialog.c:501 +#: ../src/bjb-settings-dialog.c:506 msgid "Primary Book" msgstr "Birincil Kitap" @@ -454,7 +456,7 @@ msgstr "Bu yıl" msgid "Unknown" msgstr "Bilinmeyen" -#: ../src/libbiji/biji-notebook.c:262 +#: ../src/libbiji/biji-notebook.c:264 msgid "Local" msgstr "Yerel" diff -up bijiben-3.21.2/po/zh_HK.po.webkit2 bijiben-3.21.2/po/zh_HK.po --- bijiben-3.21.2/po/zh_HK.po.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/po/zh_HK.po 2017-05-05 08:05:14.925352019 +0200 @@ -12,7 +12,7 @@ msgstr "" "PO-Revision-Date: 2014-08-31 15:50+0800\n" "Last-Translator: Chao-Hsiung Liao \n" "Language-Team: Chinese (Hong Kong) \n" -"Language: zh_TW\n" +"Language: zh_HK\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff -up bijiben-3.21.2/src/bijiben-shell-search-provider.c.webkit2 bijiben-3.21.2/src/bijiben-shell-search-provider.c --- bijiben-3.21.2/src/bijiben-shell-search-provider.c.webkit2 2016-05-20 21:38:33.000000000 +0200 +++ bijiben-3.21.2/src/bijiben-shell-search-provider.c 2017-05-05 08:05:14.925352019 +0200 @@ -21,8 +21,8 @@ /* * Adapted from Nautilus shell-search-provider - * - * Authors: + * + * Authors: * Original code : Cosimo Cecchi * Bijiben : Pierre-Yves Luyten * @@ -83,7 +83,7 @@ bjb_perform_query (BijibenShellSearchPro return result ; } -GList * +static GList * biji_get_notes_with_strings (BijibenShellSearchProviderApp *self, gchar **needles) { gint parser; @@ -283,7 +283,7 @@ add_single_note_meta (BijibenShellSearch g_variant_builder_close (results); } - + g_object_unref (cursor); } @@ -325,7 +325,7 @@ handle_activate_result (BijibenShellSear g_application_hold (user_data); - app = G_APP_INFO (g_desktop_app_info_new ("bijiben.desktop")); + app = G_APP_INFO (g_desktop_app_info_new ("org.gnome.bijiben.desktop")); context = gdk_display_get_app_launch_context (gdk_display_get_default ()); gdk_app_launch_context_set_timestamp (context, timestamp); diff -up bijiben-3.21.2/src/bjb-bijiben.c.webkit2 bijiben-3.21.2/src/bjb-bijiben.c --- bijiben-3.21.2/src/bjb-bijiben.c.webkit2 2016-05-20 21:38:33.000000000 +0200 +++ bijiben-3.21.2/src/bjb-bijiben.c 2017-05-05 08:05:14.926352019 +0200 @@ -1,17 +1,18 @@ /* * bjb-bijiben.c - * Copyright (C) Pierre-Yves LUYTEN 2011 - * + * Copyright (C) 2011 Pierre-Yves LUYTEN + * Copyright (C) 2017 Iñigo Martínez + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -43,118 +44,67 @@ struct _BijibenPriv gboolean first_run; gboolean is_loaded; gboolean new_note; - GQueue *files_to_open; // paths + GQueue files_to_open; // paths }; G_DEFINE_TYPE (Bijiben, bijiben, GTK_TYPE_APPLICATION); -static void -bijiben_new_window_internal (Bijiben *app, - GFile *file, - BijiItem *item); - +static void bijiben_new_window_internal (Bijiben *self, + BijiNoteObj *note); +static gboolean bijiben_open_path (Bijiben *self, + gchar *path, + BjbWindowBase *window); static void -on_window_activated_cb (BjbWindowBase *window, - gboolean win_is_available, - Bijiben *self) +on_window_activated_cb (BjbWindowBase *window, + gboolean available, + Bijiben *self) { BijibenPriv *priv; - gchar *path; - BijiItem *item; - GList *notfound, *l; + GList *l, *next; - item = NULL; priv = self->priv; priv->is_loaded = TRUE; - notfound = NULL; - while ((path = g_queue_pop_head (priv->files_to_open))) + for (l = priv->files_to_open.head; l != NULL; l = next) { - item = biji_manager_get_item_at_path (priv->manager, path); - - if (item != NULL) + next = l->next; + if (bijiben_open_path (self, l->data, (available ? window : NULL))) { - /* If that's a note, detach it */ - if (BIJI_IS_NOTE_OBJ (item)) - { - bijiben_new_window_for_note (G_APPLICATION (self), BIJI_NOTE_OBJ (item)); - } - - /* Else, check */ - else - { - if (win_is_available) - bjb_window_base_switch_to_item (window, item); - - else - bijiben_new_window_internal (self, NULL, item); - } - g_free (path); + g_free (l->data); + g_queue_delete_link (&priv->files_to_open, l); } - - else - { - notfound = g_list_prepend (notfound, path); - } - } - - /* We just wait for next provider to be loaded. - * TODO should also check if all providers are loaded - * in order to trigger file reading. */ - for (l = notfound; l != NULL; l=l->next) - { - g_queue_push_head (priv->files_to_open, l->data); } - /* All requested notes are loaded, but we have a new one to create... * This implementation is not really safe, * we might have loaded SOME provider(s) * but not the default one - more work is needed here */ - if (notfound == NULL && - priv->new_note == TRUE) + if (priv->new_note && g_queue_is_empty (&priv->files_to_open)) { + BijiItem *item; + priv->new_note = FALSE; item = BIJI_ITEM (biji_manager_note_new ( priv->manager, NULL, bjb_settings_get_default_location (self->priv->settings))); - bijiben_new_window_internal (self, NULL, item); + bijiben_new_window_internal (self, BIJI_NOTE_OBJ (item)); } } - static void bijiben_new_window_internal (Bijiben *self, - GFile *file, - BijiItem *item) + BijiNoteObj *note) { BjbWindowBase *window; - BijiNoteObj *note; - gchar *path; GList *windows; gboolean not_first_window; - note = NULL; - windows = gtk_application_get_windows (GTK_APPLICATION (self)); not_first_window = (gboolean) g_list_length (windows); - if (file != NULL) - { - path = g_file_get_parse_name (file); - note = BIJI_NOTE_OBJ (biji_manager_get_item_at_path (self->priv->manager, path)); - g_free (path); - } - - else if (item != NULL && BIJI_IS_NOTE_OBJ (item)) - { - note = BIJI_NOTE_OBJ (item); - } - - window = BJB_WINDOW_BASE (bjb_window_base_new (note)); g_signal_connect (window, "activated", G_CALLBACK (on_window_activated_cb), self); @@ -165,11 +115,31 @@ bijiben_new_window_internal (Bijiben gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); } +static gboolean +bijiben_open_path (Bijiben *self, + gchar *path, + BjbWindowBase *window) +{ + BijiItem *item; + + if (!self->priv->is_loaded) + return FALSE; + + item = biji_manager_get_item_at_path (self->priv->manager, path); + + if (BIJI_IS_NOTE_OBJ (item) || !window) + bijiben_new_window_internal (self, BIJI_NOTE_OBJ (item)); + else + bjb_window_base_switch_to_item (window, item); + + return TRUE; +} + void bijiben_new_window_for_note (GApplication *app, BijiNoteObj *note) { - bijiben_new_window_internal (BIJIBEN_APPLICATION (app), NULL, BIJI_ITEM (note)); + bijiben_new_window_internal (BIJIBEN_APPLICATION (app), note); } static void @@ -193,16 +163,17 @@ bijiben_open (GApplication *application { Bijiben *self; gint i; + gchar *path; self = BIJIBEN_APPLICATION (application); for (i = 0; i < n_files; i++) { - if (self->priv->is_loaded == TRUE) - bijiben_new_window_internal (self, files[i], NULL); - + path = g_file_get_parse_name (files[i]); + if (bijiben_open_path (self, path, NULL)) + g_free (path); else - g_queue_push_head (self->priv->files_to_open, g_file_get_parse_name (files[i])); + g_queue_push_head (&self->priv->files_to_open, path); } } @@ -216,7 +187,7 @@ bijiben_init (Bijiben *self) G_TYPE_INSTANCE_GET_PRIVATE (self, BIJIBEN_TYPE_APPLICATION, BijibenPriv); priv->settings = bjb_settings_new (); - priv->files_to_open = g_queue_new (); + g_queue_init (&priv->files_to_open); priv->new_note = FALSE; priv->is_loaded = FALSE; } @@ -300,7 +271,7 @@ manager_ready_cb (GObject *source, return; } - bijiben_new_window_internal (self, NULL, NULL); + bijiben_new_window_internal (self, NULL); } static void @@ -380,15 +351,13 @@ bijiben_application_local_command_line ( gchar ***arguments, gint *exit_status) { + Bijiben *self; gboolean version = FALSE; gchar **remaining = NULL; GOptionContext *context; GError *error = NULL; gint argc = 0; gchar **argv = NULL; - *exit_status = EXIT_SUCCESS; - GFile **files; - gint idx, len; const GOptionEntry options[] = { { "version", 0, 0, G_OPTION_ARG_NONE, &version, @@ -400,6 +369,7 @@ bijiben_application_local_command_line ( { NULL } }; + *exit_status = EXIT_SUCCESS; context = g_option_context_new (NULL); g_option_context_set_summary (context, @@ -427,15 +397,14 @@ bijiben_application_local_command_line ( goto out; } - /* bijiben_startup */ g_application_register (application, NULL, &error); if (error != NULL) { - /* Translators: this is a fatal error quit message - * printed on the command line */ g_printerr ("%s: %s\n", + /* Translators: this is a fatal error quit message + * printed on the command line */ _("Could not register the application"), error->message); g_error_free (error); @@ -444,58 +413,21 @@ bijiben_application_local_command_line ( goto out; } - if (BIJIBEN_APPLICATION (application)->priv->new_note) - { - g_application_open (application, NULL, 0, ""); - goto out; - } - - len = 0; - files = NULL; - - /* Convert args to GFiles */ - if (remaining != NULL) - { - GFile *file; - GPtrArray *file_array; - - file_array = g_ptr_array_new (); - - for (idx = 0; remaining[idx] != NULL; idx++) - { - file = g_file_new_for_commandline_arg (remaining[idx]); - if (file != NULL) - g_ptr_array_add (file_array, file); - } - - len = file_array->len; - files = (GFile **) g_ptr_array_free (file_array, FALSE); - g_strfreev (remaining); - } + self = BIJIBEN_APPLICATION (application); - if (files == NULL) + if (!self->priv->new_note && remaining != NULL) { - files = g_malloc0 (sizeof (GFile *)); - len = 0; + gchar **args; - files[0] = NULL; + for (args = remaining; *args; args++) + if (!bijiben_open_path (self, *args, NULL)) + g_queue_push_head (&self->priv->files_to_open, g_strdup (*args)); } - if (len == 0) - goto out; - - /* Invoke "Open" to create new windows */ - g_application_open (application, files, len, ""); - - for (idx = 0; idx < len; idx++) - { - g_object_unref (files[idx]); - } - - g_free (files); - out: + g_strfreev (remaining); g_option_context_free (context); + return TRUE; } @@ -506,7 +438,8 @@ bijiben_finalize (GObject *object) g_clear_object (&self->priv->manager); g_clear_object (&self->priv->settings); - g_queue_free (self->priv->files_to_open); + g_queue_foreach (&self->priv->files_to_open, (GFunc) g_free, NULL); + g_queue_clear (&self->priv->files_to_open); G_OBJECT_CLASS (bijiben_parent_class)->finalize (object); } diff -up bijiben-3.21.2/src/bjb-color-button.c.webkit2 bijiben-3.21.2/src/bjb-color-button.c --- bijiben-3.21.2/src/bjb-color-button.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/bjb-color-button.c 2017-05-05 08:05:14.926352019 +0200 @@ -1,16 +1,16 @@ /* bjb-color-button.c * Copyright (C) Pierre-Yves Luyten 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * anjuta 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -27,7 +27,7 @@ // Bijiben probably wants something like 6 light colors #define BJB_NUM_COLORS 4 -static gchar *palette_str[BJB_NUM_COLORS] = { +static const gchar *palette_str[BJB_NUM_COLORS] = { "rgb(239, 242, 209)", // eff2d1 from the mockup "rgb(210, 219, 230)", // d2dbe6 from the mockup "rgb(229, 230, 210)", // @@ -110,7 +110,7 @@ bjb_color_button_clicked (GtkButton *b) for (i=0 ; i< BJB_NUM_COLORS ; i++) { GdkRGBA color; - + if (gdk_rgba_parse (&color, palette_str[i])) priv->palette [i] = color; } @@ -161,9 +161,9 @@ bjb_color_button_finalize (GObject *obje static void bjb_color_button_class_init (BjbColorButtonClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass); - + g_type_class_add_private (klass, sizeof (BjbColorButtonPrivate)); object_class->constructed = bjb_color_button_constructed; diff -up bijiben-3.21.2/src/bjb-controller.c.webkit2 bijiben-3.21.2/src/bjb-controller.c --- bijiben-3.21.2/src/bjb-controller.c.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/bjb-controller.c 2017-05-05 08:05:14.926352019 +0200 @@ -567,6 +567,8 @@ bjb_controller_apply_needle (BjbControll else update_controller_callback (result, self); + g_list_free (result); + return; } @@ -605,11 +607,8 @@ on_manager_changed (BijiManager GtkTreeIter iter; GtkTreeIter *p_iter = &iter; - g_print ("manager changed\n"); - if (group != self->priv->group) { - g_print ("no controller\n"); g_debug ("Controller received signal for group %i while %i", group, self->priv->group); return; diff -up bijiben-3.21.2/src/bjb-editor-toolbar.c.webkit2 bijiben-3.21.2/src/bjb-editor-toolbar.c --- bijiben-3.21.2/src/bjb-editor-toolbar.c.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/bjb-editor-toolbar.c 2017-05-05 08:05:14.926352019 +0200 @@ -1,6 +1,7 @@ /* bjb-editor-toolbar.c * Copyright © 2012, 2013 Red Hat, Inc. * Copyright © 2013 Pierre-Yves LUYTEN + * Copyright © 2017 Iñigo Martínez * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -16,14 +17,6 @@ * with this program. If not, see . */ -/* Offset for toolbar related to cursor. - * (Pixels) - * - * X offset might be replaced by something like -(toolbar size/2) - * Y offset might not be replaced */ -#define EDITOR_TOOLBAR_X_OFFSET -120; -#define EDITOR_TOOLBAR_Y_OFFSET -15; - #include "config.h" #include @@ -35,289 +28,158 @@ #include "bjb-editor-toolbar.h" #include "bjb-window-base.h" - enum { PROP_0, PROP_NOTE, - PROP_BJB_NOTE_VIEW, + PROP_NOTE_VIEW, NUM_PROPERTIES }; -static GParamSpec *properties[NUM_PROPERTIES] = { NULL, }; - struct _BjbEditorToolbarPrivate { /* Note provide us the WebKitWebView editor */ - BjbNoteView *view; - BijiNoteObj *note; + BjbNoteView *view; + BijiNoteObj *note; - GtkWidget *widget; - GtkAccelGroup *accel; + GtkAccelGroup *accel; - /* If user rigth-clicks we want to keep the toolbar visible - * untill user changes his mind */ - gboolean glued; - - /* Do not use toggle buttons. uggly there. - * Paste : the user might want to paste overriding selected text. - * Other : when no selection the user won't try to bold "null".*/ - GtkWidget *box; - GtkWidget *toolbar_cut; - GtkWidget *toolbar_copy; - GtkWidget *toolbar_paste; - GtkWidget *toolbar_bold; - GtkWidget *toolbar_italic; - GtkWidget *toolbar_strike; - GtkWidget *toolbar_bullet; - GtkWidget *toolbar_list; - GtkWidget *toolbar_link; -}; + GtkWidget *cut_button; + GtkWidget *copy_button; + GtkWidget *paste_button; -G_DEFINE_TYPE (BjbEditorToolbar, bjb_editor_toolbar, G_TYPE_OBJECT); + GtkWidget *bold_button; + GtkWidget *italic_button; + GtkWidget *strike_button; -static void -bjb_editor_toolbar_fade_in (BjbEditorToolbar *self) -{ - BjbEditorToolbarPrivate *priv = self->priv; - gtk_widget_show (priv->widget); -} + GtkWidget *bullets_button; + GtkWidget *list_button; + GtkWidget *link_button; +}; +G_DEFINE_TYPE_WITH_PRIVATE (BjbEditorToolbar, bjb_editor_toolbar, GTK_TYPE_ACTION_BAR) -static void -bjb_editor_toolbar_fade_out (BjbEditorToolbar *self) +static gboolean +on_release_event (GtkWidget *widget, + GdkEvent *event, + BjbEditorToolbar *self) { - gtk_widget_hide (self->priv->widget); -} + BjbEditorToolbarPrivate *priv; + priv = bjb_editor_toolbar_get_instance_private (self); -static void -bjb_editor_toolbar_init (BjbEditorToolbar *self) -{ - self->priv = G_TYPE_INSTANCE_GET_PRIVATE ( - self, - BJB_TYPE_EDITOR_TOOLBAR, - BjbEditorToolbarPrivate); + gtk_widget_set_visible (GTK_WIDGET (self), + biji_note_obj_editor_has_selection (priv->note)); - self->priv->accel = gtk_accel_group_new (); + return FALSE; } - static void -bjb_editor_toolbar_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) +on_cut_clicked (GtkButton *button, + BjbEditorToolbar *self) { - switch (property_id) - { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} + BjbEditorToolbarPrivate *priv; + priv = bjb_editor_toolbar_get_instance_private (self); -static void -bjb_editor_toolbar_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - BjbEditorToolbar *self = BJB_EDITOR_TOOLBAR (object); + biji_note_obj_editor_cut (priv->note); - switch (property_id) - { - case PROP_BJB_NOTE_VIEW: - self->priv->view = g_value_get_object (value); - break; - case PROP_NOTE: - self->priv->note = g_value_get_object (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } + gtk_widget_hide (GTK_WIDGET (self)); } - -/* TODO identify selected text. if some text is selected, - * compute x (left), y (top), width (columns), height (rows) */ static void -editor_toolbar_align (BjbEditorToolbar *self, GdkEvent *event) +on_copy_clicked (GtkButton *button, + BjbEditorToolbar *self) { - gint x_alignment, y_alignment; - BjbEditorToolbarPrivate *priv = self->priv; - cairo_rectangle_int_t rect; - GtkWidget *top; - GdkDisplay *display; - GdkCursor* cursor; + BjbEditorToolbarPrivate *priv; - if (event) - { - x_alignment = event->button.x;// + EDITOR_TOOLBAR_X_OFFSET; - y_alignment = event->button.y + EDITOR_TOOLBAR_Y_OFFSET; - - if ( x_alignment < 0) - x_alignment = 0; + priv = bjb_editor_toolbar_get_instance_private (self); - rect.x = x_alignment; - rect.y = y_alignment; - rect.width = 1; - rect.height = 1; - - gtk_popover_set_pointing_to (GTK_POPOVER (priv->widget), &rect); - } - - /* Hide the cursor from the main view */ - top = gtk_widget_get_toplevel (priv->widget); - - if (gtk_widget_is_toplevel (top)) - { - display = gdk_screen_get_display (gtk_window_get_screen (GTK_WINDOW (top))); - cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR); - gdk_window_set_cursor (gtk_widget_get_window (biji_note_obj_get_editor (priv->note)), - cursor); - } + biji_note_obj_editor_copy (priv->note); } static void -show_edit_bar (BjbEditorToolbar *self, GdkEvent *event) +on_paste_clicked (GtkButton *button, + BjbEditorToolbar *self) { - if (event) - editor_toolbar_align (self, event); + BjbEditorToolbarPrivate *priv; - bjb_editor_toolbar_fade_in (self); -} + priv = bjb_editor_toolbar_get_instance_private (self); -static gboolean -on_button_released (GtkWidget *widget, - GdkEvent *event, - BjbEditorToolbar *self) -{ - switch (event->button.button) - { - /* If left click, see if selection */ - case 1: - if (biji_note_obj_editor_has_selection (self->priv->note)) - show_edit_bar (self, event); - - else - bjb_editor_toolbar_fade_out (self); + biji_note_obj_editor_paste (priv->note); - return FALSE; - - default: - return FALSE; - } + gtk_widget_hide (GTK_WIDGET (self)); } +static void +on_bold_clicked (GtkButton *button, + BjbEditorToolbar *self) +{ + BjbEditorToolbarPrivate *priv; -static gboolean -on_key_released (GtkWidget *widget, - GdkEvent *event, - gpointer user_data) -{ - BjbEditorToolbar *self = BJB_EDITOR_TOOLBAR (user_data); - - /* Do not provide event. Event is null in order not to align */ - if (biji_note_obj_editor_has_selection (self->priv->note)) - show_edit_bar (self, NULL); - - else - bjb_editor_toolbar_fade_out (self); + priv = bjb_editor_toolbar_get_instance_private (self); - return FALSE; + biji_note_obj_editor_apply_format (priv->note, BIJI_BOLD); } -static gboolean -on_button_pressed (GtkWidget *widget, - GdkEvent *event, +static void +on_italic_clicked (GtkButton *button, BjbEditorToolbar *self) { - switch (event->button.button) - { - /* Show toolbar on right-click */ - case 3: - show_edit_bar (self, event); - return TRUE; - - /* Do not break stuff otherwise */ - default : - return FALSE; - } -} + BjbEditorToolbarPrivate *priv; -static gboolean -on_cut_clicked (GtkWidget *button, BjbEditorToolbar *self) -{ - biji_note_obj_editor_cut (self->priv->note); - bjb_editor_toolbar_fade_out (self); - return TRUE ; -} + priv = bjb_editor_toolbar_get_instance_private (self); -static gboolean -on_copy_clicked (GtkWidget *button, BjbEditorToolbar *self) -{ - biji_note_obj_editor_copy (self->priv->note); - bjb_editor_toolbar_fade_out (self); - return TRUE ; -} - -static gboolean -on_paste_clicked (GtkWidget *button, BjbEditorToolbar *self) -{ - biji_note_obj_editor_paste (self->priv->note); - bjb_editor_toolbar_fade_out (self); - return TRUE ; + biji_note_obj_editor_apply_format (priv->note, BIJI_ITALIC); } static void -bold_button_callback (GtkWidget *button, BjbEditorToolbar *self) +on_strike_clicked (GtkButton *button, + BjbEditorToolbar *self) { - biji_note_obj_editor_apply_format (self->priv->note, BIJI_BOLD); - bjb_editor_toolbar_fade_out (self); -} + BjbEditorToolbarPrivate *priv; -static void -italic_button_callback (GtkWidget *button, BjbEditorToolbar *self) -{ - biji_note_obj_editor_apply_format (self->priv->note, BIJI_ITALIC); - bjb_editor_toolbar_fade_out (self); -} + priv = bjb_editor_toolbar_get_instance_private (self); -static void -strike_button_callback (GtkWidget *button, BjbEditorToolbar *self) -{ - biji_note_obj_editor_apply_format (self->priv->note, BIJI_STRIKE); - bjb_editor_toolbar_fade_out (self); + biji_note_obj_editor_apply_format (priv->note, BIJI_STRIKE); } static void -on_bullet_clicked (GtkWidget *button, BjbEditorToolbar *self) +on_bullets_clicked (GtkButton *button, + BjbEditorToolbar *self) { - biji_note_obj_editor_apply_format (self->priv->note, BIJI_BULLET_LIST); - bjb_editor_toolbar_fade_out (self); + BjbEditorToolbarPrivate *priv; + + priv = bjb_editor_toolbar_get_instance_private (self); + + biji_note_obj_editor_apply_format (priv->note, BIJI_BULLET_LIST); } static void -on_list_clicked (GtkWidget *button, BjbEditorToolbar *self) +on_list_clicked (GtkButton *button, + BjbEditorToolbar *self) { - biji_note_obj_editor_apply_format (self->priv->note, BIJI_ORDER_LIST); - bjb_editor_toolbar_fade_out (self); + BjbEditorToolbarPrivate *priv; + + priv = bjb_editor_toolbar_get_instance_private (self); + + biji_note_obj_editor_apply_format (priv->note, BIJI_ORDER_LIST); } static void -link_callback (GtkWidget *button, BjbEditorToolbar *self) +on_link_clicked (GtkButton *button, + BjbEditorToolbar *self) { BjbSettings *settings; gchar *link; GtkWidget *window; BijiNoteObj *result; - GdkRGBA color; - BijiManager *manager; - BjbEditorToolbarPrivate *priv = self->priv; + GdkRGBA color; + BijiManager *manager; + BjbEditorToolbarPrivate *priv; + + priv = bjb_editor_toolbar_get_instance_private (self); link = biji_note_obj_editor_get_selection (priv->note); @@ -337,252 +199,180 @@ link_callback (GtkWidget *button, BjbEdi biji_note_obj_set_rgba (result, &color); bijiben_new_window_for_note(g_application_get_default(), result); - bjb_editor_toolbar_fade_out (self); } static void -bjb_editor_toolbar_constructed (GObject *obj) +bjb_editor_toolbar_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) { - BjbEditorToolbar *self; - BjbEditorToolbarPrivate *priv; - GtkWidget *view; - GtkWidget *window; - GtkWidget *image; - GdkPixbuf *pixbuf; - gchar *icons_path, *full_path; - GError *error = NULL; - - G_OBJECT_CLASS (bjb_editor_toolbar_parent_class)->constructed (obj); - - self = BJB_EDITOR_TOOLBAR (obj); - priv = self->priv; - window = bjb_note_view_get_base_window (priv->view); - gtk_window_add_accel_group (GTK_WINDOW (window), priv->accel); - - - /* Popover */ - priv->widget = gtk_popover_new (GTK_WIDGET (priv->view)); - gtk_style_context_add_class (gtk_widget_get_style_context (priv->widget), - GTK_STYLE_CLASS_OSD); - gtk_popover_set_position (GTK_POPOVER (priv->widget), - GTK_POS_TOP); - gtk_popover_set_modal (GTK_POPOVER (priv->widget), FALSE); - - - /* Toolbar */ - priv->box = GTK_WIDGET (gtk_toolbar_new ()); - gtk_toolbar_set_style (GTK_TOOLBAR (priv->box), GTK_TOOLBAR_TEXT); - gtk_toolbar_set_show_arrow (GTK_TOOLBAR (priv->box), FALSE); - gtk_widget_show (priv->box); - gtk_container_add (GTK_CONTAINER (priv->widget), priv->box); - - - /* Cut */ - priv->toolbar_cut = GTK_WIDGET (gtk_tool_button_new (NULL, _("Cut"))); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_cut), TRUE); - gtk_widget_show (priv->toolbar_cut); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_cut), -1); - - - /* Copy */ - priv->toolbar_copy = GTK_WIDGET (gtk_tool_button_new (NULL, _("Copy"))); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_copy), TRUE); - gtk_widget_show (priv->toolbar_copy); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_copy), -1); - - /* 'n paste */ - priv->toolbar_paste = GTK_WIDGET (gtk_tool_button_new (NULL, _("Paste"))); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_paste), TRUE); - gtk_widget_show (priv->toolbar_paste); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_paste), -1); - - if (biji_note_obj_can_format (priv->note)) + switch (property_id) { - - /* Bullet - * Translator : "* " stands for a bullet list. - * This is displayed inside a button. */ - priv->toolbar_bullet = GTK_WIDGET (gtk_tool_button_new (NULL, _("* "))); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_bullet), TRUE); - gtk_widget_show (priv->toolbar_bullet); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_bullet), -1); - - /* List - * Translator : this "1." temporarilly stands for ordered list. - * This is displayed inside a button. */ - priv->toolbar_list = GTK_WIDGET (gtk_tool_button_new (NULL, _("1."))); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_list), TRUE); - gtk_widget_show (priv->toolbar_list); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_list), -1); - - - /* Bold */ - image = gtk_image_new_from_icon_name ("format-text-bold-symbolic", GTK_ICON_SIZE_INVALID); - gtk_image_set_pixel_size (GTK_IMAGE (image), 24); - priv->toolbar_bold = GTK_WIDGET (gtk_tool_button_new (image, NULL)); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_bold), TRUE); - gtk_widget_show_all (priv->toolbar_bold); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_bold), -1); - gtk_widget_set_tooltip_text (GTK_WIDGET (priv->toolbar_bold), _("Bold")); - - - /* Italic */ - image = gtk_image_new_from_icon_name ("format-text-italic-symbolic", GTK_ICON_SIZE_INVALID); - gtk_image_set_pixel_size (GTK_IMAGE (image), 24); - priv->toolbar_italic = GTK_WIDGET (gtk_tool_button_new (image, NULL)); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_italic), TRUE); - gtk_widget_show_all (priv->toolbar_italic); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_italic), -1); - gtk_widget_set_tooltip_text (GTK_WIDGET (priv->toolbar_italic), _("Italic")); - - - /* Strike */ - image = gtk_image_new_from_icon_name ("format-text-strikethrough-symbolic", GTK_ICON_SIZE_INVALID); - gtk_image_set_pixel_size (GTK_IMAGE (image), 24); - priv->toolbar_strike = GTK_WIDGET (gtk_tool_button_new (image, NULL)); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_strike), TRUE); - gtk_widget_show_all (priv->toolbar_strike); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_strike), -1); - gtk_widget_set_tooltip_text (GTK_WIDGET (priv->toolbar_strike), _("Strike")); + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; } +} +static void +bjb_editor_toolbar_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) +{ + BjbEditorToolbarPrivate *priv; - /* Link */ - icons_path = (gchar*) bijiben_get_bijiben_dir (); - full_path = g_build_filename (icons_path, - "bijiben", - "icons", - "hicolor", - "scalable", - "actions", - "link.svg", - NULL); - - pixbuf = gdk_pixbuf_new_from_file (full_path, &error); - g_free (full_path); - - if (error) - g_warning ("error loading link icon : %s",error->message); - - image = gtk_image_new_from_pixbuf (pixbuf); - gtk_image_set_pixel_size (GTK_IMAGE (image), 24); - priv->toolbar_link = GTK_WIDGET (gtk_tool_button_new (image, NULL)); - gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->toolbar_link), TRUE); - gtk_widget_show_all (priv->toolbar_link); - gtk_toolbar_insert (GTK_TOOLBAR (priv->box), GTK_TOOL_ITEM (priv->toolbar_link), -1); - gtk_widget_set_tooltip_text (GTK_WIDGET (priv->toolbar_link), - _("Copy selection to a new note")); - + priv = bjb_editor_toolbar_get_instance_private (BJB_EDITOR_TOOLBAR (object)); - priv->glued = FALSE; + switch (property_id) + { + case PROP_NOTE: + priv->note = g_value_get_object (value); + break; + case PROP_NOTE_VIEW: + priv->view = g_value_get_object (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} - /* text selected --> fade in , and not selected --> fade out */ - view = biji_note_obj_get_editor (priv->note); +static void +bjb_editor_toolbar_constructed (GObject *object) +{ + BjbEditorToolbar *self; + BjbEditorToolbarPrivate *priv; + GtkWidget *view; + GtkWidget *window; + gboolean can_format; - g_signal_connect(view,"button-press-event", - G_CALLBACK(on_button_pressed),self); + G_OBJECT_CLASS (bjb_editor_toolbar_parent_class)->constructed (object); - g_signal_connect(view,"button-release-event", - G_CALLBACK(on_button_released),self); + self = BJB_EDITOR_TOOLBAR (object); - g_signal_connect(view,"key-release-event", - G_CALLBACK(on_key_released),self); + priv = bjb_editor_toolbar_get_instance_private (self); - /* buttons */ + window = bjb_note_view_get_base_window (priv->view); + gtk_window_add_accel_group (GTK_WINDOW (window), priv->accel); - g_signal_connect (priv->toolbar_cut,"clicked", - G_CALLBACK(on_cut_clicked), self); + gtk_widget_add_accelerator (priv->bold_button, "clicked", priv->accel, + GDK_KEY_b, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - g_signal_connect (priv->toolbar_copy,"clicked", - G_CALLBACK(on_copy_clicked), self); + gtk_widget_add_accelerator (priv->italic_button, "clicked", priv->accel, + GDK_KEY_i, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - g_signal_connect (priv->toolbar_paste,"clicked", - G_CALLBACK(on_paste_clicked), self); + gtk_widget_add_accelerator (priv->strike_button, "clicked", priv->accel, + GDK_KEY_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - g_signal_connect (priv->toolbar_bullet,"clicked", - G_CALLBACK(on_bullet_clicked), self); + view = biji_note_obj_get_editor (priv->note); - g_signal_connect (priv->toolbar_list,"clicked", - G_CALLBACK(on_list_clicked), self); + g_signal_connect (view,"button-release-event", + G_CALLBACK (on_release_event), self); - g_signal_connect (priv->toolbar_bold,"clicked", - G_CALLBACK(bold_button_callback), self); - gtk_widget_add_accelerator (priv->toolbar_bold, - "clicked", priv->accel, GDK_KEY_b, - GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); + g_signal_connect (view,"key-release-event", + G_CALLBACK (on_release_event), self); - g_signal_connect (priv->toolbar_italic,"clicked", - G_CALLBACK(italic_button_callback), self); - gtk_widget_add_accelerator (priv->toolbar_italic, - "clicked", priv->accel, GDK_KEY_i, - GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); + can_format = biji_note_obj_can_format (priv->note); - g_signal_connect (priv->toolbar_strike,"clicked", - G_CALLBACK(strike_button_callback), self); - gtk_widget_add_accelerator (priv->toolbar_strike, - "clicked", priv->accel, GDK_KEY_s, - GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); + gtk_widget_set_sensitive (priv->bold_button, can_format); + gtk_widget_set_sensitive (priv->italic_button, can_format); + gtk_widget_set_sensitive (priv->strike_button, can_format); - g_signal_connect (priv->toolbar_link,"clicked", - G_CALLBACK(link_callback), self); + gtk_widget_set_sensitive (priv->bullets_button, can_format); + gtk_widget_set_sensitive (priv->list_button, can_format); } static void -bjb_editor_toolbar_finalize (GObject *obj) +bjb_editor_toolbar_finalize (GObject *object) { - BjbEditorToolbar *self = BJB_EDITOR_TOOLBAR (obj); - BjbEditorToolbarPrivate *priv = self->priv; + BjbEditorToolbarPrivate *priv; GtkWidget *window; + priv = bjb_editor_toolbar_get_instance_private (BJB_EDITOR_TOOLBAR (object)); + window = bjb_note_view_get_base_window (priv->view); gtk_window_remove_accel_group (GTK_WINDOW (window), priv->accel); g_object_unref (priv->accel); - G_OBJECT_CLASS (bjb_editor_toolbar_parent_class)->finalize (obj); + G_OBJECT_CLASS (bjb_editor_toolbar_parent_class)->finalize (object); } static void -bjb_editor_toolbar_class_init (BjbEditorToolbarClass *class) +bjb_editor_toolbar_class_init (BjbEditorToolbarClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (class); + GObjectClass *object_class; + GtkWidgetClass *widget_class; - object_class->get_property = bjb_editor_toolbar_get_property ; - object_class->set_property = bjb_editor_toolbar_set_property ; - object_class->constructed = bjb_editor_toolbar_constructed ; + object_class = G_OBJECT_CLASS (klass); + object_class->get_property = bjb_editor_toolbar_get_property; + object_class->set_property = bjb_editor_toolbar_set_property; + object_class->constructed = bjb_editor_toolbar_constructed; object_class->finalize = bjb_editor_toolbar_finalize; + g_object_class_install_property (object_class, + PROP_NOTE, + g_param_spec_object ("note", + "Note", + "Biji Note Obj", + BIJI_TYPE_NOTE_OBJ, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_STRINGS)); - - properties[PROP_BJB_NOTE_VIEW] = g_param_spec_object ("bjbnoteview", - "bjbnoteview", - "bjbnoteview", + g_object_class_install_property (object_class, + PROP_NOTE_VIEW, + g_param_spec_object ("note-view", + "Note View", + "Note View", BJB_TYPE_NOTE_VIEW, - G_PARAM_READWRITE | + G_PARAM_READWRITE | G_PARAM_CONSTRUCT | - G_PARAM_STATIC_STRINGS); + G_PARAM_STATIC_STRINGS)); + + widget_class = GTK_WIDGET_CLASS (klass); + gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/bijiben/editor-toolbar.ui"); + + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, cut_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, copy_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, paste_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, bold_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, italic_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, strike_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, bullets_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, list_button); + gtk_widget_class_bind_template_child_private (widget_class, BjbEditorToolbar, link_button); + + gtk_widget_class_bind_template_callback (widget_class, on_cut_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_copy_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_paste_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_bold_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_italic_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_strike_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_bullets_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_list_clicked); + gtk_widget_class_bind_template_callback (widget_class, on_link_clicked); +} - g_object_class_install_property (object_class,PROP_BJB_NOTE_VIEW,properties[PROP_BJB_NOTE_VIEW]); +static void +bjb_editor_toolbar_init (BjbEditorToolbar *self) +{ + BjbEditorToolbarPrivate *priv; - properties[PROP_NOTE] = g_param_spec_object ("note", - "Note", - "Biji Note Obj", - BIJI_TYPE_NOTE_OBJ, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | - G_PARAM_STATIC_STRINGS); + gtk_widget_init_template (GTK_WIDGET (self)); - g_object_class_install_property (object_class,PROP_NOTE,properties[PROP_NOTE]); + priv = bjb_editor_toolbar_get_instance_private (self); - g_type_class_add_private (class, sizeof (BjbEditorToolbarPrivate)); + priv->accel = gtk_accel_group_new (); } - -BjbEditorToolbar * -bjb_editor_toolbar_new (BjbNoteView *bjb_note_view, - BijiNoteObj *biji_note_obj) +GtkWidget * +bjb_editor_toolbar_new (BjbNoteView *bjb_note_view, + BijiNoteObj *biji_note_obj) { return g_object_new (BJB_TYPE_EDITOR_TOOLBAR, - "bjbnoteview" , bjb_note_view, - "note" , biji_note_obj, + "note" , biji_note_obj, + "note-view", bjb_note_view, NULL); } diff -up bijiben-3.21.2/src/bjb-editor-toolbar.h.webkit2 bijiben-3.21.2/src/bjb-editor-toolbar.h --- bijiben-3.21.2/src/bjb-editor-toolbar.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/bjb-editor-toolbar.h 2017-05-05 08:05:14.926352019 +0200 @@ -1,6 +1,7 @@ /* bjb-editor-toolbar.h * Copyright © 2012, 2013 Red Hat, Inc. * Copyright © 2013, 2014 Pierre-Yves LUYTEN + * Copyright © 2017 Iñigo Martínez * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -25,36 +26,17 @@ G_BEGIN_DECLS #define BJB_TYPE_EDITOR_TOOLBAR (bjb_editor_toolbar_get_type ()) -#define BJB_EDITOR_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BJB_TYPE_EDITOR_TOOLBAR, BjbEditorToolbar)) +G_DECLARE_FINAL_TYPE (BjbEditorToolbar, bjb_editor_toolbar, BJB, EDITOR_TOOLBAR, GtkActionBar); -#define BJB_EDITOR_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BJB_TYPE_EDITOR_TOOLBAR, BjbEditorToolbarClass)) - -#define BJB_IS_EDITOR_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BJB_TYPE_EDITOR_TOOLBAR)) - -#define BJB_IS_EDITOR_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BJB_TYPE_EDITOR_TOOLBAR)) - -#define BJB_EDITOR_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BJB_TYPE_EDITOR_TOOLBAR, BjbEditorToolbarClass)) - -typedef struct _BjbEditorToolbar BjbEditorToolbar; -typedef struct _BjbEditorToolbarClass BjbEditorToolbarClass; typedef struct _BjbEditorToolbarPrivate BjbEditorToolbarPrivate; struct _BjbEditorToolbar { - GObject parent_instance; - BjbEditorToolbarPrivate *priv; + GtkActionBar parent; }; -struct _BjbEditorToolbarClass -{ - GObjectClass parent_class; -}; - -GType bjb_editor_toolbar_get_type (void) G_GNUC_CONST; - -BjbEditorToolbar *bjb_editor_toolbar_new (BjbNoteView *bjb_note_view, - BijiNoteObj *biji_note_obj); - +GtkWidget *bjb_editor_toolbar_new (BjbNoteView *bjb_note_view, + BijiNoteObj *biji_note_obj); G_END_DECLS diff -up bijiben-3.21.2/src/bjb-empty-results-box.c.webkit2 bijiben-3.21.2/src/bjb-empty-results-box.c --- bijiben-3.21.2/src/bjb-empty-results-box.c.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/bjb-empty-results-box.c 2017-05-05 08:05:14.926352019 +0200 @@ -49,7 +49,8 @@ bjb_empty_results_box_constructed (GObje BjbEmptyResultsBoxPrivate *priv; GtkStyleContext *context; GtkWidget *labels_grid; - gchar *label, *markup; + const gchar *label; + gchar *markup; GFile *note_icon_file; GIcon *icon; diff -up bijiben-3.21.2/src/bjb.gresource.xml.webkit2 bijiben-3.21.2/src/bjb.gresource.xml --- bijiben-3.21.2/src/bjb.gresource.xml.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/bjb.gresource.xml 2017-05-05 08:05:14.927352019 +0200 @@ -3,6 +3,7 @@ resources/Adwaita.css resources/app-menu.ui + resources/editor-toolbar.ui resources/thumbnail-frame.png resources/note-symbolic.svg diff -up bijiben-3.21.2/src/bjb-import-dialog.c.webkit2 bijiben-3.21.2/src/bjb-import-dialog.c --- bijiben-3.21.2/src/bjb-import-dialog.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/bjb-import-dialog.c 2017-05-05 08:05:14.926352019 +0200 @@ -85,7 +85,7 @@ G_DEFINE_TYPE (BjbImportDialog, bjb_impo static ImportDialogChild * -import_dialog_child_new () +import_dialog_child_new (void) { ImportDialogChild *retval = g_slice_new (ImportDialogChild); @@ -112,7 +112,7 @@ import_dialog_child_free (ImportDialogCh * might use app_info here */ static GdkPixbuf * -get_app_icon (gchar *app_name) +get_app_icon (const gchar *app_name) { gint i; GdkPixbuf *retval= NULL; @@ -154,7 +154,7 @@ application_quark (void) static GtkWidget * -child_toggle_new () +child_toggle_new (void) { GtkWidget *w; @@ -333,8 +333,8 @@ add_custom (BjbImportDialog *self) static ImportDialogChild * -add_application (gchar *app, - gchar *visible_label, +add_application (const gchar *app, + const gchar *visible_label, gchar *location) { GtkWidget *box, *w; @@ -382,8 +382,6 @@ add_application (gchar *app, static void bjb_import_dialog_constructed (GObject *obj) { - G_OBJECT_CLASS(bjb_import_dialog_parent_class)->constructed(obj); - GtkWidget *area, *label_box, *label, *frame; gchar *path; GList *windows; @@ -393,6 +391,8 @@ bjb_import_dialog_constructed (GObject * GtkWindow *win = GTK_WINDOW (obj); BjbImportDialogPrivate *priv = self->priv; + G_OBJECT_CLASS(bjb_import_dialog_parent_class)->constructed(obj); + /* Don't finalize locations with HashTable * They belong to qdata in gtkwidgets */ diff -up bijiben-3.21.2/src/bjb-main-toolbar.c.webkit2 bijiben-3.21.2/src/bjb-main-toolbar.c --- bijiben-3.21.2/src/bjb-main-toolbar.c.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/bjb-main-toolbar.c 2017-05-05 08:05:14.926352019 +0200 @@ -5,12 +5,12 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -36,8 +36,7 @@ typedef enum BJB_TOOLBAR_TRASH_LIST, BJB_TOOLBAR_TRASH_ICON, BJB_TOOLBAR_TRASH_SELECT, - BJB_TOOLBAR_NOTE_VIEW, - BJB_TOOLBAR_NUM + BJB_TOOLBAR_NOTE_VIEW } BjbToolbarType; /* Color Button */ @@ -151,7 +150,7 @@ update_selection_label (BjbMainToolbar * return TRUE; } -void +static void on_view_selection_changed_cb (BjbMainToolbar *self) { GtkStyleContext *context; @@ -736,7 +735,7 @@ on_detached_clicked_cb (BjbMainToolbar * } -GtkWidget * +static GtkWidget * bjb_note_menu_new (BjbMainToolbar *self) { BjbMainToolbarPrivate *priv = self->priv; @@ -768,7 +767,7 @@ bjb_note_menu_new (BjbMainToolbar *self) item = gtk_menu_item_new_with_label (_("Undo")); gtk_menu_shell_append (GTK_MENU_SHELL (result), item); g_signal_connect_swapped (item, "activate", - G_CALLBACK (webkit_web_view_undo), editor); + G_CALLBACK (biji_webkit_editor_undo), editor); gtk_widget_add_accelerator (item, "activate", priv->accel, GDK_KEY_z, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); @@ -776,7 +775,7 @@ bjb_note_menu_new (BjbMainToolbar *self) item = gtk_menu_item_new_with_label (_("Redo")); gtk_menu_shell_append (GTK_MENU_SHELL (result), item); g_signal_connect_swapped (item, "activate", - G_CALLBACK (webkit_web_view_redo), editor); + G_CALLBACK (biji_webkit_editor_redo), editor); gtk_widget_add_accelerator (item, "activate", priv->accel, GDK_KEY_z, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE); @@ -802,7 +801,7 @@ bjb_note_menu_new (BjbMainToolbar *self) G_CALLBACK (on_email_note_callback), priv->note); g_signal_connect_swapped (biji_note_obj_get_editor (priv->note), - "user-changed-contents", + "content-changed", G_CALLBACK (on_note_content_changed), self); @@ -1016,7 +1015,7 @@ populate_main_toolbar(BjbMainToolbar *se /* Not really a toolbar, * still used for Spinner */ default: - to_be = BJB_TOOLBAR_0; + break; } @@ -1069,8 +1068,10 @@ bjb_main_toolbar_constructed (GObject *o static void bjb_main_toolbar_init (BjbMainToolbar *self) { + BjbMainToolbarPrivate *priv; + self->priv = BJB_MAIN_TOOLBAR_GET_PRIVATE(self); - BjbMainToolbarPrivate *priv = self->priv; + priv = self->priv; priv->type = BJB_TOOLBAR_0 ; diff -up bijiben-3.21.2/src/bjb-main-view.c.webkit2 bijiben-3.21.2/src/bjb-main-view.c --- bijiben-3.21.2/src/bjb-main-view.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/bjb-main-view.c 2017-05-05 08:05:14.927352019 +0200 @@ -1,16 +1,16 @@ /* bjb-main-view.c * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -86,7 +86,7 @@ static void bjb_main_view_view_changed ( static void bjb_main_view_init (BjbMainView *object) { - object->priv = + object->priv = G_TYPE_INSTANCE_GET_PRIVATE(object,BJB_TYPE_MAIN_VIEW,BjbMainViewPriv); object->priv->key = 0; @@ -258,7 +258,7 @@ switch_to_item (BjbMainView *view, BijiI static GList * get_selected_paths(BjbMainView *self) { - return gd_main_view_get_selection ( self->priv->view ) ; + return gd_main_view_get_selection ( self->priv->view ) ; } static gchar * @@ -268,7 +268,7 @@ get_note_url_from_tree_path(GtkTreePath gchar *note_path ; GtkTreeModel *model ; - model = bjb_controller_get_model(self->priv->controller); + model = bjb_controller_get_model(self->priv->controller); gtk_tree_model_get_iter (model,&iter, path); gtk_tree_model_get (model, &iter,GD_MAIN_COLUMN_URI, ¬e_path,-1); @@ -378,7 +378,7 @@ on_item_activated (GdMainView * g g_return_val_if_fail (item_path != NULL, FALSE); // #709197 /* Switch to that item */ - manager = bjb_window_base_get_manager (view->priv->window); + manager = bjb_window_base_get_manager (view->priv->window); to_open = biji_manager_get_item_at_path (manager, item_path); g_free (item_path); @@ -388,7 +388,7 @@ on_item_activated (GdMainView * g return FALSE ; } -static GtkTargetEntry target_list[] = { +static const GtkTargetEntry target_list[] = { { "text/plain", 0, 2} }; @@ -458,14 +458,14 @@ bjb_main_view_connect_signals (BjbMainVi G_CALLBACK (on_drag_data_received), self); } -void +static void __destroy_n_notify__ (gpointer data) { } -BijiItem * +static BijiItem * _get_item_for_tree_path (GtkTreeModel *tree_model, GtkTreeIter *iter, BjbMainView *self) @@ -556,7 +556,7 @@ render_date (GtkTreeViewColumn *tree gpointer data) { BijiItem *item; - gchar *str; + const gchar *str; BjbMainView *self; self = data; diff -up bijiben-3.21.2/src/bjb-note-view.c.webkit2 bijiben-3.21.2/src/bjb-note-view.c --- bijiben-3.21.2/src/bjb-note-view.c.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/bjb-note-view.c 2017-05-05 08:05:14.927352019 +0200 @@ -1,16 +1,17 @@ /* bjb-note-view.c - * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * Copyright © 2012 Pierre-Yves LUYTEN + * Copyright © 2017 Iñigo Martínez + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -49,8 +50,8 @@ struct _BjbNoteViewPrivate { /* UI */ BijiWebkitEditor *editor; - BjbEditorToolbar *edit_bar; - gboolean edit_bar_is_sticky; + GtkWidget *box; + GtkWidget *edit_bar; GtkWidget *last_update; }; @@ -171,13 +172,17 @@ on_note_trashed (BijiNoteObj *note, BjbN static void on_note_color_changed_cb (BijiNoteObj *note, BjbNoteView *self) { - gchar *font_color, *span, *text; + const gchar *font_color; + gchar *span, *text; BjbNoteViewPrivate *priv = self->priv; GdkRGBA color; g_return_if_fail (BIJI_IS_NOTE_OBJ (note)); biji_note_obj_get_rgba (note, &color); + + webkit_web_view_set_background_color (WEBKIT_WEB_VIEW (priv->view), &color); + if (color.red < 0.5) font_color = "white"; else @@ -217,7 +222,6 @@ bjb_note_view_constructed (GObject *obj) BjbNoteView *self = BJB_NOTE_VIEW (obj); BjbNoteViewPrivate *priv = self->priv; BjbSettings *settings; - GtkWidget *scroll; gchar *default_font; GdkRGBA color; @@ -229,7 +233,6 @@ bjb_note_view_constructed (GObject *obj) /* view new from note deserializes the note-content. */ priv->view = biji_note_obj_open (priv->note); - g_signal_connect(priv->note,"deleted", G_CALLBACK(on_note_trashed),self); g_signal_connect(priv->note,"trashed", @@ -238,21 +241,13 @@ bjb_note_view_constructed (GObject *obj) g_signal_connect(priv->window,"destroy", G_CALLBACK(on_window_closed), priv->note); + priv->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_container_add (GTK_CONTAINER (self), priv->box); + gtk_widget_show (priv->box); /* Text Editor (WebKitMainView) */ - scroll = gtk_scrolled_window_new (NULL,NULL); - gtk_widget_show (scroll); - - gtk_widget_set_hexpand (scroll, TRUE); - gtk_widget_set_vexpand (scroll, TRUE); - - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - - gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET(priv->view)); - gtk_container_add (GTK_CONTAINER (self), scroll); - gtk_widget_show (GTK_WIDGET (priv->view)); + gtk_box_pack_start (GTK_BOX (priv->box), GTK_WIDGET(priv->view), TRUE, TRUE, 0); + gtk_widget_show (priv->view); /* Apply the gsettings font */ @@ -283,6 +278,8 @@ bjb_note_view_constructed (GObject *obj) /* Edition Toolbar for text selection */ priv->edit_bar = bjb_editor_toolbar_new (self, priv->note); + gtk_box_pack_start (GTK_BOX (priv->box), priv->edit_bar, FALSE, TRUE, 0); + gtk_widget_hide (priv->edit_bar); /* Last updated row */ bjb_note_view_last_updated_actor_new (self); @@ -291,6 +288,7 @@ bjb_note_view_constructed (GObject *obj) gtk_widget_set_valign (priv->last_update, GTK_ALIGN_END); gtk_widget_set_margin_bottom (priv->last_update, 50); gtk_overlay_add_overlay (GTK_OVERLAY (self), priv->last_update); + gtk_widget_show (priv->last_update); } BjbNoteView * diff -up bijiben-3.21.2/src/bjb-settings.c.webkit2 bijiben-3.21.2/src/bjb-settings.c --- bijiben-3.21.2/src/bjb-settings.c.webkit2 2016-02-01 22:06:10.000000000 +0100 +++ bijiben-3.21.2/src/bjb-settings.c 2017-05-05 08:05:14.927352019 +0200 @@ -1,16 +1,16 @@ /* bjb-settings.c * Copyright (C) Pierre-Yves LUYTEN 2011 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see .*/ @@ -59,8 +59,8 @@ G_DEFINE_TYPE (BjbSettings, bjb_settings static void bjb_settings_init (BjbSettings *object) -{ - object->priv = +{ + object->priv = G_TYPE_INSTANCE_GET_PRIVATE(object,BJB_TYPE_SETTINGS,BjbSettingsPrivate); } @@ -72,6 +72,10 @@ bjb_settings_finalize (GObject *object) self = BJB_SETTINGS (object); g_object_unref (self->priv->system); + g_free (self->priv->font); + g_free (self->priv->color); + g_free (self->priv->primary); + G_OBJECT_CLASS (bjb_settings_parent_class)->finalize (object); } @@ -100,7 +104,7 @@ bjb_settings_get_property (GObject *o case PROP_PRIMARY: g_value_set_string (value, settings->priv->primary); break; - + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -118,21 +122,24 @@ bjb_settings_set_property (GObject switch (prop_id) { case PROP_USE_SYSTEM_FONT: - settings->priv->use_system_font = g_value_get_boolean (value) ; + settings->priv->use_system_font = g_value_get_boolean (value) ; break; case PROP_FONT: - settings->priv->font = g_value_dup_string(value) ; + g_free (settings->priv->font); + settings->priv->font = g_value_dup_string(value); break; case PROP_COLOR: + g_free (settings->priv->color); settings->priv->color = g_value_dup_string(value); break; case PROP_PRIMARY: + g_free (settings->priv->primary); settings->priv->primary = g_value_dup_string (value); break; - + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -188,7 +195,7 @@ bjb_settings_class_init (BjbSettingsClas "Use system font", "Default System Font for Notes", TRUE, - G_PARAM_READWRITE | + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); @@ -197,7 +204,7 @@ bjb_settings_class_init (BjbSettingsClas "Notes Font", "Font for Notes", NULL, - G_PARAM_READWRITE | + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); @@ -206,7 +213,7 @@ bjb_settings_class_init (BjbSettingsClas "New Notes Color", "Default Color for New Notes", NULL, - G_PARAM_READWRITE | + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); @@ -215,7 +222,7 @@ bjb_settings_class_init (BjbSettingsClas "Primary Location", "Default Provider for New Notes", NULL, - G_PARAM_READWRITE | + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); @@ -242,25 +249,25 @@ bjb_settings_use_system_font void bjb_settings_set_use_system_font (BjbSettings *settings, gboolean value) { - settings->priv->use_system_font = value; + settings->priv->use_system_font = value; } -gchar * +const gchar * bjb_settings_get_default_font (BjbSettings *settings) { return settings->priv->font; } -gchar * +const gchar * bjb_settings_get_default_color (BjbSettings *settings) { return settings->priv->color; } -gchar * +const gchar * bjb_settings_get_default_location (BjbSettings *settings) { return settings->priv->primary; diff -up bijiben-3.21.2/src/bjb-settings-dialog.c.webkit2 bijiben-3.21.2/src/bjb-settings-dialog.c --- bijiben-3.21.2/src/bjb-settings-dialog.c.webkit2 2016-05-20 21:44:14.000000000 +0200 +++ bijiben-3.21.2/src/bjb-settings-dialog.c 2017-05-05 08:05:14.927352019 +0200 @@ -1,6 +1,6 @@ /* * bjb_settings_dialog.c - * + * * Copyright © 2013 Pierre-Yves LUYTEN * * bijiben is free software: you can redistribute it and/or modify it @@ -147,7 +147,7 @@ typedef struct static ProviderChild * -provider_child_new () +provider_child_new (void) { ProviderChild *retval; @@ -183,7 +183,7 @@ application_quark (void) static GtkWidget * -child_toggle_new () +child_toggle_new (void) { GtkWidget *w; @@ -335,7 +335,7 @@ add_child (gpointer provider_info, gpoin } -GtkWidget * +static GtkWidget * create_page_primary (BjbSettingsDialog *self) { BjbSettingsDialogPrivate *priv; @@ -372,7 +372,7 @@ create_page_primary (BjbSettingsDialog * /* Edition page (font, color) */ -GtkWidget * +static GtkWidget * create_page_edition (BjbSettingsDialog *self) { BjbSettingsDialogPrivate *priv; diff -up bijiben-3.21.2/src/bjb-settings.h.webkit2 bijiben-3.21.2/src/bjb-settings.h --- bijiben-3.21.2/src/bjb-settings.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/bjb-settings.h 2017-05-05 08:05:14.927352019 +0200 @@ -61,13 +61,13 @@ void bjb_settings_set_use_s gboolean value); -gchar *bjb_settings_get_default_font (BjbSettings *settings); +const gchar *bjb_settings_get_default_font (BjbSettings *settings); -gchar *bjb_settings_get_default_color (BjbSettings *settings); +const gchar *bjb_settings_get_default_color (BjbSettings *settings); -gchar *bjb_settings_get_default_location (BjbSettings *settings); +const gchar *bjb_settings_get_default_location (BjbSettings *settings); gchar *bjb_settings_get_system_font (BjbSettings *settings); diff -up bijiben-3.21.2/src/bjb-share.c.webkit2 bijiben-3.21.2/src/bjb-share.c --- bijiben-3.21.2/src/bjb-share.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/bjb-share.c 2017-05-05 08:05:14.927352019 +0200 @@ -1,16 +1,16 @@ /* biji-share.c * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -30,29 +30,29 @@ mail_str (const gchar * string ) gboolean on_email_note_callback(GtkWidget *widget, BijiNoteObj *note) { - GError *error; - error = NULL; + GError *error = NULL; gchar *title_mail, *text_mail; + const gchar *execute[7]; title_mail = mail_str ((gchar*) biji_item_get_title (BIJI_ITEM (note))); text_mail = mail_str (biji_note_obj_get_raw_text (note)); - gchar *execute[7] = { "xdg-email", - "--utf8", - "--subject", - title_mail, - "--body", - text_mail, - NULL } ; - - g_spawn_async ( NULL, - execute, + execute[0] = "xdg-email"; + execute[1] = "--utf8"; + execute[2] = "--subject"; + execute[3] = title_mail; + execute[4] = "--body"; + execute[5] = text_mail; + execute[6] = NULL; + + g_spawn_async ( NULL, + (gchar **) execute, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, - &error); + &error); if ( error != NULL ) g_message("error :%s",error->message); diff -up bijiben-3.21.2/src/bjb-window-base.c.webkit2 bijiben-3.21.2/src/bjb-window-base.c --- bijiben-3.21.2/src/bjb-window-base.c.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/bjb-window-base.c 2017-05-05 08:05:14.927352019 +0200 @@ -270,14 +270,20 @@ bjb_window_base_constructed (GObject *ob const gint32 *size; gsize n_elements; GVariant *variant; + GdkVisual *rgba_visual; G_OBJECT_CLASS (bjb_window_base_parent_class)->constructed (obj); priv = self->priv; priv->settings = bjb_app_get_settings ((gpointer) g_application_get_default ()); - - + /* Allow transparencies if possible */ + rgba_visual = gdk_screen_get_rgba_visual (gtk_window_get_screen (GTK_WINDOW (self))); + if (rgba_visual) + { + gtk_widget_set_visual (GTK_WIDGET (self), rgba_visual); + gtk_widget_set_app_paintable (GTK_WIDGET (self), TRUE); + } gtk_window_set_position (GTK_WINDOW (self),GTK_WIN_POS_CENTER); gtk_window_set_title (GTK_WINDOW (self), _(BIJIBEN_MAIN_WIN_TITLE)); @@ -551,7 +557,7 @@ bjb_window_base_switch_to (BjbWindowBase case BJB_WINDOW_BASE_NOTE_VIEW: - gtk_widget_show_all (GTK_WIDGET (priv->note_view)); + gtk_widget_show (GTK_WIDGET (priv->note_view)); gtk_widget_hide (GTK_WIDGET (priv->search_bar)); gtk_stack_set_visible_child_name (priv->stack, "note-view"); break; diff -up bijiben-3.21.2/src/bjb-window-base.h.webkit2 bijiben-3.21.2/src/bjb-window-base.h --- bijiben-3.21.2/src/bjb-window-base.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/bjb-window-base.h 2017-05-05 08:05:14.927352019 +0200 @@ -76,7 +76,7 @@ gpointer bjb_window_base_g BijiNoteObj *bjb_window_base_get_note (BjbWindowBase *self); -gboolean switch_window_fullscreen(); +gboolean switch_window_fullscreen (void); gboolean bjb_window_base_get_show_search_bar (BjbWindowBase *self); diff -up bijiben-3.21.2/src/libbiji/biji-date-time.c.webkit2 bijiben-3.21.2/src/libbiji/biji-date-time.c --- bijiben-3.21.2/src/libbiji/biji-date-time.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-date-time.c 2017-05-05 08:05:18.111351975 +0200 @@ -1,16 +1,16 @@ /* biji-date-time.c * Copyright (C) Pierre-Yves LUYTEN 2011 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see .*/ @@ -18,7 +18,7 @@ #include "libbiji.h" -gchar * +const gchar * biji_get_time_diff_with_time (glong sec_since_epoch) { GTimeVal now; diff -up bijiben-3.21.2/src/libbiji/biji-date-time.h.webkit2 bijiben-3.21.2/src/libbiji/biji-date-time.h --- bijiben-3.21.2/src/libbiji/biji-date-time.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-date-time.h 2017-05-05 08:05:18.111351975 +0200 @@ -1,16 +1,16 @@ /* biji-date-time.h * Copyright (C) Pierre-Yves LUYTEN 2011-2013 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see .*/ @@ -23,7 +23,7 @@ -gchar *biji_get_time_diff_with_time (glong sec_since_epoch); +const gchar *biji_get_time_diff_with_time (glong sec_since_epoch); diff -up bijiben-3.21.2/src/libbiji/biji-error.c.webkit2 bijiben-3.21.2/src/libbiji/biji-error.c --- bijiben-3.21.2/src/libbiji/biji-error.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-error.c 2017-05-05 08:05:18.111351975 +0200 @@ -46,7 +46,7 @@ biji_error_quark (void) GError * biji_error_new (BijiErrorType type, - gchar *message) + const gchar *message) { return g_error_new_literal (BIJI_ERROR, type, message); } diff -up bijiben-3.21.2/src/libbiji/biji-error.h.webkit2 bijiben-3.21.2/src/libbiji/biji-error.h --- bijiben-3.21.2/src/libbiji/biji-error.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-error.h 2017-05-05 08:05:18.111351975 +0200 @@ -45,7 +45,7 @@ GQuark biji_error_quark GError *biji_error_new (BijiErrorType type, - gchar *message); + const gchar *message); G_END_DECLS diff -up bijiben-3.21.2/src/libbiji/biji-info-set.c.webkit2 bijiben-3.21.2/src/libbiji/biji-info-set.c --- bijiben-3.21.2/src/libbiji/biji-info-set.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-info-set.c 2017-05-05 08:05:18.111351975 +0200 @@ -21,7 +21,7 @@ BijiInfoSet * -biji_info_set_new () +biji_info_set_new (void) { BijiInfoSet *retval; diff -up bijiben-3.21.2/src/libbiji/biji-info-set.h.webkit2 bijiben-3.21.2/src/libbiji/biji-info-set.h --- bijiben-3.21.2/src/libbiji/biji-info-set.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-info-set.h 2017-05-05 08:05:18.111351975 +0200 @@ -57,7 +57,7 @@ typedef struct } BijiInfoSet; -BijiInfoSet * biji_info_set_new (); +BijiInfoSet * biji_info_set_new (void); void biji_info_set_free (BijiInfoSet *info); diff -up bijiben-3.21.2/src/libbiji/biji-manager.c.webkit2 bijiben-3.21.2/src/libbiji/biji-manager.c --- bijiben-3.21.2/src/libbiji/biji-manager.c.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/biji-manager.c 2017-05-05 08:05:18.112351975 +0200 @@ -1,16 +1,16 @@ /* bjb-note-manager.c * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -118,7 +118,6 @@ on_provider_loaded_cb (BijiProvider *pro * See #708458 * There are more performant fixes but not worth it */ biji_manager_notify_changed (manager, group, BIJI_MANAGER_MASS_CHANGE, NULL); - g_print ("sending the mass change\n"); } static void @@ -128,7 +127,7 @@ on_provider_abort_cb (BijiProvider *prov const BijiProviderInfo *info; info = biji_provider_get_info (provider); - g_hash_table_remove (self->priv->providers, (gpointer) info->unique_id); + g_hash_table_remove (self->priv->providers, info->unique_id); g_object_unref (G_OBJECT (provider)); } @@ -149,7 +148,8 @@ _add_provider (BijiManager *self, const BijiProviderInfo *info; info = biji_provider_get_info (provider); - g_hash_table_insert (self->priv->providers, (gpointer) info->unique_id, provider); + g_hash_table_insert (self->priv->providers, + g_strdup (info->unique_id), g_object_ref (provider)); g_signal_connect (provider, "loaded", G_CALLBACK (on_provider_loaded_cb), self); @@ -185,6 +185,7 @@ load_goa_client (BijiManager *self, g_message ("Loading account %s", goa_account_get_id (account)); provider = biji_own_cloud_provider_new (self, object); _add_provider (self, provider); + g_object_unref (provider); } } } @@ -204,6 +205,7 @@ load_eds_registry (BijiManager *self, { provider = biji_memo_provider_new (self, l->data); _add_provider (self, provider); + g_object_unref (provider); } g_list_free_full (list, g_object_unref); @@ -297,8 +299,8 @@ biji_manager_init (BijiManager *self) * - local files stored notes = "local" * - own cloud notes = account_get_id */ - - priv->providers = g_hash_table_new (g_str_hash, g_str_equal); + priv->providers = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, g_object_unref); } @@ -348,6 +350,8 @@ biji_manager_finalize (GObject *object) g_hash_table_destroy (manager->priv->items); g_hash_table_destroy (manager->priv->archives); + g_hash_table_unref (manager->priv->providers); + g_clear_object (&manager->priv->local_provider); G_OBJECT_CLASS (biji_manager_parent_class)->finalize (object); } @@ -435,16 +439,16 @@ title_is_unique (BijiManager *manager, g gchar * biji_manager_get_unique_title (BijiManager *manager, const gchar *title) { + gchar *new_title; + gint suffix = 2; + if (!manager) return g_strdup (title); - gchar *new_title; - if (!title) title = ""; new_title = g_strdup (title); - gint suffix = 2; while (!title_is_unique (manager, new_title)) { @@ -824,13 +828,13 @@ biji_manager_new_finish (GAsyncResult *r * And no need to _add_provider, it's a tmp provider. */ void biji_manager_import_uri (BijiManager *manager, - gchar *target_provider_id, - gchar *uri) + const gchar *target_provider_id, + const gchar *uri) { BijiProvider *ret; ret = biji_import_provider_new (manager, target_provider_id, uri); - g_signal_connect (ret, "loaded", + g_signal_connect (ret, "loaded", G_CALLBACK (on_provider_loaded_cb), manager); } @@ -841,8 +845,8 @@ biji_manager_import_uri (BijiManager *ma */ BijiNoteObj * biji_manager_note_new (BijiManager *self, - gchar *str, - gchar *provider_id) + const gchar *str, + const gchar *provider_id) { BijiProvider *provider = NULL; BijiNoteObj *retval; @@ -867,12 +871,12 @@ biji_manager_note_new (BijiMa BijiNoteObj * -biji_manager_note_new_full (BijiManager *manager, - gchar *provider_id, - gchar *suggested_path, - BijiInfoSet *info, - gchar *html, - GdkRGBA *color) +biji_manager_note_new_full (BijiManager *manager, + const gchar *provider_id, + const gchar *suggested_path, + BijiInfoSet *info, + const gchar *html, + const GdkRGBA *color) { BijiProvider *provider; BijiNoteObj *retval; diff -up bijiben-3.21.2/src/libbiji/biji-manager.h.webkit2 bijiben-3.21.2/src/libbiji/biji-manager.h --- bijiben-3.21.2/src/libbiji/biji-manager.h.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/biji-manager.h 2017-05-05 08:05:18.112351975 +0200 @@ -4,7 +4,7 @@ #include #include -#if BUILD_ZEITGEIST +#ifdef BUILD_ZEITGEIST #include #endif /* BUILD_ZEIGEIST */ @@ -85,13 +85,13 @@ BijiManager *biji_manager_new_finish void biji_manager_import_uri (BijiManager *manager, - gchar *target_provider_id, - gchar *uri); + const gchar *target_provider_id, + const gchar *uri); GList *biji_manager_get_providers (BijiManager *manager); /* */ -#if BUILD_ZEITGEIST +#ifdef BUILD_ZEITGEIST ZeitgeistLog *biji_manager_get_zg_log (BijiManager *manager); #endif /* BUILD_ZEITGEIST */ @@ -138,16 +138,16 @@ void biji_manager_empty_bin BijiNoteObj *biji_manager_note_new (BijiManager *manager, - gchar *str, - gchar *provider_id); + const gchar *str, + const gchar *provider_id); -BijiNoteObj *biji_manager_note_new_full (BijiManager *manager, - gchar *provider_id, - gchar *suggested_path, - BijiInfoSet *info, - gchar *html, - GdkRGBA *color); +BijiNoteObj *biji_manager_note_new_full (BijiManager *manager, + const gchar *provider_id, + const gchar *suggested_path, + BijiInfoSet *info, + const gchar *html, + const GdkRGBA *color); G_END_DECLS diff -up bijiben-3.21.2/src/libbiji/biji-note-id.c.webkit2 bijiben-3.21.2/src/libbiji/biji-note-id.c --- bijiben-3.21.2/src/libbiji/biji-note-id.c.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/biji-note-id.c 2017-05-05 08:05:18.112351975 +0200 @@ -1,16 +1,16 @@ /* bjb-note-id.c * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -228,7 +228,8 @@ biji_note_id_get_title (BijiNoteID* n) gboolean -biji_note_id_set_content (BijiNoteID *id, gchar *content) +biji_note_id_set_content (BijiNoteID *id, + const gchar *content) { g_return_val_if_fail (BIJI_IS_NOTE_ID (id), FALSE); g_return_val_if_fail ((content != NULL), FALSE); diff -up bijiben-3.21.2/src/libbiji/biji-note-id.h.webkit2 bijiben-3.21.2/src/libbiji/biji-note-id.h --- bijiben-3.21.2/src/libbiji/biji-note-id.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-note-id.h 2017-05-05 08:05:18.112351975 +0200 @@ -1,16 +1,16 @@ /* bjb-note-id.h * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -67,7 +67,7 @@ void biji_note_id_set_title const gchar *biji_note_id_get_title (BijiNoteID* n); -gboolean biji_note_id_set_content (BijiNoteID *id, gchar *content); +gboolean biji_note_id_set_content (BijiNoteID *id, const gchar *content); const gchar *biji_note_id_get_content (BijiNoteID *id); diff -up bijiben-3.21.2/src/libbiji/biji-note-obj.c.webkit2 bijiben-3.21.2/src/libbiji/biji-note-obj.c --- bijiben-3.21.2/src/libbiji/biji-note-obj.c.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-note-obj.c 2017-05-05 08:05:18.113351975 +0200 @@ -234,7 +234,7 @@ biji_note_obj_are_same (BijiNoteObj *a, /* First cancel timeout * this func is most probably stupid it might exists (move file) */ -gboolean +static gboolean biji_note_obj_trash (BijiItem *item) { BijiNoteObj *note_to_kill; @@ -287,21 +287,15 @@ biji_note_obj_is_trashed static const gchar * biji_note_obj_get_path (BijiItem *item) { + BijiNoteObj *note; + g_return_val_if_fail (BIJI_IS_NOTE_OBJ (item), NULL); - BijiNoteObj *note = BIJI_NOTE_OBJ (item); + note = BIJI_NOTE_OBJ (item); return biji_note_id_get_path (note->priv->id); } - -BijiNoteID * -note_get_id(BijiNoteObj* n) -{ - return n->priv->id; -} - - static const gchar * biji_note_obj_get_title (BijiItem *note) { @@ -367,7 +361,7 @@ biji_note_obj_get_mtime (BijiItem *note) return biji_note_id_get_mtime (BIJI_NOTE_OBJ (note)->priv->id); } -gchar * +const gchar * biji_note_obj_get_last_change_date_string (BijiNoteObj *self) { g_return_val_if_fail (BIJI_IS_NOTE_OBJ (self), ""); @@ -394,14 +388,6 @@ biji_note_obj_set_last_metadata_change_d return biji_note_id_set_last_metadata_change_date (n->priv->id, time); } -gboolean -biji_note_obj_set_note_create_date (BijiNoteObj* n, gint64 time) -{ - g_return_val_if_fail (BIJI_IS_NOTE_OBJ(n), FALSE); - - return biji_note_id_set_create_date (n->priv->id, time); -} - static void biji_note_obj_clear_icons (BijiNoteObj *note) { @@ -411,7 +397,8 @@ biji_note_obj_clear_icons (BijiNoteObj * } static void -biji_note_obj_set_rgba_internal (BijiNoteObj *n, GdkRGBA *rgba) +biji_note_obj_set_rgba_internal (BijiNoteObj *n, + const GdkRGBA *rgba) { n->priv->color = gdk_rgba_copy(rgba); @@ -419,7 +406,8 @@ biji_note_obj_set_rgba_internal (BijiNot } void -biji_note_obj_set_rgba (BijiNoteObj *n, GdkRGBA *rgba) +biji_note_obj_set_rgba (BijiNoteObj *n, + const GdkRGBA *rgba) { if (!n->priv->color) biji_note_obj_set_rgba_internal (n, rgba); @@ -458,7 +446,8 @@ biji_note_obj_get_raw_text } void -biji_note_obj_set_raw_text (BijiNoteObj *note, gchar *plain_text) +biji_note_obj_set_raw_text (BijiNoteObj *note, + const gchar *plain_text) { if (biji_note_id_set_content (note->priv->id, plain_text)) { @@ -475,7 +464,7 @@ biji_note_obj_get_notebooks (BijiNoteObj return g_hash_table_get_values (n->priv->labels); } -gboolean +static gboolean biji_note_obj_has_notebook (BijiItem *item, gchar *label) { BijiNoteObj *note = BIJI_NOTE_OBJ (item); @@ -498,7 +487,7 @@ _biji_notebook_refresh (gboolean query_r } -/*static */ gboolean +static gboolean biji_note_obj_add_notebook (BijiItem *item, BijiItem *notebook, gchar *title) @@ -530,13 +519,15 @@ biji_note_obj_add_notebook (BijiItem *it } -gboolean +static gboolean biji_note_obj_remove_notebook (BijiItem *item, BijiItem *notebook) { + BijiNoteObj *note; + g_return_val_if_fail (BIJI_IS_NOTE_OBJ (item), FALSE); g_return_val_if_fail (BIJI_IS_NOTEBOOK (notebook), FALSE); - BijiNoteObj *note = BIJI_NOTE_OBJ (item); + note = BIJI_NOTE_OBJ (item); if (g_hash_table_remove (note->priv->labels, biji_item_get_title (notebook))) { @@ -552,27 +543,6 @@ biji_note_obj_remove_notebook (BijiItem } gboolean -biji_note_obj_has_tag_prefix (BijiNoteObj *note, gchar *label) -{ - gboolean retval = FALSE; - GList *tags, *l; - - tags = g_hash_table_get_keys (note->priv->labels); - - for (l = tags; l != NULL; l=l->next) - { - if (g_str_has_prefix (l->data, label)) - { - retval = TRUE; - break; - } - } - - g_list_free (tags); - return retval; -} - -gboolean note_obj_is_template (BijiNoteObj *n) { g_return_val_if_fail(BIJI_IS_NOTE_OBJ(n),FALSE); @@ -595,11 +565,11 @@ biji_note_obj_save_note (BijiNoteObj *se gchar * biji_note_obj_get_icon_file (BijiNoteObj *note) { - g_return_val_if_fail (BIJI_IS_NOTE_OBJ (note), NULL); - const gchar *uuid; gchar *basename, *filename; + g_return_val_if_fail (BIJI_IS_NOTE_OBJ (note), NULL); + uuid = BIJI_NOTE_OBJ_GET_CLASS (note)->get_basename (note); basename = biji_str_mass_replace (uuid, ".note", ".png", ".txt", ".png", NULL); @@ -793,7 +763,7 @@ biji_note_obj_set_create_date (BijiNoteO /* Webkit */ gchar * -html_from_plain_text (gchar *content) +html_from_plain_text (const gchar *content) { gchar *escaped, *retval; @@ -808,12 +778,11 @@ html_from_plain_text NULL); retval = g_strconcat ("", + "", + "", + "" + "", "", - "", escaped, "", NULL); @@ -830,7 +799,7 @@ biji_note_obj_get_html (BijiNoteObj *not void biji_note_obj_set_html (BijiNoteObj *note, - gchar *html) + const gchar *html) { BIJI_NOTE_OBJ_GET_CLASS (note)->set_html (note, html); } diff -up bijiben-3.21.2/src/libbiji/biji-note-obj.h.webkit2 bijiben-3.21.2/src/libbiji/biji-note-obj.h --- bijiben-3.21.2/src/libbiji/biji-note-obj.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-note-obj.h 2017-05-05 08:05:18.113351975 +0200 @@ -1,16 +1,16 @@ /* biji-note-obj.h * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -66,7 +66,7 @@ struct _BijiNoteObjClass /* * Mandatory. When editor amends html, assign it */ - void (*set_html) (BijiNoteObj *note, gchar *html); + void (*set_html) (BijiNoteObj *note, const gchar *html); /* * Mandatory. Store the note. This might be async. */ @@ -118,7 +118,7 @@ gboolean biji_note_obj_set_mtime gint64 time); -gchar *biji_note_obj_get_last_change_date_string (BijiNoteObj *self); +const gchar *biji_note_obj_get_last_change_date_string (BijiNoteObj *self); gint64 biji_note_obj_get_last_metadata_change_date (BijiNoteObj *note); @@ -142,7 +142,8 @@ gboolean biji_note_obj_get_rgba GdkRGBA *rgba) ; -void biji_note_obj_set_rgba (BijiNoteObj *n, GdkRGBA *rgba) ; +void biji_note_obj_set_rgba (BijiNoteObj *n, + const GdkRGBA *rgba) ; GList *biji_note_obj_get_notebooks (BijiNoteObj *n); @@ -172,7 +173,7 @@ const gchar *biji_note_obj_get_raw_t void biji_note_obj_set_raw_text (BijiNoteObj *note, - gchar *plain_text); + const gchar *plain_text); gboolean biji_note_obj_set_title (BijiNoteObj* note_obj_ptr, @@ -182,9 +183,6 @@ gboolean biji_note_obj_set_title gboolean biji_note_obj_is_template (BijiNoteObj *note); -gboolean biji_note_obj_is_trashed (BijiNoteObj *note); - - GtkWidget *biji_note_obj_open (BijiNoteObj *note); @@ -197,11 +195,11 @@ GtkWidget *biji_note_obj_get_edito gboolean biji_note_obj_can_format (BijiNoteObj *note); -gchar *html_from_plain_text (gchar *content); +gchar *html_from_plain_text (const gchar *content); -void biji_note_obj_set_html (BijiNoteObj *note, - gchar *html); +void biji_note_obj_set_html (BijiNoteObj *note, + const gchar *html); gchar *biji_note_obj_get_html (BijiNoteObj *note); diff -up bijiben-3.21.2/src/libbiji/biji-string.c.webkit2 bijiben-3.21.2/src/libbiji/biji-string.c --- bijiben-3.21.2/src/libbiji/biji-string.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-string.c 2017-05-05 08:05:18.114351975 +0200 @@ -1,16 +1,16 @@ /* biji-string.c * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -19,7 +19,9 @@ #include "biji-string.h" gchar * -biji_str_replace (const gchar *string, gchar *as_is, gchar *to_be) +biji_str_replace (const gchar *string, + const gchar *as_is, + const gchar *to_be) { gchar **array; gchar *result = NULL; diff -up bijiben-3.21.2/src/libbiji/biji-string.h.webkit2 bijiben-3.21.2/src/libbiji/biji-string.h --- bijiben-3.21.2/src/libbiji/biji-string.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-string.h 2017-05-05 08:05:18.114351975 +0200 @@ -1,16 +1,16 @@ /* biji-string.h * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -25,7 +25,7 @@ G_BEGIN_DECLS /* Replaces inside string the as_is with to_be * Returns a newly allocated string */ -gchar * biji_str_replace (const gchar *string, gchar *as_is, gchar *to_be); +gchar * biji_str_replace (const gchar *string, const gchar *as_is, const gchar *to_be); /* Calls biji_str_replace as much as there are paired gchar* args * Returns a newly allocated string */ diff -up bijiben-3.21.2/src/libbiji/biji-tracker.c.webkit2 bijiben-3.21.2/src/libbiji/biji-tracker.c --- bijiben-3.21.2/src/libbiji/biji-tracker.c.webkit2 2015-05-14 14:01:40.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-tracker.c 2017-05-05 08:05:18.114351975 +0200 @@ -1,16 +1,16 @@ /* biji-tracker.c * Copyright (C) Pierre-Yves LUYTEN 2012, 2013 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -215,7 +215,7 @@ biji_query_info_hash_finish (GObject set->tracker_urn = g_strdup (tracker_sparql_cursor_get_string (cursor, BIJI_URN_COL, NULL)); set->title = g_strdup (tracker_sparql_cursor_get_string (cursor, BIJI_TITLE_COL, NULL)); - + if (g_time_val_from_iso8601 (tracker_sparql_cursor_get_string (cursor, BIJI_MTIME_COL, NULL), &time)) set->mtime = time.tv_sec; @@ -339,6 +339,8 @@ biji_get_all_notebooks_async (BijiManage NULL); bjb_query_async (manager, query, cb, NULL, user_data); + + g_free (query); } @@ -745,7 +747,7 @@ ensure_ressource_callback (GObject *sour void -biji_tracker_ensure_ressource_from_info (BijiManager *manager, +biji_tracker_ensure_ressource_from_info (BijiManager *manager, BijiInfoSet *info) { gchar *query; @@ -776,6 +778,8 @@ biji_tracker_ensure_ressource_from_info tracker_sparql_connection_query_async ( get_connection (manager), query, NULL, ensure_ressource_callback, finisher); + + g_free (query); } diff -up bijiben-3.21.2/src/libbiji/biji-zeitgeist.c.webkit2 bijiben-3.21.2/src/libbiji/biji-zeitgeist.c --- bijiben-3.21.2/src/libbiji/biji-zeitgeist.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-zeitgeist.c 2017-05-05 08:05:18.114351975 +0200 @@ -1,16 +1,16 @@ /* biji-zeitgeist.c * Copyright (C) Pierre-Yves LUYTEN 2011 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see .*/ @@ -34,9 +34,9 @@ biji_zeitgeist_init (void) log = zeitgeist_log_new (); event = zeitgeist_event_new_full ( - NULL, NULL, "application://bijiben.desktop", NULL, NULL); + NULL, NULL, "application://org.gnome.bijiben.desktop", NULL, NULL); - ptr_arr = g_ptr_array_new (); + ptr_arr = g_ptr_array_new_with_free_func (g_object_unref); g_ptr_array_add (ptr_arr, event); ds = zeitgeist_data_source_new_full ("org.gnome.bijiben,dataprovider", @@ -47,7 +47,8 @@ biji_zeitgeist_init (void) zg_dsr = zeitgeist_data_source_registry_new (); zeitgeist_data_source_registry_register_data_source (zg_dsr, ds, NULL, NULL, NULL); - g_ptr_array_set_free_func (ptr_arr, g_object_unref); + g_object_unref (ds); + g_object_unref (zg_dsr); g_ptr_array_unref (ptr_arr); return log; @@ -88,20 +89,20 @@ check_insert_create_zeitgeist (BijiNoteO GPtrArray *templates; ZeitgeistEvent *event; ZeitgeistSubject *subject; - + uri = g_strdup_printf ("file://%s", biji_item_get_uuid (BIJI_ITEM (note))); log = biji_manager_get_zg_log (biji_item_get_manager (BIJI_ITEM (note))); - - templates = g_ptr_array_new (); - event = zeitgeist_event_new_full (ZEITGEIST_ZG_CREATE_EVENT, + + templates = g_ptr_array_new_with_free_func (g_object_unref); + event = zeitgeist_event_new_full (ZEITGEIST_ZG_CREATE_EVENT, NULL, - "application://bijiben.desktop", + "application://org.gnome.bijiben.desktop", NULL, NULL); subject = zeitgeist_subject_new (); zeitgeist_subject_set_uri (subject, uri); zeitgeist_event_add_subject (event, subject); g_ptr_array_add (templates, event); - + zeitgeist_log_find_events (log, zeitgeist_time_range_new_to_now (), templates, @@ -111,12 +112,15 @@ check_insert_create_zeitgeist (BijiNoteO NULL, (GAsyncReadyCallback) on_find_create_event, note); + + g_ptr_array_unref (templates); + g_free (uri); } void insert_zeitgeist (BijiNoteObj *note, - gchar *zg_interpretation) + const gchar *zg_interpretation) { gchar *uri; const gchar *title; @@ -149,7 +153,7 @@ insert_zeitgeist (BijiNoteObj *note, event = zeitgeist_event_new_full (zg_interpretation, ZEITGEIST_ZG_USER_ACTIVITY, - "application://bijiben.desktop", + "application://org.gnome.bijiben.desktop", "", subject, NULL); @@ -161,9 +165,11 @@ insert_zeitgeist (BijiNoteObj *note, zeitgeist_log_insert_event_no_reply (log, event, NULL); g_free (uri); + g_object_unref (event); + g_object_unref (subject); - /* + /* * Check if the note * was already created into zeitgeist */ diff -up bijiben-3.21.2/src/libbiji/biji-zeitgeist.h.webkit2 bijiben-3.21.2/src/libbiji/biji-zeitgeist.h --- bijiben-3.21.2/src/libbiji/biji-zeitgeist.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/biji-zeitgeist.h 2017-05-05 08:05:18.115351975 +0200 @@ -1,16 +1,16 @@ /* biji-zeitgeist.h * Copyright (C) Pierre-Yves LUYTEN 2011 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see .*/ @@ -31,7 +31,7 @@ ZeitgeistLog *biji_zeitgeist_i void insert_zeitgeist (BijiNoteObj *note, - gchar *zg_interpretation); + const gchar *zg_interpretation); #endif /* BUILD_ZEITGEIST */ diff -up bijiben-3.21.2/src/libbiji/deserializer/biji-lazy-deserializer.c.webkit2 bijiben-3.21.2/src/libbiji/deserializer/biji-lazy-deserializer.c --- bijiben-3.21.2/src/libbiji/deserializer/biji-lazy-deserializer.c.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/deserializer/biji-lazy-deserializer.c 2017-05-05 08:05:18.115351975 +0200 @@ -6,12 +6,12 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * WebkitWebView 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -39,7 +39,7 @@ enum #define TOMBOY_NS "http://beatniksoftware.com/tomboy" -typedef enum +typedef enum { NO_TYPE, BIJIBEN_1, @@ -97,7 +97,7 @@ biji_lazy_deserializer_set_property (GOb BijiLazyDeserializer *self = BIJI_LAZY_DESERIALIZER (object); switch (property_id) - { + { case PROP_NOTE: self->priv->note = g_value_get_object (value); break; @@ -211,7 +211,7 @@ process_tomboy_end_elem (BijiLazyDeseria { BijiLazyDeserializerPrivate *priv = self->priv; const gchar *element_name; - + element_name = (const gchar *) xmlTextReaderConstName (priv->inner); if (g_strcmp0 (element_name, "note-content")==0) @@ -257,7 +257,7 @@ process_tomboy_node (BijiLazyDeserialize type = xmlTextReaderNodeType (priv->inner); name = xmlTextReaderConstName (priv->inner); - + if (name == NULL) name = BAD_CAST "(NULL)"; @@ -278,6 +278,9 @@ process_tomboy_node (BijiLazyDeserialize case XML_DTD_NODE: process_tomboy_text_elem (self); break; + + default: + break; } } @@ -452,7 +455,7 @@ process_bijiben_html_content (BijiLazyDe /* Common XML format for both Bijiben / Tomboy */ static void -processNode (BijiLazyDeserializer *self) +processNode (BijiLazyDeserializer *self) { xmlTextReaderPtr r = self->priv->r; BijiNoteObj * n = self->priv->note; @@ -503,7 +506,7 @@ processNode (BijiLazyDeserializer *self) free (result); } - if (g_strcmp0 ((gchar*) name, "color") == 0 ) + if (g_strcmp0 ((gchar*) name, "color") == 0 ) { color_str = (gchar*) xmlTextReaderReadString (r); @@ -516,7 +519,7 @@ processNode (BijiLazyDeserializer *self) free (color_str); } - if ( g_strcmp0((gchar*)name,"tag") == 0 ) + if ( g_strcmp0((gchar*)name,"tag") == 0 ) { tag = (gchar*) xmlTextReaderReadString(r); @@ -551,19 +554,19 @@ biji_parse_file (BijiLazyDeserializer *s } } -gboolean +static gboolean biji_lazy_deserialize_internal (BijiLazyDeserializer *self) { BijiNoteObj* n = self->priv->note; const gchar *path; xmlDocPtr doc; xmlNodePtr cur; - xmlChar *version; + xmlChar *version; path = biji_item_get_uuid (BIJI_ITEM (n)); doc = xmlParseFile (path); - if (doc == NULL ) + if (doc == NULL ) { g_warning ("File not parsed successfully"); return FALSE; @@ -571,14 +574,14 @@ biji_lazy_deserialize_internal (BijiLazy cur = xmlDocGetRootElement (doc); - if (cur == NULL) + if (cur == NULL) { g_warning ("File empty"); xmlFreeDoc(doc); return FALSE; } - if (xmlStrcmp(cur->name, (const xmlChar *) "note")) + if (xmlStrcmp(cur->name, (const xmlChar *) "note")) { g_message ("document of the wrong type, root node != note"); xmlFreeDoc(doc); diff -up bijiben-3.21.2/src/libbiji/deserializer/biji-tomboy-reader.c.webkit2 bijiben-3.21.2/src/libbiji/deserializer/biji-tomboy-reader.c --- bijiben-3.21.2/src/libbiji/deserializer/biji-tomboy-reader.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/deserializer/biji-tomboy-reader.c 2017-05-05 08:05:18.115351975 +0200 @@ -1,18 +1,18 @@ /* * biji-tomboy-reader.c - * + * * Copyright 2013 Pierre-Yves Luyten - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -46,7 +46,7 @@ enum { static GParamSpec *properties[TOMBOY_READER_PROP] = { NULL, }; -typedef enum +typedef enum { NO_TYPE, TOMBOY_1, @@ -130,7 +130,7 @@ process_tomboy_end_elem (BijiTomboyReade { BijiTomboyReaderPrivate *priv = self->priv; const gchar *element_name; - + element_name = (const gchar *) xmlTextReaderConstName (priv->inner); if (g_strcmp0 (element_name, "note-content")==0) @@ -211,6 +211,9 @@ process_tomboy_node (BijiTomboyReader *s case XML_DTD_NODE: process_tomboy_text_elem (self); break; + + default: + break; } } @@ -248,7 +251,7 @@ process_tomboy_xml_content (BijiTomboyRe static void -processNode (BijiTomboyReader *self) +processNode (BijiTomboyReader *self) { BijiTomboyReaderPrivate *priv; xmlTextReaderPtr r; @@ -264,7 +267,7 @@ processNode (BijiTomboyReader *self) if (g_strcmp0 (name, "title") == 0) priv->set->title = (gchar*) xmlTextReaderReadString (r); - + if (g_strcmp0(name, "text") == 0) { @@ -297,7 +300,7 @@ processNode (BijiTomboyReader *self) - if (g_strcmp0 (name,"tag") == 0 ) + if (g_strcmp0 (name,"tag") == 0 ) { tag = (gchar*) xmlTextReaderReadString(r); @@ -330,15 +333,15 @@ biji_tomboy_reader_constructed (GObject BijiTomboyReaderPrivate *priv; xmlDocPtr doc; xmlNodePtr cur; - xmlChar *version; + xmlChar *version; self = BIJI_TOMBOY_READER (obj); priv = self->priv; - + doc = xmlParseFile (priv->path); - if (doc == NULL ) + if (doc == NULL ) { priv->error = biji_error_new (BIJI_ERROR_SOURCE, "File not parsed successfully"); @@ -348,7 +351,7 @@ biji_tomboy_reader_constructed (GObject cur = xmlDocGetRootElement (doc); - if (cur == NULL) + if (cur == NULL) { priv->error = biji_error_new (BIJI_ERROR_SOURCE, "File empty"); @@ -357,7 +360,7 @@ biji_tomboy_reader_constructed (GObject } - if (xmlStrcmp(cur->name, (const xmlChar *) "note")) + if (xmlStrcmp(cur->name, (const xmlChar *) "note")) { priv->error = biji_error_new (BIJI_ERROR_SOURCE, "Root node != note"); diff -up bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.c.webkit2 bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.c --- bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.c.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.c 2017-05-05 08:05:18.116351975 +0200 @@ -21,10 +21,6 @@ #endif #include "biji-editor-selection.h" -#include "biji-editor-utils.h" - -#include -#include #include #include @@ -34,17 +30,9 @@ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_EDITOR_SELECTION, EEditorSelectionPrivate)) -#define WORD_WRAP_LENGTH 71 - - struct _EEditorSelectionPrivate { - WebKitWebView *webview; - - gchar *text; - gchar *background_color; - gchar *font_color; - gchar *font_family; + WebKitEditorTypingAttributes attrs; }; G_DEFINE_TYPE ( @@ -56,190 +44,60 @@ G_DEFINE_TYPE ( enum { PROP_0, PROP_WEBVIEW, - PROP_BACKGROUND_COLOR, PROP_BOLD, - PROP_FONT_NAME, - PROP_FONT_SIZE, - PROP_FONT_COLOR, - PROP_BLOCK_FORMAT, - PROP_INDENTED, PROP_ITALIC, - PROP_MONOSPACED, PROP_STRIKE_THROUGH, - PROP_SUBSCRIPT, - PROP_SUPERSCRIPT, - PROP_TEXT, - PROP_UNDERLINE, }; -/* e-utils.h */ - -/** - * e_rgba_to_value: - * @rgba: a #GdkRGBA - * - * - * Converts #GdkRGBA to a 24-bit RGB color value - * - * Returns: a 24-bit color value - **/ -guint32 -e_rgba_to_value (GdkRGBA *rgba) -{ - guint16 red; - guint16 green; - guint16 blue; - - g_return_val_if_fail (rgba != NULL, 0); - - red = 255 * rgba->red; - green = 255 * rgba->green; - blue = 255 * rgba->blue; - - return (guint32) - ((((red & 0xFF) << 16) | - ((green & 0xFF) << 8) | - (blue & 0xFF)) & 0xffffff); -} - -/* e-editor-selection */ - -static const GdkRGBA black = { 0 }; - -static WebKitDOMRange * -editor_selection_get_current_range (EEditorSelection *selection) -{ - WebKitDOMDocument *document; - WebKitDOMDOMWindow *window; - WebKitDOMDOMSelection *dom_selection; - - document = webkit_web_view_get_dom_document (selection->priv->webview); - window = webkit_dom_document_get_default_view (document); - - if (!window) - return NULL; - - dom_selection = webkit_dom_dom_window_get_selection (window); - - if (webkit_dom_dom_selection_get_range_count (dom_selection) < 1) - return NULL; - - return webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL); -} - -static gboolean -get_has_style (EEditorSelection *selection, const gchar *style_tag) -{ - WebKitDOMNode *node; - WebKitDOMElement *element; - WebKitDOMRange *range; - gboolean result; - gint tag_len; - - range = editor_selection_get_current_range (selection); - - if (!range) - return FALSE; - - node = webkit_dom_range_get_start_container (range, NULL); - - if (!WEBKIT_DOM_IS_ELEMENT (node)) - element = webkit_dom_node_get_parent_element (node); - - else - element = WEBKIT_DOM_ELEMENT (node); - - tag_len = strlen (style_tag); - result = FALSE; - while (!result && element) { - gchar *element_tag; - - element_tag = webkit_dom_element_get_tag_name (element); - - result = ((tag_len == strlen (element_tag)) && - (g_ascii_strncasecmp (element_tag, style_tag, tag_len) == 0)); - - /* Special case:
marks quotation, while - * just
is used for indentation. If the
- * has type=cite, then ignore it */ - if (result && g_ascii_strncasecmp (element_tag, "blockquote", 10) == 0) { - if (webkit_dom_element_has_attribute (element, "type")) { - gchar *type; - type = webkit_dom_element_get_attribute ( - element, "type"); - if (g_ascii_strncasecmp (type, "cite", 4) == 0) { - result = FALSE; - } - g_free (type); - } - } - - g_free (element_tag); - - if (result) { - break; - } - - element = webkit_dom_node_get_parent_element ( - WEBKIT_DOM_NODE (element)); - } - - return result; -} - -static gchar * -get_font_property (EEditorSelection *selection, - const gchar *font_property) -{ - WebKitDOMRange *range; - WebKitDOMNode *node; - WebKitDOMElement *element; - gchar *value; - - range = editor_selection_get_current_range (selection); - if (!range) { - return NULL; - } - - node = webkit_dom_range_get_common_ancestor_container (range, NULL); - element = e_editor_dom_node_find_parent_element (node, "FONT"); - if (!element) { - return NULL; - } - - g_object_get (G_OBJECT (element), font_property, &value, NULL); - - return value; +static void +check_and_update_typing_attr (EEditorSelection *selection, + WebKitEditorTypingAttributes attrs, + unsigned attr, + const char *poperty_name) +{ + if (attrs & attr) { + if (!(selection->priv->attrs & attr)) { + selection->priv->attrs |= attr; + g_object_notify (G_OBJECT (selection), poperty_name); + } + } else if (!(attrs & attr)) { + if (selection->priv->attrs & attr) { + selection->priv->attrs &= ~attr; + g_object_notify (G_OBJECT (selection), poperty_name); + } + } } static void -webview_selection_changed (WebKitWebView *webview, - EEditorSelection *selection) -{ - g_object_notify (G_OBJECT (selection), "background-color"); - g_object_notify (G_OBJECT (selection), "bold"); - g_object_notify (G_OBJECT (selection), "font-name"); - g_object_notify (G_OBJECT (selection), "font-size"); - g_object_notify (G_OBJECT (selection), "font-color"); - g_object_notify (G_OBJECT (selection), "block-format"); - g_object_notify (G_OBJECT (selection), "indented"); - g_object_notify (G_OBJECT (selection), "italic"); - g_object_notify (G_OBJECT (selection), "monospaced"); - g_object_notify (G_OBJECT (selection), "strike-through"); - g_object_notify (G_OBJECT (selection), "subscript"); - g_object_notify (G_OBJECT (selection), "superscript"); - g_object_notify (G_OBJECT (selection), "text"); - g_object_notify (G_OBJECT (selection), "underline"); +webview_typing_attributes_changed (WebKitEditorState *editor, + GParamSpec *spec, + EEditorSelection *selection) +{ + WebKitEditorTypingAttributes attrs; + + attrs = webkit_editor_state_get_typing_attributes (editor); + + g_object_freeze_notify (G_OBJECT (selection)); + check_and_update_typing_attr (selection, attrs, WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD, "bold"); + check_and_update_typing_attr (selection, attrs, WEBKIT_EDITOR_TYPING_ATTRIBUTE_ITALIC, "italic"); + check_and_update_typing_attr (selection, attrs, WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH, "strike-through"); + g_object_thaw_notify (G_OBJECT (selection)); } static void editor_selection_set_webview (EEditorSelection *selection, WebKitWebView *webview) { + WebKitEditorState *editor; + + g_clear_object (&selection->priv->webview); selection->priv->webview = g_object_ref (webview); - g_signal_connect ( - webview, "selection-changed", - G_CALLBACK (webview_selection_changed), selection); + + editor = webkit_web_view_get_editor_state (webview); + selection->priv->attrs = webkit_editor_state_get_typing_attributes (editor); + g_signal_connect ( + editor, "notify::typing-attributes", + G_CALLBACK (webview_typing_attributes_changed), selection); } @@ -249,82 +107,28 @@ e_editor_selection_get_property (GObject GValue *value, GParamSpec *pspec) { - GdkRGBA rgba = { 0 }; EEditorSelection *selection = E_EDITOR_SELECTION (object); switch (property_id) { - case PROP_BACKGROUND_COLOR: - g_value_set_string (value, - e_editor_selection_get_background_color (selection)); - return; - case PROP_BOLD: g_value_set_boolean (value, e_editor_selection_get_bold (selection)); - return; - - case PROP_FONT_NAME: - g_value_set_string (value, - e_editor_selection_get_font_name (selection)); - return; - - case PROP_FONT_SIZE: - g_value_set_int (value, - e_editor_selection_get_font_size (selection)); - return; - - case PROP_FONT_COLOR: - e_editor_selection_get_font_color (selection, &rgba); - g_value_set_boxed (value, &rgba); - return; - - case PROP_BLOCK_FORMAT: - g_value_set_int (value, - e_editor_selection_get_block_format (selection)); - return; - - case PROP_INDENTED: - g_value_set_boolean (value, - e_editor_selection_get_indented (selection)); - return; + break; case PROP_ITALIC: g_value_set_boolean (value, e_editor_selection_get_italic (selection)); - return; - - case PROP_MONOSPACED: - g_value_set_boolean (value, - e_editor_selection_get_monospaced (selection)); - return; + break; case PROP_STRIKE_THROUGH: g_value_set_boolean (value, e_editor_selection_get_strike_through (selection)); - return; - - case PROP_SUBSCRIPT: - g_value_set_boolean (value, - e_editor_selection_get_subscript (selection)); - return; - - case PROP_SUPERSCRIPT: - g_value_set_boolean (value, - e_editor_selection_get_superscript (selection)); - return; - - case PROP_TEXT: - g_value_set_string (value, - e_editor_selection_get_string (selection)); break; - case PROP_UNDERLINE: - g_value_set_boolean (value, - e_editor_selection_get_underline (selection)); - return; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; } - - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } static void @@ -341,65 +145,20 @@ e_editor_selection_set_property (GObject selection, g_value_get_object (value)); return; - case PROP_BACKGROUND_COLOR: - e_editor_selection_set_background_color ( - selection, g_value_get_string (value)); - return; - case PROP_BOLD: e_editor_selection_set_bold ( selection, g_value_get_boolean (value)); return; - case PROP_FONT_COLOR: - e_editor_selection_set_font_color ( - selection, g_value_get_boxed (value)); - return; - - case PROP_BLOCK_FORMAT: - e_editor_selection_set_block_format ( - selection, g_value_get_int (value)); - return; - - case PROP_FONT_NAME: - e_editor_selection_set_font_name ( - selection, g_value_get_string (value)); - return; - - case PROP_FONT_SIZE: - e_editor_selection_set_font_size ( - selection, g_value_get_int (value)); - return; - case PROP_ITALIC: e_editor_selection_set_italic ( selection, g_value_get_boolean (value)); return; - case PROP_MONOSPACED: - e_editor_selection_set_monospaced ( - selection, g_value_get_boolean (value)); - return; - case PROP_STRIKE_THROUGH: e_editor_selection_set_strike_through ( selection, g_value_get_boolean (value)); return; - - case PROP_SUBSCRIPT: - e_editor_selection_set_subscript ( - selection, g_value_get_boolean (value)); - return; - - case PROP_SUPERSCRIPT: - e_editor_selection_set_superscript ( - selection, g_value_get_boolean (value)); - return; - - case PROP_UNDERLINE: - e_editor_selection_set_underline ( - selection, g_value_get_boolean (value)); - return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -410,8 +169,9 @@ e_editor_selection_finalize (GObject *ob { EEditorSelection *selection = E_EDITOR_SELECTION (object); - g_free (selection->priv->text); - selection->priv->text = NULL; + g_object_unref (selection->priv->webview); + + G_OBJECT_CLASS (e_editor_selection_parent_class)->finalize (object); } static void @@ -438,16 +198,6 @@ e_editor_selection_class_init (EEditorSe g_object_class_install_property ( object_class, - PROP_BACKGROUND_COLOR, - g_param_spec_string ( - "background-color", - NULL, - NULL, - NULL, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, PROP_BOLD, g_param_spec_boolean ( "bold", @@ -458,60 +208,6 @@ e_editor_selection_class_init (EEditorSe g_object_class_install_property ( object_class, - PROP_FONT_NAME, - g_param_spec_string ( - "font-name", - NULL, - NULL, - NULL, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_FONT_SIZE, - g_param_spec_int ( - "font-size", - NULL, - NULL, - 1, - 7, - 3, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_FONT_COLOR, - g_param_spec_boxed ( - "font-color", - NULL, - NULL, - GDK_TYPE_RGBA, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_BLOCK_FORMAT, - g_param_spec_int ( - "block-format", - NULL, - NULL, - 0, - G_MAXINT, - 0, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_INDENTED, - g_param_spec_boolean ( - "indented", - NULL, - NULL, - FALSE, - G_PARAM_READABLE)); - - g_object_class_install_property ( - object_class, PROP_ITALIC, g_param_spec_boolean ( "italic", @@ -522,16 +218,6 @@ e_editor_selection_class_init (EEditorSe g_object_class_install_property ( object_class, - PROP_MONOSPACED, - g_param_spec_boolean ( - "monospaced", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, PROP_STRIKE_THROUGH, g_param_spec_boolean ( "strike-through", @@ -539,46 +225,6 @@ e_editor_selection_class_init (EEditorSe NULL, FALSE, G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_SUPERSCRIPT, - g_param_spec_boolean ( - "superscript", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_SUBSCRIPT, - g_param_spec_boolean ( - "subscript", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_TEXT, - g_param_spec_string ( - "text", - NULL, - NULL, - NULL, - G_PARAM_READABLE)); - - g_object_class_install_property ( - object_class, - PROP_UNDERLINE, - g_param_spec_boolean ( - "underline", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); } @@ -599,350 +245,17 @@ e_editor_selection_new (WebKitWebView *p } gboolean -e_editor_selection_has_text (EEditorSelection *selection) -{ - WebKitDOMRange *range; - WebKitDOMNode *node; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - - range = editor_selection_get_current_range (selection); - - node = webkit_dom_range_get_start_container (range, NULL); - if (webkit_dom_node_get_node_type (node) == 3) { - return TRUE; - } - - node = webkit_dom_range_get_end_container (range, NULL); - if (webkit_dom_node_get_node_type (node) == 3) { - return TRUE; - } - - node = WEBKIT_DOM_NODE (webkit_dom_range_clone_contents (range, NULL)); - while (node) { - if (webkit_dom_node_get_node_type (node) == 3) { - return TRUE; - } - - if (webkit_dom_node_has_child_nodes (node)) { - node = webkit_dom_node_get_first_child (node); - } else if (webkit_dom_node_get_next_sibling (node)) { - node = webkit_dom_node_get_next_sibling (node); - } else { - node = webkit_dom_node_get_parent_node (node); - if (node) { - node = webkit_dom_node_get_next_sibling (node); - } - } - } - - return FALSE; -} - -gchar * -e_editor_selection_get_caret_word (EEditorSelection *selection) -{ - WebKitDOMRange *range; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), NULL); - - range = editor_selection_get_current_range (selection); - - /* Don't operate on the visible selection */ - range = webkit_dom_range_clone_range (range, NULL); - webkit_dom_range_expand (range, "word", NULL); - - return webkit_dom_range_to_string (range, NULL); -} - -void -e_editor_selection_replace_caret_word (EEditorSelection *selection, - const gchar *replacement) -{ - WebKitDOMDocument *document; - WebKitDOMDOMWindow *window; - WebKitDOMDOMSelection *dom_selection; - WebKitDOMRange *range; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - g_return_if_fail (replacement); - - range = editor_selection_get_current_range (selection); - document = webkit_web_view_get_dom_document (selection->priv->webview); - window = webkit_dom_document_get_default_view (document); - dom_selection = webkit_dom_dom_window_get_selection (window); - - webkit_dom_range_expand (range, "word", NULL); - webkit_dom_dom_selection_add_range (dom_selection, range); - - e_editor_selection_insert_html (selection, replacement); -} - -const gchar * -e_editor_selection_get_string (EEditorSelection *selection) -{ - WebKitDOMRange *range; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), NULL); - - range = editor_selection_get_current_range (selection); - - g_free (selection->priv->text); - selection->priv->text = webkit_dom_range_get_text (range); - - return selection->priv->text; -} - -void -e_editor_selection_replace (EEditorSelection *selection, - const gchar *new_string) -{ - WebKitDOMDocumentFragment *frag; - WebKitDOMRange *range; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - range = editor_selection_get_current_range (selection); - - frag = webkit_dom_range_create_contextual_fragment ( - range, new_string, NULL); - - webkit_dom_range_delete_contents (range, NULL); - webkit_dom_range_insert_node (range, WEBKIT_DOM_NODE (frag), NULL); -} - -const gchar * -e_editor_selection_get_background_color (EEditorSelection *selection) -{ - WebKitDOMNode *ancestor; - WebKitDOMRange *range; - WebKitDOMCSSStyleDeclaration *css; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), NULL); - - range = editor_selection_get_current_range (selection); - - ancestor = webkit_dom_range_get_common_ancestor_container (range, NULL); - - css = webkit_dom_element_get_style (WEBKIT_DOM_ELEMENT (ancestor)); - selection->priv->background_color = - webkit_dom_css_style_declaration_get_property_value ( - css, "background-color"); - - return selection->priv->background_color; -} - -void -e_editor_selection_set_background_color (EEditorSelection *selection, - const gchar *color) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - g_return_if_fail (color && *color); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command ( - document, "backColor", FALSE, color); - - g_object_notify (G_OBJECT (selection), "background-color"); -} - -EEditorSelectionBlockFormat -e_editor_selection_get_block_format (EEditorSelection *selection) -{ - WebKitDOMNode *node; - WebKitDOMRange *range; - WebKitDOMElement *element; - EEditorSelectionBlockFormat result; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), - E_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH); - - range = editor_selection_get_current_range (selection); - if (!range) { - return E_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH; - } - - node = webkit_dom_range_get_start_container (range, NULL); - - if (e_editor_dom_node_find_parent_element (node, "UL")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_UNORDERED_LIST; - } else if ((element = e_editor_dom_node_find_parent_element (node, "OL")) != NULL) { - if (webkit_dom_element_has_attribute (element, "type")) { - gchar *type; - - type = webkit_dom_element_get_attribute(element, "type"); - if (type && ((*type == 'a') || (*type == 'A'))) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ALPHA; - } else if (type && ((*type == 'i') || (*type == 'I'))) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ROMAN; - } else { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST; - } - - g_free (type); - } else { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST; - } - } else if (e_editor_dom_node_find_parent_element (node, "BLOCKQUOTE")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_BLOCKQUOTE; - } else if (e_editor_dom_node_find_parent_element (node, "PRE")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_PRE; - } else if (e_editor_dom_node_find_parent_element (node, "ADDRESS")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_ADDRESS; - } else if (e_editor_dom_node_find_parent_element (node, "H1")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_H1; - } else if (e_editor_dom_node_find_parent_element (node, "H2")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_H2; - } else if (e_editor_dom_node_find_parent_element (node, "H3")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_H3; - } else if (e_editor_dom_node_find_parent_element (node, "H4")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_H4; - } else if (e_editor_dom_node_find_parent_element (node, "H5")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_H5; - } else if (e_editor_dom_node_find_parent_element (node, "H6")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_H6; - } else if (e_editor_dom_node_find_parent_element (node, "P")) { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH; - } else { - result = E_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH; - } - - return result; -} - -void -e_editor_selection_set_block_format (EEditorSelection *selection, - EEditorSelectionBlockFormat format) -{ - EEditorSelectionBlockFormat current_format; - WebKitDOMDocument *document; - const gchar *command; - const gchar *value; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - current_format = e_editor_selection_get_block_format (selection); - if (current_format == format) { - return; - } - - document = webkit_web_view_get_dom_document (selection->priv->webview); - - switch (format) { - case E_EDITOR_SELECTION_BLOCK_FORMAT_BLOCKQUOTE: - command = "formatBlock"; - value = "BLOCKQUOTE"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_H1: - command = "formatBlock"; - value = "H1"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_H2: - command = "formatBlock"; - value = "H2"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_H3: - command = "formatBlock"; - value = "H3"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_H4: - command = "formatBlock"; - value = "H4"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_H5: - command = "formatBlock"; - value = "H5"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_H6: - command = "formatBlock"; - value = "H6"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH: - command = "formatBlock"; - value = "P"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_PRE: - command = "formatBlock"; - value = "PRE"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_ADDRESS: - command = "formatBlock"; - value = "ADDRESS"; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST: - case E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ALPHA: - case E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ROMAN: - command = "insertOrderedList"; - value = ""; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_UNORDERED_LIST: - command = "insertUnorderedList"; - value = ""; - break; - case E_EDITOR_SELECTION_BLOCK_FORMAT_NONE: - default: - command = "removeFormat"; - value = ""; - break; - } - - - /* First remove (un)ordered list before changing formatting */ - if (current_format == E_EDITOR_SELECTION_BLOCK_FORMAT_UNORDERED_LIST) { - webkit_dom_document_exec_command ( - document, "insertUnorderedList", FALSE, ""); - /* ^-- not a typo, "insert" toggles the formatting - * if already present */ - } else if (current_format >= E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST) { - webkit_dom_document_exec_command ( - document, "insertOrderedList", FALSE ,""); - } - - webkit_dom_document_exec_command ( - document, command, FALSE, value); - - /* Fine tuning - set the specific marker type for ordered lists */ - if ((format == E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ALPHA) || - (format == E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ROMAN)) { - - WebKitDOMRange *range = editor_selection_get_current_range (selection); - WebKitDOMNode *node; - WebKitDOMElement *list; - - node = webkit_dom_range_get_start_container (range, NULL); - - list = e_editor_dom_node_find_child_element (node, "OL"); - if (!list) { - list = e_editor_dom_node_find_parent_element (node, "OL"); - } - - if (list) { - webkit_dom_element_set_attribute ( - list, "type", - (format == E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ALPHA) ? - "A" : "I", NULL); - } - } - - g_object_notify (G_OBJECT (selection), "block-format"); -} - -gboolean e_editor_selection_get_bold (EEditorSelection *selection) { g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - return get_has_style (selection, "b"); + return selection->priv->attrs & WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD; } void e_editor_selection_set_bold (EEditorSelection *selection, gboolean bold) { - WebKitDOMDocument *document; - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); if ((e_editor_selection_get_bold (selection) ? TRUE : FALSE) @@ -950,160 +263,7 @@ e_editor_selection_set_bold (EEditorSele return; } - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "bold", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "bold"); -} - -void -e_editor_selection_get_font_color (EEditorSelection *selection, - GdkRGBA *rgba) -{ - gchar *color; - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - color = get_font_property (selection, "color"); - if (!color) { - *rgba = black; - return; - } - - gdk_rgba_parse (rgba, color); - g_free (color); -} - -void -e_editor_selection_set_font_color (EEditorSelection *selection, - const GdkRGBA *rgba) -{ - WebKitDOMDocument *document; - gchar *color; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - if (!rgba) { - rgba = &black; - } - - color = g_strdup_printf ("#%06x", e_rgba_to_value ((GdkRGBA *) rgba)); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "foreColor", FALSE, color); - - g_free (color); - - g_object_notify (G_OBJECT (selection), "font-color"); -} - -const gchar * -e_editor_selection_get_font_name (EEditorSelection *selection) -{ - WebKitDOMNode *node; - WebKitDOMRange *range; - WebKitDOMCSSStyleDeclaration *css; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), NULL); - - range = editor_selection_get_current_range (selection); - node = webkit_dom_range_get_common_ancestor_container (range, NULL); - - g_free (selection->priv->font_family); - css = webkit_dom_element_get_style (WEBKIT_DOM_ELEMENT (node)); - selection->priv->font_family = - webkit_dom_css_style_declaration_get_property_value (css, "fontFamily"); - - return selection->priv->font_family; -} - -void -e_editor_selection_set_font_name (EEditorSelection *selection, - const gchar *font_name) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "fontName", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "font-name"); -} - -guint -e_editor_selection_get_font_size (EEditorSelection *selection) -{ - gchar *size; - gint size_int; - - g_return_val_if_fail ( - E_IS_EDITOR_SELECTION (selection), - E_EDITOR_SELECTION_FONT_SIZE_NORMAL); - - size = get_font_property (selection, "size"); - if (!size) { - return E_EDITOR_SELECTION_FONT_SIZE_NORMAL; - } - - size_int = atoi (size); - g_free (size); - - if (size_int == 0) { - return E_EDITOR_SELECTION_FONT_SIZE_NORMAL; - } - - return size_int; -} - -void -e_editor_selection_set_font_size (EEditorSelection *selection, - guint font_size) -{ - WebKitDOMDocument *document; - gchar *size_str; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - size_str = g_strdup_printf("%d", font_size); - webkit_dom_document_exec_command (document, "fontSize", FALSE, size_str); - g_free (size_str); - - g_object_notify (G_OBJECT (selection), "font-size"); -} - -gboolean -e_editor_selection_get_indented (EEditorSelection *selection) -{ - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - - return get_has_style (selection, "blockquote"); -} - -void -e_editor_selection_indent (EEditorSelection *selection) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "indent", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "indented"); -} - -void -e_editor_selection_unindent (EEditorSelection *selection) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "outdent", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "indented"); + webkit_web_view_execute_editing_command (selection->priv->webview, "Bold"); } gboolean @@ -1111,15 +271,13 @@ e_editor_selection_get_italic (EEditorSe { g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - return get_has_style (selection, "i"); + return selection->priv->attrs & WEBKIT_EDITOR_TYPING_ATTRIBUTE_ITALIC; } void e_editor_selection_set_italic (EEditorSelection *selection, gboolean italic) { - WebKitDOMDocument *document; - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); if ((e_editor_selection_get_italic (selection) ? TRUE : FALSE) @@ -1127,64 +285,7 @@ e_editor_selection_set_italic (EEditorSe return; } - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "italic", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "italic"); -} - -gboolean -e_editor_selection_get_monospaced (EEditorSelection *selection) -{ - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - - return get_has_style (selection, "tt"); -} - -void -e_editor_selection_set_monospaced (EEditorSelection *selection, - gboolean monospaced) -{ - WebKitDOMDocument *document; - WebKitDOMRange *range; - gboolean is_monospaced; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - is_monospaced = e_editor_selection_get_monospaced (selection) ? TRUE : FALSE; - if ((is_monospaced ? TRUE : FALSE) == (monospaced ? TRUE : FALSE)) { - return; - } - - range = editor_selection_get_current_range (selection); - if (!range) { - return; - } - - document = webkit_web_view_get_dom_document (selection->priv->webview); - if (monospaced) { - WebKitDOMElement *wrapper; - gchar *html; - - wrapper = webkit_dom_document_create_element (document, "TT", NULL); - webkit_dom_node_append_child ( - WEBKIT_DOM_NODE (wrapper), - WEBKIT_DOM_NODE (webkit_dom_range_clone_contents (range, NULL)), - NULL); - - html = webkit_dom_html_element_get_outer_html ( - WEBKIT_DOM_HTML_ELEMENT (wrapper)); - e_editor_selection_insert_html (selection, html); - } else { - /* XXX This removes _all_ formatting that the selection has. - * In theory it's possible to write a code that would remove - * the from selection using advanced DOM manipulation, - * but right now I don't really feel like writing it all... */ - webkit_dom_document_exec_command ( - document, "removeFormat", FALSE, ""); - } - - g_object_notify (G_OBJECT (selection), "monospaced"); + webkit_web_view_execute_editing_command (selection->priv->webview, "Italic"); } gboolean @@ -1192,15 +293,13 @@ e_editor_selection_get_strike_through (E { g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - return get_has_style (selection, "strike"); + return selection->priv->attrs & WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH; } void e_editor_selection_set_strike_through (EEditorSelection *selection, gboolean strike_through) { - WebKitDOMDocument *document; - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); if ((e_editor_selection_get_strike_through (selection) ? TRUE : FALSE) @@ -1208,364 +307,5 @@ e_editor_selection_set_strike_through (E return; } - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "strikeThrough", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "strike-through"); -} - -gboolean -e_editor_selection_get_subscript (EEditorSelection *selection) -{ - WebKitDOMNode *node; - WebKitDOMRange *range; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - - range = editor_selection_get_current_range (selection); - node = webkit_dom_range_get_common_ancestor_container (range, NULL); - - while (node) { - gchar *tag_name; - - tag_name = webkit_dom_element_get_tag_name (WEBKIT_DOM_ELEMENT (node)); - - if (g_ascii_strncasecmp (tag_name, "sub", 3) == 0) { - g_free (tag_name); - break; - } - - g_free (tag_name); - node = webkit_dom_node_get_parent_node (node); - } - - return (node != NULL); -} - -void -e_editor_selection_set_subscript (EEditorSelection *selection, - gboolean subscript) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - if ((e_editor_selection_get_subscript (selection) ? TRUE : FALSE) - == (subscript? TRUE : FALSE)) { - return; - } - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "subscript", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "subscript"); -} - -gboolean -e_editor_selection_get_superscript (EEditorSelection *selection) -{ - WebKitDOMNode *node; - WebKitDOMRange *range; - - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - - range = editor_selection_get_current_range (selection); - node = webkit_dom_range_get_common_ancestor_container (range, NULL); - - while (node) { - gchar *tag_name; - - tag_name = webkit_dom_element_get_tag_name (WEBKIT_DOM_ELEMENT (node)); - - if (g_ascii_strncasecmp (tag_name, "sup", 3) == 0) { - g_free (tag_name); - break; - } - - g_free (tag_name); - node = webkit_dom_node_get_parent_node (node); - } - - return (node != NULL); -} - -void -e_editor_selection_set_superscript (EEditorSelection *selection, - gboolean superscript) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - if ((e_editor_selection_get_superscript (selection) ? TRUE : FALSE) - == (superscript? TRUE : FALSE)) { - return; - } - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "superscript", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "superscript"); -} - -gboolean -e_editor_selection_get_underline (EEditorSelection *selection) -{ - g_return_val_if_fail (E_IS_EDITOR_SELECTION (selection), FALSE); - - return get_has_style (selection, "u"); -} - -void -e_editor_selection_set_underline (EEditorSelection *selection, - gboolean underline) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - if ((e_editor_selection_get_underline (selection) ? TRUE : FALSE) - == (underline? TRUE : FALSE)) { - return; - } - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "underline", FALSE, ""); - - g_object_notify (G_OBJECT (selection), "underline"); -} - -void -e_editor_selection_unlink (EEditorSelection *selection) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "unlink", FALSE, ""); -} - -void -e_editor_selection_create_link (EEditorSelection *selection, - const gchar *uri) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - g_return_if_fail (uri && *uri); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command (document, "createLink", FALSE, uri); -} - - -void -e_editor_selection_insert_text (EEditorSelection *selection, - const gchar *plain_text) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - g_return_if_fail (plain_text != NULL); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - - webkit_dom_document_exec_command ( - document, "insertText", FALSE, plain_text); -} - -void -e_editor_selection_insert_html (EEditorSelection *selection, - const gchar *html_text) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - g_return_if_fail (html_text != NULL); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command ( - document, "insertHTML", FALSE, html_text); -} - -void -e_editor_selection_insert_image (EEditorSelection *selection, - const gchar *image_uri) -{ - WebKitDOMDocument *document; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - g_return_if_fail (image_uri != NULL); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - webkit_dom_document_exec_command ( - document, "insertImage", FALSE, image_uri); -} - -static gint -find_where_to_break_line (WebKitDOMNode *node, - gint max_len) -{ - gchar *str, *text_start; - gunichar uc; - gint pos, last_space; - - text_start = webkit_dom_text_get_whole_text ((WebKitDOMText *) node); - - pos = 0; - last_space = 0; - str = text_start; - do { - uc = g_utf8_get_char (str); - if (!uc) { - g_free (text_start); - if (pos <= max_len) { - return pos; - } else { - return last_space; - } - } - - /* If last_space is zero then the word is longer than - * WORD_WRAP_LENGTH characters, so continue untill we find - * a space */ - if ((pos > max_len) && (last_space > 0)) { - g_free (text_start); - return last_space; - } - - if (g_unichar_isspace (uc)) { - last_space = pos; - } - - pos += 1; - str = g_utf8_next_char (str); - } while (*str); - - g_free (text_start); - return max_len; -} - -void -e_editor_selection_wrap_lines (EEditorSelection *selection) -{ - WebKitDOMRange *range; - WebKitDOMNode *node, *start_node; - WebKitDOMDocument *document; - WebKitDOMElement *element; - WebKitDOMDocumentFragment *fragment; - gint len; - gchar *html; - - g_return_if_fail (E_IS_EDITOR_SELECTION (selection)); - - document = webkit_web_view_get_dom_document (selection->priv->webview); - range = editor_selection_get_current_range (selection); - - /* Extend the range to include entire nodes */ - webkit_dom_range_select_node_contents ( - range, - webkit_dom_range_get_common_ancestor_container (range, NULL), - NULL); - - /* Copy the selection from DOM, wrap the lines and then paste it back - * using the DOM command which will overwrite the selection, and - * record it as an undoable action */ - fragment = webkit_dom_range_clone_contents (range, NULL); - node = WEBKIT_DOM_NODE (fragment); - - start_node = node; - len = 0; - while (node) { - /* Find nearest text node */ - if (webkit_dom_node_get_node_type (node) != 3) { - if (webkit_dom_node_has_child_nodes (node)) { - node = webkit_dom_node_get_first_child (node); - } else if (webkit_dom_node_get_next_sibling (node)) { - node = webkit_dom_node_get_next_sibling (node); - } else { - if (webkit_dom_node_is_equal_node (node, start_node)) { - break; - } - - node = webkit_dom_node_get_parent_node (node); - if (node) { - node = webkit_dom_node_get_next_sibling (node); - } - } - continue; - } - - /* If length of this node + what we already have is still less - * then 71 characters, then just join it and continue to next - * node */ - if ((webkit_dom_character_data_get_length ( - (WebKitDOMCharacterData *) node) + len) < WORD_WRAP_LENGTH) { - - len += webkit_dom_character_data_get_length ( - (WebKitDOMCharacterData *) node); - - } else { - gint offset; - - /* Find where we can line-break the node so that it - * effectively fills the rest of current row */ - offset = find_where_to_break_line (node, WORD_WRAP_LENGTH - len); - - if (offset > 0) { - /* Split the node and append
tag to it */ - webkit_dom_text_split_text ( - (WebKitDOMText *) node, len + offset, NULL); - - element = webkit_dom_document_create_element ( - document, "BR", NULL); - - /* WebKit throws warning when ref_child is NULL */ - if (webkit_dom_node_get_next_sibling (node)) { - webkit_dom_node_insert_before ( - webkit_dom_node_get_parent_node (node), - WEBKIT_DOM_NODE (element), - webkit_dom_node_get_next_sibling (node), - NULL); - } else { - webkit_dom_node_append_child ( - webkit_dom_node_get_parent_node (node), - WEBKIT_DOM_NODE (element), - NULL); - } - - len = 0; - } - } - - /* Skip to next node */ - if (webkit_dom_node_get_next_sibling (node)) { - node = webkit_dom_node_get_next_sibling (node); - } else { - if (webkit_dom_node_is_equal_node (node, start_node)) { - break; - } - - node = webkit_dom_node_get_parent_node (node); - if (node) { - node = webkit_dom_node_get_next_sibling (node); - } - } - } - - /* Create a wrapper DIV and put the processed content into it */ - element = webkit_dom_document_create_element (document, "DIV", NULL); - webkit_dom_node_append_child ( - WEBKIT_DOM_NODE (element), WEBKIT_DOM_NODE (start_node), NULL); - - /* Get HTML code of the processed content */ - html = webkit_dom_html_element_get_inner_html ( - WEBKIT_DOM_HTML_ELEMENT (element)); - - /* Overwrite the current selection be the processed content, so that - * "UNDO" and "REDO" buttons work as expected */ - e_editor_selection_insert_html (selection, html); - - g_free (html); + webkit_web_view_execute_editing_command (selection->priv->webview, "Strikethrough"); } diff -up bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.h.webkit2 bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.h --- bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.h.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/editor/biji-editor-selection.h 2017-05-05 08:05:18.116351975 +0200 @@ -20,7 +20,7 @@ #define E_EDITOR_SELECTION_H #include -#include +#include /* Standard GObject macros */ #define E_TYPE_EDITOR_SELECTION \ @@ -47,40 +47,6 @@ typedef struct _EEditorSelection EEditor typedef struct _EEditorSelectionClass EEditorSelectionClass; typedef struct _EEditorSelectionPrivate EEditorSelectionPrivate; -typedef enum { - E_EDITOR_SELECTION_BLOCK_FORMAT_NONE = 0, - E_EDITOR_SELECTION_BLOCK_FORMAT_H1, - E_EDITOR_SELECTION_BLOCK_FORMAT_H2, - E_EDITOR_SELECTION_BLOCK_FORMAT_H3, - E_EDITOR_SELECTION_BLOCK_FORMAT_H4, - E_EDITOR_SELECTION_BLOCK_FORMAT_H5, - E_EDITOR_SELECTION_BLOCK_FORMAT_H6, - E_EDITOR_SELECTION_BLOCK_FORMAT_PARAGRAPH, - E_EDITOR_SELECTION_BLOCK_FORMAT_BLOCKQUOTE, - E_EDITOR_SELECTION_BLOCK_FORMAT_PRE, - E_EDITOR_SELECTION_BLOCK_FORMAT_ADDRESS, - E_EDITOR_SELECTION_BLOCK_FORMAT_UNORDERED_LIST, - E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST, - E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ROMAN, - E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST_ALPHA, -} EEditorSelectionBlockFormat; - -typedef enum { - E_EDITOR_SELECTION_FONT_SIZE_TINY = 1, /* The values match actual */ - E_EDITOR_SELECTION_FONT_SIZE_SMALL = 2, /* size in */ - E_EDITOR_SELECTION_FONT_SIZE_NORMAL = 3, - E_EDITOR_SELECTION_FONT_SIZE_BIG = 4, - E_EDITOR_SELECTION_FONT_SIZE_BIGGER = 5, - E_EDITOR_SELECTION_FONT_SIZE_LARGE = 6, - E_EDITOR_SELECTION_FONT_SIZE_VERY_LARGE = 7 -} EEditorSelectionFontSize; - -typedef enum { - E_EDITOR_SELECTION_ALIGNMENT_LEFT, - E_EDITOR_SELECTION_ALIGNMENT_CENTER, - E_EDITOR_SELECTION_ALIGNMENT_RIGHT -} EEditorSelectionAlignment; - struct _EEditorSelection { GObject parent; @@ -95,113 +61,20 @@ GType e_editor_selection_get_type (vo EEditorSelection * e_editor_selection_new (WebKitWebView *parent_view); -gboolean e_editor_selection_has_text (EEditorSelection *selection); - -gchar * e_editor_selection_get_caret_word - (EEditorSelection *selection); -void e_editor_selection_replace_caret_word - (EEditorSelection *selection, - const gchar *replacement); - -void e_editor_selection_set_alignment - (EEditorSelection *selection, - EEditorSelectionAlignment alignment); -EEditorSelectionAlignment - e_editor_selection_get_alignment - (EEditorSelection *selection); - -void e_editor_selection_set_background_color - (EEditorSelection *selection, - const gchar *color); -const gchar* e_editor_selection_get_background_color - (EEditorSelection *selection); - void e_editor_selection_set_bold (EEditorSelection *selection, gboolean bold); gboolean e_editor_selection_get_bold (EEditorSelection *selection); -void e_editor_selection_set_font_name - (EEditorSelection *selection, - const gchar *font_name); -const gchar * e_editor_selection_get_font_name - (EEditorSelection *selection); - -void e_editor_selection_set_font_size - (EEditorSelection *selection, - guint font_size); -guint e_editor_selection_get_font_size - (EEditorSelection *selection); - -void e_editor_selection_set_font_color - (EEditorSelection *selection, - const GdkRGBA *color); -void e_editor_selection_get_font_color - (EEditorSelection *selection, - GdkRGBA *color); - -void e_editor_selection_set_block_format - (EEditorSelection *selection, - EEditorSelectionBlockFormat format); -EEditorSelectionBlockFormat - e_editor_selection_get_block_format - (EEditorSelection *selection); - -gboolean e_editor_selection_get_indented (EEditorSelection *selection); -void e_editor_selection_indent (EEditorSelection *selection); -void e_editor_selection_unindent (EEditorSelection *selection); - void e_editor_selection_set_italic (EEditorSelection *selection, gboolean italic); gboolean e_editor_selection_get_italic (EEditorSelection *selection); -void e_editor_selection_set_monospaced - (EEditorSelection *selection, - gboolean monospaced); -gboolean e_editor_selection_get_monospaced - (EEditorSelection *selection); - void e_editor_selection_set_strike_through (EEditorSelection *selection, gboolean strike_through); gboolean e_editor_selection_get_strike_through (EEditorSelection *selection); -void e_editor_selection_set_superscript - (EEditorSelection *selection, - gboolean superscript); -gboolean e_editor_selection_get_superscript - (EEditorSelection *selection); - -void e_editor_selection_set_subscript - (EEditorSelection *selection, - gboolean subscript); -gboolean e_editor_selection_get_subscript - (EEditorSelection *selection); - -void e_editor_selection_set_underline - (EEditorSelection *selection, - gboolean underline); -gboolean e_editor_selection_get_underline - (EEditorSelection *selection); - -void e_editor_selection_unlink (EEditorSelection *selection); - -void e_editor_selection_create_link (EEditorSelection *selection, - const gchar *uri); - -const gchar * e_editor_selection_get_string (EEditorSelection *selection); - -void e_editor_selection_replace (EEditorSelection *selection, - const gchar *new_string); - -void e_editor_selection_insert_html (EEditorSelection *selection, - const gchar *html_text); -void e_editor_selection_insert_image (EEditorSelection *selection, - const gchar *image_uri); -void e_editor_selection_insert_text (EEditorSelection *selection, - const gchar *plain_text); -void e_editor_selection_wrap_lines (EEditorSelection *selection); - G_END_DECLS -#endif /* E_EDITOR_SELECTION_H */ \ No newline at end of file +#endif /* E_EDITOR_SELECTION_H */ diff -up bijiben-3.21.2/src/libbiji/editor/biji-editor-utils.c.webkit2 bijiben-3.21.2/src/libbiji/editor/biji-editor-utils.c diff -up bijiben-3.21.2/src/libbiji/editor/biji-editor-utils.h.webkit2 bijiben-3.21.2/src/libbiji/editor/biji-editor-utils.h diff -up bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.c.webkit2 bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.c --- bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.c.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.c 2017-05-05 08:05:18.116351975 +0200 @@ -1,16 +1,16 @@ /* biji-webkit-editor.c * Copyright (C) Pierre-Yves LUYTEN 2012 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -22,6 +22,7 @@ #include "../biji-manager.h" #include "biji-webkit-editor.h" #include "biji-editor-selection.h" +#include /* Prop */ enum { @@ -33,9 +34,17 @@ enum { /* Signals */ enum { EDITOR_CLOSED, + CONTENT_CHANGED, EDITOR_SIGNALS }; +/* Block Format */ +typedef enum { + BLOCK_FORMAT_NONE, + BLOCK_FORMAT_UNORDERED_LIST, + BLOCK_FORMAT_ORDERED_LIST +} BlockFormat; + static guint biji_editor_signals [EDITOR_SIGNALS] = { 0 }; static GParamSpec *properties[NUM_PROP] = { NULL, }; @@ -45,11 +54,11 @@ struct _BijiWebkitEditorPrivate BijiNoteObj *note; gulong content_changed; gulong color_changed; - gchar *font_color; + gboolean has_text; + gchar *selected_text; + BlockFormat block_format; - WebKitWebSettings *settings; EEditorSelection *sel; - GObject *spell_check; }; G_DEFINE_TYPE (BijiWebkitEditor, biji_webkit_editor, WEBKIT_TYPE_WEB_VIEW); @@ -58,29 +67,48 @@ gboolean biji_webkit_editor_has_selection (BijiWebkitEditor *self) { BijiWebkitEditorPrivate *priv = self->priv; - const gchar *text = NULL; - gboolean retval = FALSE; - if (e_editor_selection_has_text (priv->sel)) - { - text = e_editor_selection_get_string (priv->sel); + return priv->has_text && priv->selected_text && *priv->selected_text; +} + +const gchar * +biji_webkit_editor_get_selection (BijiWebkitEditor *self) +{ + return self->priv->selected_text; +} + +static WebKitWebContext * +biji_webkit_editor_get_web_context (void) +{ + static WebKitWebContext *web_context = NULL; - if ( g_strcmp0 (text, "") != 0) - retval = TRUE; + if (!web_context) + { + web_context = webkit_web_context_get_default (); + webkit_web_context_set_cache_model (web_context, WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER); + webkit_web_context_set_process_model (web_context, WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS); + webkit_web_context_set_spell_checking_enabled (web_context, TRUE); } - return retval; + return web_context; } -gchar * -biji_webkit_editor_get_selection (BijiWebkitEditor *self) +static WebKitSettings * +biji_webkit_editor_get_web_settings (void) { - gchar *retval = NULL; + static WebKitSettings *settings = NULL; - if (e_editor_selection_has_text (self->priv->sel)) - retval = (gchar*) e_editor_selection_get_string (self->priv->sel); + if (!settings) + { + settings = webkit_settings_new_with_settings ( + "enable-page-cache", FALSE, + "enable-plugins", FALSE, + "enable-tabs-to-links", FALSE, + "allow-file-access-from-file-urls", TRUE, + NULL); + } - return retval; + return settings; } typedef gboolean GetFormatFunc (EEditorSelection*); @@ -95,15 +123,24 @@ biji_toggle_format (EEditorSelection *se } static void -biji_toggle_block_format (EEditorSelection *sel, - EEditorSelectionBlockFormat format) +biji_toggle_block_format (BijiWebkitEditor *self, + BlockFormat block_format) { - if (e_editor_selection_get_block_format(sel) == format) - e_editor_selection_set_block_format (sel, - E_EDITOR_SELECTION_BLOCK_FORMAT_NONE); + const char *command = NULL; - else - e_editor_selection_set_block_format (sel, format); + /* insert commands toggle the formatting */ + switch (block_format) { + case BLOCK_FORMAT_UNORDERED_LIST: + command = "insertUnorderedList"; + break; + case BLOCK_FORMAT_ORDERED_LIST: + command = "insertOrderedList"; + break; + default: + g_assert_not_reached (); + } + + webkit_web_view_execute_editing_command (WEBKIT_WEB_VIEW (self), command); } void @@ -111,7 +148,7 @@ biji_webkit_editor_apply_format (BijiWeb { BijiWebkitEditorPrivate *priv = self->priv; - if ( e_editor_selection_has_text (priv->sel)) + if (priv->has_text) { switch (format) { @@ -131,13 +168,11 @@ biji_webkit_editor_apply_format (BijiWeb break; case BIJI_BULLET_LIST: - biji_toggle_block_format (priv->sel, - E_EDITOR_SELECTION_BLOCK_FORMAT_UNORDERED_LIST); + biji_toggle_block_format (self, BLOCK_FORMAT_UNORDERED_LIST); break; case BIJI_ORDER_LIST: - biji_toggle_block_format (priv->sel, - E_EDITOR_SELECTION_BLOCK_FORMAT_ORDERED_LIST); + biji_toggle_block_format (self, BLOCK_FORMAT_ORDERED_LIST); break; default: @@ -149,45 +184,71 @@ biji_webkit_editor_apply_format (BijiWeb void biji_webkit_editor_cut (BijiWebkitEditor *self) { - webkit_web_view_cut_clipboard (WEBKIT_WEB_VIEW (self)); + webkit_web_view_execute_editing_command (WEBKIT_WEB_VIEW (self), WEBKIT_EDITING_COMMAND_CUT); } void biji_webkit_editor_copy (BijiWebkitEditor *self) { - webkit_web_view_copy_clipboard (WEBKIT_WEB_VIEW (self)); + webkit_web_view_execute_editing_command (WEBKIT_WEB_VIEW (self), WEBKIT_EDITING_COMMAND_COPY); } void biji_webkit_editor_paste (BijiWebkitEditor *self) { - webkit_web_view_paste_clipboard (WEBKIT_WEB_VIEW (self)); + webkit_web_view_execute_editing_command (WEBKIT_WEB_VIEW (self), WEBKIT_EDITING_COMMAND_PASTE); +} + +void +biji_webkit_editor_undo (BijiWebkitEditor *self) +{ + webkit_web_view_execute_editing_command (WEBKIT_WEB_VIEW (self), WEBKIT_EDITING_COMMAND_UNDO); +} + +void +biji_webkit_editor_redo (BijiWebkitEditor *self) +{ + webkit_web_view_execute_editing_command (WEBKIT_WEB_VIEW (self), WEBKIT_EDITING_COMMAND_REDO); } static void -set_editor_color (GtkWidget *w, GdkRGBA *col) +set_editor_color (WebKitWebView *w, GdkRGBA *col) { - gtk_widget_override_background_color (w, GTK_STATE_FLAG_NORMAL, col); + gchar *script; + + webkit_web_view_set_background_color (w, col); + script = g_strdup_printf ("document.getElementById('editable').style.color = '%s';", + col->red < 0.5 ? "white" : "black"); + webkit_web_view_run_javascript (w, script, NULL, NULL, NULL); + g_free (script); } void biji_webkit_editor_set_font (BijiWebkitEditor *self, gchar *font) { - BijiWebkitEditorPrivate *priv = self->priv; PangoFontDescription *font_desc; + const gchar *family; + gint size; /* parse : but we only parse font properties we'll be able * to transfer to webkit editor * Maybe is there a better way than webkitSettings, * eg applying format to the whole body */ font_desc = pango_font_description_from_string (font); - const gchar * family = pango_font_description_get_family (font_desc); - gint size = pango_font_description_get_size (font_desc) / 1000 ; + family = pango_font_description_get_family (font_desc); + size = pango_font_description_get_size (font_desc); + + if (!pango_font_description_get_size_is_absolute (font_desc)) + size /= PANGO_SCALE; + + GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (self)); + double dpi = screen ? gdk_screen_get_resolution (screen) : 96.0; + guint font_size = size / 72. * dpi; /* Set */ - g_object_set (G_OBJECT(priv->settings), + g_object_set (biji_webkit_editor_get_web_settings (), "default-font-family", family, - "default-font-size", size, + "default-font-size", font_size, NULL); pango_font_description_free (font_desc); @@ -197,29 +258,7 @@ biji_webkit_editor_set_font (BijiWebkitE static void biji_webkit_editor_init (BijiWebkitEditor *self) { - WebKitWebView *view = WEBKIT_WEB_VIEW (self); - BijiWebkitEditorPrivate *priv; - - priv = G_TYPE_INSTANCE_GET_PRIVATE (self, BIJI_TYPE_WEBKIT_EDITOR, BijiWebkitEditorPrivate); - self->priv = priv; - - priv->sel = e_editor_selection_new (view); - priv->font_color = NULL; - - /* Settings */ - webkit_web_view_set_editable (view, TRUE); - webkit_web_view_set_transparent (view, TRUE); - priv->settings = webkit_web_view_get_settings (view); - - - g_object_set (G_OBJECT(priv->settings), - "enable-plugins", FALSE, - "enable-file-access-from-file-uris", TRUE, - "enable-spell-checking", TRUE, - "tab-key-cycles-through-elements", FALSE, - NULL); - - priv->spell_check = webkit_get_text_checker (); + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, BIJI_TYPE_WEBKIT_EDITOR, BijiWebkitEditorPrivate); } static void @@ -228,36 +267,28 @@ biji_webkit_editor_finalize (GObject *ob BijiWebkitEditor *self = BIJI_WEBKIT_EDITOR (object); BijiWebkitEditorPrivate *priv = self->priv; - /* priv->spell_check is ref by webkit. probably not to unref */ - g_object_unref (priv->sel); - - g_free (priv->font_color); + g_free (priv->selected_text); - if (priv->note != NULL) + if (priv->note != NULL) { + g_object_remove_weak_pointer (G_OBJECT (priv->note), (gpointer*) &priv->note); g_signal_handler_disconnect (priv->note, priv->color_changed); - + } G_OBJECT_CLASS (biji_webkit_editor_parent_class)->finalize (object); } static void -on_content_changed (WebKitWebView *view) +biji_webkit_editor_content_changed (BijiWebkitEditor *self, + const char *html, + const char *text) { - BijiWebkitEditor *self = BIJI_WEBKIT_EDITOR (view); BijiNoteObj *note = self->priv->note; - WebKitDOMDocument *dom; - WebKitDOMHTMLElement *elem; - gchar *html, *text; - gchar **rows; - - /* First html serializing */ - dom = webkit_web_view_get_dom_document (view); - elem = WEBKIT_DOM_HTML_ELEMENT (webkit_dom_document_get_document_element (dom)); - html = webkit_dom_html_element_get_outer_html (elem); - text = webkit_dom_html_element_get_inner_text (elem); + gchar **rows; - biji_note_obj_set_html (note, html); - biji_note_obj_set_raw_text (note, text); + biji_note_obj_set_html (note, (char *)html); + biji_note_obj_set_raw_text (note, (char *)text); + + g_signal_emit (self, biji_editor_signals[CONTENT_CHANGED], 0, NULL); /* Now tries to update title */ @@ -284,8 +315,6 @@ on_content_changed (WebKitWebView *view) } g_strfreev (rows); - g_free (html); - g_free (text); biji_note_obj_set_mtime (note, g_get_real_time () / G_USEC_PER_SEC); biji_note_obj_save_note (note); @@ -293,163 +322,197 @@ on_content_changed (WebKitWebView *view) static void -on_css_directory_created (GObject *source, - GAsyncResult *res, - gpointer user_data) +on_note_color_changed (BijiNoteObj *note, BijiWebkitEditor *self) { - BijiWebkitEditorPrivate *priv; - gchar *path_src = NULL, *path_dest = NULL, *css_path = NULL, *font_color = NULL, *css = NULL; - GFile *src = NULL, *dest = NULL; GdkRGBA color; - GError *error = NULL; - GFileInputStream *str; - gchar buffer[1000] = ""; - gsize bytes; - GRegex *rgxp = NULL; - - priv = BIJI_WEBKIT_EDITOR (user_data)->priv; - biji_note_obj_get_rgba (priv->note,&color); - - /* - * Generate font color - * See if need need to change css. - */ - if (color.red < 0.5) - font_color = "white"; - else - font_color = "black"; - if (g_strcmp0 (priv->font_color, font_color) == 0) - return; - else - priv->font_color = g_strdup (font_color); + if (biji_note_obj_get_rgba(note,&color)) + set_editor_color (WEBKIT_WEB_VIEW (self), &color); +} + + +static void +open_url ( const char *uri) +{ + gtk_show_uri (gdk_screen_get_default (), + uri, + gtk_get_current_event_time (), + NULL); +} +static gboolean +on_navigation_request (WebKitWebView *web_view, + WebKitPolicyDecision *decision, + WebKitPolicyDecisionType decision_type, + gpointer user_data) +{ + WebKitNavigationPolicyDecision *navigation_decision; + WebKitNavigationAction *action; + const char *requested_uri; + + if (decision_type != WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION) + return FALSE; + + navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision); + action = webkit_navigation_policy_decision_get_navigation_action (navigation_decision); + requested_uri = webkit_uri_request_get_uri (webkit_navigation_action_get_request (action)); + if (g_strcmp0 (webkit_web_view_get_uri (web_view), requested_uri) == 0) + return FALSE; - /* build the path for source and Destination of Default.css */ - path_src = g_build_filename(DATADIR, "bijiben", "Default.css", NULL); - src = g_file_new_for_path (path_src); + open_url (requested_uri); + webkit_policy_decision_ignore (decision); + return TRUE; +} - path_dest = g_build_filename(g_get_tmp_dir (), "bijiben", "Default.css", NULL); - dest = g_file_new_for_path (path_dest); - css_path = g_file_get_uri (dest); +static void +on_load_change (WebKitWebView *web_view, + WebKitLoadEvent event) +{ + BijiWebkitEditorPrivate *priv; + GdkRGBA color; - /* Read & amend the css */ - str = g_file_read (src, NULL, &error); + if (event != WEBKIT_LOAD_FINISHED) + return; - if (error) - { - g_warning ("%s", error->message); - g_error_free (error); - goto out; - } + priv = BIJI_WEBKIT_EDITOR (web_view)->priv; - g_input_stream_read_all (G_INPUT_STREAM (str), buffer, 1000, &bytes, NULL, &error); + /* Apply color */ + if (biji_note_obj_get_rgba (priv->note, &color)) + set_editor_color (web_view, &color); - if (error) + if (!priv->color_changed) { - g_warning ("%s", error->message); - g_error_free (error); - goto out; + priv->color_changed = g_signal_connect (priv->note, + "color-changed", + G_CALLBACK (on_note_color_changed), + web_view); } +} - g_input_stream_close (G_INPUT_STREAM (str), NULL, NULL); - rgxp = g_regex_new ("_BIJI_TEXT_COLOR", 0, 0, NULL); - css = g_regex_replace_literal (rgxp, buffer, -1, 0, priv->font_color, 0, &error); +static char * +get_js_property_string (JSGlobalContextRef js_context, + JSObjectRef js_object, + const char *property_name) +{ + JSStringRef js_property_name; + JSValueRef js_property_value; + JSStringRef js_string_value; + size_t max_size; + char *property_value = NULL; + + js_property_name = JSStringCreateWithUTF8CString (property_name); + js_property_value = JSObjectGetProperty (js_context, js_object, js_property_name, NULL); + JSStringRelease (js_property_name); + + if (!js_property_value || !JSValueIsString (js_context, js_property_value)) + return NULL; + + js_string_value = JSValueToStringCopy (js_context, js_property_value, NULL); + if (!js_string_value) + return NULL; - if (error) + max_size = JSStringGetMaximumUTF8CStringSize (js_string_value); + if (max_size) { - g_warning ("%s", error->message); - g_error_free (error); - goto out; + property_value = g_malloc (max_size); + JSStringGetUTF8CString (js_string_value, property_value, max_size); } + JSStringRelease (js_string_value); - /* copy the Default.css file */ - g_file_replace_contents (dest, css, 1000, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, &error); + return property_value; +} - if (error) - { - g_warning ("%s", error->message); - g_error_free (error); - goto out; - } - - /* Change the css path to NULL and then - again set it back to actual css path - so that changes in css file are considered - immediately */ - - g_object_set (G_OBJECT(priv->settings), - "user-stylesheet-uri", NULL, - NULL); +static gboolean +get_js_property_boolean (JSGlobalContextRef js_context, + JSObjectRef js_object, + const char *property_name) +{ + JSStringRef js_property_name; + JSValueRef js_property_value; - g_object_set (G_OBJECT(priv->settings), - "user-stylesheet-uri", css_path, - NULL); + js_property_name = JSStringCreateWithUTF8CString (property_name); + js_property_value = JSObjectGetProperty (js_context, js_object, js_property_name, NULL); + JSStringRelease (js_property_name); -out: - g_object_unref (str); - g_free (css_path); - g_free (path_src); - g_free (path_dest); - g_object_unref (src); - g_object_unref (dest); - g_free (css); - g_regex_unref (rgxp); -} + if (!js_property_value || !JSValueIsBoolean (js_context, js_property_value)) + return FALSE; -static void -biji_webkit_editor_change_css_file(BijiWebkitEditor *self) -{ - gchar *bijiben_temp_dir_path; - GFile *bijiben_temp_dir; - - /* Generate Temp directory path and URI for bijiben */ - bijiben_temp_dir_path = g_build_filename (g_get_tmp_dir (), "bijiben", NULL); - bijiben_temp_dir = g_file_new_for_path (bijiben_temp_dir_path); - g_file_make_directory (bijiben_temp_dir, NULL, NULL); - - g_file_make_directory_async (bijiben_temp_dir, - G_PRIORITY_DEFAULT, - NULL, /* cancellable */ - on_css_directory_created, - self); + return JSValueToBoolean (js_context, js_property_value); } - static void -on_note_color_changed (BijiNoteObj *note, BijiWebkitEditor *self) +biji_webkit_editor_handle_contents_update (BijiWebkitEditor *self, + JSGlobalContextRef js_context, + JSObjectRef js_object) { - GdkRGBA color; + char *html, *text; - if (biji_note_obj_get_rgba(note,&color)) - set_editor_color (GTK_WIDGET (self), &color); + html = get_js_property_string (js_context, js_object, "outerHTML"); + if (!html) + return; - /*Need to change text color as well*/ - biji_webkit_editor_change_css_file(self); + text = get_js_property_string (js_context, js_object, "innerText"); + if (!text) + { + g_free (html); + return; + } + + biji_webkit_editor_content_changed (self, html, text); + g_free (html); + g_free (text); } +static void +biji_webkit_editor_handle_selection_change (BijiWebkitEditor *self, + JSGlobalContextRef js_context, + JSObjectRef js_object) +{ + char *block_format_str; + + self->priv->has_text = get_js_property_boolean (js_context, js_object, "hasText"); + + g_free (self->priv->selected_text); + self->priv->selected_text = get_js_property_string (js_context, js_object, "text"); + + block_format_str = get_js_property_string (js_context, js_object, "blockFormat"); + if (g_strcmp0 (block_format_str, "UL") == 0) + self->priv->block_format = BLOCK_FORMAT_UNORDERED_LIST; + else if (g_strcmp0 (block_format_str, "OL") == 0) + self->priv->block_format = BLOCK_FORMAT_ORDERED_LIST; + else + self->priv->block_format = BLOCK_FORMAT_NONE; + g_free (block_format_str); +} static void -open_url ( const char *uri) +on_script_message (WebKitUserContentManager *user_content, + WebKitJavascriptResult *message, + BijiWebkitEditor *self) { - gtk_show_uri (gdk_screen_get_default (), - uri, - gtk_get_current_event_time (), - NULL); -} + JSGlobalContextRef js_context; + JSValueRef js_value; + JSObjectRef js_object; + char *message_name; + js_context = webkit_javascript_result_get_global_context (message); + js_value = webkit_javascript_result_get_value (message); + if (!js_value || !JSValueIsObject (js_context, js_value)) + { + g_warning ("Invalid script message received"); + return; + } -gboolean -on_navigation_request (WebKitWebView *web_view, - WebKitWebFrame *frame, - WebKitNetworkRequest *request, - WebKitWebNavigationAction *navigation_action, - WebKitWebPolicyDecision *policy_decision, - gpointer user_data) -{ - webkit_web_policy_decision_ignore (policy_decision); - open_url (webkit_network_request_get_uri (request)); - return TRUE; + js_object = JSValueToObject (js_context, js_value, NULL); + if (!js_object) + return; + + message_name = get_js_property_string (js_context, js_object, "messageName"); + if (g_strcmp0 (message_name, "ContentsUpdate") == 0) + biji_webkit_editor_handle_contents_update (self, js_context, js_object); + else if (g_strcmp0 (message_name, "SelectionChange") == 0) + biji_webkit_editor_handle_selection_change (self, js_context, js_object); + g_free (message_name); } static void @@ -458,8 +521,9 @@ biji_webkit_editor_constructed (GObject BijiWebkitEditor *self; BijiWebkitEditorPrivate *priv; WebKitWebView *view; + WebKitUserContentManager *user_content; + GBytes *html_data; gchar *body; - GdkRGBA color; self = BIJI_WEBKIT_EDITOR (obj); view = WEBKIT_WEB_VIEW (self); @@ -467,46 +531,34 @@ biji_webkit_editor_constructed (GObject G_OBJECT_CLASS (biji_webkit_editor_parent_class)->constructed (obj); + user_content = webkit_web_view_get_user_content_manager (view); + webkit_user_content_manager_register_script_message_handler (user_content, "bijiben"); + g_signal_connect (user_content, "script-message-received::bijiben", + G_CALLBACK (on_script_message), self); + + priv->sel = e_editor_selection_new (view); + + webkit_web_view_set_editable (view, TRUE); + /* Do not segfault at finalize * if the note died */ g_object_add_weak_pointer (G_OBJECT (priv->note), (gpointer*) &priv->note); - body = biji_note_obj_get_html (priv->note); if (!body) body = html_from_plain_text (""); - webkit_web_view_load_string (view, body, "application/xhtml+xml", NULL, NULL); - g_free (body); - + html_data = g_bytes_new_take (body, strlen (body)); + webkit_web_view_load_bytes (view, html_data, "application/xhtml+xml", NULL, + "file://" DATADIR G_DIR_SEPARATOR_S "bijiben" G_DIR_SEPARATOR_S); + g_bytes_unref (html_data); /* Do not be a browser */ - g_signal_connect (view, "navigation-policy-decision-requested", + g_signal_connect (view, "decide-policy", G_CALLBACK (on_navigation_request), NULL); - - - /* Drag n drop */ - GtkTargetList *targets = webkit_web_view_get_copy_target_list (view); - gtk_target_list_add_image_targets (targets, 0, TRUE); - - /* Apply color */ - if (biji_note_obj_get_rgba (priv->note,&color)) - set_editor_color (GTK_WIDGET (self), &color); - - priv->color_changed = g_signal_connect (priv->note, - "color-changed", - G_CALLBACK (on_note_color_changed), - self); - - /* Save */ - priv->content_changed = g_signal_connect (WEBKIT_WEB_VIEW (self), - "user-changed-contents", - G_CALLBACK (on_content_changed), - NULL); - - /*Add font color*/ - biji_webkit_editor_change_css_file(self); + g_signal_connect (view, "load-changed", + G_CALLBACK (on_load_change), NULL); } static void @@ -574,6 +626,15 @@ biji_webkit_editor_class_init (BijiWebki g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + biji_editor_signals[CONTENT_CHANGED] = g_signal_new ("content-changed", + G_OBJECT_CLASS_TYPE (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); g_type_class_add_private (klass, sizeof (BijiWebkitEditorPrivate)); } @@ -581,7 +642,14 @@ biji_webkit_editor_class_init (BijiWebki BijiWebkitEditor * biji_webkit_editor_new (BijiNoteObj *note) { + WebKitUserContentManager *manager = webkit_user_content_manager_new (); + return g_object_new (BIJI_TYPE_WEBKIT_EDITOR, + "web-context", biji_webkit_editor_get_web_context (), + "settings", biji_webkit_editor_get_web_settings (), + "user-content-manager", manager, "note", note, NULL); + + g_object_unref (manager); } diff -up bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.h.webkit2 bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.h --- bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.h.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/editor/biji-webkit-editor.h 2017-05-05 08:05:18.117351975 +0200 @@ -19,7 +19,7 @@ #define _BIJI_WEBKIT_EDITOR_H_ #include -#include +#include #include "../biji-note-obj.h" @@ -55,7 +55,7 @@ void biji_webkit_editor_apply_format (Bi gboolean biji_webkit_editor_has_selection (BijiWebkitEditor *self); -gchar * biji_webkit_editor_get_selection (BijiWebkitEditor *self); +const gchar * biji_webkit_editor_get_selection (BijiWebkitEditor *self); void biji_webkit_editor_cut (BijiWebkitEditor *self); @@ -63,6 +63,9 @@ void biji_webkit_editor_copy (BijiWebkit void biji_webkit_editor_paste (BijiWebkitEditor *self); +void biji_webkit_editor_undo (BijiWebkitEditor *self); +void biji_webkit_editor_redo (BijiWebkitEditor *self); + void biji_webkit_editor_set_font (BijiWebkitEditor *self, gchar *font); G_END_DECLS diff -up bijiben-3.21.2/src/libbiji/Makefile.am.webkit2 bijiben-3.21.2/src/libbiji/Makefile.am --- bijiben-3.21.2/src/libbiji/Makefile.am.webkit2 2016-05-23 21:52:11.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/Makefile.am 2017-05-05 08:05:18.110351975 +0200 @@ -11,15 +11,10 @@ AM_CPPFLAGS = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -I$(top_srcdir)/libgd \ -I$(top_srcdir)/src/ \ - -I$(top_srcdir)/src/libiji \ + -I$(top_srcdir)/src/libbiji \ $(BIJIBEN_CFLAGS) \ $(ZEITGEIST_CFLAGS) -AM_CFLAGS =\ - -Wall\ - -g - - if BUILD_ZEITGEIST AM_CPPFLAGS += -DBUILD_ZEITGEIST endif @@ -29,6 +24,14 @@ libbiji_la_built_sources = \ biji-marshalers.h \ $(NULL) +libbiji_la_CFLAGS = \ + $(WARN_CFLAGS) \ + $(NULL) + +libbiji_la_LDFLAGS = \ + $(WARN_LDFLAGS) \ + $(NULL) + libbiji_la_SOURCES = \ $(libbiji_la_built_sources) \ libbiji.h \ @@ -62,8 +65,6 @@ libbiji_la_SOURCES = \ deserializer/biji-tomboy-reader.h \ editor/biji-editor-selection.c \ editor/biji-editor-selection.h \ - editor/biji-editor-utils.c \ - editor/biji-editor-utils.h \ editor/biji-webkit-editor.c \ editor/biji-webkit-editor.h \ provider/biji-import-provider.c \ diff -up bijiben-3.21.2/src/libbiji/provider/biji-import-provider.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-import-provider.c --- bijiben-3.21.2/src/libbiji/provider/biji-import-provider.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-import-provider.c 2017-05-05 08:05:18.117351975 +0200 @@ -1,18 +1,18 @@ /* * biji-import-provider.c - * + * * Copyright 2013 Pierre-Yves Luyten - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -72,6 +72,10 @@ instanciate_note (BijiImportProvider *se gchar *path; GdkRGBA *color; BijiManager *manager; + GError *error = NULL; + BijiInfoSet *set; + gchar *html = NULL; + GList *notebooks = NULL; retval = NULL; @@ -86,12 +90,6 @@ instanciate_note (BijiImportProvider *se /* Deserialize it */ - - GError *error = NULL; - BijiInfoSet *set; - gchar *html = NULL; - GList *notebooks = NULL; - biji_tomboy_reader_read (path, &error, &set, @@ -234,12 +232,12 @@ biji_import_provider_constructed (GObjec priv->info.unique_id = NULL; priv->info.datasource = NULL; - priv->info.name = "import-provider"; + priv->info.name = (gchar *) "import-provider"; priv->info.icon = NULL; priv->info.domain = NULL; priv->info.user = NULL; - + to_import = g_file_new_for_uri (self->priv->uri); g_file_enumerate_children_async (to_import, ATTRIBUTES_FOR_NOTEBOOK, @@ -250,7 +248,7 @@ biji_import_provider_constructed (GObjec } -const BijiProviderInfo * +static const BijiProviderInfo * biji_import_provider_get_info (BijiProvider *self) { return & (BIJI_IMPORT_PROVIDER (self)->priv->info); @@ -358,7 +356,9 @@ biji_import_provider_init (BijiImportPro BijiProvider * -biji_import_provider_new (BijiManager *b, gchar *target_provider, gchar *uri) +biji_import_provider_new (BijiManager *b, + const gchar *target_provider, + const gchar *uri) { return g_object_new (BIJI_TYPE_IMPORT_PROVIDER, "manager", b, diff -up bijiben-3.21.2/src/libbiji/provider/biji-import-provider.h.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-import-provider.h --- bijiben-3.21.2/src/libbiji/provider/biji-import-provider.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-import-provider.h 2017-05-05 08:05:18.117351975 +0200 @@ -1,18 +1,18 @@ /* * biji-import-provider.h - * + * * Copyright 2013 Pierre-Yves Luyten - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -66,8 +66,8 @@ GType biji_import_prov BijiProvider *biji_import_provider_new (BijiManager *manager, - gchar *target_provider, - gchar *uri); + const gchar *target_provider, + const gchar *uri); G_END_DECLS diff -up bijiben-3.21.2/src/libbiji/provider/biji-local-note.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-local-note.c --- bijiben-3.21.2/src/libbiji/provider/biji-local-note.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-local-note.c 2017-05-05 08:05:18.117351975 +0200 @@ -1,16 +1,16 @@ /* bjb-local-note.c * Copyright (C) Pierre-Yves LUYTEN 2013 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -36,7 +36,7 @@ G_DEFINE_TYPE (BijiLocalNote, biji_local /* Iface */ -const gchar * +static const gchar * local_note_get_place (BijiItem *local) { BijiLocalNote *self; @@ -51,7 +51,7 @@ local_note_get_place (BijiItem *local) } -gchar * +static gchar * local_note_get_html (BijiNoteObj *note) { if (BIJI_IS_LOCAL_NOTE (note)) @@ -62,9 +62,9 @@ local_note_get_html (BijiNoteObj *note) } -void +static void local_note_set_html (BijiNoteObj *note, - gchar *html) + const gchar *html) { if (BIJI_LOCAL_NOTE (note)->priv->html) g_free (BIJI_LOCAL_NOTE (note)->priv->html); @@ -74,7 +74,7 @@ local_note_set_html (BijiNoteObj *note, } -void +static void local_note_save (BijiNoteObj *note) { const BijiProviderInfo *prov_info; diff -up bijiben-3.21.2/src/libbiji/provider/biji-local-provider.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-local-provider.c --- bijiben-3.21.2/src/libbiji/provider/biji-local-provider.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-local-provider.c 2017-05-05 08:05:18.117351975 +0200 @@ -1,17 +1,17 @@ /* * biji-local-provider.c * Copyright (C) Pierre-Yves LUYTEN 2013 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -211,8 +211,8 @@ enumerate_next_files_ready_cb (GObject * continue; info.url = g_build_filename (base_path, name, NULL); - info.title = ""; - info.content = ""; + info.title = (gchar *) ""; + info.content = (gchar *) ""; info.mtime = 0; @@ -424,7 +424,7 @@ _get_note_skeleton (BijiLocalProvider *s static BijiNoteObj * local_prov_create_new_note (BijiProvider *self, - gchar *str) + const gchar *str) { BijiNoteObj *ret = _get_note_skeleton (BIJI_LOCAL_PROVIDER (self)); BijiManager *manager; @@ -453,11 +453,11 @@ local_prov_create_new_note (BijiProvider } static BijiNoteObj * -local_prov_create_note_full (BijiProvider *provider, - gchar *suggested_path, - BijiInfoSet *info, - gchar *html, - GdkRGBA *color) +local_prov_create_note_full (BijiProvider *provider, + const gchar *suggested_path, + BijiInfoSet *info, + const gchar *html, + const GdkRGBA *color) { BijiLocalProvider *self; BijiNoteObj *retval; @@ -539,7 +539,7 @@ biji_local_provider_get_property (GObjec } -const BijiProviderInfo * +static const BijiProviderInfo * local_provider_get_info (BijiProvider *provider) { BijiLocalProvider *self; diff -up bijiben-3.21.2/src/libbiji/provider/biji-memo-note.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-memo-note.c --- bijiben-3.21.2/src/libbiji/provider/biji-memo-note.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-memo-note.c 2017-05-05 08:05:18.117351975 +0200 @@ -25,7 +25,7 @@ struct _BijiMemoNotePrivate BijiProvider *provider; ECalComponent *ecal; ECalClient *client; - gchar *description; + const gchar *description; BijiNoteID *id; }; @@ -48,7 +48,7 @@ static GParamSpec *properties[MEMO_NOTE_ /* Function from evo calendar gui comp-util.c (LGPL) * to be removed if we depen on evo, * the func is borrowed as is (=3.13.1) */ -gboolean +static gboolean cal_comp_is_on_server (ECalComponent *comp, ECalClient *client) { @@ -309,7 +309,8 @@ biji_memo_note_get_property (GObject static void -memo_set_html (BijiNoteObj *note, gchar *html) +memo_set_html (BijiNoteObj *note, + const gchar *html) { /* NULL */ } @@ -460,7 +461,7 @@ biji_memo_note_new_from_info (B BijiManager *manager, BijiInfoSet *info, ECalComponent *component, - gchar *description, + const gchar *description, ECalClient *client) { BijiNoteID *id; diff -up bijiben-3.21.2/src/libbiji/provider/biji-memo-note.h.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-memo-note.h --- bijiben-3.21.2/src/libbiji/provider/biji-memo-note.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-memo-note.h 2017-05-05 08:05:18.117351975 +0200 @@ -61,7 +61,7 @@ BijiNoteObj *biji_memo_note_ne BijiManager *manager, BijiInfoSet *info, ECalComponent *comp, - gchar *description, + const gchar *description, ECalClient *client); diff -up bijiben-3.21.2/src/libbiji/provider/biji-memo-provider.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-memo-provider.c --- bijiben-3.21.2/src/libbiji/provider/biji-memo-provider.c.webkit2 2015-02-19 23:03:36.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/provider/biji-memo-provider.c 2017-05-05 08:05:18.117351975 +0200 @@ -19,7 +19,7 @@ /* * http://tools.ietf.org/html/rfc2445 - * + * * Evolution UI offers to sync Memo to local computer * TODO: check this */ @@ -171,7 +171,7 @@ create_note_from_item (BijiMemoItem *ite biji_manager_get_default_color (manager, &color); biji_note_obj_set_rgba (note, &color); g_hash_table_replace (item->self->priv->items, - item->set.url, + g_strdup (item->set.url), note); } @@ -280,7 +280,7 @@ on_object_list_got (GObject *obj, dtstart = time; else dtstart = 0; - // e_cal_component_free_datetime() + e_cal_component_free_datetime(&tz); e_cal_component_get_last_modified (co, &t); // or dtstart if (time_val_from_icaltime (t, &time)) @@ -323,7 +323,7 @@ on_object_list_got (GObject *obj, -static gchar * +static const gchar * i_want_all_memos (void) { return "occur-in-time-range? (make-time \"19820421T204153Z\") (make-time \"20820423T232416Z\")"; @@ -362,6 +362,8 @@ on_notes_mined (GObject *source_ob g_strdup (tracker_sparql_cursor_get_string (cursor, 1, NULL))); } + + g_object_unref (cursor); } e_cal_client_get_object_list (self->priv->client, @@ -374,7 +376,7 @@ on_notes_mined (GObject *source_ob /* From gnome-calendar -> ported to GdkRGBA */ -GdkPixbuf* +static GdkPixbuf* get_pixbuf_from_color (GdkRGBA *color, gint size) { cairo_surface_t *surface; @@ -440,8 +442,7 @@ on_client_connected (GObject *obj, GAsyncResult *res, gpointer user_data) { - GError *error; - error = NULL; + GError *error = NULL; gchar *query; BijiMemoProvider *self = BIJI_MEMO_PROVIDER (user_data); @@ -531,9 +532,9 @@ on_object_created (GObject *client, -BijiNoteObj * +static BijiNoteObj * memo_create_note (BijiProvider *provider, - gchar *str) + const gchar *str) { BijiMemoProvider *self = BIJI_MEMO_PROVIDER (provider); BijiInfoSet info; @@ -601,7 +602,7 @@ memo_create_note (BijiProvider *provider /* make sure the component has an UID and info get it */ - if (! (info.url = icalcomponent_get_uid (icalcomp))) + if (! (info.url = (gchar *) icalcomponent_get_uid (icalcomp))) { gchar *uid; @@ -650,7 +651,8 @@ biji_memo_provider_init (BijiMemoProvide priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, BIJI_TYPE_MEMO_PROVIDER, BijiMemoProviderPrivate); priv->queue = g_queue_new (); - priv->items = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + priv->items = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, g_object_unref); priv->tracker = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); priv->memos = NULL; @@ -659,7 +661,13 @@ biji_memo_provider_init (BijiMemoProvide static void biji_memo_provider_finalize (GObject *object) { - e_cal_client_free_icalcomp_slist (BIJI_MEMO_PROVIDER (object)->priv->memos); + BijiMemoProviderPrivate *priv = BIJI_MEMO_PROVIDER (object)->priv; + + e_cal_client_free_icalcomp_slist (priv->memos); + + g_hash_table_unref (priv->tracker); + g_hash_table_unref (priv->items); + g_queue_free_full (priv->queue, (GDestroyNotify) memo_item_free); G_OBJECT_CLASS (biji_memo_provider_parent_class)->finalize (object); } @@ -708,7 +716,7 @@ biji_memo_provider_get_property (GObject -const BijiProviderInfo * +static const BijiProviderInfo * memo_provider_get_info (BijiProvider *provider) { return &(BIJI_MEMO_PROVIDER (provider)->priv->info); diff -up bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-note.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-note.c --- bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-note.c.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-note.c 2017-05-05 08:05:18.117351975 +0200 @@ -1,16 +1,16 @@ /* bjb-own-cloud-note.c * Copyright (C) Pierre-Yves LUYTEN 2013 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -54,7 +54,7 @@ G_DEFINE_TYPE (BijiOwnCloudNote, biji_ow -const gchar * +static const gchar * ocloud_note_get_place (BijiItem *local) { BijiOwnCloudNote *self; @@ -110,7 +110,7 @@ ocloud_note_get_html (BijiNoteObj *note) /* We don't put any html to note. We do not need this */ static void ocloud_note_set_html (BijiNoteObj *note, - gchar *html) + const gchar *html) { } @@ -154,7 +154,7 @@ ocloud_note_ensure_ressource (BijiNoteOb /* TODO: propagate error if any * through generic provider -> manager */ -void +static void on_content_replaced (GObject *source_object, GAsyncResult *res, gpointer user_data) diff -up bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-provider.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-provider.c --- bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-provider.c.webkit2 2014-12-01 21:43:40.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/provider/biji-own-cloud-provider.c 2017-05-05 08:05:18.117351975 +0200 @@ -1,17 +1,17 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */ /* biji-own-cloud-provider.c * Copyright (C) Pierre-Yves LUYTEN 2013 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -137,6 +137,11 @@ biji_own_cloud_provider_finalize (GObjec g_object_unref (self->priv->folder); g_clear_pointer (&self->priv->info.name, g_free); + g_clear_pointer (&self->priv->info.datasource, g_free); + + g_queue_free_full (self->priv->queue, g_object_unref); + g_hash_table_unref (self->priv->notes); + g_hash_table_unref (self->priv->tracker); G_OBJECT_CLASS (biji_own_cloud_provider_parent_class)->finalize (object); } @@ -790,9 +795,10 @@ biji_own_cloud_provider_constructed (GOb { priv->info.icon = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_INVALID); gtk_image_set_pixel_size (GTK_IMAGE (priv->info.icon), 48); - g_object_ref (priv->info.icon); } + g_object_unref (icon); + owncloudclient = g_build_filename ( g_get_home_dir (), ".local/share/data/ownCloud/folders/ownCloud", @@ -806,6 +812,8 @@ biji_own_cloud_provider_constructed (GOb else get_mount (self); + g_object_unref (client); + return; } @@ -893,9 +901,9 @@ own_cloud_get_info (BijiProvider * * things will go right. * Promise. */ -BijiNoteObj * -own_cloud_create_note (BijiProvider *provider, - gchar *str) +static BijiNoteObj * +own_cloud_create_note (BijiProvider *provider, + const gchar *str) { BijiInfoSet info; BijiOwnCloudProvider *self; @@ -904,7 +912,7 @@ own_cloud_create_note (BijiProvi info.url = NULL; info.title = NULL; info.mtime = g_get_real_time (); - info.content = ""; + info.content = (gchar *) ""; info.created = g_get_real_time (); return biji_own_cloud_note_new_from_info ( @@ -919,12 +927,12 @@ own_cloud_create_note (BijiProvi /* This is a dummy func. we can create a note with extra args * but can't use path, nor color, nor html. */ -BijiNoteObj * -own_cloud_create_full (BijiProvider *provider, - gchar *suggested_path, - BijiInfoSet *info, - gchar *html, - GdkRGBA *color) +static BijiNoteObj * +own_cloud_create_full (BijiProvider *provider, + const gchar *suggested_path, + BijiInfoSet *info, + const gchar *html, + const GdkRGBA *color) { BijiOwnCloudProvider *self; BijiNoteObj *retval; diff -up bijiben-3.21.2/src/libbiji/provider/biji-provider.c.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-provider.c --- bijiben-3.21.2/src/libbiji/provider/biji-provider.c.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-provider.c 2017-05-05 08:05:18.117351975 +0200 @@ -27,7 +27,7 @@ * */ -#include "../biji-marshalers.h" +#include "biji-marshalers.h" #include "biji-provider.h" diff -up bijiben-3.21.2/src/libbiji/provider/biji-provider.h.webkit2 bijiben-3.21.2/src/libbiji/provider/biji-provider.h --- bijiben-3.21.2/src/libbiji/provider/biji-provider.h.webkit2 2014-10-18 23:26:34.000000000 +0200 +++ bijiben-3.21.2/src/libbiji/provider/biji-provider.h 2017-05-05 08:05:18.117351975 +0200 @@ -1,16 +1,16 @@ /* bjb-provider.h * Copyright (C) Pierre-Yves LUYTEN 2013 - * + * * bijiben is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * bijiben 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -95,7 +95,7 @@ struct BijiProviderClass_ * Does not allow to trick color or dates */ BijiNoteObj* (*create_new_note) (BijiProvider *provider, - gchar *content); + const gchar *content); /* Creates a single note representing some existing data, * with title, content, dates, html, color. @@ -116,11 +116,11 @@ struct BijiProviderClass_ * TODO: rebase startup code on local provider create note full when good enough * TODO: owncloud provider (to handle importing) */ - BijiNoteObj* (*create_note_full) (BijiProvider *provider, - gchar *suggested_path, - BijiInfoSet *info, - gchar *html, - GdkRGBA *color); + BijiNoteObj* (*create_note_full) (BijiProvider *provider, + const gchar *suggested_path, + BijiInfoSet *info, + const gchar *html, + const GdkRGBA *color); /* TODO : (*create_notebook). Add a flag into provider info? */ diff -up bijiben-3.21.2/src/libbiji/serializer/biji-lazy-serializer.c.webkit2 bijiben-3.21.2/src/libbiji/serializer/biji-lazy-serializer.c --- bijiben-3.21.2/src/libbiji/serializer/biji-lazy-serializer.c.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/libbiji/serializer/biji-lazy-serializer.c 2017-05-05 08:05:18.118351975 +0200 @@ -6,12 +6,12 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * WebkitWebView 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 General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -131,7 +131,9 @@ biji_lazy_serializer_class_init (BijiLaz } static void -serialize_node (xmlTextWriterPtr writer, gchar *node, gchar *value) +serialize_node (xmlTextWriterPtr writer, + const gchar *node, + const gchar *value) { xmlTextWriterWriteRaw (writer, BAD_CAST "\n "); xmlTextWriterStartElement (writer, BAD_CAST node); @@ -162,7 +164,7 @@ serialize_html (BijiLazySerializer *self xmlTextWriterWriteRaw(priv->writer, BAD_CAST html); } -gboolean +static gboolean biji_lazy_serialize_internal (BijiLazySerializer *self) { BijiLazySerializerPrivate *priv = self->priv; @@ -179,15 +181,15 @@ biji_lazy_serialize_internal (BijiLazySe xmlTextWriterStartDocument (priv->writer,"1.0","utf-8",NULL); xmlTextWriterStartElement (priv->writer, BAD_CAST "note"); - xmlTextWriterWriteAttributeNS (priv->writer, NULL, - BAD_CAST "version",NULL, + xmlTextWriterWriteAttributeNS (priv->writer, NULL, + BAD_CAST "version",NULL, BAD_CAST "1"); xmlTextWriterWriteAttributeNS (priv->writer, BAD_CAST "xmlns", - BAD_CAST "link", NULL, + BAD_CAST "link", NULL, BAD_CAST "http://projects.gnome.org/bijiben/link"); xmlTextWriterWriteAttributeNS (priv->writer, BAD_CAST "xmlns", BAD_CAST "size", NULL, BAD_CAST "http://projects.gnome.org/bijiben/size"); - xmlTextWriterWriteAttributeNS (priv->writer, NULL, BAD_CAST "xmlns", NULL, + xmlTextWriterWriteAttributeNS (priv->writer, NULL, BAD_CAST "xmlns", NULL, BAD_CAST "http://projects.gnome.org/bijiben"); // @@ -195,14 +197,14 @@ biji_lazy_serialize_internal (BijiLazySe "title", (gchar*) biji_item_get_title (BIJI_ITEM (priv->note))); - // <text> + // <text> xmlTextWriterWriteRaw(priv->writer, BAD_CAST "\n "); xmlTextWriterStartElement(priv->writer, BAD_CAST "text"); xmlTextWriterWriteAttributeNS(priv->writer, BAD_CAST "xml", - BAD_CAST "space", NULL, + BAD_CAST "space", NULL, BAD_CAST "preserve"); serialize_html (self); - // </text> + // </text> xmlTextWriterEndElement(priv->writer); // <last-change-date> diff -up bijiben-3.21.2/src/Makefile.am.webkit2 bijiben-3.21.2/src/Makefile.am --- bijiben-3.21.2/src/Makefile.am.webkit2 2015-11-29 14:44:32.000000000 +0100 +++ bijiben-3.21.2/src/Makefile.am 2017-05-05 08:05:14.925352019 +0200 @@ -13,43 +13,36 @@ AM_CPPFLAGS = \ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -I$(top_srcdir)/libgd \ + -I$(top_builddir)/src/libbiji \ $(BIJIBEN_CFLAGS) -AM_CFLAGS =\ - -Wall\ - -g - - - - - - LDADD = libbiji/libbiji.la \ - -lm \ + $(LIBM) \ $(top_builddir)/libgd/libgd.la \ $(BIJIBEN_LIBS) -bijiben_LDFLAGS = \ - -Wl,--export-dynamic - -resource_files = \ - resources/Adwaita.css \ - resources/app-menu.ui \ - resources/note-symbolic.svg \ - resources/thumbnail-frame.png +bijiben_CFLAGS = \ + $(WARN_CFLAGS) \ + $(NULL) -bjb-resources.c: bjb.gresource.xml $(resource_files) - glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name bjb $(srcdir)/bjb.gresource.xml +bijiben_LDFLAGS = \ + -Wl,--export-dynamic \ + $(WARN_LDFLAGS) \ + $(NULL) -bjb-resources.h: bjb.gresource.xml - glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name bjb $(srcdir)/bjb.gresource.xml +bjb_gresource_xml_deps = \ + $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=$(srcdir) $(srcdir)/bjb.gresource.xml) +bjb-resources.c: bjb.gresource.xml $(bjb_gresource_xml_deps) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name bjb $< +bjb-resources.h: bjb.gresource.xml $(bjb_gresource_xml_deps) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header --c-name bjb $< -bijiben_built_sources = \ +bjb_resources_sources = \ bjb-resources.c \ - bjb-resources.h + bjb-resources.h \ + $(NULL) bijiben_SOURCES = \ - $(bijiben_built_sources) \ bjb-app-menu.c \ bjb-app-menu.h \ bjb-bijiben.c \ @@ -92,43 +85,51 @@ bijiben_SOURCES = \ bjb-window-base.c \ bjb-window-base.h +nodist_bijiben_SOURCES = \ + $(bjb_resources_sources) \ + $(NULL) + dbus_shell_search_provider_built_sources = \ bijiben-shell-search-provider-generated.c \ bijiben-shell-search-provider-generated.h $(dbus_shell_search_provider_built_sources) : Makefile.am $(top_srcdir)/data/shell-search-provider-dbus-interfaces.xml - gdbus-codegen \ + $(AM_V_GEN)$(GDBUS_CODEGEN) \ --interface-prefix org.gnome. \ --c-namespace Bijiben \ --generate-c-code bijiben-shell-search-provider-generated \ $(top_srcdir)/data/shell-search-provider-dbus-interfaces.xml \ $(NULL) +bijiben_shell_search_provider_CFLAGS = \ + $(WARN_CFLAGS) \ + $(NULL) + +bijiben_shell_search_provider_LDFLAGS = \ + $(WARN_LDFLAGS) \ + $(NULL) + bijiben_shell_search_provider_SOURCES = \ bijiben-shell-search-provider.c \ $(NULL) nodist_bijiben_shell_search_provider_SOURCES = \ - $(bijiben_built_sources) \ + $(bjb_resources_sources) \ $(dbus_shell_search_provider_built_sources) \ $(NULL) BUILT_SOURCES = \ - $(bijiben_built_sources) \ + $(bjb_resources_sources) \ $(dbus_shell_search_provider_built_sources) \ $(NULL) EXTRA_DIST = \ bjb.gresource.xml \ - $(resource_files) \ + $(bjb_gresource_xml_deps) \ $(NULL) CLEANFILES = \ $(BUILT_SOURCES) \ $(NULL) -dist-hook: - cd $(distdir); rm -f $(CLEANFILES) - - -include $(top_srcdir)/git.mk diff -up bijiben-3.21.2/src/resources/editor-toolbar.ui.webkit2 bijiben-3.21.2/src/resources/editor-toolbar.ui --- bijiben-3.21.2/src/resources/editor-toolbar.ui.webkit2 2017-05-05 08:05:18.118351975 +0200 +++ bijiben-3.21.2/src/resources/editor-toolbar.ui 2017-05-05 08:05:18.118351975 +0200 @@ -0,0 +1,219 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <object class="GtkImage" id="format-text-bold"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">format-text-bold-symbolic</property> + <property name="icon_size">3</property> + </object> + <object class="GtkImage" id="format-text-italic"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">format-text-italic-symbolic</property> + <property name="icon_size">3</property> + </object> + <object class="GtkImage" id="format-text-strikethrough"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">format-text-strikethrough-symbolic</property> + <property name="icon_size">3</property> + </object> + <object class="GtkImage" id="insert-link"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">insert-link-symbolic</property> + <property name="icon_size">3</property> + </object> + <template class="BjbEditorToolbar" parent="GtkActionBar"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <style> + <class name="osd" /> + </style> + <child> + <object class="GtkButtonBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">expand</property> + <child> + <object class="GtkButton" id="cut_button"> + <property name="label" translatable="yes">Cut</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_cut_clicked" object="BjbEditorToolbar" swapped="no" /> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="copy_button"> + <property name="label" translatable="yes">Copy</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_copy_clicked" object="BjbEditorToolbar" swapped="no" /> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="paste_button"> + <property name="label" translatable="yes">Paste</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_paste_clicked" object="BjbEditorToolbar" swapped="no" /> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="pack_type">start</property> + <property name="position">0</property> + </packing> + </child> + <child type="center"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkButtonBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">expand</property> + <child> + <object class="GtkButton" id="bold_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Bold</property> + <property name="image">format-text-bold</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_bold_clicked" object="BjbEditorToolbar" swapped="no" /> + <accelerator key="b" modifiers="GDK_CONTROL_MASK" signal="clicked"/> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="italic_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Italic</property> + <property name="image">format-text-italic</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_italic_clicked" object="BjbEditorToolbar" swapped="no" /> + <accelerator key="i" modifiers="GDK_CONTROL_MASK" signal="clicked"/> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="strike_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Strike</property> + <property name="image">format-text-strikethrough</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_strike_clicked" object="BjbEditorToolbar" swapped="no" /> + <accelerator key="s" modifiers="GDK_CONTROL_MASK" signal="clicked"/> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</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="GtkButtonBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">expand</property> + <child> + <object class="GtkButton" id="bullets_button"> + <property name="label" translatable="yes">* </property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Bullets</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_bullets_clicked" object="BjbEditorToolbar" swapped="no" /> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="list_button"> + <property name="label" translatable="yes">1.</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">List</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_list_clicked" object="BjbEditorToolbar" swapped="no" /> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</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> + </object> + </child> + <child> + <object class="GtkButton" id="link_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Copy selection to a new note</property> + <property name="image">insert-link</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_link_clicked" object="BjbEditorToolbar" swapped="no" /> + </object> + <packing> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + </template> +</interface>