diff --git a/cxfreeze_setup.py b/cxfreeze_setup.py index 0a557313..8c4b4e32 100755 --- a/cxfreeze_setup.py +++ b/cxfreeze_setup.py @@ -97,7 +97,7 @@ def convert_file(filename, ext): buildOptions = dict( includes = [], excludes = [], - packages = ['gi', 'vlc'], + packages = ['gi', 'vlc', 'six'], include_files = include_files, silent = True ) diff --git a/docs/.buildinfo b/docs/.buildinfo index a10abb2b..d7de780f 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 53e31eb641f54d7b8dba261ca7caedd0 +config: 830a85a3ec736f97a870e58cf2359a05 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/README.html b/docs/README.html index 927f1fdf..c1e3e852 100644 --- a/docs/README.html +++ b/docs/README.html @@ -13,6 +13,8 @@ + + @@ -44,17 +46,19 @@ +
-
+ + + + + + + + + + + + + + + + +
+ + +
-
+
+

What is Pympress?

@@ -154,7 +179,7 @@
  • supports embedded videos
  • text annotations displayed in the presenter window
  • -
  • natively supports beamer’s notes on second screen!
  • +
  • natively supports beamer's notes on second screen!

Pympress is a free software, distributed under the terms of the GPL license (version 2 or, at your option, any later version).

Pympress was originally created and maintained by Schnouki, on his repo.

@@ -173,18 +198,19 @@
python3 -m pip install git+https://github.com/Cimbali/pympress#egg=pympress
 
-

If you don’t have pip, see the python documentation on installing. You may also want to check that you have all the dependencies.

+

If you don't have pip, see the python documentation on installing. You may also want to check that you have all the dependencies.

From source

-

If you also want the source code, you can clone this repo or grab the latest releases’ source, open a console where you put the code, and type python3 -m pip install . (or, if you plan on modifying that code, python3 -m pip install -e .). Same remarks as above apply.

+

If you also want the source code, you can clone this repo or grab the latest releases' source, open a console where you put the code, and type python3 -m pip install . (or, if you plan on modifying that code, python3 -m pip install -e .). Same remarks as above apply.

Binary install

-

If you don’t want to know about source code or dependencies, this is for you. -Grab the latest installer for your platform and execute it. You’re done!

-

Currently binaries are only available for windows (.msi files). Choose packages with ‘amd64’ in the name if you have a 64 bit machine, ‘x86’ if you have a 32 bit machine. The ‘vlc’ suffix indicates that this installer ships VLC as well to support video, so try it if the other version fails to read videos.

+

If you don't want to know about source code or dependencies, this is for you. +Grab the latest installer for your platform and execute it. You're done!

+

Currently binaries are only available for windows (.msi files). Choose packages with 'amd64' in the name if you have a 64 bit machine, 'x86' if you have a 32 bit machine. The 'vlc' suffix indicates that this installer ships VLC as well to support video, so try it if the other version fails to read videos.

+

On windows, in the unlikely event you get an error message along the lines of "MSVCP100.dll is missing", you can download this package from Microsoft for x86 (32 bit) or for x64 (64 bits). Those libraries really should already be installed on your system.

Dependencies

@@ -192,15 +218,18 @@
  • Python, 3.x or 2.7 (with setuptools, which is usually shipped by default with python).
  • Poppler, the PDF rendering library.
  • -
  • Cairo (and python bindings for cairo), the graphics library which to pre-render and draw over PDF pages.
  • -
  • Gtk+ 3, a toolkit for creating graphical user interfaces.
  • +
  • Gtk+ 3, a toolkit for creating graphical user interfaces, and its dependencies, specifically:
      +
    • Cairo (and python bindings for cairo), the graphics library which is used to pre-render and draw over PDF pages.
    • +
    • Gdk, a lower-level graphics library to handles icons.
    • +
    +
  • PyGi, the python bindings for Gtk+3. PyGi is also known as pygobject3, just pygobject or python3-gi.
    • Introspection bindings for poppler may be shipped separately, ensure you have those as well (typelib-1_0-Poppler-0_18 on OpenSUSE, gir1.2-poppler-0.18 on Ubuntu)
  • optionally VLC, to play videos (with the same bitness as Python)
-

On windows GTK+3, Poppler and their python bindings are all shipped together in the PyGi installer. Be sure to check the supported Python versions (up to 3.4 at the time of writing), they appear in the FEATURES list in the linked page.

+

On windows GTK+3, Poppler and their python bindings are all shipped together in the PyGi installer. Be sure to check the supported Python versions (up to 3.4 at the time of writing), they appear in the FEATURES list in the linked page. Be sure to tick all the necessary dependencies in the installer (Poppler, Cairo, Gdk-Pixbuf).

On other platforms they are often installed by default, or easily available through your package or software manager. For example, on ubuntu, you can run the following as root to make sure you have all the prerequisites assuming you use python3:

apt-get install python3 python3-pip libgtk-3-0 libpoppler-glib8 libcairo2 python3-gi python3-cairo gir1.2-gtk-3.0 gir1.2-poppler-0.18
@@ -222,18 +251,18 @@
 

Functionalities

-

