Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nwg-look for openSUSE:Factory 
checked in at 2026-10-13 17:46:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nwg-look (Old)
 and      /work/SRC/openSUSE:Factory/.nwg-look.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nwg-look"

Tue Oct 13 17:46:11 2026 rev:6 rq:1384512 version:1.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/nwg-look/nwg-look.changes        2026-10-12 
22:06:05.970509947 +0200
+++ /work/SRC/openSUSE:Factory/.nwg-look.new.3698736/nwg-look.changes   
2026-10-13 17:47:15.994146708 +0200
@@ -1,0 +2,9 @@
+Tue Oct 13 07:02:07 UTC 2026 - Khang Lê <[email protected]>
+
+- Update to version 1.2.0:
+  * update dependencies
+  * bump to 1.2.0
+  * add Polish strings missing from #136
+  * Add support for GTK sound options
+
+-------------------------------------------------------------------

Old:
----
  nwg-look-1.1.2.tar.gz

New:
----
  nwg-look-1.2.0.tar.gz

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

Other differences:
------------------
++++++ nwg-look.spec ++++++
--- /var/tmp/diff_new_pack.kKLA27/_old  2026-10-13 17:47:17.983230081 +0200
+++ /var/tmp/diff_new_pack.kKLA27/_new  2026-10-13 17:47:17.985230164 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           nwg-look
-Version:        1.1.2
+Version:        1.2.0
 Release:        0
 Summary:        GTK3 settings editor adapted to work in sway/wlroots 
environment
 License:        MIT

++++++ _service ++++++
--- /var/tmp/diff_new_pack.kKLA27/_old  2026-10-13 17:47:18.020231632 +0200
+++ /var/tmp/diff_new_pack.kKLA27/_new  2026-10-13 17:47:18.024231799 +0200
@@ -3,7 +3,7 @@
     <param name="url">https://github.com/nwg-piotr/nwg-look.git</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">v1.1.2</param>
+    <param name="revision">v1.2.0</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">enable</param>
     <param name="versionrewrite-pattern">v(.*)</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.kKLA27/_old  2026-10-13 17:47:18.045232679 +0200
+++ /var/tmp/diff_new_pack.kKLA27/_new  2026-10-13 17:47:18.050232889 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/nwg-piotr/nwg-look.git</param>
-              <param 
name="changesrevision">ee086e41bd93baa4bb711ffbf7604346fb0aa9af</param></service></servicedata>
+              <param 
name="changesrevision">a45feeaf617a46bb47dbeb69240bcde35bf15f6e</param></service></servicedata>
 (No newline at EOF)
 

