Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package virt-manager for openSUSE:Factory 
checked in at 2024-06-12 15:37:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-manager (Old)
 and      /work/SRC/openSUSE:Factory/.virt-manager.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-manager"

Wed Jun 12 15:37:14 2024 rev:255 rq:1180071 version:4.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes        
2024-05-28 17:27:30.957149581 +0200
+++ /work/SRC/openSUSE:Factory/.virt-manager.new.19518/virt-manager.changes     
2024-06-12 15:37:15.831800523 +0200
@@ -1,0 +2,8 @@
+Tue Jun 11 13:24:45 MDT 2024 - carn...@suse.com
+
+- bsc#1226173 - virt-manager: Browse local does not work anymore
+  090-db1b2fbc-Use-GtkFileChooserNative.patch
+  Renamed 090-uitests-Fix-with-GtkFileChooserNative.patch to
+  091-uitests-Fix-with-GtkFileChooserNative.patch
+
+-------------------------------------------------------------------

Old:
----
  090-uitests-Fix-with-GtkFileChooserNative.patch

New:
----
  090-db1b2fbc-Use-GtkFileChooserNative.patch
  091-uitests-Fix-with-GtkFileChooserNative.patch

BETA DEBUG BEGIN:
  Old:  090-db1b2fbc-Use-GtkFileChooserNative.patch
  Renamed 090-uitests-Fix-with-GtkFileChooserNative.patch to
  091-uitests-Fix-with-GtkFileChooserNative.patch
BETA DEBUG END:

BETA DEBUG BEGIN:
  New:- bsc#1226173 - virt-manager: Browse local does not work anymore
  090-db1b2fbc-Use-GtkFileChooserNative.patch
  Renamed 090-uitests-Fix-with-GtkFileChooserNative.patch to
  New:  Renamed 090-uitests-Fix-with-GtkFileChooserNative.patch to
  091-uitests-Fix-with-GtkFileChooserNative.patch
BETA DEBUG END:

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

Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.AZ03B6/_old  2024-06-12 15:37:19.123921072 +0200
+++ /var/tmp/diff_new_pack.AZ03B6/_new  2024-06-12 15:37:19.127921218 +0200
@@ -127,7 +127,8 @@
 Patch87:        087-Allow-serial-console-resize-to-beyond-80-columns.patch
 Patch88:        088-tests-Fix-host-copy-XML-with-libvirt-10.1.0.patch
 Patch89:        089-hostdev-Fix-error-when-mdev-type_id-is-missing.patch
-Patch90:        090-uitests-Fix-with-GtkFileChooserNative.patch
+Patch90:        090-db1b2fbc-Use-GtkFileChooserNative.patch
+Patch91:        091-uitests-Fix-with-GtkFileChooserNative.patch
 Patch100:       
revert-363fca41-virt-install-Require-osinfo-for-non-x86-HVM-case-too.patch
 # SUSE Only
 Patch150:       virtman-desktop.patch

++++++ 090-db1b2fbc-Use-GtkFileChooserNative.patch ++++++
Subject: Use GtkFileChooserNative
From: Michael Weghorn m.wegh...@posteo.de Wed Mar 20 07:41:29 2024 +0100
Date: Sun Apr 7 15:54:47 2024 -0400:
Git: db1b2fbce3c287e8127b3c744b2f8d49ad8ed2bc

Use GtkFileChooserNative [1] instead of GtkFileChooserDialog [2]
to integrate better with the platform (e.g. use the portal
implementation when run with GTK_USE_PORTAL=1, resulting in
the KDE Frameworks implementation being used when
xdg-desktop-portal-kde is in use). Quoting from
the GtkFileChooserDialog doc [2]:

> If you want to integrate well with the platform you should use the
> GtkFileChooserNative API, which will use a platform-specific dialog if
> available and fall back to GtkFileChooserDialog otherwise.

Also replace the use of GTK_STOCK_CANCEL [3] and GTK_STOCK_OPEN [4]
which were deprecated in GTK 3.10:

Both, the `accept_label` and `cancel_label` params of
`Gtk.FileChooserNative.new` can be `None` to use the default
text ("Open", "Cancel"). [5]

Adjust the only caller (in `vmmVMWindow#_takeScreenshot`)
that was passing an explicit label/icon name for the
accept button to pass `_("_Save")` as label, rather than
the also deprecated Gtk.STOCK_SAVE [6].
(GtkFileChooserDialog has special handling for Gtk.STOCK_SAVE
etc., but that's not generally the case for native dialogs).

Rename the method param from `choose_button` to `choose_label`
to make clearer that this is a label.

[1] https://docs.gtk.org/gtk3/class.FileChooserNative.html
[2] https://docs.gtk.org/gtk3/class.FileChooserDialog.html
[3] https://docs.gtk.org/gtk3/const.STOCK_CANCEL.html
[4] https://docs.gtk.org/gtk3/const.STOCK_OPEN.html
[5] 
http://pygobject-doc.gitee.io/pgi-docs/Gtk-3.0/classes/FileChooserNative.html#Gtk.FileChooserNative.new
[6] https://docs.gtk.org/gtk3/const.STOCK_SAVE.html

Fixes #315

diff --git a/virtManager/error.py b/virtManager/error.py
index 593c89ca..2b3a99f5 100644
--- a/virtManager/error.py
+++ b/virtManager/error.py
@@ -234,7 +234,7 @@ class vmmErrorDialog(vmmGObject):
 
     def browse_local(self, dialog_name, start_folder=None,
                      _type=None, dialog_type=None,
-                     choose_button=None, default_name=None,
+                     choose_label=None, default_name=None,
                      confirm_overwrite=False):
         """
         Helper function for launching a filechooser
@@ -246,19 +246,11 @@ class vmmErrorDialog(vmmGObject):
         """
         if dialog_type is None:
             dialog_type = Gtk.FileChooserAction.OPEN
-        if choose_button is None:
-            choose_button = Gtk.STOCK_OPEN
-
-        buttons = (Gtk.STOCK_CANCEL,
-                   Gtk.ResponseType.CANCEL,
-                   choose_button,
-                   Gtk.ResponseType.ACCEPT)
-
-        fcdialog = Gtk.FileChooserDialog(title=dialog_name,
-                                    parent=self.get_parent(),
-                                    action=dialog_type,
-                                    buttons=buttons)
-        fcdialog.set_default_response(Gtk.ResponseType.ACCEPT)
+
+        fcdialog = Gtk.FileChooserNative.new(title=dialog_name,
+                                             parent=self.get_parent(),
+                                             action=dialog_type,
+                                             accept_label=choose_label)
 
         if default_name:
             fcdialog.set_current_name(default_name)
diff --git a/virtManager/vmwindow.py b/virtManager/vmwindow.py
index d5549454..4a4d2842 100644
--- a/virtManager/vmwindow.py
+++ b/virtManager/vmwindow.py
@@ -558,7 +558,7 @@ class vmmVMWindow(vmmGObjectUI):
             _("Save Virtual Machine Screenshot"),
             _type=("png", _("PNG files")),
             dialog_type=Gtk.FileChooserAction.SAVE,
-            choose_button=Gtk.STOCK_SAVE,
+            choose_label=_("_Save"),
             start_folder=start_folder,
             default_name=default,
             confirm_overwrite=True)

++++++ 090-uitests-Fix-with-GtkFileChooserNative.patch -> 
091-uitests-Fix-with-GtkFileChooserNative.patch ++++++

Reply via email to