All functionalities are available from the menus of the window with slide previews. Don’t be afraid to experiment with them!

+

All functionalities are available from the menus of the window with slide previews. Don't be afraid to experiment with them!

Keyboard shortcuts are also listed in these menus. Some more usual shortcuts are often available, for example Ctrl+L, and F11 also toggle fullscreen, though the main shortcut is just F.

A few of the fancier functionalities are listed here:

  • Swap screens: If Pympress mixed up which screen is the projector and which is not, press S

  • -
  • Go To Slide: To jump to a selected slide without flashing through the whole presentation on the projector, press G or click the “current slide” box.

    +
  • Go To Slide: To jump to a selected slide without flashing through the whole presentation on the projector, press G or click the "current slide" box.

    A spin box will appear, and you will be able to navigate through your slides in the presenter window only by scrolling your mouse, with the Home/Up/Down/End keys, with the + and - buttons of the spin box, or simply by typing in the number of the slide. Press Enter to validate going to the new slide or Esc to cancel.

  • Estimated talk time: Click the Time estimation box and set your planned talk duration. You can also pass this on the command line through the -ett flag. The color will allow you to see at a glance how much time you have left.

  • -
  • Adjust screen centering: If your slides’ form factor doesn’t fit the projectors’ and you don’t want the slide centered in the window, use the “Screen Center” option in the “Presentation” menu.

    +
  • Adjust screen centering: If your slides' form factor doesn't fit the projectors' and you don't want the slide centered in the window, use the "Screen Center" option in the "Presentation" menu.

  • Resize Current/Next slide: You can drag the bar between both slides on the Presenter window to adjust their relative sizes to your liking.

  • @@ -256,15 +285,19 @@
+
+
+ +
@@ -294,10 +328,11 @@ diff --git a/docs/_modules/gi/overrides/Gtk.html b/docs/_modules/gi/overrides/Gtk.html index 1f8e4efd..98fb5220 100644 --- a/docs/_modules/gi/overrides/Gtk.html +++ b/docs/_modules/gi/overrides/Gtk.html @@ -13,6 +13,8 @@ + + @@ -37,23 +39,25 @@ - + +
-
+ + + + + + + + + + + + + + + + +
+ + +
-
+
+

Source code for gi.overrides.Gtk

 # -*- Mode: Python; py-indent-offset: 4 -*-
@@ -203,7 +212,6 @@ 

Source code for gi.overrides.Gtk

 class PyGTKDeprecationWarning(PyGIDeprecationWarning):
     pass
 
-
 __all__.append('PyGTKDeprecationWarning')
 
 
@@ -220,7 +228,6 @@ 

Source code for gi.overrides.Gtk

         target_entries.append(entry)
     return target_entries
 
-
 __all__.append('_construct_target_list')
 
 
@@ -354,209 +361,210 @@ 

Source code for gi.overrides.Gtk

 __all__.append("Editable")
 
 
-if Gtk._version in ("2.0", "3.0"):
-    class Action(Gtk.Action):
-        __init__ = deprecated_init(Gtk.Action.__init__,
-                                   arg_names=('name', 'label', 'tooltip', 'stock_id'),
-                                   category=PyGTKDeprecationWarning)
-
-    Action = override(Action)
-    __all__.append("Action")
-
-    class RadioAction(Gtk.RadioAction):
-        __init__ = deprecated_init(Gtk.RadioAction.__init__,
-                                   arg_names=('name', 'label', 'tooltip', 'stock_id', 'value'),
-                                   category=PyGTKDeprecationWarning)
-
-    RadioAction = override(RadioAction)
-    __all__.append("RadioAction")
-
-    class ActionGroup(Gtk.ActionGroup):
-        __init__ = deprecated_init(Gtk.ActionGroup.__init__,
-                                   arg_names=('name',),
-                                   category=PyGTKDeprecationWarning)
-
-        def add_actions(self, entries, user_data=None):
-            """
-            The add_actions() method is a convenience method that creates a number
-            of gtk.Action  objects based on the information in the list of action
-            entry tuples contained in entries and adds them to the action group.
-            The entry tuples can vary in size from one to six items with the
-            following information:
-
-                * The name of the action. Must be specified.
-                * The stock id for the action. Optional with a default value of None
-                  if a label is specified.
-                * The label for the action. This field should typically be marked
-                  for translation, see the set_translation_domain() method. Optional
-                  with a default value of None if a stock id is specified.
-                * The accelerator for the action, in the format understood by the
-                  gtk.accelerator_parse() function. Optional with a default value of
-                  None.
-                * The tooltip for the action. This field should typically be marked
-                  for translation, see the set_translation_domain() method. Optional
-                  with a default value of None.
-                * The callback function invoked when the action is activated.
-                  Optional with a default value of None.
-
-            The "activate" signals of the actions are connected to the callbacks and
-            their accel paths are set to <Actions>/group-name/action-name.
-            """
-            try:
-                iter(entries)
-            except (TypeError):
-                raise TypeError('entries must be iterable')
-
-            def _process_action(name, stock_id=None, label=None, accelerator=None, tooltip=None, callback=None):
-                action = Action(name=name, label=label, tooltip=tooltip, stock_id=stock_id)
-                if callback is not None:
-                    if user_data is None:
-                        action.connect('activate', callback)
-                    else:
-                        action.connect('activate', callback, user_data)
-
-                self.add_action_with_accel(action, accelerator)
-
-            for e in entries:
-                # using inner function above since entries can leave out optional arguments
-                _process_action(*e)
-
-        def add_toggle_actions(self, entries, user_data=None):
-            """
-            The add_toggle_actions() method is a convenience method that creates a
-            number of gtk.ToggleAction objects based on the information in the list
-            of action entry tuples contained in entries and adds them to the action
-            group. The toggle action entry tuples can vary in size from one to seven
-            items with the following information:
-
-                * The name of the action. Must be specified.
-                * The stock id for the action. Optional with a default value of None
-                  if a label is specified.
-                * The label for the action. This field should typically be marked
-                  for translation, see the set_translation_domain() method. Optional
-                  with a default value of None if a stock id is specified.
-                * The accelerator for the action, in the format understood by the
-                  gtk.accelerator_parse() function. Optional with a default value of
-                  None.
-                * The tooltip for the action. This field should typically be marked
-                  for translation, see the set_translation_domain() method. Optional
-                  with a default value of None.
-                * The callback function invoked when the action is activated.
-                  Optional with a default value of None.
-                * A flag indicating whether the toggle action is active. Optional
-                  with a default value of False.
-
-            The "activate" signals of the actions are connected to the callbacks and
-            their accel paths are set to <Actions>/group-name/action-name.
-            """
+class Action(Gtk.Action):
+    __init__ = deprecated_init(Gtk.Action.__init__,
+                               arg_names=('name', 'label', 'tooltip', 'stock_id'),
+                               category=PyGTKDeprecationWarning)
+
+Action = override(Action)
+__all__.append("Action")
+
+
+class RadioAction(Gtk.RadioAction):
+    __init__ = deprecated_init(Gtk.RadioAction.__init__,
+                               arg_names=('name', 'label', 'tooltip', 'stock_id', 'value'),
+                               category=PyGTKDeprecationWarning)
+
+RadioAction = override(RadioAction)
+__all__.append("RadioAction")
 
