Project

General

Profile

Actions

Bug #1236

closed

Ironman status bar is not showing pairing icon.

Added by Hammel 2 days ago. Updated about 7 hours ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
General
Target version:
Start date:
14 Oct 2025
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

This may have broke after updating the way builds are done using installed staging/toolchain trees.

Actions #1

Updated by Hammel 2 days ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

The .statusbar/imrest.xml has been installed by ironman+imrest and the network icons are available in /etc/launcher/icons. This should be loaded by launcher and the icons displayed, but it's not.

First test is to verify the xml is being loaded.

Actions #2

Updated by Hammel 1 day ago

Problems identified when loading .xml files.

  1. Tried to parse a png.
    dbLoad[db.c:339] INFO App Description file: /etc/launcher/Mask.png
    /etc/launcher/Mask.png:1: parser error : Start tag expected, '<' not found
    dbLoad[db.c:347] ERROR Failed to parse Mask.png
    

The init processing does find the imrest.xml and parses it.

dbLoad[db.c:339] INFO App Description file: /etc/launcher/.statusbar/imrest.xml
dbLoad[db.c:367] INFO Node name: appName
parseElement[db.c:237] INFO Key = *imrest*
dbLoad[db.c:367] INFO Node name: author
parseElement[db.c:237] INFO Key = *Michael J. Hammel*
dbLoad[db.c:367] INFO Node name: contact
parseElement[db.c:237] INFO Key = *mjhammel@graphics-muse.org*
dbLoad[db.c:367] INFO Node name: command
parseElement[db.c:237] INFO Key = */usr/bin/imrest-app*
dbLoad[db.c:367] INFO Node name: icon
parseElement[db.c:237] INFO Key = *icons/imrest.png*
dbLoad[db.c:367] INFO Node name: splash
parseElement[db.c:237] INFO Key = *icons/imrest.png*
dbLoad[db.c:367] INFO Node name: description
parseElement[db.c:237] INFO Key = *Pair management for Ironman's RESTful server.*
dbLoad[db.c:425] INFO Loaded app: imrest
dbLoad[db.c:443] INFO Found 1 application descriptions in /etc/launcher/.statusbar

The problem can be tracked to the code in launcher.c:draw_status() with the following line

            if ( appEntry->active )

The app is not active until it's pressed in the status bar, so this never displays the pair icon for Ironman. If I remove this line then the pair icon shows up but the network icon goes away.

Since both network and pair icons are handled by draw_status() if DRAW_ICONS is passed to it then the wrapping conditional for each can be combined into a single conditional which then only requires a single cairo update. That should, I think, fix this problem.

This only works for status bar apps that are pressed by the user. For apps that need to show status of background events (like the network drop out) then the might not need to be shown at all unless the event happens. That would require a different processing here - possibly by setting a field in the xml that says "always show" or "show on event only". Something like that.

Actions #3

Updated by Hammel about 7 hours ago

  • Status changed from In Progress to Closed
  • % Done changed from 10 to 100

Combining the network and app icon drawing into a single conditional helped fix the problem. Both icons are now properly displayed.

Additional work was needed to fix touch presses to identify the correct app that was selected. This was minor and is now fixed too.

Code tested on hardware, committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF