Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bluetuith for openSUSE:Factory 
checked in at 2024-01-22 20:33:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bluetuith (Old)
 and      /work/SRC/openSUSE:Factory/.bluetuith.new.16006 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bluetuith"

Mon Jan 22 20:33:29 2024 rev:7 rq:1140245 version:0.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/bluetuith/bluetuith.changes      2023-11-06 
21:14:29.331729623 +0100
+++ /work/SRC/openSUSE:Factory/.bluetuith.new.16006/bluetuith.changes   
2024-01-22 20:33:46.616237542 +0100
@@ -1,0 +2,7 @@
+Sat Jan 20 12:09:23 UTC 2024 - Joshua Smith <jsmith...@gmail.com>
+
+- Update to 0.2.0:
+  * Show device alias name if it is unique
+  * Display compact set of help keybindings
+
+-------------------------------------------------------------------

Old:
----
  bluetuith-0.1.9.tar.gz

New:
----
  bluetuith-0.2.0.tar.gz

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

Other differences:
------------------
++++++ bluetuith.spec ++++++
--- /var/tmp/diff_new_pack.DkTCfz/_old  2024-01-22 20:33:47.288262086 +0100
+++ /var/tmp/diff_new_pack.DkTCfz/_new  2024-01-22 20:33:47.288262086 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package bluetuith
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           bluetuith
-Version:        0.1.9
+Version:        0.2.0
 Release:        0
 Summary:        A TUI bluetooth manager for Linux
 License:        MIT

++++++ _service ++++++
--- /var/tmp/diff_new_pack.DkTCfz/_old  2024-01-22 20:33:47.328263547 +0100
+++ /var/tmp/diff_new_pack.DkTCfz/_new  2024-01-22 20:33:47.332263693 +0100
@@ -3,7 +3,7 @@
     <param name="url">https://github.com/darkhz/bluetuith.git</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">v0.1.9</param>
+    <param name="revision">v0.2.0</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
   </service>
@@ -14,7 +14,6 @@
     <param name="file">*.tar</param>
     <param name="compression">gz</param>
   </service>
-  <service name="go_modules" mode="disabled">
-  </service>
+  <service name="go_modules" mode="disabled"/>
 </services>
 

