1. 25 Jul, 2020 3 commits
  2. 23 Jul, 2020 2 commits
  3. 14 Jul, 2020 1 commit
    • Michael Weghorn's avatar
      FileChooser: Return selected filter · 8922d260
      Michael Weghorn authored
      This implements handling the 'current_filter' return
      value which returns the filter that was selected in the
      file chooser and was added to 'xdg-desktop-portal'
      and thus the FileChooser API in commit [1].
      Keep a mapping between the user-visible names
      (for name filters) or MIME types (for MIME type
      filters) to the actual filters in order to retrieve
      the actual filter to return after running the file dialog.
      Since multiple name filters can use the same filter string,
      those aren't necessarily unique, so use the user-visible
      names rather than just the filter string to avoid
      potential name clashes and be able to retrieve the correct
      filter again in the end.
      Mapping back to an actual filter does not necessarily
      work in all cases, e.g. if a manual filter string was
      entered in the file widget. No 'current_filter' is
      returned in that case.
      This commit moves the extraction of the filters to a
      separate method to avoid code duplication.
      Handling 'current_filter' is e.g. needed to make gtk's
      'gtk_file_chooser_get_filter' function work for the portal
      use case. The filter returned by 'gtk_file_chooser_get_filter'
      (not just the file extension) is used e.g. by Firefox and
      Thunderbird to determine what file format to save a file in,
      s. Mozilla bug [2] and gtk issue [3] for more details.
      This way, this commit makes that scenario work for the
      KF5 native file chooser as well (with 'GTK_USE_PORTAL=1'
      set and 'xdg-desktop-portal-kde' in use).
      Note: For the case of a gtk program, like the Firefox use case,
      this depends on the gtk commits [4] and and [5] in addition
      to xdg-desktop-portal commit [1] to actually work as expected.
      [1] https://github.com/flatpak/xdg-desktop-portal/commit/35fca7fae881bdaba1bebccf7775eba84407a488
      [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1517074
      [3] https://gitlab.gnome.org/GNOME/gtk/-/issues/1820
      [4] https://gitlab.gnome.org/GNOME/gtk/-/commit/baddc90c26f65a0867aa6b4073e1a6b689d87136
      [5] https://gitlab.gnome.org/GNOME/gtk/-/commit/d59b28d5f4e2c4ff4cb51df0a39d94c7df7fee96
  4. 18 Jun, 2020 1 commit
  5. 17 Jun, 2020 1 commit
  6. 13 Jun, 2020 1 commit
  7. 09 Jun, 2020 1 commit
  8. 04 Jun, 2020 1 commit
    • Michael Weghorn's avatar
      FileChooser: Handle 'options' - 'choices' · 67344e9f
      Michael Weghorn authored
      This impelements handling for the 'choices' in the 'options'
      vardict of the FileChooser portal, which is described in the
      spec [1] as:
      > choices a(ssa(ss)s)
      >     List of serialized combo boxes to add to the file chooser.
      >     For each element, the first string is an ID that will be returned
      >     with the response, te second string is a user-visible label. The
      >     a(ss) is the list of choices, each being a is an ID and a
      >     user-visible label. The final string is the initial selection, or
      >     "", to let the portal decide which choice will be initially
      >     selected. None of the strings, except for the initial selection,
      >     should be empty.
      >     As a special case, passing an empty array for the list of choices
      >     indicates a boolean choice that is typically displayed as a check
      >     button, using "true" and "false" as the choices.
      >     Example: [('encoding', 'Encoding', [('utf8', 'Unicode (UTF-8)'),
      >             ('latin15', 'Western')], 'latin15'), ('reencode',
      >                 'Reencode', [], 'false')]
      The corresponding types are added for marshalling/unmarshalling to/from
      the QDBusArgument.
      Note that the implementation uses the term "Option" for a top-level
      element in the list passed by the 'choices' key while "Choice" refers
      to an element in the "list of choices" for a single element/option.
      For every option, a checkbox (for boolean options) or combobox is
      created and all of them are inserted into the layout of a widget that
      is then set as the custom widget of the a custom widget that is then
      added to the file dialog using 'KFileWidget::KFilesetCustomWidget'.
      [1] https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-org.freedesktop.portal.FileChooser
  9. 02 Jun, 2020 2 commits
    • Michael Weghorn's avatar
      FileChooser portal: Handle 'current_filter' · 5b9b8f19
      Michael Weghorn authored
      From FileChooser portal documentation [1]:
      > current_filter (sa(us))
      >     Request that this filter be set by default at dialog creation. If
      >     the filters list is nonempty, it should match a filter in the list
      >     to set the default filter from the list. Alternatively, it may be
      >     specified when the list is empty to apply the filter
      >     unconditionally.
      The implemented approach adds the filter specified by current_filter
      regardless of whether the passed filters list is empty or not.
      Since KFileWidget always seems to select the first filter in the
      list it was passed and there seems to be no way to explicitly select
      a different one, this makes sure the the filter specified by
      'current_filter' is the first one in the corresponding list.
      [1] https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-org.freedesktop.impl.portal.FileChooser
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · cf1c33a9
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
  10. 31 May, 2020 2 commits
  11. 17 May, 2020 1 commit
  12. 15 May, 2020 1 commit
  13. 14 May, 2020 3 commits
  14. 11 May, 2020 1 commit
  15. 10 May, 2020 1 commit
  16. 09 May, 2020 1 commit
  17. 07 May, 2020 1 commit
  18. 29 Apr, 2020 1 commit
  19. 28 Apr, 2020 1 commit
  20. 26 Apr, 2020 1 commit
  21. 25 Apr, 2020 1 commit
  22. 17 Apr, 2020 1 commit
  23. 16 Apr, 2020 2 commits
    • Jan Grulich's avatar
      Screensharing: support variable stride · d1f0ec4d
      Jan Grulich authored
      Summary: We were ignoring stride higher than stride calculated as width * bpp, which I assumed will always be the case, but it turns out that some drivers might use bigger stride, which might be width * bpp + some additional padding.
      Test Plan: All current clients still work and also we now support bigger stride we get from gbm_bo.
      Reviewers: #plasma, cblack
      Reviewed By: #plasma, cblack
      Subscribers: plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D28875
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · e18d6426
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
  24. 14 Apr, 2020 1 commit
  25. 13 Apr, 2020 2 commits
  26. 11 Apr, 2020 1 commit
  27. 10 Apr, 2020 2 commits
    • Jan Blackquill's avatar
      Return buffer to pipewire when returning early from recordFrame · 3afcdb2a
      Jan Blackquill authored
      Summary: Even when something goes wrong, the buffer should be returned to pipewire for recycling on next frame.
      Test Plan:
      Before: when something goes wrong when screencasting, first errors are the actual issue and subsequent errors are due to pipewire not having any buffers for the pw_stream_deque_buffer call
      After: when something goes wrong when screencasting, errors are always the actual issue
      Reviewers: #plasma, jgrulich
      Reviewed By: jgrulich
      Subscribers: plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D28713
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 4cb8ca2c
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
  28. 09 Apr, 2020 1 commit
  29. 08 Apr, 2020 1 commit
  30. 07 Apr, 2020 1 commit