-            try:
-                iter(entries)
-            except (TypeError):
-                raise TypeError('entries must be iterable')
-
-            def _process_action(name, stock_id=None, label=None, accelerator=None, tooltip=None, callback=None, is_active=False):
-                action = Gtk.ToggleAction(name=name, label=label, tooltip=tooltip, stock_id=stock_id)
-                action.set_active(is_active)
-                if callback is not None:
-                    if user_data is None:
-                        action.connect('activate', callback)
-                    else:
-                        action.connect('activate', callback, user_data)
-
-                self.add_action_with_accel(action, accelerator)
-
-            for e in entries:
-                # using inner function above since entries can leave out optional arguments
-                _process_action(*e)
-
-        def add_radio_actions(self, entries, value=None, on_change=None, user_data=None):
-            """
-            The add_radio_actions() method is a convenience method that creates a
-            number of gtk.RadioAction objects based on the information in the list
-            of action entry tuples contained in entries and adds them to the action
-            group. The entry tuples can vary in size from one to six items with the
-            following information:
-
-                * The name of the action. Must be specified.
-                * The stock id for the action. Optional with a default value of None
-                  if a label is specified.
-                * The label for the action. This field should typically be marked
-                  for translation, see the set_translation_domain() method. Optional
-                  with a default value of None if a stock id is specified.
-                * The accelerator for the action, in the format understood by the
-                  gtk.accelerator_parse() function. Optional with a default value of
-                  None.
-                * The tooltip for the action. This field should typically be marked
-                  for translation, see the set_translation_domain() method. Optional
-                  with a default value of None.
-                * The value to set on the radio action. Optional with a default
-                  value of 0. Should be specified in applications.
-
-            The value parameter specifies the radio action that should be set
-            active. The "changed" signal of the first radio action is connected to
-            the on_change callback (if specified and not None) and the accel paths
-            of the actions are set to <Actions>/group-name/action-name.
-            """
-            try:
-                iter(entries)
-            except (TypeError):
-                raise TypeError('entries must be iterable')
 
-            first_action = None
+class ActionGroup(Gtk.ActionGroup):
+    __init__ = deprecated_init(Gtk.ActionGroup.__init__,
+                               arg_names=('name',),
+                               category=PyGTKDeprecationWarning)
 
-            def _process_action(group_source, name, stock_id=None, label=None, accelerator=None, tooltip=None, entry_value=0):
-                action = RadioAction(name=name, label=label, tooltip=tooltip, stock_id=stock_id, value=entry_value)
+    def add_actions(self, entries, user_data=None):
+        """
+        The add_actions() method is a convenience method that creates a number
+        of gtk.Action  objects based on the information in the list of action
+        entry tuples contained in entries and adds them to the action group.
+        The entry tuples can vary in size from one to six items with the
+        following information:
+
+            * The name of the action. Must be specified.
+            * The stock id for the action. Optional with a default value of None
+              if a label is specified.
+            * The label for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None if a stock id is specified.
+            * The accelerator for the action, in the format understood by the
+              gtk.accelerator_parse() function. Optional with a default value of
+              None.
+            * The tooltip for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None.
+            * The callback function invoked when the action is activated.
+              Optional with a default value of None.
+
+        The "activate" signals of the actions are connected to the callbacks and
+        their accel paths are set to <Actions>/group-name/action-name.
+        """
+        try:
+            iter(entries)
+        except (TypeError):
+            raise TypeError('entries must be iterable')
 
