Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package almanah for openSUSE:Factory checked 
in at 2021-04-27 21:35:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/almanah (Old)
 and      /work/SRC/openSUSE:Factory/.almanah.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "almanah"

Tue Apr 27 21:35:16 2021 rev:16 rq:888745 version:0.12.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/almanah/almanah.changes  2020-09-14 
12:29:07.557129169 +0200
+++ /work/SRC/openSUSE:Factory/.almanah.new.12324/almanah.changes       
2021-04-27 21:35:45.928092755 +0200
@@ -1,0 +2,7 @@
+Mon Apr 26 17:37:56 UTC 2021 - Ferdinand Thiessen <r...@fthiessen.de>
+
+- Update to version 0.12.3
+  * Fixed: Font size is too small in text view
+  * Updated Catalan translation
+
+-------------------------------------------------------------------

Old:
----
  almanah-0.12.2.tar.xz

New:
----
  almanah-0.12.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ almanah.spec ++++++
--- /var/tmp/diff_new_pack.4kBEyu/_old  2021-04-27 21:35:46.396093525 +0200
+++ /var/tmp/diff_new_pack.4kBEyu/_new  2021-04-27 21:35:46.400093532 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package almanah
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           almanah
-Version:        0.12.2
+Version:        0.12.3
 Release:        0
 Summary:        GTK+ application to allow you to keep a diary of your life
 License:        GPL-3.0+
@@ -70,7 +70,8 @@
 %find_lang %{name} %{?no_lang_C}
 
 %files
-%doc AUTHORS COPYING NEWS README.md
+%license COPYING
+%doc AUTHORS NEWS README.md
 %{_bindir}/%{name}
 %dir %{_datadir}/metainfo
 %{_datadir}/metainfo/almanah.appdata.xml

++++++ almanah-0.12.2.tar.xz -> almanah-0.12.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/almanah-0.12.2/NEWS new/almanah-0.12.3/NEWS
--- old/almanah-0.12.2/NEWS     2020-09-03 12:15:22.815016700 +0200
+++ new/almanah-0.12.3/NEWS     2021-03-05 16:05:46.932089000 +0100
@@ -1,3 +1,14 @@
+Overview of changes from Almanah 0.12.2 to Almanah 0.12.3
+=========================================================
+
+* Bugs fixed:
+ - #4 Font size is too small in text view
+ - #7 A lot of [-Wincompatible-pointer-types] compiler warnings
+
+* Translation updates:
+ - Catalan
+
+
 Overview of changes from Almanah 0.12.1 to Almanah 0.12.2
 =========================================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/almanah-0.12.2/data/almanah.appdata.xml.in 
new/almanah-0.12.3/data/almanah.appdata.xml.in
--- old/almanah-0.12.2/data/almanah.appdata.xml.in      2020-09-03 
12:15:22.815016700 +0200
+++ new/almanah-0.12.3/data/almanah.appdata.xml.in      2021-03-05 
16:05:46.932089000 +0100
@@ -18,6 +18,7 @@
     </p>
   </description>
   <releases>
+    <release version="0.12.3" date="2021-03-05" type="stable"/>
     <release version="0.12.2" date="2020-09-03" type="stable"/>
     <release version="0.12.1" date="2020-09-03" type="stable"/>
     <release version="0.12.0" date="2019-10-07" type="stable"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/almanah-0.12.2/meson.build 
new/almanah-0.12.3/meson.build
--- old/almanah-0.12.2/meson.build      2020-09-03 12:15:22.819016700 +0200
+++ new/almanah-0.12.3/meson.build      2021-03-05 16:05:46.935089000 +0100
@@ -2,7 +2,7 @@
   'almanah',
   'c',
   license: 'GPL3+',
