Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghex for openSUSE:Factory checked in 
at 2022-06-17 21:21:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghex (Old)
 and      /work/SRC/openSUSE:Factory/.ghex.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghex"

Fri Jun 17 21:21:19 2022 rev:61 rq:983435 version:42.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghex/ghex.changes        2022-04-27 
21:41:42.773040671 +0200
+++ /work/SRC/openSUSE:Factory/.ghex.new.1548/ghex.changes      2022-06-17 
21:23:36.086808789 +0200
@@ -1,0 +2,11 @@
+Wed Jun 15 11:22:07 UTC 2022 - Bj??rn Lie <[email protected]>
+
+- Update to version 42.3:
+  + main: Hotfix to workaround gtk #4880 (affects Save As dialogs
+    on X11 primarily).
+  + config: Add GNOME 42+ compatibility for dark mode, and fetch
+    dark settings from portal if possible.
+  + widget: Properly update highlights upon resize.
+  + find-replace: Remove spurious g_object_ref() call.
+
+-------------------------------------------------------------------

Old:
----
  ghex-42.2.tar.xz

New:
----
  ghex-42.3.tar.xz

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

Other differences:
------------------
++++++ ghex.spec ++++++
--- /var/tmp/diff_new_pack.X8LBIs/_old  2022-06-17 21:23:36.502809015 +0200
+++ /var/tmp/diff_new_pack.X8LBIs/_new  2022-06-17 21:23:36.506809017 +0200
@@ -19,7 +19,7 @@
 %define so_ver 4
 
 Name:           ghex
-Version:        42.2
+Version:        42.3
 Release:        0
 Summary:        GNOME Binary Editor
 License:        GPL-2.0-or-later

++++++ ghex-42.2.tar.xz -> ghex-42.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghex-42.2/NEWS new/ghex-42.3/NEWS
--- old/ghex-42.2/NEWS  2022-04-26 21:58:24.013011200 +0200
+++ new/ghex-42.3/NEWS  2022-06-13 17:27:12.466964200 +0200
@@ -1,4 +1,18 @@
 =========
+GHex 42.3
+=========
+
+Bugfixes since 42.2 (all backports from master pending upcoming 43 release)
+(Logan Rathbone):
+
+- main: Hotfix to workaround gtk #4880 (affects Save As dialogs on X11
+  primarily)
+- config: Add GNOME 42+ compatibility for dark mode, and fetch dark settings
+  from portal if possible
+- widget: Properly update highlights upon resize
+- find-replace: Remove spurious g_object_ref() call
+
+=========
 GHex 42.2
 =========
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghex-42.2/data/org.gnome.GHex.appdata.xml.in.in 
new/ghex-42.3/data/org.gnome.GHex.appdata.xml.in.in
--- old/ghex-42.2/data/org.gnome.GHex.appdata.xml.in.in 2022-04-26 
21:58:24.018011300 +0200
+++ new/ghex-42.3/data/org.gnome.GHex.appdata.xml.in.in 2022-06-13 
17:27:12.468964300 +0200
@@ -30,6 +30,7 @@
     <kudo>UserDocs</kudo>
   </kudos>
   <releases>
+    <release version="42.3" date="2022-06-13"/>
     <release version="42.2" date="2022-04-26"/>
     <release version="42.1" date="2022-04-16"/>
     <release version="42.0" date="2022-04-05"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghex-42.2/meson.build new/ghex-42.3/meson.build
--- old/ghex-42.2/meson.build   2022-04-26 21:58:24.049011200 +0200
+++ new/ghex-42.3/meson.build   2022-06-13 17:27:12.480964400 +0200
@@ -1,6 +1,6 @@
 project(
   'ghex', 'c',
-  version: '42.2',
+  version: '42.3',
   meson_version: '>=0.59.0',
   license: 'GPL2'
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghex-42.2/src/configuration.c 
new/ghex-42.3/src/configuration.c
--- old/ghex-42.2/src/configuration.c   2022-04-26 21:58:24.066011200 +0200
+++ new/ghex-42.3/src/configuration.c   2022-06-13 17:27:12.494964400 +0200
@@ -75,11 +75,140 @@
     def_dark_mode = g_settings_get_enum (settings, key);
 }
 