-                # FIXME: join_group is a patch to Gtk+ 3.0
-                #        otherwise we can't effectively add radio actions to a
-                #        group.  Should we depend on 3.0 and error out here
-                #        or should we offer the functionality via a compat
-                #        C module?
-                if hasattr(action, 'join_group'):
-                    action.join_group(group_source)
+        def _process_action(name, stock_id=None, label=None, accelerator=None, tooltip=None, callback=None):
+            action = Action(name=name, label=label, tooltip=tooltip, stock_id=stock_id)
+            if callback is not None:
+                if user_data is None:
+                    action.connect('activate', callback)
+                else:
+                    action.connect('activate', callback, user_data)
 
-                if value == entry_value:
-                    action.set_active(True)
+            self.add_action_with_accel(action, accelerator)
 
-                self.add_action_with_accel(action, accelerator)
-                return action
+        for e in entries:
+            # using inner function above since entries can leave out optional arguments
+            _process_action(*e)
 
-            for e in entries:
-                # using inner function above since entries can leave out optional arguments
-                action = _process_action(first_action, *e)
-                if first_action is None:
-                    first_action = action
+    def add_toggle_actions(self, entries, user_data=None):
+        """
+        The add_toggle_actions() method is a convenience method that creates a
+        number of gtk.ToggleAction objects based on the information in the list
+        of action entry tuples contained in entries and adds them to the action
+        group. The toggle action entry tuples can vary in size from one to seven
+        items with the following information:
+
+            * The name of the action. Must be specified.
+            * The stock id for the action. Optional with a default value of None
+              if a label is specified.
+            * The label for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None if a stock id is specified.
+            * The accelerator for the action, in the format understood by the
+              gtk.accelerator_parse() function. Optional with a default value of
+              None.
+            * The tooltip for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None.
+            * The callback function invoked when the action is activated.
+              Optional with a default value of None.
+            * A flag indicating whether the toggle action is active. Optional
+              with a default value of False.
+
+        The "activate" signals of the actions are connected to the callbacks and
+        their accel paths are set to <Actions>/group-name/action-name.
+        """
 
-            if first_action is not None and on_change is not None:
+        try:
+            iter(entries)
+        except (TypeError):
+            raise TypeError('entries must be iterable')
+
+        def _process_action(name, stock_id=None, label=None, accelerator=None, tooltip=None, callback=None, is_active=False):
+            action = Gtk.ToggleAction(name=name, label=label, tooltip=tooltip, stock_id=stock_id)
+            action.set_active(is_active)
+            if callback is not None:
                 if user_data is None:
-                    first_action.connect('changed', on_change)
+                    action.connect('activate', callback)
                 else:
-                    first_action.connect('changed', on_change, user_data)
+                    action.connect('activate', callback, user_data)
+
+            self.add_action_with_accel(action, accelerator)
+
+        for e in entries:
+            # using inner function above since entries can leave out optional arguments
+            _process_action(*e)
+
+    def add_radio_actions(self, entries, value=None, on_change=None, user_data=None):
+        """
+        The add_radio_actions() method is a convenience method that creates a
+        number of gtk.RadioAction objects based on the information in the list
+        of action entry tuples contained in entries and adds them to the action
+        group. The entry tuples can vary in size from one to six items with the
+        following information:
+
+            * The name of the action. Must be specified.
+            * The stock id for the action. Optional with a default value of None
+              if a label is specified.
+            * The label for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None if a stock id is specified.
+            * The accelerator for the action, in the format understood by the
+              gtk.accelerator_parse() function. Optional with a default value of
+              None.
+            * The tooltip for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None.
+            * The value to set on the radio action. Optional with a default
+              value of 0. Should be specified in applications.
+
+        The value parameter specifies the radio action that should be set
+        active. The "changed" signal of the first radio action is connected to
+        the on_change callback (if specified and not None) and the accel paths
+        of the actions are set to <Actions>/group-name/action-name.
+        """
+        try:
+            iter(entries)
+        except (TypeError):
+            raise TypeError('entries must be iterable')
+
+        first_action = None
+
+        def _process_action(group_source, name, stock_id=None, label=None, accelerator=None, tooltip=None, entry_value=0):
+            action = RadioAction(name=name, label=label, tooltip=tooltip, stock_id=stock_id, value=entry_value)
+
+            # FIXME: join_group is a patch to Gtk+ 3.0
+            #        otherwise we can't effectively add radio actions to a
+            #        group.  Should we depend on 3.0 and error out here
+            #        or should we offer the functionality via a compat
+            #        C module?
+            if hasattr(action, 'join_group'):
+                action.join_group(group_source)
+
+            if value == entry_value:
+                action.set_active(True)
+
+            self.add_action_with_accel(action, accelerator)
+            return action
+
+        for e in entries:
+            # using inner function above since entries can leave out optional arguments
+            action = _process_action(first_action, *e)
+            if first_action is None:
+                first_action = action
+
+        if first_action is not None and on_change is not None:
+            if user_data is None:
+                first_action.connect('changed', on_change)
+            else:
+                first_action.connect('changed', on_change, user_data)
+
+ActionGroup = override(ActionGroup)
+__all__.append('ActionGroup')
 