-  version: '0.12.2',
+  version: '0.12.3',
   default_options: [
     'b_ndebug=if-release',
   ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/almanah-0.12.2/po/ca.po new/almanah-0.12.3/po/ca.po
--- old/almanah-0.12.2/po/ca.po 2020-09-03 12:15:22.819016700 +0200
+++ new/almanah-0.12.3/po/ca.po 2021-03-05 16:05:46.936089000 +0100
@@ -38,10 +38,11 @@
 "events which happened (on your computer) for each day (such as tasks and "
 "appointments from Evolution)."
 msgstr ""
-"Podeu xifrar l'agenda per preservar la vostra privacitat. T?? les habilitats "
-"d'edici??, que inclouen la formataci?? de text i la impressi?? de text, i 
tamb?? "
-"us mostra una llista dels esdeveniments que van succeir (en l'ordinador "
-"actual) per a cada dia (com ara les tasques i les cites d'Evolution)."
+"Podeu xifrar l'agenda per a preservar la vostra privacitat. T?? les "
+"habilitats d'edici??, que inclouen la formataci?? de text i la impressi?? de "
+"text, i tamb?? us mostra una llista dels esdeveniments que van succeir (en "
+"l'ordinador actual) per a cada dia (com ara les tasques i les cites "
+"d'Evolution)."
 
 #: ../data/almanah.desktop.in.h:1 ../src/application.c:133
 #: ../src/main-window.c:156
@@ -52,12 +53,14 @@
 msgid "Keep a personal diary"
 msgstr "Manteniu una agenda personal"
 
-#. Translators: This is the default name of the PDF/PS/SVG file the diary is 
printed to if "Print to File" is chosen.
+#. Translators: This is the default name of the PDF/PS/SVG file the diary is
+#. printed to if "Print to File" is chosen.
 #: ../data/almanah.desktop.in.h:3 ../src/application.c:272
 msgid "Diary"
 msgstr "Agenda"
 
-#. TRANSLATORS: Search terms to find this application. Do NOT translate or 
localize the semicolons! The list MUST also end with a semicolon!
+#. TRANSLATORS: Search terms to find this application. Do NOT translate or
+#. localize the semicolons! The list MUST also end with a semicolon!
 #: ../data/almanah.desktop.in.h:5
 msgid "diary;journal;"
 msgstr "agenda;diari;"
@@ -68,7 +71,7 @@
 
 #: ../src/ui/almanah.ui.h:2
 msgid "Go to Today"
-msgstr "V??s a avui"
+msgstr "Ves a avui"
 
 #: ../src/ui/almanah.ui.h:3
 msgid "Select Date???"
@@ -136,9 +139,9 @@
 "been built with encryption support. Leave blank to disable database "
 "encryption."
 msgstr ""
-"L'id. de la clau a utilitzar per xifrar i desxifrar la base de dades, si "
+"L'id. de la clau a utilitzar per a xifrar i desxifrar la base de dades, si "
 "Almanah es va construir amb compatibilitat per al xifratge. Deixeu-ho en "
-"blanc per inhabilitar el xifratge de la base de dades."
+"blanc per a inhabilitar el xifratge de la base de dades."
 
 #: ../data/org.gnome.almanah.gschema.xml.in.h:3
 msgid "Spell checking language"
@@ -204,7 +207,7 @@
 msgstr ""
 "Almanah es distribueix amb l'expectativa que ser?? ??til, per?? SENSE CAP "
 "GARANTIA; ni tan sols la garantia impl??cita de COMERCIABILITAT o ADEQUACI?? "
-"PER UN PROP??SIT PARTICULAR. Vegeu la Llic??ncia P??blica General GNU per "
+"PER UN PROP??SIT PARTICULAR. Vegeu la Llic??ncia P??blica General GNU per a "
 "obtenir-ne m??s detalls."
 
 #: ../src/application.c:530
@@ -225,11 +228,11 @@
 msgid "Copyright ?? 2008-2009 Philip Withnall"
 msgstr "Copyright ?? 2008-2009 Philip Withnall"
 
-#. Translators: please include your names here to be credited for your hard 
work!
+#. Translators: please include your names here to be credited for your hard
+#. work!
 #. * Format:
 #. * "Translator name 1 <translator@email.address>\n"
 #. * "Translator name 2 <translator2@email.address>"
-#.
 #: ../src/application.c:557
 msgid "translator-credits"
 msgstr ""
@@ -315,7 +318,7 @@
 "Select a _filename for a complete copy of the unencrypted Almanah Diary "
 "database to be given."
 msgstr ""
-"Seleccioneu el nom a donar al fitxer amb una c??pia completa de la base de "
+"S_eleccioneu el nom a donar al fitxer amb una c??pia completa de la base de "
 "dades de l'agenda Almanah sense xifrar."
 
 #: ../src/export-operation.c:256 ../src/export-operation.c:313
@@ -436,12 +439,18 @@
 msgid "Import Results"
 msgstr "Resultats de la importaci??"
 
-#. Translators: This is a strftime()-format string for the dates displayed in 
import results.
-#. Translators: This is a strftime()-format string for the date to display 
when asking about editing a diary entry.
-#. Translators: This is a strftime()-format string for the date to display 
when asking about deleting a diary entry.
-#. Translators: This is a strftime()-format string for the date displayed at 
the top of the main window.
-#. Translators: This is a strftime()-format string for the date displayed 
above each printed entry.
-#. Translators: This is a strftime()-format string for the dates displayed in 
search results.
+#. Translators: This is a strftime()-format string for the dates displayed in
+#. import results.
+#. Translators: This is a strftime()-format string for the date to display when
+#. asking about editing a diary entry.
+#. Translators: This is a strftime()-format string for the date to display when
+#. asking about deleting a diary entry.
+#. Translators: This is a strftime()-format string for the date displayed at
+#. the top of the main window.
+#. Translators: This is a strftime()-format string for the date displayed above
+#. each printed entry.
+#. Translators: This is a strftime()-format string for the dates displayed in
+#. search results.
 #: ../src/import-export-dialog.c:542 ../src/main-window.c:590
 #: ../src/main-window.c:621 ../src/main-window.c:1228 ../src/printing.c:263
 #: ../src/search-dialog.c:180
@@ -462,7 +471,7 @@
 msgid "Select a database _file created by Almanah Diary to import."
 msgstr ""
 "Seleccioneu un _fitxer de base de dades que s'hagi creat amb l'agenda "
-"Almanah per importar-ho."
+"Almanah per a importar-ho."
 
 #: ../src/import-operation.c:248
 #, c-format
@@ -481,7 +490,8 @@
 "interm??dia. S'est?? sobreescrivint amb l'entrada importada: %s"
 
 #. Append some header text for the imported entry
-#. Translators: This text is appended to an existing entry when an entry is 
being imported to the same date.
+#. Translators: This text is appended to an existing entry when an entry is
+#. being imported to the same date.
 #. * The imported entry is appended to this text.
 #: ../src/import-operation.c:305
 #, c-format
@@ -525,7 +535,8 @@
 msgid "Error opening URI"
 msgstr "S'ha produ??t un error en obrir l'URI"
 
-#. Translators: this is an event source name (like Calendar appointment) and 
the time when the event takes place
+#. Translators: this is an event source name (like Calendar appointment) and
+#. the time when the event takes place
 #: ../src/main-window.c:1155
 #, c-format
 msgid "%s @ %s"
@@ -536,14 +547,15 @@
 msgstr "No s'ha pogut carregar el contingut de l'entrada"
 
 #. Translators: this sentence is just used in startup to estimate the width
-#. of a 15 words sentence. Translate with some random sentences with just 15 
words.
+#. of a 15 words sentence. Translate with some random sentences with just 15
+#. words.
 #. See: https://bugzilla.gnome.org/show_bug.cgi?id=754841
 #: ../src/main-window.c:1416
 msgid ""
 "This is just a fifteen words sentence to calculate the diary entry text view "
 "size"
 msgstr ""
-"Aix?? tan sols ??s una frase de quinze paraules per calcular la mida del text"
+"Aix?? tan sols ??s una frase de quinze paraules per a calcular la mida del 
text"
 
 #: ../src/main-window.c:1453
 msgid "Spelling checker could not be initialized"
@@ -604,7 +616,8 @@
 msgid "Search canceled."
 msgstr "S'ha cancel??lat la cerca."
 
-#. Translators: This is an error message wrapper for when searches encounter 
an error. The placeholder is for an error message.
+#. Translators: This is an error message wrapper for when searches encounter an
+#. error. The placeholder is for an error message.
 #: ../src/search-dialog.c:224
 #, c-format
 msgid "Error: %s"
@@ -703,7 +716,8 @@
 msgid "Error encrypting database: %s"
 msgstr "S'ha produ??t un error en xifrar la base de dades: %s"
 
-#. Translators: The first and second params are file paths, the last param is 
an error message.
+#. Translators: The first and second params are file paths, the last param is
+#. an error message.
 #: ../src/vfs.c:489
 #, c-format
 msgid "Error copying the file from %s to %s: %s"
@@ -721,7 +735,8 @@
 msgid "Error closing file: %s"
 msgstr "S'ha produ??t un error en tancar el fitxer: %s"
 
-#. Translators: the first parameter is a filename, the second is an error 
message.
+#. Translators: the first parameter is a filename, the second is an error
+#. message.
 #. Translators: the first parameter is a filename.
 #: ../src/vfs.c:994 ../src/vfs.c:1021
 #, c-format
@@ -751,7 +766,8 @@
 "No es pot carregar l'objecte de finestra del calendari sense un fitxer "
 "d'interf??cie gr??fica"
 
-#. Translators: This is the detail string for important days as displayed in 
the calendar.
+#. Translators: This is the detail string for important days as displayed in
+#. the calendar.
 #: ../src/widgets/calendar.c:176
 msgid "Important!"
 msgstr "Important"
@@ -762,13 +778,14 @@
 
 #: ../src/widgets/entry-tags-area.c:101
 msgid "Write the tag and press enter to save it"
-msgstr "Escriviu l'etiqueta i premeu la tecla de retorn per desar-la"
+msgstr "Escriviu l'etiqueta i premeu la tecla de retorn per a desar-la"
 
 #: ../src/widgets/tag-accessible.c:165
 msgid "Remove the tag from the entry"
 msgstr "Suprimeix l'etiqueta de l'entrada"
 
-#. Looks like gtk_widget_set_tooltip_text don't works here, even in the 
init... ?
+#. Looks like gtk_widget_set_tooltip_text don't works here, even in the init...
+#. ?
 #: ../src/widgets/tag.c:416
 msgid "Remove tag"
 msgstr "Suprimeix l'etiqueta"
@@ -776,198 +793,3 @@
 #: ../src/widgets/tag-entry.c:85
 msgid "Tag entry"
 msgstr "Etiqueta l'entrada"
-
-#~ msgid "Almanah Preferences"
-#~ msgstr "Prefer??ncies de l'Almanah"
-
-#~ msgid "Main window X position"
-#~ msgstr "Posici?? X de la finestra principal"
-
-#~ msgid "Main window Y position"
-#~ msgstr "Posici?? Y de la finestra principal"
-
-#~ msgid "Main window height"
-#~ msgstr "Al??ada de la finestra principal"
-
-#~ msgid "Main window maximization"
-#~ msgstr "Maximitzaci?? de la finestra principal"
-
-#~ msgid "Main window width"
-#~ msgstr "Amplada de la finestra principal"
-
-#~ msgid "The X position of the main window."
-#~ msgstr "La posici?? X de la finestra principal."
-
-#~ msgid "The Y position of the main window."
-#~ msgstr "La posici?? Y de la finestra principal."
-
-#~ msgid "The height of the main window."
-#~ msgstr "L'al??ada de la finestra principal."
-
-#~ msgid "The width of the main window."
-#~ msgstr "L'amplada de la finestra principal."
-
-#~ msgid "Whether the main window should start maximized."
-#~ msgstr "Si la finestra principal s'hauria d'iniciar maximitzada."
-
-#~ msgid "Add a definition for the currently selected text."
-#~ msgstr "Afegeix una definici?? per al text seleccionat."
-
-#~ msgid "Definition Description"
-#~ msgstr "Descripci?? de la definici??"
-
-#~ msgid "Definition List"
-#~ msgstr "Llista de definicions"
-
-#~ msgid "Definition Type"
-#~ msgstr "Tipus de definici??"
-
-#~ msgid "Definition type:"
-#~ msgstr "Tipus de definici??:"
-
-#~ msgid "F_ormat"
-#~ msgstr "F_ormata"
-
-#~ msgid "I_mportant"
-#~ msgstr "I_mportant"
-
-#~ msgid "Jump to the current date in the diary."
-#~ msgstr "V??s a la data actual en el diari."
-
-#~ msgid "Nothing selected"
-#~ msgstr "No s'ha seleccionat res"
-
-#~ msgid "Results:"
-#~ msgstr "Resultats:"
-
-#~ msgid "Toggle whether the current entry is marked as important."
-#~ msgstr "Commuta si l'entrada actual est?? marcada com a important."
-
-#~ msgid "Toggle whether the currently selected text is bold."
-#~ msgstr "Commuta si el text seleccionat est?? en negreta."
-
-#~ msgid "Toggle whether the currently selected text is italic."
-#~ msgstr "Commuta si el text seleccionat est?? en cursiva."
-
-#~ msgid "Toggle whether the currently selected text is underlined."
-#~ msgstr "Commuta si el text seleccionat est?? subratllat."
-
-#~ msgid "View"
-#~ msgstr "Visualitza"
-
-#~ msgid "View Event"
-#~ msgstr "Visualitza l'esdeveniment"
-
-#~ msgid "_Add Definition"
-#~ msgstr "_Afegeix una definici??"
-
-#~ msgid "_Definitions"
-#~ msgstr "_Definicions"
-
-#~ msgid "_Export???"
-#~ msgstr "_Exporta???"
-
-#~ msgid "_File"
-#~ msgstr "_Fitxer"
-
-#~ msgid "_Help"
-#~ msgstr "A_juda"
-
-#~ msgid "_Import???"
-#~ msgstr "_Importa???"
-
-#~ msgid "_Print???"
-#~ msgstr "_Imprimeix???"
-
-#~ msgid "_Remove Definition"
-#~ msgstr "_Suprimeix la definici??"
-
-#~ msgid "_View Definitions"
-#~ msgstr "_Visualitza les definicions"
-
-#~ msgid "Add Definition"
-#~ msgstr "Afegeix una definici??"
-
-#~ msgid "Definition Manager"
-#~ msgstr "Gestor de definicions"
-
-#~ msgid "Are you sure you want to delete the definition for \"%s\"?"
-#~ msgstr "Segur que voleu suprimir la definici?? per a ??%s???"
-
-#~ msgid "Contact"
-#~ msgstr "Contacte"
-
-#~ msgid "An Evolution contact."
-#~ msgstr "Un contacte de l'Evolution."
-
-#~ msgid "Select Contact"
-#~ msgstr "Seleccioneu un contacte"
-
-#~ msgid "Error opening contact"
-#~ msgstr "S'ha produ??t un error en obrir el contacte"
-
-#~ msgid "Error opening Evolution"
-#~ msgstr "S'ha produ??t un error en obrir l'Evolution"
-
-#~ msgid "File"
-#~ msgstr "Fitxer"
-
-#~ msgid "An attached file."
-#~ msgstr "Un fitxer adjunt."
-
-#~ msgid "Select File"
-#~ msgstr "Seleccioneu un fitxer"
-
-#~ msgid "Note"
-#~ msgstr "Nota"
-
-#~ msgid "A note about an important event."
-#~ msgstr "Una nota sobre un esdeveniment important."
-
-#~ msgid "URI"
-#~ msgstr "URI"
-
-#~ msgid "A URI of a file or web page."
-#~ msgstr "Un URI d'un fitxer o d'una p??gina web."
-
-#~ msgid "URI: "
-#~ msgstr "URI: "
-
-#~ msgid "- Manage your diary"
-#~ msgstr "- Gestioneu el vostre diari"
-
-#~ msgid ""
-#~ "The encrypted database is empty. The plain database file has been left "
-#~ "undeleted as backup."
-#~ msgstr ""
-#~ "La base de dades encriptada est?? buida. El fitxer de base de dades s'ha "
-#~ "deixat com a c??pia de seguretat."
-
-#~ msgid "Could not delete plain database file \"%s\"."
-#~ msgstr "No s'ha pogut suprimir el fitxer de base de dades ??%s??."
-
-#~ msgid "Due to an unknown error the file cannot be opened."
-#~ msgstr "No es pot obrir el fitxer degut a un error desconegut."
-
-#~ msgid "Due to an unknown error the URI cannot be opened."
-#~ msgstr "No es pot obrir l'URI degut a un error desconegut."
-
-#~ msgid "<b>%A, %e %B %Y</b>"
-#~ msgstr "<b>%A %e %B %Y</b>"
-
-#~ msgid "<b>End Date</b>"
-#~ msgstr "<b>Data de finalitzaci??</b>"
-
-#~ msgid ""
-#~ "Both an encrypted and plaintext version of the database exist as \"%s\" "
-#~ "and \"%s\", and one is likely corrupt. Please delete the corrupt one "
-#~ "before continuing."
-#~ msgstr ""
-#~ "Existeix una versi?? encriptada de la base de dades i una sense encriptar, 
"
-#~ "anomenades ??%s?? i ??%s??. Sembla que una de les dues est?? malmesa. 
Suprimiu-"
-#~ "la per a continuar."
-
-#~ msgid "Error getting encryption key: GConf key \"%s\" invalid or empty."
-#~ msgstr ""
-#~ "Error en obtenir la clau d'encriptaci??: La clau del GConf ??%s?? no ??s "
-#~ "v??lida o ??s buida."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/almanah-0.12.2/src/main-window.c 
new/almanah-0.12.3/src/main-window.c
--- old/almanah-0.12.2/src/main-window.c        2020-09-03 12:15:22.826016700 
+0200
+++ new/almanah-0.12.3/src/main-window.c        2021-03-05 16:05:46.946089300 
+0100
@@ -259,8 +259,8 @@
 
        /* Grab our child widgets */
        priv->entry_scrolled = GTK_WIDGET (gtk_builder_get_object (builder, 
"almanah_mw_main_content_scrolled_window"));
-       priv->entry_view = GTK_TEXT_VIEW (gtk_builder_get_object (builder, 
"almanah_mw_entry_view"));
-       priv->entry_buffer = gtk_text_view_get_buffer (priv->entry_view);
+       priv->entry_view = GTK_SOURCE_VIEW (gtk_builder_get_object (builder, 
"almanah_mw_entry_view"));
+       priv->entry_buffer = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer 
(GTK_TEXT_VIEW (priv->entry_view)));
        priv->entry_tags_area = ALMANAH_ENTRY_TAGS_AREA (gtk_builder_get_object 
(builder, "almanah_mw_entry_tags_area"));
        priv->event_store = GTK_LIST_STORE (gtk_builder_get_object (builder, 
"almanah_mw_event_store"));
        priv->events_expander = GTK_WIDGET (gtk_builder_get_object (builder, 
"almanah_mw_events_expander"));
@@ -282,7 +282,7 @@
 
        /* Set up text formatting. It's important this is done after setting up 
GtkSpell, so that we know whether to
         * create a dummy gtkspell-misspelled text tag. */