+
+/* NOTE: for GTK 4.0 backwards compatibility, we manually define these
+ * here. If we wish to add an additional dependency on
+ * gsettings-desktop-schemas >= 42, this can be eliminated.
+ */
+enum system_color_scheme {
+       SYSTEM_DEFAULT,
+       SYSTEM_PREFER_DARK,
+       SYSTEM_PREFER_LIGHT,
+};
+
+static gboolean
+try_dark_from_gsettings (void)
+{
+       int color_scheme;
+       GSettingsSchemaSource *source;
+       GSettingsSchema *schema;
+       char *schema_id = NULL;
+
+       source = g_settings_schema_source_get_default ();
+       schema = g_settings_schema_source_lookup (source, 
"org.freedesktop.appearance", TRUE);
+
+       if (schema && g_settings_schema_has_key (schema, "color-scheme"))
+       {
+               schema_id = "org.freedesktop.appearance";
+       }
+       else
+       {
+               g_clear_pointer (&schema, g_settings_schema_unref);
+               schema = g_settings_schema_source_lookup (source, 
"org.gnome.desktop.interface", TRUE);
+               if (schema && g_settings_schema_has_key (schema, 
"color-scheme"))
+               {
+                       schema_id = "org.gnome.desktop.interface";
+               }
+               g_clear_pointer (&schema, g_settings_schema_unref);
+       }
+
+       if (schema_id)
+       {
+               GSettings *set = g_settings_new (schema_id);
+               color_scheme = g_settings_get_enum (set, "color-scheme");
+               if (color_scheme == SYSTEM_PREFER_DARK)
+                       sys_default_is_dark = TRUE;
+               g_object_unref (set);
+
+               return TRUE;
+       }
+       return FALSE;
+}
+
+static gboolean
+try_dark_from_portal (void)
+{
+       int color_scheme;
+       char *color_scheme_str = NULL;
+       GDBusProxy *settings_portal = NULL;
+       GVariant *gvar = NULL, *gvar2 = NULL;
+       gboolean retval = FALSE;
+
+       settings_portal = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+                       G_DBUS_PROXY_FLAGS_NONE,
+                       NULL,
+                       "org.freedesktop.portal.Desktop",
+                       "/org/freedesktop/portal/desktop",
+                       "org.freedesktop.portal.Settings",
+                       NULL,
+                       NULL);
+
+       if (! settings_portal)
+               goto out;
+
+       gvar = g_dbus_proxy_call_sync (settings_portal,
+                       "Read",
+                       g_variant_new ("(ss)", "org.freedesktop.appearance", 
"color-scheme"),
+                       G_DBUS_CALL_FLAGS_NONE,
+                       G_MAXINT,
+                       NULL,
+                       NULL);
+
+       if (gvar)
+       {
+               g_variant_get (gvar, "(v)", &gvar2);
+               g_variant_get (g_variant_get_variant (gvar2), "u", 
&color_scheme);
+               retval = TRUE;
+               goto out;
+       }
+
+       gvar = g_dbus_proxy_call_sync (settings_portal,
+                       "Read",
+                       g_variant_new ("(ss)", "org.gnome.desktop.interface", 
"color-scheme"),
+                       G_DBUS_CALL_FLAGS_NONE,
+                       G_MAXINT,
+                       NULL,
+                       NULL);
+
+       if (! gvar)
+               goto out;
+
+       g_variant_get (gvar, "(v)", &gvar2);
+       g_variant_get (g_variant_get_variant (gvar2), "s", &color_scheme_str);
+
+       if (color_scheme_str)
+       {
+               retval = TRUE;
+               if (g_strcmp0 (color_scheme_str, "prefer-dark") == 0)
+                       color_scheme = SYSTEM_PREFER_DARK;
+       }
+
+out:
+       if (color_scheme == SYSTEM_PREFER_DARK)
+               sys_default_is_dark = TRUE;
+
+       g_clear_object (&settings_portal);
+       g_clear_pointer (&gvar, g_variant_unref);
+       g_clear_pointer (&gvar2, g_variant_unref);
+
+       return retval;
+}
+
 void
 get_sys_default_is_dark (void)
 {
        GtkSettings *gtk_settings;
+       gboolean got_dark_pref;
+
+       got_dark_pref = try_dark_from_portal ();
+       if (got_dark_pref)
+               return;
+
+       got_dark_pref = try_dark_from_gsettings ();
+       if (got_dark_pref)
+               return;
 
+       /* If all else fails, try to fetch from GtkSettings. */
        gtk_settings = gtk_settings_get_default ();
        g_object_get (gtk_settings,
                        "gtk-application-prefer-dark-theme", 
&sys_default_is_dark,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghex-42.2/src/findreplace.c 
new/ghex-42.3/src/findreplace.c
--- old/ghex-42.2/src/findreplace.c     2022-04-26 21:58:24.066011200 +0200
+++ new/ghex-42.3/src/findreplace.c     2022-06-13 17:27:12.494964400 +0200
@@ -121,7 +121,6 @@
        GtkWidget *gh;
 
        gh = hex_widget_new (doc);
-       g_object_ref (gh);
 
        gtk_widget_set_hexpand (gh, TRUE);
        hex_widget_set_group_type (HEX_WIDGET(gh), def_group_type);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghex-42.2/src/gtkhex.c new/ghex-42.3/src/gtkhex.c
--- old/ghex-42.2/src/gtkhex.c  2022-04-26 21:58:24.068011300 +0200
+++ new/ghex-42.3/src/gtkhex.c  2022-06-13 17:27:12.496964500 +0200
@@ -1298,9 +1298,6 @@
 
        self->top_line = gtk_adjustment_get_value (adj);
 
-       hex_widget_update_all_auto_highlights (self);
-       hex_widget_invalidate_all_highlights (self);
-
        gtk_widget_queue_draw (GTK_WIDGET(self));
 }
 
@@ -2348,6 +2345,9 @@
        else
                self->vis_lines = self->default_lines;
 
+       hex_widget_update_all_auto_highlights (self);
+       hex_widget_invalidate_all_highlights (self);
+
        /* queue child draw functions
         */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghex-42.2/src/main.c new/ghex-42.3/src/main.c
--- old/ghex-42.2/src/main.c    2022-04-26 21:58:24.072011200 +0200
+++ new/ghex-42.3/src/main.c    2022-06-13 17:27:12.497964400 +0200
@@ -115,6 +115,10 @@
 {
        (void)user_data;        /* unused */
 
+       /* WORKAROUND https://gitlab.gnome.org/GNOME/gtk/-/issues/4880 */
+
+       g_object_set (gtk_settings_get_default (), "gtk-dialogs-use-header", 
TRUE, NULL);
+
        do_app_window (app);
 
        gtk_window_set_application (window, app);

Reply via email to