-    ActionGroup = override(ActionGroup)
-    __all__.append('ActionGroup')
 
-    class UIManager(Gtk.UIManager):
-        def add_ui_from_string(self, buffer):
-            if not isinstance(buffer, _basestring):
-                raise TypeError('buffer must be a string')
+class UIManager(Gtk.UIManager):
+    def add_ui_from_string(self, buffer):
+        if not isinstance(buffer, _basestring):
+            raise TypeError('buffer must be a string')
 
-            length = len(buffer.encode('UTF-8'))
+        length = len(buffer.encode('UTF-8'))
 
-            return Gtk.UIManager.add_ui_from_string(self, buffer, length)
+        return Gtk.UIManager.add_ui_from_string(self, buffer, length)
 
-        def insert_action_group(self, buffer, length=-1):
-            return Gtk.UIManager.insert_action_group(self, buffer, length)
+    def insert_action_group(self, buffer, length=-1):
+        return Gtk.UIManager.insert_action_group(self, buffer, length)
 
-    UIManager = override(UIManager)
-    __all__.append('UIManager')
+UIManager = override(UIManager)
+__all__.append('UIManager')
 
 
 class ComboBox(Gtk.ComboBox, Container):
     get_active_iter = strip_boolean_result(Gtk.ComboBox.get_active_iter)
 
-
 ComboBox = override(ComboBox)
 __all__.append('ComboBox')
 
@@ -566,7 +574,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('homogeneous', 'spacing'),
                                category=PyGTKDeprecationWarning)
 
-
 Box = override(Box)
 __all__.append('Box')
 
@@ -577,7 +584,6 @@ 

Source code for gi.overrides.Gtk

                                deprecated_defaults={'mode': Gtk.SizeGroupMode.VERTICAL},
                                category=PyGTKDeprecationWarning)
 
-
 SizeGroup = override(SizeGroup)
 __all__.append('SizeGroup')
 
@@ -587,7 +593,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('label',),
                                category=PyGTKDeprecationWarning)
 
-
 MenuItem = override(MenuItem)
 __all__.append('MenuItem')
 
@@ -623,7 +628,6 @@ 

Source code for gi.overrides.Gtk

 
         return Gtk.Builder.add_objects_from_string(self, buffer, length, object_ids)
 
-
 Builder = override(Builder)
 __all__.append('Builder')
 
@@ -637,7 +641,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('type',),
                                category=PyGTKDeprecationWarning)
 
-
 Window = override(Window)
 __all__.append('Window')
 
@@ -724,7 +727,6 @@ 

Source code for gi.overrides.Gtk

         except (IndexError):
             raise TypeError('Must pass an even number of arguments')
 
-
 Dialog = override(Dialog)
 __all__.append('Dialog')
 
@@ -745,19 +747,17 @@ 

Source code for gi.overrides.Gtk

         self.set_property('secondary-use-markup', True)
         self.set_property('secondary-text', message_format)
 
-
 MessageDialog = override(MessageDialog)
 __all__.append('MessageDialog')
 
 
-if Gtk._version in ("2.0", "3.0"):
-    class ColorSelectionDialog(Gtk.ColorSelectionDialog):
-        __init__ = deprecated_init(Gtk.ColorSelectionDialog.__init__,
-                                   arg_names=('title',),
-                                   category=PyGTKDeprecationWarning)
+class ColorSelectionDialog(Gtk.ColorSelectionDialog):
+    __init__ = deprecated_init(Gtk.ColorSelectionDialog.__init__,
+                               arg_names=('title',),
+                               category=PyGTKDeprecationWarning)
 
-    ColorSelectionDialog = override(ColorSelectionDialog)
-    __all__.append('ColorSelectionDialog')
+ColorSelectionDialog = override(ColorSelectionDialog)
+__all__.append('ColorSelectionDialog')
 
 
 class FileChooserDialog(Gtk.FileChooserDialog):
@@ -765,19 +765,17 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('title', 'parent', 'action', 'buttons'),
                                category=PyGTKDeprecationWarning)
 
-
 FileChooserDialog = override(FileChooserDialog)
 __all__.append('FileChooserDialog')
 
 
-if Gtk._version in ("2.0", "3.0"):
-    class FontSelectionDialog(Gtk.FontSelectionDialog):
-        __init__ = deprecated_init(Gtk.FontSelectionDialog.__init__,
-                                   arg_names=('title',),
-                                   category=PyGTKDeprecationWarning)
+class FontSelectionDialog(Gtk.FontSelectionDialog):
+    __init__ = deprecated_init(Gtk.FontSelectionDialog.__init__,
+                               arg_names=('title',),
+                               category=PyGTKDeprecationWarning)
 
