Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pympress for openSUSE:Factory 
checked in at 2023-12-15 21:50:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pympress (Old)
 and      /work/SRC/openSUSE:Factory/.pympress.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pympress"

Fri Dec 15 21:50:42 2023 rev:3 rq:1133459 version:1.8.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/pympress/pympress.changes        2023-09-08 
21:16:17.420077369 +0200
+++ /work/SRC/openSUSE:Factory/.pympress.new.25432/pympress.changes     
2023-12-15 21:51:05.262536193 +0100
@@ -1,0 +2,11 @@
+Fri Dec 15 12:27:39 UTC 2023 - m...@cimba.li
+
+-   Update to v1.8.5
+    *   Include missing standard PDF fonts on Windows, which caused
+        pdfs that don't include fonts (e.g. images from ggplot2) to
+        have symbols that were not rendered
+    *   Fix high-DPI (scaling ≥ 200%) blurriness on Windows
+    *   document and improve error messaging for Gstreamer's Gtk
+        plugin dependency (libgstgtk)
+
+-------------------------------------------------------------------

Old:
----
  pympress-1.8.4.tar.gz

New:
----
  pympress-1.8.5.tar.gz

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

Other differences:
------------------
++++++ pympress.spec ++++++
--- /var/tmp/diff_new_pack.faZ5t8/_old  2023-12-15 21:51:05.670551114 +0100
+++ /var/tmp/diff_new_pack.faZ5t8/_new  2023-12-15 21:51:05.670551114 +0100
@@ -21,12 +21,12 @@
 # Do not support python 2, and build a single package
 %define pythons python3
 Name:           pympress
-Version:        1.8.4
+Version:        1.8.5
 Release:        0
 Summary:        A simple and powerful dual-screen PDF reader designed for 
presentations
 License:        GPL-2.0-or-later
 URL:            https://github.com/Cimbali/pympress/
-Source0:        pympress-1.8.4.tar.gz
+Source0:        pympress-1.8.5.tar.gz
 BuildRequires:  coreutils
 BuildRequires:  fdupes
 BuildRequires:  findutils

++++++ pympress-1.8.4.tar.gz -> pympress-1.8.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/README.md new/pympress-1.8.5/README.md
--- old/pympress-1.8.4/README.md        2023-09-06 20:21:28.000000000 +0200
+++ new/pympress-1.8.5/README.md        2023-12-15 01:33:03.000000000 +0100
@@ -202,7 +202,7 @@
 ## Media and autoplay
 
 To enable media playback, you need to have either:
-- Gstreamer installed (enabled by default), with plugins 
gstreamer-good/-bad/-ugly based on which codecs you need, or
+- Gstreamer installed (enabled by default), with its gtk plugin (`libgstgtk`) 
which is sometimes packaged separately (e.g. as `gst-plugin-gtk` or 
`gstreamer1.0-gtk3`), and plugins gstreamer-good/-bad/-ugly based on which 
codecs you need, or
 - VLC installed (and the python-vlc module), with `enabled = on` under the 
`[vlc]` section of your config file.
 
 On macOS, issues with the gstreamer brew formula may require users to set 
`GST_PLUGIN_SYSTEM_PATH` manually. For default homebrew configurations the 
value should be `/opt/homebrew/lib/gstreamer-1.0/`. Make sure to set this 
environmental variable globally, or pympress might not pick it up.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/pympress/__init__.py 
new/pympress-1.8.5/pympress/__init__.py
--- old/pympress-1.8.4/pympress/__init__.py     2023-09-06 20:20:48.000000000 
+0200
+++ new/pympress-1.8.5/pympress/__init__.py     2023-12-15 01:32:31.000000000 
+0100
@@ -26,7 +26,7 @@
 # DON'T IMPORT ANYTHING HERE (OR YOU WILL BREAK setup.py)
 #
 