-       almanah_interface_create_text_tags (priv->entry_buffer, TRUE);
+       almanah_interface_create_text_tags (GTK_TEXT_BUFFER 
(priv->entry_buffer), TRUE);
 
        /* Make sure we're notified if the cursor moves position so we can 
check the tag stack */
        g_signal_connect (priv->entry_buffer, "notify::cursor-position", 
G_CALLBACK (mw_entry_buffer_cursor_position_cb), main_window);
@@ -334,7 +334,7 @@
 current_entry_notify_cb (__attribute__ ((unused)) AlmanahEntry *entry, 
__attribute__ ((unused)) GParamSpec *pspec, AlmanahMainWindow *self)
 {
        /* As the entry's been changed, mark it as edited so that it has to be 
saved */
-       gtk_text_buffer_set_modified (self->priv->entry_buffer, TRUE);
+       gtk_text_buffer_set_modified (GTK_TEXT_BUFFER 
(self->priv->entry_buffer), TRUE);
 }
 
 static void
@@ -569,8 +569,8 @@
 
        /* Don't save if it hasn't been/can't be edited */
        if (priv->current_entry == NULL ||
-           gtk_text_view_get_editable (priv->entry_view) == FALSE ||
-           gtk_text_buffer_get_modified (priv->entry_buffer) == FALSE)
+           gtk_text_view_get_editable (GTK_TEXT_VIEW (priv->entry_view)) == 
FALSE ||
+           gtk_text_buffer_get_modified (GTK_TEXT_BUFFER (priv->entry_buffer)) 
== FALSE)
                return;
 
        storage_manager = almanah_application_dup_storage_manager 