-    FontSelectionDialog = override(FontSelectionDialog)
-    __all__.append('FontSelectionDialog')
+FontSelectionDialog = override(FontSelectionDialog)
+__all__.append('FontSelectionDialog')
 
 
 class RecentChooserDialog(Gtk.RecentChooserDialog):
@@ -788,7 +786,6 @@ 

Source code for gi.overrides.Gtk

                                deprecated_aliases={'recent_manager': 'manager'},
                                category=PyGTKDeprecationWarning)
 
-
 RecentChooserDialog = override(RecentChooserDialog)
 __all__.append('RecentChooserDialog')
 
@@ -802,7 +799,6 @@ 

Source code for gi.overrides.Gtk

     get_visible_range = strip_boolean_result(Gtk.IconView.get_visible_range)
     get_dest_item_at_pos = strip_boolean_result(Gtk.IconView.get_dest_item_at_pos)
 
-
 IconView = override(IconView)
 __all__.append('IconView')
 
@@ -812,7 +808,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('stock_id',),
                                category=PyGTKDeprecationWarning)
 
-
 ToolButton = override(ToolButton)
 __all__.append('ToolButton')
 
@@ -820,7 +815,6 @@ 

Source code for gi.overrides.Gtk

 class IMContext(Gtk.IMContext):
     get_surrounding = strip_boolean_result(Gtk.IMContext.get_surrounding)
 
-
 IMContext = override(IMContext)
 __all__.append('IMContext')
 
@@ -828,7 +822,6 @@ 

Source code for gi.overrides.Gtk

 class RecentInfo(Gtk.RecentInfo):
     get_application_info = strip_boolean_result(Gtk.RecentInfo.get_application_info)
 
-
 RecentInfo = override(RecentInfo)
 __all__.append('RecentInfo')
 
@@ -916,7 +909,6 @@ 

Source code for gi.overrides.Gtk

 
     get_selection_bounds = strip_boolean_result(Gtk.TextBuffer.get_selection_bounds, fail_ret=())
 
-
 TextBuffer = override(TextBuffer)
 __all__.append('TextBuffer')
 
@@ -925,7 +917,6 @@ 

Source code for gi.overrides.Gtk

     forward_search = strip_boolean_result(Gtk.TextIter.forward_search)
     backward_search = strip_boolean_result(Gtk.TextIter.backward_search)
 
-
 TextIter = override(TextIter)
 __all__.append('TextIter')
 
@@ -1092,7 +1083,6 @@ 

Source code for gi.overrides.Gtk

     def set_default_sort_func(self, sort_func, user_data=None):
         super(TreeSortable, self).set_default_sort_func(sort_func, user_data)
 
-
 TreeSortable = override(TreeSortable)
 __all__.append('TreeSortable')
 
@@ -1102,7 +1092,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('model',),
                                category=PyGTKDeprecationWarning)
 
-
 TreeModelSort = override(TreeModelSort)
 __all__.append('TreeModelSort')
 
@@ -1187,7 +1176,6 @@ 

Source code for gi.overrides.Gtk

             else:
                 raise TypeError('Argument list must be in the form of (column, value, ...), ((columns,...), (values, ...)) or {column: value}.  No -1 termination is needed.')
 
-
 ListStore = override(ListStore)
 __all__.append('ListStore')
 
@@ -1250,11 +1238,8 @@ 

Source code for gi.overrides.Gtk

             for i in range(start, stop, step):
                 alist.append(self.model.get_value(self.iter, i))
             return alist
-        elif isinstance(key, tuple):
-            return [self[k] for k in key]
         else:
-            raise TypeError("indices must be integers, slice or tuple, not %s"
-                            % type(key).__name__)
+            raise TypeError("indices must be integers, not %s" % type(key).__name__)
 
     def __setitem__(self, key, value):
         if isinstance(key, int):
@@ -1273,16 +1258,8 @@ 

Source code for gi.overrides.Gtk

 
             for i, v in enumerate(indexList):
                 self.model.set_value(self.iter, v, value[i])
-        elif isinstance(key, tuple):
-            if len(key) != len(value):
-                raise ValueError(
-                    "attempt to assign sequence of size %d to sequence of size %d"
-                    % (len(value), len(key)))
-            for k, v in zip(key, value):
-                self[k] = v
         else:
-            raise TypeError("indices must be an integer, slice or tuple, not %s"
-                            % type(key).__name__)
+            raise TypeError("index must be an integer or slice, not %s" % type(key).__name__)
 
     def _convert_negative_index(self, index):
         new_index = self.model.get_n_columns() + index
@@ -1294,7 +1271,6 @@ 

Source code for gi.overrides.Gtk

         child_iter = self.model.iter_children(self.iter)
         return TreeModelRowIter(self.model, child_iter)
 
-
 __all__.append('TreeModelRow')
 
 
@@ -1317,7 +1293,6 @@ 

Source code for gi.overrides.Gtk

     def __iter__(self):
         return self
 
-
 __all__.append('TreeModelRowIter')
 
 
@@ -1369,7 +1344,6 @@ 

Source code for gi.overrides.Gtk

     def __getitem__(self, index):
         return self.get_indices()[index]
 
-
 TreePath = override(TreePath)
 __all__.append('TreePath')
 