-__version__ = '1.8.4'
+__version__ = '1.8.5'
 __author__ = """2009, 2010 Thomas Jost <thomas.j...@gmail.com>
 2015-2023 Cimbali <m...@cimba.li>
 2016 Christoph Rath <christof.r...@iaik.tugraz.at>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/pympress/__main__.py 
new/pympress-1.8.5/pympress/__main__.py
--- old/pympress-1.8.4/pympress/__main__.py     2023-09-06 20:20:48.000000000 
+0200
+++ new/pympress-1.8.5/pympress/__main__.py     2023-12-15 01:32:31.000000000 
+0100
@@ -53,6 +53,10 @@
         lang, enc = locale.getdefaultlocale()
         os.environ['LANG'] = lang
 
+    # Before any initialisation or imports
+    util.make_windows_dpi_aware()
+
+
 try:
     loaded_locale = locale.setlocale(locale.LC_ALL, '')
 except locale.Error as err:
Binary files old/pympress-1.8.4/pympress/__pycache__/__init__.cpython-310.pyc 
and new/pympress-1.8.5/pympress/__pycache__/__init__.cpython-310.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/pympress/document.py 
new/pympress-1.8.5/pympress/document.py
--- old/pympress-1.8.4/pympress/document.py     2023-09-06 20:20:48.000000000 
+0200
+++ new/pympress-1.8.5/pympress/document.py     2023-12-15 01:32:31.000000000 
+0100
@@ -591,16 +591,17 @@
         return self.annotations
 
 
-    def new_annotation(self, pos, rect=None):
+    def new_annotation(self, pos, rect=None, value=''):
         """ Add an annotation to this page
 
         Args:
             pos (`int`): The position in the list of annotations in which to 
insert this annotation
             rect (:class:`~Poppler.Rectangle`): A rectangle for the position 
of this annotation
-
-        Returns:
-            :class:`~Poppler.Annot`: A new annotation on this page
+            value (`str`): The contents of the annotation
         """
+        if self.parent.doc is None:
+            return
+
         if pos < 0:
             pos = 0
         if pos > len(self.annotations):
@@ -615,25 +616,30 @@
 
         new_annot = Poppler.AnnotText.new(self.parent.doc, rect)
         new_annot.set_icon(Poppler.ANNOT_TEXT_ICON_NOTE)
+        new_annot.set_contents(value)
         self.annotations.insert(pos, new_annot)
         self.parent.made_changes()
-        return new_annot
 
 
     def set_annotation(self, pos, value):
-        """ Add an annotation to this page
+        """ Update an annotation on this page
 
         Args:
             pos (`int`): The number of the annotation
             value (`str`): The new contents of the annotation
         """