(ALMANAH_APPLICATION (gtk_window_get_application (GTK_WINDOW (self))));
@@ -579,7 +579,7 @@
        editability = almanah_entry_get_editability (priv->current_entry);
        entry_exists = almanah_storage_manager_entry_exists (storage_manager, 
&date);
        existing_entry_is_empty = almanah_entry_is_empty (priv->current_entry);
-       entry_is_empty = (gtk_text_buffer_get_char_count (priv->entry_buffer) 
== 0) ? TRUE : FALSE;
+       entry_is_empty = (gtk_text_buffer_get_char_count (GTK_TEXT_BUFFER 
(priv->entry_buffer)) == 0) ? TRUE : FALSE;
 
        /* Make sure they're editable: don't allow entries in the future to be 
edited,
         * but allow entries in the past to be added or edited, as long as 
permission is given.
@@ -652,8 +652,8 @@
        }
 
        /* Save the entry */
-       almanah_entry_set_content (priv->current_entry, priv->entry_buffer);
-       gtk_text_buffer_set_modified (priv->entry_buffer, FALSE);
+       almanah_entry_set_content (priv->current_entry, GTK_TEXT_BUFFER 
(priv->entry_buffer));
+       gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (priv->entry_buffer), 
FALSE);
 
        g_date_set_time_t (&last_edited, time (NULL));
        almanah_entry_set_last_edited (priv->current_entry, &last_edited);