@@ -1449,7 +1423,6 @@ 

Source code for gi.overrides.Gtk

             else:
                 raise TypeError('Argument list must be in the form of (column, value, ...), ((columns,...), (values, ...)) or {column: value}.  No -1 termination is needed.')
 
-
 TreeStore = override(TreeStore)
 __all__.append('TreeStore')
 
@@ -1496,7 +1469,6 @@ 

Source code for gi.overrides.Gtk

         self.insert_column(column, position)
         column.set_attributes(cell, **kwargs)
 
-
 TreeView = override(TreeView)
 __all__.append('TreeView')
 
@@ -1578,7 +1550,6 @@ 

Source code for gi.overrides.Gtk

         else:
             self._init(*args, **kwargs)
 
-
 Button = override(Button)
 __all__.append('Button')
 
@@ -1588,7 +1559,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('uri', 'label'),
                                category=PyGTKDeprecationWarning)
 
-
 LinkButton = override(LinkButton)
 __all__.append('LinkButton')
 
@@ -1598,7 +1568,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('label',),
                                category=PyGTKDeprecationWarning)
 
-
 Label = override(Label)
 __all__.append('Label')
 
@@ -1621,23 +1590,21 @@ 

Source code for gi.overrides.Gtk

         if 'value' in kwargs:
             self.set_value(kwargs['value'])
 
-
 Adjustment = override(Adjustment)
 __all__.append('Adjustment')
 
 
-if Gtk._version in ("2.0", "3.0"):
-    class Table(Gtk.Table, Container):
-        __init__ = deprecated_init(Gtk.Table.__init__,
-                                   arg_names=('n_rows', 'n_columns', 'homogeneous'),
-                                   deprecated_aliases={'n_rows': 'rows', 'n_columns': 'columns'},
-                                   category=PyGTKDeprecationWarning)
+class Table(Gtk.Table, Container):
+    __init__ = deprecated_init(Gtk.Table.__init__,
+                               arg_names=('n_rows', 'n_columns', 'homogeneous'),
+                               deprecated_aliases={'n_rows': 'rows', 'n_columns': 'columns'},
+                               category=PyGTKDeprecationWarning)
 
-        def attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions=Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, xpadding=0, ypadding=0):
-            Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
+    def attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions=Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, xpadding=0, ypadding=0):
+        Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
 
-    Table = override(Table)
-    __all__.append('Table')
+Table = override(Table)
+__all__.append('Table')
 
 
 class ScrolledWindow(Gtk.ScrolledWindow):
@@ -1645,27 +1612,26 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('hadjustment', 'vadjustment'),
                                category=PyGTKDeprecationWarning)
 
-
 ScrolledWindow = override(ScrolledWindow)
 __all__.append('ScrolledWindow')
 
 
-if Gtk._version in ("2.0", "3.0"):
-    class HScrollbar(Gtk.HScrollbar):
-        __init__ = deprecated_init(Gtk.HScrollbar.__init__,
-                                   arg_names=('adjustment',),
-                                   category=PyGTKDeprecationWarning)
+class HScrollbar(Gtk.HScrollbar):
+    __init__ = deprecated_init(Gtk.HScrollbar.__init__,
+                               arg_names=('adjustment',),
+                               category=PyGTKDeprecationWarning)
 
-    HScrollbar = override(HScrollbar)
-    __all__.append('HScrollbar')
+HScrollbar = override(HScrollbar)
+__all__.append('HScrollbar')
 
-    class VScrollbar(Gtk.VScrollbar):
-        __init__ = deprecated_init(Gtk.VScrollbar.__init__,
-                                   arg_names=('adjustment',),
-                                   category=PyGTKDeprecationWarning)
 
-    VScrollbar = override(VScrollbar)
-    __all__.append('VScrollbar')
+class VScrollbar(Gtk.VScrollbar):
+    __init__ = deprecated_init(Gtk.VScrollbar.__init__,
+                               arg_names=('adjustment',),
+                               category=PyGTKDeprecationWarning)
+
+VScrollbar = override(VScrollbar)
+__all__.append('VScrollbar')
 
 
 class Paned(Gtk.Paned):
@@ -1675,36 +1641,35 @@ 

Source code for gi.overrides.Gtk

     def pack2(self, child, resize=True, shrink=True):
         super(Paned, self).pack2(child, resize, shrink)
 
-
 Paned = override(Paned)
 __all__.append('Paned')
 
 
-if Gtk._version in ("2.0", "3.0"):
-    class Arrow(Gtk.Arrow):
-        __init__ = deprecated_init(Gtk.Arrow.__init__,
-                                   arg_names=('arrow_type', 'shadow_type'),
-                                   category=PyGTKDeprecationWarning)
+class Arrow(Gtk.Arrow):
+    __init__ = deprecated_init(Gtk.Arrow.__init__,
+                               arg_names=('arrow_type', 'shadow_type'),
+                               category=PyGTKDeprecationWarning)
 
-    Arrow = override(Arrow)
-    __all__.append('Arrow')
+Arrow = override(Arrow)
+__all__.append('Arrow')
 