-        rect = self.annotations[pos].get_rectangle()
-        self.remove_annotation(pos)
-        self.new_annotation(pos, rect).set_contents(value)
+        try:
+            rect = self.annotations[pos].get_rectangle()
+        except IndexError:
+            # Often because no document is loaded
+            logger.error(_("Pympress can not edit PDF annotation 
{}").format(pos))
+        else:
+            self.remove_annotation(pos)
+            self.new_annotation(pos, rect, value)
 
 
     def remove_annotation(self, pos):
-        """ Add an annotation to this page
+        """ Remove an annotation from this page
 
         Args:
             pos (`int`): The number of the annotation
@@ -1237,8 +1243,8 @@
     Also, it has no "rendering" capability, and is made harmless by overriding 
its render function.
     """
 
-    def __init__(self):
-        super(EmptyPage, self).__init__(None, -1, None)
+    def __init__(self, parent):
+        super(EmptyPage, self).__init__(None, -1, parent)
         self.page_label = None
         # by default, anything that will have a 1.3 asapect ratio
         self.pw, self.ph = 1.3, 1.0
@@ -1270,7 +1276,7 @@
     """
     def __init__(self):
         super(EmptyDocument, self).__init__(None, None, None)
-        self.pages_cache[-1] = EmptyPage()
+        self.pages_cache[-1] = EmptyPage(self)
 
 
     def page(self, number):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/pympress/extras.py 
new/pympress-1.8.5/pympress/extras.py
--- old/pympress-1.8.4/pympress/extras.py       2023-09-06 20:20:48.000000000 
+0200
+++ new/pympress-1.8.5/pympress/extras.py       2023-12-15 01:32:31.000000000 
+0100
@@ -46,6 +46,10 @@
     annotations_treeview = None
     #: The containing :class:`~Gtk.ListStore` storing the annotations to be 
displayed
     annotations_liststore = None
+    #: The :class:`~Gtk.TreeViewColumn` where the text is rendered
+    annotation_column = None
+    #: The :class:`~Gtk.CellRendererText` defining how text is rendered
+    annotation_renderer = None
     #: The :class:`~Gtk.Entry` in which we are currently editing an 
annotation, or None
     editing = None
 
@@ -92,6 +96,14 @@
         return True
 
 
+    def rewrap_annotations(self):
+        """ Update the wrap-width of the annotation column to fit its actual 
width
+        """
+        width = self.annotations_treeview.get_allocated_width()
+        self.annotation_renderer.set_property('wrap-width', width - 4)
+        self.annotation_column.queue_resize()
+
+
     def key_event(self, widget, event):
         """ Handle a key (press/release) event.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pympress-1.8.4/pympress/media_overlays/gst_backend.py 
new/pympress-1.8.5/pympress/media_overlays/gst_backend.py
--- old/pympress-1.8.4/pympress/media_overlays/gst_backend.py   2023-09-06 
20:20:48.000000000 +0200
+++ new/pympress-1.8.5/pympress/media_overlays/gst_backend.py   2023-12-15 
01:32:31.000000000 +0100
@@ -220,4 +220,9 @@
         """
         Gst.init(gst_opts)
 
+        if Gst.ElementFactory.make('gtksink', None) is None:
+            logger.warning('Can not create a gtksink. Check the gtk plugin for 
GStreamer is installed.')
+            logger.warning('See 
https://github.com/Cimbali/pympress/issues/240')
+            raise ValueError('Can not create a gtksink.')
+
         return Gst.version_string()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/pympress/share/xml/presenter.glade 
new/pympress-1.8.5/pympress/share/xml/presenter.glade
--- old/pympress-1.8.4/pympress/share/xml/presenter.glade       2023-09-06 
20:20:48.000000000 +0200
+++ new/pympress-1.8.5/pympress/share/xml/presenter.glade       2023-12-15 
01:32:31.000000000 +0100
@@ -838,6 +838,7 @@
                                 <property name="can-focus">True</property>
                                 <property name="hexpand">True</property>
                                 <property name="vexpand">True</property>
+                                <property 
name="hscrollbar-policy">external</property>
                                 <property name="shadow-type">in</property>
                                 <child>
                                   <object class="GtkTreeView" 
id="annotations_treeview">
@@ -845,15 +846,11 @@
                                     <property name="can-focus">True</property>
                                     <property name="hexpand">True</property>
                                     <property name="vexpand">True</property>
-                                    <property 
name="resize-mode">immediate</property>
                                     <property 
name="model">annotations_liststore</property>
                                     <property 
name="headers-visible">False</property>
                                     <property 
name="headers-clickable">False</property>
-                                    <property 
name="reorderable">True</property>
-                                    <property name="rules-hint">True</property>
                                     <property name="search-column">0</property>
                                     <property 
name="show-expanders">False</property>
-                                    <property 
name="enable-tree-lines">True</property>
                                     <child internal-child="selection">
                                       <object class="GtkTreeSelection" 
id="annotations_selection"/>
                                     </child>
@@ -865,6 +862,7 @@
                                         <child>
                                           <object class="GtkCellRendererText" 
id="annotation_renderer">
                                             <property 
name="editable">True</property>
+                                            <property 
name="wrap-mode">word</property>
                                             <signal name="edited" 
handler="annotations.editing_validated" swapped="no"/>
                                             <signal name="editing-canceled" 
handler="annotations.editing_finished" swapped="no"/>
                                             <signal name="editing-started" 
handler="annotations.editing_started" swapped="no"/>
@@ -879,7 +877,7 @@
                                 </child>
                               </object>
                               <packing>
-                                <property name="expand">False</property>
+                                <property name="expand">True</property>
                                 <property name="fill">True</property>
                                 <property name="pack-type">end</property>
                                 <property name="position">1</property>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pympress-1.8.4/pympress/share/xml/time_report_dialog.glade 
new/pympress-1.8.5/pympress/share/xml/time_report_dialog.glade
--- old/pympress-1.8.4/pympress/share/xml/time_report_dialog.glade      
2023-09-06 20:20:48.000000000 +0200
+++ new/pympress-1.8.5/pympress/share/xml/time_report_dialog.glade      
2023-12-15 01:32:31.000000000 +0100
@@ -50,6 +50,7 @@
                   <object class="GtkTreeViewColumn" id="name_renderer">
                     <property name="title" translatable="yes">name</property>
                     <property name="expand">True</property>
+                    <property name="resizable">True</property>
                     <child>
                       <object class="GtkCellRendererText"/>
                       <attributes>
@@ -61,6 +62,7 @@
                 <child>
                   <object class="GtkTreeViewColumn" id="time_renderer">
                     <property name="min_width">60</property>
+                    <property name="resizable">True</property>
                     <property name="title" translatable="yes">time</property>
                     <child>
                       <object class="GtkCellRendererText"/>
@@ -73,6 +75,7 @@
                 <child>
                   <object class="GtkTreeViewColumn" id="duration_renderer">
                     <property name="min_width">60</property>
+                    <property name="resizable">True</property>
                     <property name="title" 
translatable="yes">duration</property>
                     <child>
                       <object class="GtkCellRendererText"/>
@@ -85,6 +88,7 @@
                 <child>
                   <object class="GtkTreeViewColumn" id="page_renderer">
                     <property name="min_width">60</property>
+                    <property name="resizable">True</property>
                     <property name="title" translatable="yes">slide</property>
                     <child>
                       <object class="GtkCellRendererText">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/pympress/ui.py 
new/pympress-1.8.5/pympress/ui.py
--- old/pympress-1.8.4/pympress/ui.py   2023-09-06 20:20:48.000000000 +0200
+++ new/pympress-1.8.5/pympress/ui.py   2023-12-15 01:32:31.000000000 +0100
@@ -693,6 +693,8 @@
             self.p_da_notes.queue_draw()
         if self.redraw_timeout:
             self.redraw_timeout = 0
+        if self.show_annotations:
+            self.annotations.rewrap_annotations()
 
         
self.config.update_layout_from_widgets(self.layout_name(self.notes_mode), 
self.p_central.get_children()[0],
                                                self.pane_handle_pos)
@@ -1873,6 +1875,7 @@
                 else:
                     size = parent.get_allocated_height()
                 parent.set_position(self.pane_handle_pos[parent] * size)
+            self.annotations.rewrap_annotations()
 
         GLib.idle_add(self.redraw_panes)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/pympress/util.py 
new/pympress-1.8.5/pympress/util.py
--- old/pympress-1.8.4/pympress/util.py 2023-09-06 20:20:48.000000000 +0200
+++ new/pympress-1.8.5/pympress/util.py 2023-12-15 01:32:31.000000000 +0100
@@ -33,6 +33,7 @@
 import gettext
 import os
 import sys
+import ctypes
 import pathlib
 
 if sys.version_info >= (3, 9):
@@ -480,7 +481,7 @@
 
         Args:
             display (:class:`~Gdk.Display`):  the current screen
-            *windows (`tuple` of :class:`~Gtk.Window`):  windows for wich to 
look up the monitor position
+            *windows (`tuple` of :class:`~Gtk.Window`):  windows for which to 
look up the monitor position
 
         Returns:
             `tuple` of `Monitor`: The monitors for each window, followed by 
the best monitors for presenter and content
@@ -524,6 +525,17 @@
 
         return (*pos, prim_area.most_intersection(all_geom), 
prim_area.least_intersection(all_geom))
 
+
+def make_windows_dpi_aware():
+    """ Set to avoid blurriness issues on High-DPI resolutions with scaling. 
"""
+    if not IS_WINDOWS:
+        return
+
+    if hasattr(ctypes.windll.shcore, 'SetProcessDpiAwareness'):
+        ctypes.windll.shcore.SetProcessDpiAwareness(2)
+    else:
+        ctypes.windll.user32.SetProcessDPIAware()
+
 ##
 # Local Variables:
 # mode: python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pympress-1.8.4/setup.py new/pympress-1.8.5/setup.py
--- old/pympress-1.8.4/setup.py 2023-09-06 20:20:48.000000000 +0200
+++ new/pympress-1.8.5/setup.py 2023-12-15 01:32:31.000000000 +0100
@@ -125,6 +125,7 @@
         pathlib.Path('lib', 'gdk-pixbuf-2.0'),
         pathlib.Path('share', 'poppler'),
         pathlib.Path('share', 'themes'),
+        pathlib.Path('share', 'fonts'),
         pathlib.Path('share', 'icons'),
         pathlib.Path('share', 'glib-2.0'),
         pathlib.Path('share', 'xml')

Reply via email to