@@ -701,7 +701,7 @@
 
        /* Only get the tag list if there's no selection (just an insertion 
cursor),
         * since we want the buttons untoggled if there's a selection. */
-       range_selected = gtk_text_buffer_get_selection_bounds 
(priv->entry_buffer, &iter, NULL);
+       range_selected = gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER 
(priv->entry_buffer), &iter, NULL);
        if (range_selected == FALSE)
                _tag_list = gtk_text_iter_get_tags (&iter);
 
@@ -801,11 +801,11 @@
        gtk_text_iter_backward_chars (&start, len);
 
        if (priv->pending_bold_active == TRUE)
-               gtk_text_buffer_apply_tag_by_name (text_buffer, "bold", &start, 
end);
+               gtk_text_buffer_apply_tag_by_name (GTK_TEXT_BUFFER 
(text_buffer), "bold", &start, end);
        if (priv->pending_italic_active == TRUE)
-               gtk_text_buffer_apply_tag_by_name (text_buffer, "italic", 
&start, end);
+               gtk_text_buffer_apply_tag_by_name (GTK_TEXT_BUFFER 
(text_buffer), "italic", &start, end);
        if (priv->pending_underline_active == TRUE)
-               gtk_text_buffer_apply_tag_by_name (text_buffer, "underline", 
&start, end);
+               gtk_text_buffer_apply_tag_by_name (GTK_TEXT_BUFFER 
(text_buffer), "underline", &start, end);
 
        priv->updating_formatting = FALSE;
 }
@@ -842,7 +842,7 @@
 {
        AlmanahMainWindow *main_window = ALMANAH_MAIN_WINDOW (user_data);
        GtkClipboard *clipboard = gtk_clipboard_get_for_display 
(gtk_widget_get_display (GTK_WIDGET (main_window)), GDK_SELECTION_CLIPBOARD);
-       gtk_text_buffer_cut_clipboard (main_window->priv->entry_buffer, 
clipboard, TRUE);
+       gtk_text_buffer_cut_clipboard (GTK_TEXT_BUFFER 
(main_window->priv->entry_buffer), clipboard, TRUE);
 }
 
 void
@@ -850,7 +850,7 @@
 {
        AlmanahMainWindow *main_window = ALMANAH_MAIN_WINDOW (user_data);
        GtkClipboard *clipboard = gtk_clipboard_get_for_display 
(gtk_widget_get_display (GTK_WIDGET (main_window)), GDK_SELECTION_CLIPBOARD);
-       gtk_text_buffer_copy_clipboard (main_window->priv->entry_buffer, 
clipboard);
+       gtk_text_buffer_copy_clipboard (GTK_TEXT_BUFFER 
(main_window->priv->entry_buffer), clipboard);
 }
 
 void