-    class IconSet(Gtk.IconSet):
-        def __new__(cls, pixbuf=None):
-            if pixbuf is not None:
-                warnings.warn('Gtk.IconSet(pixbuf) has been deprecated. Please use: '
-                              'Gtk.IconSet.new_from_pixbuf(pixbuf)',
-                              PyGTKDeprecationWarning, stacklevel=2)
-                iconset = Gtk.IconSet.new_from_pixbuf(pixbuf)
-            else:
-                iconset = Gtk.IconSet.__new__(cls)
-            return iconset
 
-        def __init__(self, *args, **kwargs):
-            return super(IconSet, self).__init__()
+class IconSet(Gtk.IconSet):
+    def __new__(cls, pixbuf=None):
+        if pixbuf is not None:
+            warnings.warn('Gtk.IconSet(pixbuf) has been deprecated. Please use: '
+                          'Gtk.IconSet.new_from_pixbuf(pixbuf)',
+                          PyGTKDeprecationWarning, stacklevel=2)
+            iconset = Gtk.IconSet.new_from_pixbuf(pixbuf)
+        else:
+            iconset = Gtk.IconSet.__new__(cls)
+        return iconset
 
-    IconSet = override(IconSet)
-    __all__.append('IconSet')
+    def __init__(self, *args, **kwargs):
+        return super(IconSet, self).__init__()
+
+IconSet = override(IconSet)
+__all__.append('IconSet')
 
 
 class Viewport(Gtk.Viewport):
@@ -1712,7 +1677,6 @@ 

Source code for gi.overrides.Gtk

                                arg_names=('hadjustment', 'vadjustment'),
                                category=PyGTKDeprecationWarning)
 
-
 Viewport = override(Viewport)
 __all__.append('Viewport')
 
@@ -1726,7 +1690,6 @@ 

Source code for gi.overrides.Gtk

         iter = self.convert_iter_to_child_iter(iter)
         self.get_model().set_value(iter, column, value)
 
-
 TreeModelFilter = override(TreeModelFilter)
 __all__.append('TreeModelFilter')
 
@@ -1744,18 +1707,17 @@ 

Source code for gi.overrides.Gtk

 def main_quit(*args):
     _Gtk_main_quit()
 
+stock_lookup = strip_boolean_result(Gtk.stock_lookup)
+__all__.append('stock_lookup')
 
-if Gtk._version in ("2.0", "3.0"):
-    stock_lookup = strip_boolean_result(Gtk.stock_lookup)
-    __all__.append('stock_lookup')
-
-if Gtk._version == "4.0":
-    Gtk.init_check()
-else:
-    initialized, argv = Gtk.init_check(sys.argv)
-    sys.argv = list(argv)
+initialized, argv = Gtk.init_check(sys.argv)
+sys.argv = list(argv)
 
+
+
+ +
@@ -1785,10 +1748,11 @@

Source code for gi.overrides.Gtk

     
       
diff --git a/docs/_modules/index.html b/docs/_modules/index.html
index cd0a3817..9c08287a 100644
--- a/docs/_modules/index.html
+++ b/docs/_modules/index.html
@@ -13,6 +13,8 @@
 
   
   
+  
+  
 
   
 
@@ -36,23 +38,25 @@
      
 
   
-  
+  
 
 
 
 
 
+   
   
-
+ + + + + + + + + + + + + + + + +
+ + +
-
+
+

All modules for which code is available

+
+
+ +
@@ -163,9 +177,10 @@

All modules for which code is available

© Copyright 2009-2011, Thomas Jost; 2015-2017 Cimbali. +

- Built with Sphinx using a theme provided by Read the Docs. + Built with Sphinx using a theme provided by Read the Docs.
@@ -183,10 +198,11 @@

All modules for which code is available

diff --git a/docs/_modules/pympress/document.html b/docs/_modules/pympress/document.html index 6dece85b..8634b434 100644 --- a/docs/_modules/pympress/document.html +++ b/docs/_modules/pympress/document.html @@ -13,6 +13,8 @@ + + @@ -37,23 +39,25 @@ - + +
-
+ + + + + + + + + + + + + + + + +
+ + +
-
+
+

Source code for pympress.document

 #       document.py
@@ -184,6 +193,9 @@ 

Source code for pympress.document

 
 from __future__ import print_function
 
+import logging
+logger = logging.getLogger(__name__)
+
 import os
 import sys
 import shutil
@@ -197,10 +209,10 @@ 

Source code for pympress.document

 from gi.repository import Poppler
 
 try:
-    from urllib.parse import urljoin
+    from urllib.parse import urljoin, scheme_chars
     from urllib.request import pathname2url
 except ImportError:
-    from urlparse import urljoin
+    from urlparse import urljoin, scheme_chars
     from urllib import pathname2url
 
 # find the right function to open files
@@ -215,7 +227,7 @@ 

Source code for pympress.document

 from pympress.ui import PDF_REGULAR, PDF_CONTENT_PAGE, PDF_NOTES_PAGE
 
 
-
[docs]def get_extension(mime_type): +
[docs]def get_extension(mime_type): """ Returns a valid filename extension (recognized by python) for a given mime type. """ if not mimetypes.inited: @@ -225,7 +237,7 @@

Source code for pympress.document

             return ext
-