++++++ bluetuith-0.1.9.tar.gz -> bluetuith-0.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bluetuith-0.1.9/cmd/flags.go 
new/bluetuith-0.2.0/cmd/flags.go
--- old/bluetuith-0.1.9/cmd/flags.go    2023-11-05 11:46:26.000000000 +0100
+++ new/bluetuith-0.2.0/cmd/flags.go    2023-12-28 14:53:02.000000000 +0100
@@ -60,6 +60,11 @@
                IsBoolean:   true,
        },
        {
+               Name:        "no-help-display",
+               Description: "Do not display help keybindings in the 
application.",
+               IsBoolean:   true,
+       },
+       {
                Name:        "confirm-on-quit",
                Description: "Ask for confirmation before quitting the 
application.",
                IsBoolean:   true,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bluetuith-0.1.9/theme/themeconfig.go 
new/bluetuith-0.2.0/theme/themeconfig.go
--- old/bluetuith-0.1.9/theme/themeconfig.go    2023-11-05 11:46:26.000000000 
+0100
+++ new/bluetuith-0.2.0/theme/themeconfig.go    2023-12-28 14:53:02.000000000 
+0100
@@ -23,6 +23,7 @@
        ThemeAdapterPairable          ThemeContext = "AdapterPairable"
        ThemeDevice                   ThemeContext = "Device"
        ThemeDeviceType               ThemeContext = "DeviceType"
+       ThemeDeviceAlias              ThemeContext = "DeviceAlias"
        ThemeDeviceConnected          ThemeContext = "DeviceConnected"
        ThemeDeviceDiscovered         ThemeContext = "DeviceDiscovered"
        ThemeDeviceProperty           ThemeContext = "DeviceProperty"
@@ -52,6 +53,7 @@
 
        ThemeDevice:                   "white",
        ThemeDeviceType:               "white",
+       ThemeDeviceAlias:              "white",
        ThemeDeviceConnected:          "white",
        ThemeDeviceDiscovered:         "white",
        ThemeDeviceProperty:           "grey",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bluetuith-0.1.9/ui/device.go 
new/bluetuith-0.2.0/ui/device.go
--- old/bluetuith-0.1.9/ui/device.go    2023-11-05 11:46:26.000000000 +0100
+++ new/bluetuith-0.2.0/ui/device.go    2023-12-28 14:53:02.000000000 +0100
@@ -131,6 +131,7 @@
 
        props := [][]string{
                {"Name", device.Name},
+               {"Alias", device.Alias},
                {"Address", device.Address},
                {"Class", strconv.FormatUint(uint64(device.Class), 10)},
                {"Adapter", filepath.Base(device.Adapter)},
@@ -245,11 +246,20 @@
 func setDeviceTableInfo(row int, device bluez.Device) {
        var props string
 
+       data := []string{
+               theme.ColorWrap(theme.ThemeDeviceType, device.Type),
+       }
        name := device.Name
        if name == "" {
                name = device.Address
        }
-       name += theme.ColorWrap(theme.ThemeDeviceType, " ("+device.Type+")")
+       if device.Alias != device.Name {
+               data = append(
+                       []string{theme.ColorWrap(theme.ThemeDeviceAlias, 
device.Alias)},
+                       data...,
+               )
+       }
+       name += " (" + strings.Join(data, ", ") + ")"
 
        nameColor := theme.ThemeDevice
        propColor := theme.ThemeDeviceProperty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bluetuith-0.1.9/ui/help.go 
new/bluetuith-0.2.0/ui/help.go
--- old/bluetuith-0.1.9/ui/help.go      2023-11-05 11:46:26.000000000 +0100
+++ new/bluetuith-0.2.0/ui/help.go      2023-12-28 14:53:02.000000000 +0100
@@ -9,60 +9,159 @@
        "github.com/gdamore/tcell/v2"
 )
 
-func showHelp() {
-       var row int
+// Help describes the help item.
+type Help struct {
+       Title, Description string
+       Keys               []cmd.Key
+       ShowInStatus       bool
+}
+
+var (
+       helpPage string
+
+       // HelpTopics store the various help topics.
+       HelpTopics = map[string][]Help{
+               "Device Screen": {
+                       {"Menu", "Open the menu", []cmd.Key{cmd.KeyMenu}, true},
+                       {"Switch", "Navigate between menus", 
[]cmd.Key{cmd.KeySwitch}, true},
+                       {"Navigation", "Navigate between devices/options", 
[]cmd.Key{cmd.KeyNavigateUp, cmd.KeyNavigateDown}, true},
+                       {"Power", "Toggle adapter power state", 
[]cmd.Key{cmd.KeyAdapterTogglePower}, true},
+                       {"Discoverable", "Toggle discoverable state", 
[]cmd.Key{cmd.KeyAdapterToggleDiscoverable}, false},
+                       {"Pairable", "Toggle pairable state", 
[]cmd.Key{cmd.KeyAdapterTogglePairable}, false},
+                       {"Scan", "Toggle scan (discovery state)", 
[]cmd.Key{cmd.KeyAdapterToggleScan}, true},
+                       {"Adapter", "Change adapter", 
[]cmd.Key{cmd.KeyAdapterChange}, true},
+                       {"Send", "Send files", 
[]cmd.Key{cmd.KeyDeviceSendFiles}, true},
+                       {"Network", "Connect to network", 
[]cmd.Key{cmd.KeyDeviceNetwork}, false},
+                       {"Progress", "Progress view", 
[]cmd.Key{cmd.KeyProgressView}, false},
+                       {"Player", "Show/Hide player", 
[]cmd.Key{cmd.KeyPlayerShow, cmd.KeyPlayerHide}, false},
+                       {"Device Info", "Show device information", 
[]cmd.Key{cmd.KeyDeviceInfo}, false},
+                       {"Connect", "Connect to selected device", 
[]cmd.Key{cmd.KeyDeviceConnect}, true},
+                       {"Pair", "Pair with selected device", 
[]cmd.Key{cmd.KeyDevicePair}, true},
+                       {"Trust", "Trust selected device", 
[]cmd.Key{cmd.KeyDeviceTrust}, false},
+                       {"Remove", "Remove device from adapter", 
[]cmd.Key{cmd.KeyDeviceRemove}, false},
+                       {"Cancel", "Cancel operation", 
[]cmd.Key{cmd.KeyCancel}, false},
+                       {"Help", "Show help", []cmd.Key{cmd.KeyHelp}, true},
+                       {"Quit", "Quit", []cmd.Key{cmd.KeyQuit}, false},
+               },
+               "File Picker": {
+                       {"Navigation", "Navigate between directory entries", 
[]cmd.Key{cmd.KeyNavigateUp, cmd.KeyNavigateDown}, true},
+                       {"ChgDir Fwd/Back", "Enter/Go back a directory", 
[]cmd.Key{cmd.KeyNavigateRight, cmd.KeyNavigateLeft}, true},
+                       {"One", "Select one file", 
[]cmd.Key{cmd.KeyFilebrowserSelect}, true},
+                       {"Invert", "Invert file selection", 
[]cmd.Key{cmd.KeyFilebrowserInvertSelection}, true},
+                       {"All", "Select all files", 
[]cmd.Key{cmd.KeyFilebrowserSelectAll}, true},
+                       {"Refresh", "Refresh current directory", 
[]cmd.Key{cmd.KeyFilebrowserRefresh}, false},
+                       {"Hidden", "Toggle hidden files", 
[]cmd.Key{cmd.KeyFilebrowserToggleHidden}, false},
+                       {"Confirm", "Confirm file(s) selection", 
[]cmd.Key{cmd.KeyFilebrowserConfirmSelection}, true},
+                       {"Exit", "Exit", []cmd.Key{cmd.KeyClose}, false},
+               },
+               "Progress View": {
+                       {"Navigation", "Navigate between transfers", 
[]cmd.Key{cmd.KeyNavigateUp, cmd.KeyNavigateDown}, true},
+                       {"Suspend", "Suspend transfer", 
[]cmd.Key{cmd.KeyProgressTransferSuspend}, true},
+                       {"Resume", "Resume transfer", 
[]cmd.Key{cmd.KeyProgressTransferResume}, true},
+                       {"Cancel", "Cancel transfer", 
[]cmd.Key{cmd.KeyProgressTransferCancel}, true},
+                       {"Exit", "Exit", []cmd.Key{cmd.KeyClose}, true},
+               },
+               "Media Player": {
+                       {"Play/Pause", "Toggle play/pause", 
[]cmd.Key{cmd.KeyNavigateUp, cmd.KeyNavigateDown}, false},
+                       {"Next", "Next", []cmd.Key{cmd.KeyPlayerNext}, false},
+                       {"Previous", "Previous", 
[]cmd.Key{cmd.KeyPlayerPrevious}, false},
+                       {"Rewind", "Rewind", 
[]cmd.Key{cmd.KeyPlayerSeekBackward}, false},
+                       {"Forward", "Fast forward", 
[]cmd.Key{cmd.KeyPlayerSeekForward}, false},
+                       {"Stop", "Stop", []cmd.Key{cmd.KeyPlayerStop}, false},
+               },
+       }
+)
+
+func showStatusHelp(page string) {
+       if cmd.IsPropertyEnabled("no-help-display") || helpPage == UI.page {
+               return
+       }
+
+       helpPage = UI.page
+       pages := map[string]string{
+               "main":         "Device Screen",
+               "filepicker":   "File Picker",
+               "progressview": "Progress View",
+       }
 
-       deviceKeyBindings := map[string][]cmd.Key{
-               "Open the menu":                    {cmd.KeyMenu},
-               "Navigate between menus":           {cmd.KeySwitch},
-               "Navigate between devices/options": {cmd.KeyNavigateUp, 
cmd.KeyNavigateDown},
-               "Toggle adapter power state":       {cmd.KeyAdapterTogglePower},
-               "Toggle discoverable state":        
{cmd.KeyAdapterToggleDiscoverable},
-               "Toggle pairable state":            
{cmd.KeyAdapterTogglePairable},
-               "Toggle scan (discovery state)":    {cmd.KeyAdapterToggleScan},
-               "Change adapter":                   {cmd.KeyAdapterChange},
-               "Send files":                       {cmd.KeyDeviceSendFiles},
-               "Connect to network":               {cmd.KeyDeviceNetwork},
-               "Progress view":                    {cmd.KeyProgressView},
-               "Show/Hide player":                 {cmd.KeyPlayerShow, 
cmd.KeyPlayerHide},
-               "Show device information":          {cmd.KeyDeviceInfo},
-               "Connect to selected device":       {cmd.KeyDeviceConnect},
-               "Pair with selected device":        {cmd.KeyDevicePair},
-               "Trust selected device":            {cmd.KeyDeviceTrust},
-               "Remove device from adapter":       {cmd.KeyDeviceRemove},
-               "Cancel operation":                 {cmd.KeyCancel},
-               "Quit":                             {cmd.KeyQuit},
-       }
-
-       filePickerKeyBindings := map[string][]cmd.Key{
-               "Navigate between directory entries": {cmd.KeyNavigateUp, 
cmd.KeyNavigateDown},
-               "Enter/Go back a directory":          {cmd.KeyNavigateRight, 
cmd.KeyNavigateLeft},
-               "Select one file":                    
{cmd.KeyFilebrowserSelect},
-               "Invert file selection":              
{cmd.KeyFilebrowserInvertSelection},
-               "Select all files":                   
{cmd.KeyFilebrowserSelectAll},
-               "Refresh current directory":          
{cmd.KeyFilebrowserRefresh},
-               "Toggle hidden files":                
{cmd.KeyFilebrowserToggleHidden},
-               "Confirm file(s) selection":          
{cmd.KeyFilebrowserConfirmSelection},
-               "Exit":                               {cmd.KeyClose},
-       }
-
-       progressViewKeyBindings := map[string][]cmd.Key{
-               "Navigate between transfers": {cmd.KeyNavigateUp, 
cmd.KeyNavigateDown},
-               "Suspend transfer":           {cmd.KeyProgressTransferSuspend},
-               "Resume transfer":            {cmd.KeyProgressTransferResume},
-               "Cancel transfer":            {cmd.KeyProgressTransferCancel},
-               "Exit":                       {cmd.KeyClose},
-       }
-
-       mediaPlayerKeyBindings := map[string][]cmd.Key{
-               "Toggle play/pause": {cmd.KeyNavigateUp, cmd.KeyNavigateDown},
-               "Next":              {cmd.KeyPlayerNext},
-               "Previous":          {cmd.KeyPlayerPrevious},
-               "Rewind":            {cmd.KeyPlayerSeekBackward},
-               "Fast forward":      {cmd.KeyPlayerSeekForward},
-               "Stop":              {cmd.KeyPlayerStop},
+       items, ok := HelpTopics[pages[page]]
+       if !ok {
+               UI.Status.Help.Clear()
+               return
        }
 
+       groups := map[string][]Help{}
+
+       for _, item := range items {
+               if !item.ShowInStatus {
+                       continue
+               }
+
+               var group string
+
+               for _, key := range item.Keys {
+                       switch key {
+                       case cmd.KeyMenu, cmd.KeySwitch:
+                               group = "Open"
+
+                       case cmd.KeyFilebrowserSelect, 
cmd.KeyFilebrowserInvertSelection, cmd.KeyFilebrowserSelectAll:
+                               group = "Select"
+
+                       case cmd.KeyProgressTransferSuspend, 
cmd.KeyProgressTransferResume, cmd.KeyProgressTransferCancel:
+                               group = "Transfer"
+
+                       case cmd.KeyDeviceConnect, cmd.KeyDevicePair, 
cmd.KeyAdapterToggleScan, cmd.KeyAdapterTogglePower:
+                               group = "Toggle"
+                       }
+               }
+               if group == "" {
+                       group = item.Title
+               }
+
+               helpItem := groups[group]
+               if helpItem == nil {
+                       helpItem = []Help{}
+               }
+
+               helpItem = append(helpItem, item)
+               groups[group] = helpItem
+       }
+
+       text := ""
+       count := 0
+       for group, items := range groups {
+               var names, keys []string
+
+               for _, item := range items {
+                       if item.Title != group {
+                               names = append(names, item.Title)
+                       }
+                       for _, k := range item.Keys {
+                               keys = append(keys, 
cmd.KeyName(cmd.OperationData(k).Kb))
+                       }
+               }
+               if names != nil {
+                       group += " " + strings.Join(names, "/")
+               }
+
+               helpKeys := strings.Join(keys, "/")
+               if count < len(groups)-1 {
+                       helpKeys += ", "
+               }
+
+               title := theme.ColorWrap(theme.ThemeText, group, "::bu")
+               helpKeys = theme.ColorWrap(theme.ThemeText, ": "+helpKeys)
+
+               text += title + helpKeys
+               count++
+       }
+
+       UI.Status.Help.SetText(text)
+}
+
+func showHelp() {
+       var row int
+
        helpModal := NewModal("help", "Help", nil, 40, 60)
        helpModal.Table.SetSelectionChangedFunc(func(row, col int) {
                if row == 1 {
@@ -77,12 +176,7 @@
                return action, event
        })
 
-       for title, helpMap := range map[string]map[string][]cmd.Key{
-               "Device Screen": deviceKeyBindings,
-               "File Picker":   filePickerKeyBindings,
-               "Progress View": progressViewKeyBindings,
-               "Media Player":  mediaPlayerKeyBindings,
-       } {
+       for title, helpItems := range HelpTopics {
                helpModal.Table.SetCell(row, 0, 
tview.NewTableCell("[::bu]"+title).
                        SetSelectable(false).
                        SetAlign(tview.AlignLeft).
@@ -91,16 +185,16 @@
 
                row++
 
-               for op, key := range helpMap {
+               for _, item := range helpItems {
                        var names []string
 
-                       for _, k := range key {
+                       for _, k := range item.Keys {
                                names = append(names, 
cmd.KeyName(cmd.OperationData(k).Kb))
                        }
 
                        keybinding := strings.Join(names, "/")
 
-                       helpModal.Table.SetCell(row, 0, 
tview.NewTableCell(theme.ColorWrap(theme.ThemeText, op)).
+                       helpModal.Table.SetCell(row, 0, 
tview.NewTableCell(theme.ColorWrap(theme.ThemeText, item.Description)).
                                SetExpansion(1).
                                SetAlign(tview.AlignLeft).
                                SetTextColor(theme.GetColor(theme.ThemeText)).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bluetuith-0.1.9/ui/status.go 
new/bluetuith-0.2.0/ui/status.go
--- old/bluetuith-0.1.9/ui/status.go    2023-11-05 11:46:26.000000000 +0100
+++ new/bluetuith-0.2.0/ui/status.go    2023-12-28 14:53:02.000000000 +0100
@@ -15,6 +15,9 @@
        // MessageBox is an area to display messages.
        MessageBox *tview.TextView
 
+       // Help is an area to display help keybindings.
+       Help *tview.TextView
+
        // InputField is an area to interact with messages.
        InputField *tview.InputField
 
@@ -22,6 +25,8 @@
        scancel context.CancelFunc
        msgchan chan message
 
+       itemCount int
+
        *tview.Pages
 }
 
@@ -31,7 +36,7 @@
 }
 
 // statusBar sets up the statusbar.
-func statusBar() *tview.Pages {
+func statusBar() *tview.Flex {
        UI.Status.Pages = tview.NewPages()
        UI.Status.SetBackgroundColor(theme.GetColor(theme.ThemeBackground))
 
@@ -45,6 +50,10 @@
        UI.Status.MessageBox.SetDynamicColors(true)
        
UI.Status.MessageBox.SetBackgroundColor(theme.GetColor(theme.ThemeBackground))
 
+       UI.Status.Help = tview.NewTextView()
+       UI.Status.Help.SetDynamicColors(true)
+       UI.Status.Help.SetBackgroundColor(theme.GetColor(theme.ThemeBackground))
+
        UI.Status.AddPage("input", UI.Status.InputField, true, true)
        UI.Status.AddPage("messages", UI.Status.MessageBox, true, true)
        UI.Status.SwitchToPage("messages")
@@ -54,7 +63,17 @@
 
        go startStatus()
 
-       return UI.Status.Pages
+       flex := tview.NewFlex().
+               SetDirection(tview.FlexRow).
+               AddItem(UI.Status.Pages, 1, 0, false)
+       if !cmd.IsPropertyEnabled("no-help-display") {
+               flex.AddItem(horizontalLine(), 1, 0, false)
+               flex.AddItem(UI.Status.Help, 1, 0, false)
+       }
+
+       UI.Status.itemCount = flex.GetItemCount()
+
+       return flex
 }
 
 // stopStatus stops the message event loop.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bluetuith-0.1.9/ui/ui.go new/bluetuith-0.2.0/ui/ui.go
--- old/bluetuith-0.1.9/ui/ui.go        2023-11-05 11:46:26.000000000 +0100
+++ new/bluetuith-0.2.0/ui/ui.go        2023-12-28 14:53:02.000000000 +0100
@@ -85,12 +85,14 @@
                default:
                        UI.pageContext = cmd.KeyContextApp
                }
+
+               showStatusHelp(page)
        })
 
        UI.Layout = tview.NewFlex().
                SetDirection(tview.FlexRow).
                AddItem(UI.Pages, 0, 10, true).
-               AddItem(statusBar(), 1, 0, false)
+               AddItem(statusBar(), UI.Status.itemCount, 0, false)
        UI.Layout.SetBackgroundColor(theme.GetColor(theme.ThemeBackground))
 
        UI.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
@@ -126,6 +128,7 @@
 
                return false
        })
+       UI.Pages.SwitchToPage("main")
 
        setupDevices()
        displayWarning()

++++++ vendor.tar.gz ++++++

Reply via email to