@@ -858,14 +858,14 @@
 {
        AlmanahMainWindow *main_window = ALMANAH_MAIN_WINDOW (user_data);
        GtkClipboard *clipboard = gtk_clipboard_get_for_display 
(gtk_widget_get_display (GTK_WIDGET (main_window)), GDK_SELECTION_CLIPBOARD);
-       gtk_text_buffer_paste_clipboard (main_window->priv->entry_buffer, 
clipboard, NULL, TRUE);
+       gtk_text_buffer_paste_clipboard (GTK_TEXT_BUFFER 
(main_window->priv->entry_buffer), clipboard, NULL, TRUE);
 }
 
 void
 mw_delete_activate_cb (__attribute__ ((unused)) GSimpleAction *action, 
__attribute__ ((unused)) GVariant *parameter, gpointer user_data)
 {
        AlmanahMainWindow *main_window = ALMANAH_MAIN_WINDOW (user_data);
-       gtk_text_buffer_delete_selection (main_window->priv->entry_buffer, 
TRUE, TRUE);
+       gtk_text_buffer_delete_selection (GTK_TEXT_BUFFER 
(main_window->priv->entry_buffer), TRUE, TRUE);
 }
 
 void
@@ -877,7 +877,7 @@
 
        time_struct = time (NULL);
        strftime (time_string, sizeof (time_string), "%X", localtime 
(&time_struct));
-       gtk_text_buffer_insert_at_cursor (main_window->priv->entry_buffer, 
time_string, -1);
+       gtk_text_buffer_insert_at_cursor (GTK_TEXT_BUFFER 
(main_window->priv->entry_buffer), time_string, -1);
 }
 
 void
@@ -930,12 +930,12 @@
        if (priv->updating_formatting == TRUE)
                return;
 
-       gtk_text_buffer_get_selection_bounds (priv->entry_buffer, &start, &end);
+       gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER 
(priv->entry_buffer), &start, &end);
        if (applying == TRUE)
-               gtk_text_buffer_apply_tag_by_name (priv->entry_buffer, 
tag_name, &start, &end);
+               gtk_text_buffer_apply_tag_by_name (GTK_TEXT_BUFFER 
(priv->entry_buffer), tag_name, &start, &end);
        else
-               gtk_text_buffer_remove_tag_by_name (priv->entry_buffer, 
tag_name, &start, &end);
-       gtk_text_buffer_set_modified (priv->entry_buffer, TRUE);
+               gtk_text_buffer_remove_tag_by_name (GTK_TEXT_BUFFER 
(priv->entry_buffer), tag_name, &start, &end);
+       gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (priv->entry_buffer), 
TRUE);
 }
 
 void
@@ -1019,7 +1019,7 @@
                goto finish;
        }
 
-       gtk_text_buffer_get_selection_bounds (priv->entry_buffer, &start, &end);
+       gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER 
(priv->entry_buffer), &start, &end);
 
        if (g_variant_get_boolean (parameter) == TRUE) {
                /* Add a new hyperlink on the selected text */
@@ -1037,10 +1037,10 @@
                        /* Create and apply a new anonymous tag */
                        tag = GTK_TEXT_TAG (almanah_hyperlink_tag_new 
(almanah_uri_entry_dialog_get_uri (uri_entry_dialog)));
 
-                       table = gtk_text_buffer_get_tag_table 
(priv->entry_buffer);
+                       table = gtk_text_buffer_get_tag_table (GTK_TEXT_BUFFER 
(priv->entry_buffer));
                        gtk_text_tag_table_add (table, tag);
 
-                       gtk_text_buffer_apply_tag (priv->entry_buffer, tag, 
&start, &end);
+                       gtk_text_buffer_apply_tag (GTK_TEXT_BUFFER 
(priv->entry_buffer), tag, &start, &end);
 
                        /* Connect up events */
                        g_signal_connect (tag, "event", (GCallback) 
hyperlink_tag_event_cb, self);
@@ -1070,7 +1070,7 @@
 
                                if (gtk_text_iter_backward_to_tag_toggle 
(&tag_start, tag) == TRUE &&
                                    gtk_text_iter_forward_to_tag_toggle 
(&tag_end, tag) == TRUE) {
-                                       gtk_text_buffer_remove_tag 
(priv->entry_buffer, tag, &tag_start, &tag_end);
+                                       gtk_text_buffer_remove_tag 
(GTK_TEXT_BUFFER (priv->entry_buffer), tag, &tag_start, &tag_end);
                                }
                        }
                }
@@ -1088,7 +1088,7 @@
 
                        for (i = tags; i != NULL; i = i->next) {
                                if (ALMANAH_IS_HYPERLINK_TAG (i->data)) {
-                                       gtk_text_buffer_remove_tag 
(priv->entry_buffer, GTK_TEXT_TAG (i->data), &start, &end);
+                                       gtk_text_buffer_remove_tag 
(GTK_TEXT_BUFFER (priv->entry_buffer), GTK_TEXT_TAG (i->data), &start, &end);
                                }
                        }
 
@@ -1099,7 +1099,7 @@
                update_state = TRUE;
        }
 
-       gtk_text_buffer_set_modified (priv->entry_buffer, TRUE);
+       gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (priv->entry_buffer), 
TRUE);
 
  finish:
        if (update_state)
@@ -1282,7 +1282,7 @@
        g_object_unref (entry);
 
        future_entry = almanah_entry_get_editability (priv->current_entry) == 