++++++ nwg-look-1.1.2.tar.gz -> nwg-look-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/README.md new/nwg-look-1.2.0/README.md
--- old/nwg-look-1.1.2/README.md        2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/README.md        2026-10-13 01:42:30.000000000 +0200
@@ -20,6 +20,9 @@
 - gtk3
 - [xcur2png](https://github.com/eworm-de/xcur2png)
 - gsettings
+- canberra-gtk-play
+
+A GTK module, such as `canberra-gtk-module`, may need to be loaded for sounds 
to be played across applications.
 
 Depending on your distro, you may also need to install
 [gotk3 dependencies](https://github.com/gotk3/gotk3#installation).
@@ -100,8 +103,3 @@
 - Show menu images
 
 have been deprecated since GTK 3.10, and have no corresponding gsettings 
values.
-
-- Enable event sounds
-- Enable input feedback sounds
-
-don't seem to change anything in non-GNOME environment.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/go.mod new/nwg-look-1.2.0/go.mod
--- old/nwg-look-1.1.2/go.mod   2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/go.mod   2026-10-13 01:42:30.000000000 +0200
@@ -7,4 +7,4 @@
        github.com/sirupsen/logrus v1.10.2
 )
 
-require golang.org/x/sys v0.48.0 // indirect
+require golang.org/x/sys v0.49.0 // indirect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/go.sum new/nwg-look-1.2.0/go.sum
--- old/nwg-look-1.1.2/go.sum   2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/go.sum   2026-10-13 01:42:30.000000000 +0200
@@ -6,7 +6,5 @@
 github.com/stretchr/testify v1.12.1/go.mod 
h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
 go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
 go.yaml.in/yaml/v3 v3.0.5/go.mod 
h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
-golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
-golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
-golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
-golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
+golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
+golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/langs/en_US.json 
new/nwg-look-1.2.0/langs/en_US.json
--- old/nwg-look-1.1.2/langs/en_US.json 2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/langs/en_US.json 2026-10-13 01:42:30.000000000 +0200
@@ -1,6 +1,8 @@
 {
   "apply": "Apply",
+  "bell": "Bell",
   "button": "Button",
+  "canberra-not-found": "Install canberra-gtk-play to preview sounds",
   "check-button": "Check button",
   "clear": "Clear",
   "clear-gtk4-tooltip": "Clear GTK4 symlinks and settings.ini",
@@ -12,9 +14,12 @@
   "default-font": "Default font",
   "deprecated": "deprecated",
   "deprecated-since-gtk-310": "Deprecated since GTK 3.10",
+  "enable-error-bell": "Beep on invalid input",
   "enable-event-sounds": "Enable event sounds",
   "enable-input-feedback-sounds": "Enable input feedback sounds",
   "entry": "Entry",
+  "error": "Error",
+  "error-bell": "Error bell",
   "files-to-export": "Files to export",
   "font": "Font",
   "font-antialiasing": "Font antialiasing",
@@ -27,7 +32,9 @@
   "icon-theme-preview": "Icon theme preview",
   "icons": "Icons",
   "ignored": "ignored",
+  "information": "Information",
   "large": "Large",
+  "login": "Login",
   "medium": "Medium",
   "mouse-cursor": "Mouse cursor",
   "none": "None",
@@ -43,6 +50,9 @@
   "slight": "Slight",
   "small": "Small",
   "sound-effects": "Sound effects",
+  "sound-module-note": "A GTK module, such as canberra-gtk-module, may need to 
be loaded for sounds to be played across applications",
+  "sound-theme-preview": "Sound theme preview",
+  "sounds": "Sounds",
   "text": "Text",
   "text-below-icons": "Text below icons",
   "text-next-to-icons": "Text next to icons",
@@ -50,6 +60,7 @@
   "toolbar-icon-size": "Toolbar icon size",
   "toolbar-style": "Toolbar style",
   "ui-settings": "UI settings",
+  "warning": "Warning",
   "widgets": "Widgets",
   "widget-style-preview": "Widget style preview",
   "flatpak-settings": "Flatpak settings",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/langs/pl_PL.json 
new/nwg-look-1.2.0/langs/pl_PL.json
--- old/nwg-look-1.1.2/langs/pl_PL.json 2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/langs/pl_PL.json 2026-10-13 01:42:30.000000000 +0200
@@ -1,5 +1,6 @@
 {
   "apply": "Zastosuj",
+  "bell": "Dzwonek",
   "button": "Przycisk",
   "check-button": "Przycisk wyboru",
   "clear": "Wyczyść",
@@ -12,9 +13,12 @@
   "default-font": "Domyślna czcionka",
   "deprecated": "przestarzałe",
   "deprecated-since-gtk-310": "Przestarzałe od GTK 3.10",
+  "enable-error-bell": "Dźwięk przy nieprawidłowych danych wejściowych",
   "enable-event-sounds": "Włącz dźwięki zdarzeń",
   "enable-input-feedback-sounds": "Włącz dźwięki zwrotne wejścia",
   "entry": "Pozycja",
+  "error": "Błąd",
+  "error-bell": "Dźwięk błędu",
   "files-to-export": "Pliki do wyeksportowania",
   "font": "Czcionka",
   "font-antialiasing": "Wygładzanie czcionki",
@@ -27,7 +31,9 @@
   "icon-theme-preview": "Podgląd motywu ikon",
   "icons": "Ikony",
   "ignored": "ignorowane",
+  "information": "Informacja",
   "large": "Duży",
+  "login": "Logowanie",
   "medium": "Średni",
   "mouse-cursor": "Kursor myszy",
   "none": "Brak",
@@ -43,6 +49,9 @@
   "slight": "Lekki",
   "small": "Mały",
   "sound-effects": "Efekty dźwiękowe",
+  "sound-module-note": "Moduł GTK jak canberra-gtk-module powinien być 
załadowany, by aplikacje mogły odtwarzać dźwięki",
+  "sound-theme-preview": "Podgląd tematu dźwiękowego",
+  "sounds": "Dźwięki",
   "text": "Tekst",
   "text-below-icons": "Tekst poniżej ikon",
   "text-next-to-icons": "Tekst obok ikon",
@@ -50,6 +59,7 @@
   "toolbar-icon-size": "Rozmiar ikony paska narzędzi",
   "toolbar-style": "Styl paska narzędzi",
   "ui-settings": "Ustawienia interfejsu użytkownika",
+  "warning": "Ostrzeżenie",
   "widgets": "Widżety",
   "widget-style-preview": "Podgląd stylu widżetów",
   "flatpak-settings": "Ustawienia Flatpaka",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/main.go new/nwg-look-1.2.0/main.go
--- old/nwg-look-1.1.2/main.go  2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/main.go  2026-10-13 01:42:30.000000000 +0200
@@ -22,7 +22,7 @@
        "github.com/gotk3/gotk3/gtk"
 )
 
-const version = "1.1.2"
+const version = "1.2.0"
 
 var (
        preferences           programSettings
@@ -41,6 +41,7 @@
        grid                  *gtk.Grid
        preview               *gtk.Frame
        cursorSizeSelector    *gtk.Box
+       soundEffectsSelector  *gtk.Box
        rowToFocus            *gtk.ListBoxRow
        voc                   map[string]string
        gtkThemePaths         map[string]string // theme name to path
@@ -82,8 +83,10 @@
        toolbarIconSize            string
        buttonImages               bool
        menuImages                 bool
+       soundThemeName             string
        enableEventSounds          bool
        enableInputFeedbackSounds  bool
+       errorBell                  bool
        xftAntialias               int
        fontAntialiasing           string
        xftDpi                     int
@@ -105,8 +108,10 @@
        s.toolbarIconSize = "GTK_ICON_SIZE_LARGE_TOOLBAR" // ignored
        s.buttonImages = false                            // deprecated
        s.menuImages = false                              // deprecated
+       s.soundThemeName = "freedesktop"
        s.enableEventSounds = true
        s.enableInputFeedbackSounds = true
+       s.errorBell = true
        s.xftAntialias = -1
        s.applicationPreferDarkTheme = false
 
@@ -139,6 +144,7 @@
        textScalingFactor float64
        colorScheme       string
        // org.gnome.desktop.sound
+       soundTheme          string
        eventSounds         bool
        inputFeedbackSounds bool
 }
@@ -156,6 +162,7 @@
        g.fontAntialiasing = "grayscale"
        g.fontRgbaOrder = "rgb"
        g.textScalingFactor = 1.0
+       g.soundTheme = "freedesktop"
        g.eventSounds = true
        g.inputFeedbackSounds = false
        g.colorScheme = "default"
@@ -235,6 +242,27 @@
        scrolledWindow.Hide()
 }
 
+func displaySoundThemes() {
+       destroyContent()
+       rowToFocus = nil
+
+       listBox = setUpSoundThemeListBox(gsettings.soundTheme)
+       viewport.Add(listBox)
+       menuBar.Deactivate()
+       if rowToFocus != nil {
+               rowToFocus.GrabFocus()
+       }
+
+       preview = setUpSoundsPreview()
+       grid.Attach(preview, 1, 1, 1, 1)
+
+       soundEffectsSelector = setUpSoundEffectsForm()
+       grid.Attach(soundEffectsSelector, 1, 2, 1, 1)
+
+       viewport.ShowAll()
+       grid.ShowAll()
+}
+
 func displayOtherSettingsForm() {
        destroyContent()
 
@@ -268,6 +296,9 @@
        if cursorSizeSelector != nil {
                cursorSizeSelector.Destroy()
        }
+       if soundEffectsSelector != nil {
+               soundEffectsSelector.Destroy()
+       }
 }
 
 func main() {
@@ -418,13 +449,17 @@
        item4.SetLabel(voc["font"])
        item4.Connect("button-release-event", displayFontSettingsForm)
 
-       item5, _ := getMenuItem(builder, "item-other")
-       item5.SetLabel(voc["other"])
-       item5.Connect("button-release-event", displayOtherSettingsForm)
-
-       item6, _ := getMenuItem(builder, "item-preferences")
-       item6.SetLabel(voc["preferences"])
-       item6.Connect("button-release-event", displayProgramSettingsForm)
+       item5, _ := getMenuItem(builder, "item-sounds")
+       item5.SetLabel(voc["sounds"])
+       item5.Connect("button-release-event", displaySoundThemes)
+
+       item6, _ := getMenuItem(builder, "item-other")
+       item6.SetLabel(voc["other"])
+       item6.Connect("button-release-event", displayOtherSettingsForm)
+
+       item7, _ := getMenuItem(builder, "item-preferences")
+       item7.SetLabel(voc["preferences"])
+       item7.Connect("button-release-event", displayProgramSettingsForm)
 
        btnClose, _ := getButton(builder, "btn-close")
        btnClose.SetLabel(voc["close"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/stuff/main.glade 
new/nwg-look-1.2.0/stuff/main.glade
--- old/nwg-look-1.1.2/stuff/main.glade 2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/stuff/main.glade 2026-10-13 01:42:30.000000000 +0200
@@ -51,6 +51,13 @@
               </object>
             </child>
             <child>
+              <object class="GtkMenuItem" id="item-sounds">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="label" translatable="yes">Sounds</property>
+              </object>
+            </child>
+            <child>
               <object class="GtkMenuItem" id="item-other">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/tools.go new/nwg-look-1.2.0/tools.go
--- old/nwg-look-1.1.2/tools.go 2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/tools.go 2026-10-13 01:42:30.000000000 +0200
@@ -110,10 +110,14 @@
                                        gtkConfig.buttonImages = value == "1"
                                case "gtk-menu-images":
                                        gtkConfig.menuImages = value == "1"
+                               case "gtk-sound-theme-name":
+                                       gtkConfig.soundThemeName = value
                                case "gtk-enable-event-sounds":
                                        gtkConfig.enableEventSounds = value == 
"1"
                                case "gtk-enable-input-feedback-sounds":
                                        gtkConfig.enableInputFeedbackSounds = 
value == "1"
+                               case "gtk-error-bell":
+                                       gtkConfig.errorBell = value == "1"
                                case "gtk-xft-antialias":
                                        gtkConfig.xftAntialias = intValue(value)
                                case "gtk-xft-hinting":
@@ -141,8 +145,10 @@
        log.Debugf("gtk-toolbar-icon-size: %s", gtkConfig.toolbarIconSize)
        log.Debugf("gtk-button-images: %v", gtkConfig.buttonImages)
        log.Debugf("gtk-menu-images: %v", gtkConfig.menuImages)
+       log.Debugf("gtk-sound-theme-name: %s", gtkConfig.soundThemeName)
        log.Debugf("gtk-enable-event-sounds: %v", gtkConfig.enableEventSounds)
        log.Debugf("gtk-enable-input-feedback-sounds: %v", 
gtkConfig.enableInputFeedbackSounds)
+       log.Debugf("gtk-error-bell: %v", gtkConfig.errorBell)
        log.Debugf("gtk-xft-antialias: %v", gtkConfig.xftAntialias)
        log.Debugf("gtk-xft-hinting: %v", gtkConfig.xftHinting)
        log.Debugf("gtk-xft-hintstyle: %v", gtkConfig.xftHintstyle)
@@ -277,6 +283,15 @@
                        gsettings.colorScheme)
        }
 
+       val, err = getGsettingsValue("org.gnome.desktop.sound", "theme-name")
+       if err == nil {
+               gsettings.soundTheme = val
+               log.Infof("theme-name: %s", gsettings.soundTheme)
+       } else {
+               log.Warnf("Couldn't read theme-name, leaving default %s",
+                       gsettings.soundTheme)
+       }
+
        val, err = getGsettingsValue("org.gnome.desktop.sound", "event-sounds")
        if err == nil {
                if val == "true" {
@@ -332,7 +347,7 @@
                        log.Warnf("Couldn't get gsettings key: %s", key)
                }
        }
-       for _, key := range []string{"event-sounds", "input-feedback-sounds"} {
+       for _, key := range []string{"theme-name", "event-sounds", 
"input-feedback-sounds"} {
                val, err := getGsettingsValue("org.gnome.desktop.sound", key)
                if err == nil {
                        line := fmt.Sprintf("%s=%s", key, val)
@@ -465,6 +480,14 @@
        gnomeSchema = "org.gnome.desktop.sound"
        log.Infof(">> %s", gnomeSchema)
 
+       cmd = exec.Command("gsettings", "set", gnomeSchema, "theme-name", 
gsettings.soundTheme)
+       err = cmd.Run()
+       if err != nil {
+               log.Warnf("theme-name: %s %s", gsettings.soundTheme, err)
+       } else {
+               log.Infof("theme-name: %s OK", gsettings.soundTheme)
+       }
+
        if gsettings.eventSounds {
                val = "true"
        } else {
@@ -537,6 +560,8 @@
                                                if err == nil {
                                                        
gsettings.textScalingFactor = v
                                                }
+                                       case "theme-name":
+                                               gsettings.soundTheme = value
                                        case "event-sounds":
                                                gsettings.eventSounds = value 
== "true"
                                        case "input-feedback-sounds":
@@ -586,6 +611,8 @@
        }
        lines = append(lines, fmt.Sprintf("gtk-menu-images=%v", v))
 
+       lines = append(lines, fmt.Sprintf("gtk-sound-theme-name=%s", 
gsettings.soundTheme))
+
        if gsettings.eventSounds {
                v = 1
        } else {
@@ -600,6 +627,13 @@
        }
        lines = append(lines, 
fmt.Sprintf("gtk-enable-input-feedback-sounds=%v", v))
 
+       if gtkConfig.errorBell {
+               v = 1
+       } else {
+               v = 0
+       }
+       lines = append(lines, fmt.Sprintf("gtk-error-bell=%v", v))
+
        if gsettings.fontAntialiasing != "none" {
                v = 1
        } else {
@@ -664,8 +698,14 @@
        lines = append(lines, fmt.Sprintf("gtk-font-name=%s", 
gsettings.fontName))
        lines = append(lines, fmt.Sprintf("gtk-cursor-theme-name=%s", 
gsettings.cursorTheme))
        lines = append(lines, fmt.Sprintf("gtk-cursor-theme-size=%v", 
gsettings.cursorSize))
+       lines = append(lines, fmt.Sprintf("gtk-sound-theme-name=%s", 
gsettings.soundTheme))
 
        v := 0
+       if gtkConfig.errorBell {
+               v = 1
+       }
+       lines = append(lines, fmt.Sprintf("gtk-error-bell=%v", v))
+
        if gsettings.colorScheme == "prefer-dark" {
                v = 1
        } else {
@@ -691,8 +731,10 @@
                "gtk-toolbar-icon-size",
                "gtk-button-images",
                "gtk-menu-images",
+               "gtk-sound-theme-name",
                "gtk-enable-event-sounds",
                "gtk-enable-input-feedback-sounds",
+               "gtk-error-bell",
                "gtk-xft-antialias",
                "gtk-xft-hinting",
                "gtk-xft-hintstyle",
@@ -745,6 +787,8 @@
        }
        lines = append(lines, fmt.Sprintf("gtk-menu-images=%v", v))
 
+       lines = append(lines, fmt.Sprintf("gtk-sound-theme-name=\"%s\"", 
gsettings.soundTheme))
+
        if gsettings.eventSounds {
                v = 1
        } else {
@@ -759,6 +803,13 @@
        }
        lines = append(lines, 
fmt.Sprintf("gtk-enable-input-feedback-sounds=%v", v))
 
+       if gtkConfig.errorBell {
+               v = 1
+       } else {
+               v = 0
+       }
+       lines = append(lines, fmt.Sprintf("gtk-error-bell=%v", v))
+
        if gsettings.fontAntialiasing != "none" {
                v = 1
        } else {
@@ -813,6 +864,7 @@
        lines = append(lines, fmt.Sprintf("Net/ThemeName \"%s\"", 
gsettings.gtkTheme))
        lines = append(lines, fmt.Sprintf("Net/IconThemeName \"%s\"", 
gsettings.iconTheme))
        lines = append(lines, fmt.Sprintf("Gtk/CursorThemeName \"%s\"", 
gsettings.cursorTheme))
+       lines = append(lines, fmt.Sprintf("Net/SoundThemeName \"%s\"", 
gsettings.soundTheme))
 
        var v int
        if gsettings.eventSounds {
@@ -827,7 +879,7 @@
        } else {
                v = 0
        }
-       lines = append(lines, fmt.Sprintf("EnableInputFeedbackSounds %v", v))
+       lines = append(lines, fmt.Sprintf("Net/EnableInputFeedbackSounds %v", 
v))
 
        if gsettings.fontAntialiasing != "none" {
                v = 1
@@ -1184,6 +1236,48 @@
        return name2path, name2FolderName
 }
 
+// returns map[displayName]folderName
+func getSoundThemeNames() map[string]string {
+       var dirs []string
+       name2folderName := make(map[string]string)
+
+       // get sound theme dirs
+       for _, dir := range dataDirs {
+               if pathExists(filepath.Join(dir, "sounds")) {
+                       dirs = append(dirs, filepath.Join(dir, "sounds"))
+               }
+       }
+
+       home := os.Getenv("HOME")
+       if home != "" {
+               if pathExists(filepath.Join(home, ".sounds")) {
+                       dirs = append(dirs, filepath.Join(home, ".sounds"))
+               }
+       }
+
+       for _, d := range dirs {
+               files, err := listFiles(d)
+               if err == nil {
+                       for _, f := range files {
+                               if f.IsDir() {
+                                       name, _, err := 
iconThemeName(filepath.Join(d, f.Name()))
+                                       if err == nil {
+                                               if name == "" {
+                                                       name = f.Name()
+                                               }
+                                               if _, ok := 
name2folderName[name]; !ok {
+                                                       name2folderName[name] = 
f.Name()
+                                                       log.Debugf("Sound theme 
found: %s", name)
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+
+       return name2folderName
+}
+
 func dataHome() string {
        xdgDataHome := os.Getenv("XDG_DATA_HOME")
        if xdgDataHome != "" {
@@ -1464,6 +1558,25 @@
        return true
 }
 
+func canberraAvailable() bool {
+       if _, err := exec.LookPath("canberra-gtk-play"); err != nil {
+               return false
+       }
+       return true
+}
+
+func playSound(theme string, ids ...string) {
+       go func() {
+               for _, id := range ids {
+                       cmd := exec.Command("canberra-gtk-play", "-i", id, 
fmt.Sprintf("--property=canberra.xdg-theme.name=%s", theme))
+                       if err := cmd.Run(); err == nil {
+                               return
+                       }
+               }
+               log.Warnf("Couldn't play sound '%s' from theme '%s'", 
strings.Join(ids, "', '"), theme)
+       }()
+}
+
 func loadVocabulary(lang string) map[string]string {
        for _, d := range dataDirs {
                langsDir := filepath.Join(d, "/nwg-look/langs/")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nwg-look-1.1.2/uicomponents.go 
new/nwg-look-1.2.0/uicomponents.go
--- old/nwg-look-1.1.2/uicomponents.go  2026-09-29 21:49:04.000000000 +0200
+++ new/nwg-look-1.2.0/uicomponents.go  2026-10-13 01:42:30.000000000 +0200
@@ -156,6 +156,57 @@
        return listBox
 }
 
+func setUpSoundThemeListBox(currentSoundTheme string) *gtk.ListBox {
+       listBox, _ := gtk.ListBoxNew()
+       var rowToSelect *gtk.ListBoxRow
+
+       // map[displayName]folderName
+       namesMap := getSoundThemeNames()
+       var displayNames []string
+       for name := range namesMap {
+               displayNames = append(displayNames, name)
+       }
+       sort.Slice(displayNames, func(i, j int) bool {
+               return strings.ToUpper(displayNames[i]) < 
strings.ToUpper(displayNames[j])
+       })
+
+       for _, name := range displayNames {
+               row, _ := gtk.ListBoxRowNew()
+
+               eventBox, _ := gtk.EventBoxNew()
+               box, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 6)
+               eventBox.Add(box)
+
+               lbl, _ := gtk.LabelNew(name)
+               lbl.SetProperty("margin-start", 6)
+               lbl.SetProperty("margin-end", 6)
+               n := name
+               eventBox.Connect("button-press-event", func() {
+                       gtkSettings.SetProperty("gtk-sound-theme-name", 
namesMap[n])
+                       gsettings.soundTheme = namesMap[n]
+               })
+               row.Connect("focus-in-event", func() {
+                       gtkSettings.SetProperty("gtk-sound-theme-name", 
namesMap[n])
+                       gsettings.soundTheme = namesMap[n]
+               })
+
+               if namesMap[n] == currentSoundTheme {
+                       rowToSelect = row
+               }
+
+               box.PackStart(lbl, false, false, 0)
+
+               row.Add(eventBox)
+               listBox.Add(row)
+       }
+       if rowToSelect != nil {
+               listBox.SelectRow(rowToSelect)
+               rowToFocus = rowToSelect
+       }
+
+       return listBox
+}
+
 func setUpWidgetsPreview() *gtk.Frame {
        frame, _ := gtk.FrameNew(fmt.Sprintf("  %s  ", 
voc["widget-style-preview"]))
        frame.SetLabelAlign(0.5, 0.5)
@@ -519,6 +570,113 @@
        return frame
 }
 
+func setUpSoundsPreview() *gtk.Frame {
+       frame, _ := gtk.FrameNew(fmt.Sprintf("  %s  ", 
voc["sound-theme-preview"]))
+       frame.SetLabelAlign(0.5, 0.5)
+       frame.SetProperty("margin", 6)
+       frame.SetProperty("valign", gtk.ALIGN_START)
+
+       box, _ := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 12)
+       box.SetProperty("margin", 12)
+       box.SetProperty("hexpand", true)
+       frame.Add(box)
+
+       if !canberraAvailable() {
+               lbl, _ := gtk.LabelNew(voc["canberra-not-found"])
+               box.PackStart(lbl, false, false, 0)
+               return frame
+       }
+
+       grid, _ := gtk.GridNew()
+       grid.SetRowSpacing(6)
+       grid.SetColumnSpacing(6)
+       grid.SetColumnHomogeneous(true)
+       grid.SetProperty("halign", gtk.ALIGN_CENTER)
+       box.PackStart(grid, false, false, 0)
+
+       btn, _ := gtk.ButtonNewFromIconName("media-playback-start", 
gtk.ICON_SIZE_BUTTON)
+       btn.SetLabel(voc["login"])
+       btn.SetProperty("always-show-image", true)
+       btn.Connect("clicked", func() {
+               playSound(gsettings.soundTheme, "desktop-login", 
"service-login")
+       })
+       grid.Attach(btn, 0, 0, 2, 1)
+
+       sounds := []struct {
+               id    string
+               label string
+       }{
+               {"bell", voc["bell"]},
+               {"dialog-information", voc["information"]},
+               {"dialog-warning", voc["warning"]},
+               {"dialog-error", voc["error"]},
+       }
+       for i, s := range sounds {
+               btn, _ := gtk.ButtonNewFromIconName("media-playback-start", 
gtk.ICON_SIZE_BUTTON)
+               btn.SetLabel(s.label)
+               btn.SetProperty("always-show-image", true)
+               id := s.id
+               btn.Connect("clicked", func() {
+                       playSound(gsettings.soundTheme, id)
+               })
+               grid.Attach(btn, i%2, i/2+1, 1, 1)
+       }
+
+       return frame
+}
+
+func setUpSoundEffectsForm() *gtk.Box {
+       box, _ := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 6)
+       box.SetProperty("margin", 12)
+       box.SetProperty("hexpand", true)
+       box.SetProperty("vexpand", true)
+       box.SetProperty("valign", gtk.ALIGN_START)
+
+       lbl, _ := gtk.LabelNew("")
+       lbl.SetMarkup(fmt.Sprintf("<b>%s</b>", voc["sound-effects"]))
+       lbl.SetProperty("halign", gtk.ALIGN_START)
+       box.PackStart(lbl, false, false, 0)
+
+       cbEventSounds, _ := 
gtk.CheckButtonNewWithLabel(voc["enable-event-sounds"])
+       cbEventSounds.SetActive(gsettings.eventSounds)
+       cbEventSounds.Connect("toggled", func() {
+               gsettings.eventSounds = cbEventSounds.GetActive()
+               gtkConfig.enableEventSounds = cbEventSounds.GetActive()
+       })
+       box.PackStart(cbEventSounds, false, false, 0)
+
+       cbInputSounds, _ := 
gtk.CheckButtonNewWithLabel(voc["enable-input-feedback-sounds"])
+       cbInputSounds.SetActive(gsettings.inputFeedbackSounds)
+       cbInputSounds.Connect("toggled", func() {
+               gsettings.inputFeedbackSounds = cbInputSounds.GetActive()
+               gtkConfig.enableInputFeedbackSounds = cbInputSounds.GetActive()
+       })
+       box.PackStart(cbInputSounds, false, false, 0)
+
+       lbl, _ = gtk.LabelNew(voc["sound-module-note"])
+       lbl.SetLineWrap(true)
+       lbl.SetMaxWidthChars(1)
+       lbl.SetProperty("xalign", 0)
+       ctx, _ := lbl.GetStyleContext()
+       ctx.AddClass("dim-label")
+       box.PackStart(lbl, false, false, 0)
+
+       lbl, _ = gtk.LabelNew("")
+       lbl.SetMarkup(fmt.Sprintf("<b>%s</b>", voc["error-bell"]))
+       lbl.SetProperty("halign", gtk.ALIGN_START)
+       lbl.SetProperty("margin-top", 6)
+       box.PackStart(lbl, false, false, 0)
+
+       cbErrorBell, _ := gtk.CheckButtonNewWithLabel(voc["enable-error-bell"])
+       cbErrorBell.SetActive(gtkConfig.errorBell)
+       cbErrorBell.Connect("toggled", func() {
+               gtkConfig.errorBell = cbErrorBell.GetActive()
+       })
+       box.PackStart(cbErrorBell, false, false, 0)
+
+       return box
+}
+
 func setUpOtherSettingsForm() *gtk.Frame {
        // We won't be applying these properties to gtk.Settings for preview,
        // as they remain unchanged in once open window.
@@ -604,27 +762,6 @@
        })
        g.Attach(cbMnu, 0, 4, 1, 1)
 
-       lbl, _ = gtk.LabelNew("")
-       lbl.SetMarkup(fmt.Sprintf("<b>%s</b>", voc["sound-effects"]))
-       lbl.SetProperty("halign", gtk.ALIGN_START)
-       g.Attach(lbl, 0, 5, 1, 1)
-
-       cbEventSounds, _ := 
gtk.CheckButtonNewWithLabel(voc["enable-event-sounds"])
-       cbEventSounds.SetActive(gsettings.eventSounds)
-       cbEventSounds.Connect("toggled", func() {
-               gsettings.eventSounds = cbEventSounds.GetActive()
-               gtkConfig.enableEventSounds = cbEventSounds.GetActive()
-       })
-       g.Attach(cbEventSounds, 0, 6, 1, 1)
-
-       cbInputSounds, _ := 
gtk.CheckButtonNewWithLabel(voc["enable-input-feedback-sounds"])
-       cbInputSounds.SetActive(gsettings.inputFeedbackSounds)
-       cbInputSounds.Connect("toggled", func() {
-               gsettings.inputFeedbackSounds = cbInputSounds.GetActive()
-               gtkConfig.enableInputFeedbackSounds = cbInputSounds.GetActive()
-       })
-       g.Attach(cbInputSounds, 0, 7, 2, 1)
-
        return frame
 }
 

++++++ vendor.tar.gz ++++++
++++ 4534 lines of diff (skipped)

Reply via email to