ALMANAH_ENTRY_FUTURE;
-       gtk_text_view_set_editable (priv->entry_view, !future_entry);
+       gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->entry_view), 
!future_entry);
        for (i = 0; affected_actions[i] != NULL; i++) {
                action = g_action_map_lookup_action (G_ACTION_MAP 
(main_window), affected_actions[i]);
                g_simple_action_set_enabled (G_SIMPLE_ACTION (action), 
!future_entry);
@@ -1297,8 +1297,8 @@
        if (almanah_entry_is_empty (priv->current_entry) == FALSE) {
                GError *error = NULL;
 
-               gtk_text_buffer_set_text (priv->entry_buffer, "", 0);
-               if (almanah_entry_get_content (priv->current_entry, 
priv->entry_buffer, FALSE, &error) == FALSE) {
+               gtk_text_buffer_set_text (GTK_TEXT_BUFFER (priv->entry_buffer), 
"", 0);
+               if (almanah_entry_get_content (priv->current_entry, 
GTK_TEXT_BUFFER (priv->entry_buffer), FALSE, &error) == FALSE) {
                        GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW 
(main_window),
                                                                    
GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
                                                                    _("Entry 
content could not be loaded"));
@@ -1309,18 +1309,18 @@
                        g_error_free (error);
 
                        /* Make sure the interface is left in a decent state 
before we return */
-                       gtk_text_view_set_editable (priv->entry_view, FALSE);
+                       gtk_text_view_set_editable (GTK_TEXT_VIEW 
(priv->entry_view), FALSE);
 
                        return;
                }
        } else {
                /* Set the buffer to be empty */
-               gtk_text_buffer_set_text (priv->entry_buffer, "", -1);
+               gtk_text_buffer_set_text (GTK_TEXT_BUFFER (priv->entry_buffer), 
"", -1);
        }
 
 #ifdef ENABLE_SPELL_CHECKING
        /* Ensure the spell-checking is updated */
-       gtkspell = gtk_spell_checker_get_from_text_view (priv->entry_view);
+       gtkspell = gtk_spell_checker_get_from_text_view (GTK_TEXT_VIEW 
(priv->entry_view));
        if (gtkspell != NULL) {
                gtk_spell_checker_recheck_all (gtkspell);
                gtk_widget_queue_draw (GTK_WIDGET (priv->entry_view));
@@ -1328,7 +1328,7 @@
 #endif /* ENABLE_SPELL_CHECKING */
 
        /* Unset the modification bit on the text buffer last, so that we can 
be sure it's unset */
-       gtk_text_buffer_set_modified (priv->entry_buffer, FALSE);
+       gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (priv->entry_buffer), 
FALSE);
 
        /* List the entry's events */
        event_manager = almanah_application_dup_event_manager (application);
@@ -1404,11 +1404,125 @@
        gtk_header_bar_pack_end (GTK_HEADER_BAR 
(main_window->priv->header_bar), button);
 }
 
+/* Taken from pango_font_description_to_css() in GTK, licensed under GPLv2+
+ * and modified to add @selector. */
+static gchar *
+font_description_to_css (PangoFontDescription *desc, const gchar *selector)
+{
+       GString *s;
+       PangoFontMask set;
+
+       s = g_string_new (selector);
+       g_string_append (s, " { ");
+
+       set = pango_font_description_get_set_fields (desc);
+       if (set & PANGO_FONT_MASK_FAMILY) {
+               g_string_append (s, "font-family: ");
+               g_string_append (s, pango_font_description_get_family (desc));
+               g_string_append (s, "; ");
+       }
+       if (set & PANGO_FONT_MASK_STYLE) {
+               switch (pango_font_description_get_style (desc)) {
+               case PANGO_STYLE_NORMAL:
+                       g_string_append (s, "font-style: normal; ");
+                       break;
+               case PANGO_STYLE_OBLIQUE:
+                       g_string_append (s, "font-style: oblique; ");
+                       break;
+               case PANGO_STYLE_ITALIC:
+                       g_string_append (s, "font-style: italic; ");
+                       break;
+               }
+       }
+       if (set & PANGO_FONT_MASK_VARIANT) {
+               switch (pango_font_description_get_variant (desc)) {
+               case PANGO_VARIANT_NORMAL:
+                       g_string_append (s, "font-variant: normal; ");
+                       break;
+               case PANGO_VARIANT_SMALL_CAPS:
+                       g_string_append (s, "font-variant: small-caps; ");
+                       break;
+               }
+       }
+       if (set & PANGO_FONT_MASK_WEIGHT) {
+               switch (pango_font_description_get_weight (desc)) {
+               case PANGO_WEIGHT_THIN:
+                       g_string_append (s, "font-weight: 100; ");
+                       break;
+               case PANGO_WEIGHT_ULTRALIGHT:
+                       g_string_append (s, "font-weight: 200; ");
+                       break;
+               case PANGO_WEIGHT_LIGHT:
+               case PANGO_WEIGHT_SEMILIGHT:
+                       g_string_append (s, "font-weight: 300; ");
+                       break;
+               case PANGO_WEIGHT_BOOK:
+               case PANGO_WEIGHT_NORMAL:
+                       g_string_append (s, "font-weight: 400; ");
+                       break;
+               case PANGO_WEIGHT_MEDIUM:
+                       g_string_append (s, "font-weight: 500; ");
+                       break;
+               case PANGO_WEIGHT_SEMIBOLD:
+                       g_string_append (s, "font-weight: 600; ");
+                       break;
+               case PANGO_WEIGHT_BOLD:
+                       g_string_append (s, "font-weight: 700; ");
+                       break;
+               case PANGO_WEIGHT_ULTRABOLD:
+                       g_string_append (s, "font-weight: 800; ");
+                       break;
+               case PANGO_WEIGHT_HEAVY:
+               case PANGO_WEIGHT_ULTRAHEAVY:
+                       g_string_append (s, "font-weight: 900; ");
+                       break;
+               }
+       }
+       if (set & PANGO_FONT_MASK_STRETCH) {
+               switch (pango_font_description_get_stretch (desc)) {
+               case PANGO_STRETCH_ULTRA_CONDENSED:
+                       g_string_append (s, "font-stretch: ultra-condensed; ");
+                       break;
+               case PANGO_STRETCH_EXTRA_CONDENSED:
+                       g_string_append (s, "font-stretch: extra-condensed; ");
+                       break;
+               case PANGO_STRETCH_CONDENSED:
+                       g_string_append (s, "font-stretch: condensed; ");
+                       break;
+               case PANGO_STRETCH_SEMI_CONDENSED:
+                       g_string_append (s, "font-stretch: semi-condensed; ");
+                       break;
+               case PANGO_STRETCH_NORMAL:
+                       g_string_append (s, "font-stretch: normal; ");
+                       break;
+               case PANGO_STRETCH_SEMI_EXPANDED:
+                       g_string_append (s, "font-stretch: semi-expanded; ");
+                       break;
+               case PANGO_STRETCH_EXPANDED:
+                       g_string_append (s, "font-stretch: expanded; ");
+                       break;
+               case PANGO_STRETCH_EXTRA_EXPANDED:
+                       g_string_append (s, "font-stretch: extra-expanded; ");
+                       break;
+               case PANGO_STRETCH_ULTRA_EXPANDED:
+                       g_string_append (s, "font-stretch: ultra-expanded; ");
+                       break;
+               }
+       }
+       if (set & PANGO_FONT_MASK_SIZE) {
+               g_string_append_printf (s, "font-size: %dpt", 
pango_font_description_get_size (desc) / PANGO_SCALE);
+       }
+
+       g_string_append (s, "}");
+
+       return g_string_free (s, FALSE);
+}
 
 static void
 mw_setup_size_text_view (AlmanahMainWindow *self)
 {
-       gchar *font_name = NULL;
+       gchar *font_desc_string = NULL;
+       PangoFontDescription *font_desc = NULL;
        gchar *css_font = NULL;
        int fixed_width;
 
@@ -1421,8 +1535,9 @@
                self->priv->desktop_interface_settings = g_settings_new 
(ALMANAH_MAIN_WINDOW_DESKTOP_INTERFACE_SETTINGS_SCHEMA);
                g_signal_connect (self->priv->desktop_interface_settings, 
"changed", G_CALLBACK (mw_desktop_interface_settings_changed), self);
        }
-       font_name = g_settings_get_string 
(self->priv->desktop_interface_settings, 
ALMANAH_MAIN_WINDOW_DOCUMENT_FONT_KEY_NAME);
-       css_font = g_strdup_printf (".almanah-mw-entry-view { font: %s; }", 
font_name);
+       font_desc_string = g_settings_get_string 
(self->priv->desktop_interface_settings, 
ALMANAH_MAIN_WINDOW_DOCUMENT_FONT_KEY_NAME);
+       font_desc = pango_font_description_from_string (font_desc_string);
+       css_font = font_description_to_css (font_desc, 
".almanah-mw-entry-view");
        if (self->priv->css_provider == NULL) {
                GtkStyleContext *style_context;
 
@@ -1433,12 +1548,13 @@
        gtk_css_provider_load_from_data (self->priv->css_provider, css_font, 
strlen(css_font), NULL);
 
        /* Setting up entry GtkTextView size based on font size plus a margin */
-       fixed_width = mw_get_font_width (GTK_WIDGET (self->priv->entry_view), 
font_name) + ALMANAH_MAIN_WINDOW_FIXED_MARGIN_FONT;
+       fixed_width = mw_get_font_width (GTK_WIDGET (self->priv->entry_view), 
font_desc_string) + ALMANAH_MAIN_WINDOW_FIXED_MARGIN_FONT;
        /* The ScrolledWindow (parent container for the text view) must be at
           least the new width plus the text view margin */
        gtk_widget_set_size_request(GTK_WIDGET (self->priv->entry_view), 
fixed_width, -1);
 
-       g_free (font_name);
+       g_free (font_desc_string);
+       pango_font_description_free (font_desc);
        g_free (css_font);
 }
 
@@ -1516,11 +1632,11 @@
        GtkTextTag *tag;
 
        /* Bail out if spell checking's already enabled */
-       if (gtk_spell_checker_get_from_text_view (self->priv->entry_view) != 
NULL)
+       if (gtk_spell_checker_get_from_text_view (GTK_TEXT_VIEW 
(self->priv->entry_view)) != NULL)
                return TRUE;
 
        /* If spell checking wasn't already enabled, we have a dummy 
gtkspell-misspelled text tag to destroy */
-       table = gtk_text_buffer_get_tag_table (self->priv->entry_buffer);
+       table = gtk_text_buffer_get_tag_table (GTK_TEXT_BUFFER 
(self->priv->entry_buffer));
        tag = gtk_text_tag_table_lookup (table, "gtkspell-misspelled");
        if (tag != NULL)
                gtk_text_tag_table_remove (table, tag);
@@ -1539,7 +1655,7 @@
 
        gtkspell = gtk_spell_checker_new ();
        gtk_spell_checker_set_language (gtkspell, spelling_language, error);
-       gtk_spell_checker_attach (gtkspell, self->priv->entry_view);
+       gtk_spell_checker_attach (gtkspell, GTK_TEXT_VIEW 
(self->priv->entry_view));
        g_free (spelling_language);
 
        if (gtkspell == NULL)
@@ -1554,17 +1670,17 @@
        GtkTextTagTable *table;
        GtkTextTag *tag;
 
-       gtkspell = gtk_spell_checker_get_from_text_view 
(self->priv->entry_view);
+       gtkspell = gtk_spell_checker_get_from_text_view (GTK_TEXT_VIEW 
(self->priv->entry_view));
        if (gtkspell != NULL)
                gtk_spell_checker_detach (gtkspell);
 
        /* Remove the old gtkspell-misspelling text tag */
-       table = gtk_text_buffer_get_tag_table (self->priv->entry_buffer);
+       table = gtk_text_buffer_get_tag_table (GTK_TEXT_BUFFER 
(self->priv->entry_buffer));
        tag = gtk_text_tag_table_lookup (table, "gtkspell-misspelled");
        if (tag != NULL)
                gtk_text_tag_table_remove (table, tag);
 
        /* Create a dummy gtkspell-misspelling text tag */
-       gtk_text_buffer_create_tag (self->priv->entry_buffer, 
"gtkspell-misspelled", NULL);
+       gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self->priv->entry_buffer), 
"gtkspell-misspelled", NULL);
 }
 #endif /* ENABLE_SPELL_CHECKING */

Reply via email to