bugGNU Octave - Bugs: bug #66906, Octave icon missing in figures,...

 
 

bug #66906: Octave icon missing in figures, popups, dialogs since Octave 8

Submitter:  mspo
Submitted:  Thu 13 Mar 2025 11:06:03 AM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  3 - Low Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 10.0.90 Release: 
Operating System:  * Any Fixed Release:  10.1.0
Planned Release:  10.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 21 Mar 2025 08:43:56 PM UTC, comment #26: 

I tested current stable and this looks good to me.

The buildbots seem happy.  It's built all of the Linux versions and two of the Windows ones.

I'm going to mark this as Fixed and close report.

Thanks Torsten!

Rik <rik5>
Group administrator
Fri 21 Mar 2025 02:30:54 PM UTC, comment #25: 

marking as ready for test.  since it's on stable we can wait for the nightly build to catch it, make sure it builds ok, and verify windows builds look good.

Nicholas Jankowski <nrjank>
Group Member
Fri 21 Mar 2025 11:35:54 AM UTC, comment #24: 

I have pushed the patch http://hg.savannah.gnu.org/hgweb/octave/rev/098a2c46b689 that should add the Octave logo as title bar icon to figure windows and msgbox windows. ("should", sicne I am on Gnome, which suppresses title bar icons).

Can this report be closed or have I missed something, there were many discussions on icons recently ;-).

Torsten Lilge <ttl>
Group Member
Thu 20 Mar 2025 11:10:48 PM UTC, comment #23: 

Thanks for testing. Now I see where the problem is, help dialogs and figure window share the same base window. It is just weird that the current default is showing the Octave logo in comment #20 (then, no patch would be required), bit from comment #2, the logo is missing?

Torsten Lilge <ttl>
Group Member
Thu 20 Mar 2025 08:23:39 PM UTC, comment #22: 

@Torsten: I think you should go ahead and write a commit message and then check-in the changeset on the stable branch.

Rik <rik5>
Group administrator
Thu 20 Mar 2025 05:10:25 PM UTC, comment #21: 

With the patch from comment #17 applied on the current default branch, I also see the icon with the small plot on it on Windows 11.

Markus Mützel <mmuetzel>
Group administrator
Thu 20 Mar 2025 04:51:32 PM UTC, comment #20: 

@Markus: What happens when you apply the patch from comment #17?

On current stable I get the default Octave logo for dialog windows and figure windows.

With the patch I get the Octave logo that has a small plot on it.

@Torsten: I have to say that if I could get exactly what I wanted then I would have the regular Octave logo for GUI windows, including dialog boxes.  And I would have the Octave Figure icon only for plotting windows.


Rik <rik5>
Group administrator
Thu 20 Mar 2025 09:50:36 AM UTC, comment #19: 

I'm attaching two screenshots for `helpdlg('test')` with Octave 7.3.0 and Octave 8.4.0.

There was a different icon in Octave 7.3.0. (Maybe, two different icons overlaid upon each other?)



Markus Mützel <mmuetzel>
Group administrator
Thu 20 Mar 2025 08:08:46 AM UTC, comment #18: 

It turned out that I was looking at the wrong code for helpdlg. Were there ever icons for those kind of dialogs? They are shown using the uipanel command and I haven't found a possiblity to show icons there.

Torsten Lilge <ttl>
Group Member
Sat 15 Mar 2025 07:08:44 AM UTC, comment #17: 

Sorry, there is an compile error in the previous patch. Please take the new attached patch.

(file #57019)

Torsten Lilge <ttl>
Group Member
Sat 15 Mar 2025 05:10:53 AM UTC, comment #16: 

Maybe the attached patch helps? It adds the correct icon to figure windows and dialogs (like, e.g., helpdlg). I can't test this as I am using Gnome, which does not show title bar icons.

(file #57018)

Torsten Lilge <ttl>
Group Member
Fri 14 Mar 2025 02:53:45 PM UTC, comment #15: 

thanks.  jwe and i separately checked our debian and ubuntu build setups and verified that the default themes seem to suppress title bar icons so aren't overly useful for trial and error testing.  I found a setting to switch on icons but it only seems to affect gnome apps, and then i gave up with trying to mess with ubuntu themes. i guess i could try to switch to xfce. might try that this weekend.

Nicholas Jankowski <nrjank>
Group Member
Fri 14 Mar 2025 06:04:19 AM UTC, comment #14: 

The uses of setWindowIcon in comment #13 look good to me.

  • The editor find dialog gets the same icon as the editor
  • The find files dialog gets a non octave icon, but a typical find dialog
  • The dock widgets get an icon depending on the users preference
  • The main window gets the general octave icon
  • The release notes widgets gets its own icon
Torsten Lilge <ttl>
Group Member
Fri 14 Mar 2025 01:03:39 AM UTC, comment #13: 

I agree this isn't a serious issue, but 1) it's nice to advertise Octave through it's logo, and 2) the code looks like it was trying to set individual icons based on the window and none of that is getting done.  That indicates that we don't really understand how the code is supposed to work.

Here are the uses of setWindowIcon:


 hg grep -i -n 'setwindowicon'
libgui/graphics/FigureWindow.cc:41:  setWindowIcon (QIcon (global_icon_paths.at (ICON_THEME_OCTAVE)));
libgui/src/community-news.cc:88:  setWindowIcon (QIcon (icon));
libgui/src/find-files-dialog.cc:62:  setWindowIcon (settings.icon ("edit-find"));
libgui/src/m-editor/file-editor.cc:1017:  m_find_dialog->setWindowIcon (windowIcon ());
libgui/src/m-editor/file-editor.cc:1506:    m_find_dialog->setWindowIcon (windowIcon ());
libgui/src/main-window.cc:990:          widget->setWindowIcon (QIcon (icon));
libgui/src/main-window.cc:2168:  setWindowIcon (QIcon (dw_icon_set_names["NONE"]));
libgui/src/release-notes.cc:117:  setWindowIcon (QIcon (m_release_notes_icon));


Rik <rik5>
Group administrator
Thu 13 Mar 2025 11:18:20 PM UTC, comment #12: 

@Nick I'm on the XFCE desktop environment in Linux. The native XFCE programs (the terminal window etc) show the same icon on all windows including Preferences dialogs.

I opened a couple of other programs that use Qt widgets (FreeCAD and Qt Linguist), and those do show a non-generic icon in each window. (Qt Linguist shows a stylized L for all windows I tested, and FreeCAD shows a stylized F icon for the program and dialogs or an icon of a CAD drawing for documents, all of which look intentional.)

Not sure what's going on but it's very minor and doesn't interfere with Octave code.

Arun Giridhar <arungiridhar>
Group Member
Thu 13 Mar 2025 09:51:16 PM UTC, comment #11: 

I don't seem to be able to change the icon that is used for the application in any way.  Clearly there is some very specific Qt magic going on.

Rik <rik5>
Group administrator
Thu 13 Mar 2025 09:48:12 PM UTC, comment #10: 

Yes, it really looks like, I have missed forgotten the logo file name here. I am going to look for the correct logo to put here.

Torsten Lilge <ttl>
Group Member
Thu 13 Mar 2025 08:43:01 PM UTC, comment #9: 

This Stack Overflow article looks like it might be helpful: https://stackoverflow.com/questions/29284643/how-to-set-an-icon-on-a-main-window-and-action-with-qt

Does this patch work?


diff --git a/libgui/graphics/FigureWindow.cc b/libgui/graphics/FigureWindow.cc
--- a/libgui/graphics/FigureWindow.cc
+++ b/libgui/graphics/FigureWindow.cc
@@ -38,7 +38,7 @@ FigureWindow::FigureWindow (QWidget *xpa
   : FigureWindowBase (xparent)
 {
   // set icon from application resources
-  setWindowIcon (QIcon (global_icon_paths.at (ICON_THEME_OCTAVE)));
+  setWindowIcon (QIcon (global_icon_paths.at (ICON_THEME_OCTAVE) + "logo.png"));
 }

 FigureWindow::~FigureWindow ()


Attached as file as well.



(file #57012)

Rik <rik5>
Group administrator
Thu 13 Mar 2025 08:26:46 PM UTC, comment #8: 

@Torsten: You probably can diagnose this faster than the rest of us.  Looking at the changesets, it is definitely one of these.

First changeset


hlog -p -r 36dc11ee220d

diff --git a/libgui/graphics/FigureWindow.cc b/libgui/graphics/FigureWindow.cc
--- a/libgui/graphics/FigureWindow.cc
+++ b/libgui/graphics/FigureWindow.cc
@@ -38,7 +38,7 @@ namespace octave
     : FigureWindowBase (xparent)
   {
     // set icon from application resources
-    setWindowIcon (QIcon (":/actions/icons/graphic_logo_Figure.png"));
+    setWindowIcon (QIcon::fromTheme ("graphic_logo_Figure"));
   }


Second changeset


@@ -38,7 +39,7 @@ namespace octave
     : FigureWindowBase (xparent)
   {
     // set icon from application resources
-    setWindowIcon (QIcon::fromTheme ("graphic_logo_Figure"));
+    setWindowIcon (QIcon (global_icon_fallback_paths.at (ICON_THEME_OCTAVE)));
   }


Third changeset


diff --git a/libgui/graphics/FigureWindow.cc b/libgui/graphics/FigureWindow.cc
--- a/libgui/graphics/FigureWindow.cc
+++ b/libgui/graphics/FigureWindow.cc
@@ -39,7 +39,7 @@ namespace octave
     : FigureWindowBase (xparent)
   {
     // set icon from application resources
-    setWindowIcon (QIcon (global_icon_fallback_paths.at (ICON_THEME_OCTAVE)));
+    setWindowIcon (QIcon (global_icon_paths.at (ICON_THEME_OCTAVE)));
   }


For the last changeset, this was also done


const QStringList
-global_icon_fallback_paths (QStringList ()
+global_icon_paths (QStringList ()
                         << ""
                         << ":/icons/octave/128x128/"
                         << ":/icons/tango/128x128/"
-                        << ":/cursors/"
+                        << ":/icons/cursors/"
                        );


So it would appear that


global_icon_paths.at (ICON_THEME_OCTAVE)


names a directory rather than an actual icon file name.

Rik <rik5>
Group administrator
Thu 13 Mar 2025 08:01:17 PM UTC, comment #7: 

Looking at the changelog for FigureWindow.cc it was probably one of these changesets:


changeset:   30788:c11d34f72b3c
user:        Torsten Lilge <ttl-octave@mailbox.org>
date:        Sun Feb 27 20:21:12 2022 +0100
summary:     provide different icon sets for the GUI

changeset:   30777:439eb9bd4c04
user:        Torsten Lilge <ttl-octave@mailbox.org>
date:        Thu Feb 24 22:16:35 2022 +0100
summary:     icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)

changeset:   30772:36dc11ee220d
user:        Torsten Lilge <ttl-octave@mailbox.org>
date:        Tue Feb 22 20:54:15 2022 +0100
summary:     reorganize GUIs icons


I can't test since this works on my computer.  But it should be possible to use 'hg bisect' to find the culprit.

Rik <rik5>
Group administrator
Thu 13 Mar 2025 07:04:48 PM UTC, comment #6: 

connecting this report to a discourse post on the same subject created a couple years ago:
https://octave.discourse.group/t/probably-two-separate-graphics-issues-with-octave-8-2-0/4466

that included the following:


in octave 7.2.0, there is an icon in octave 8.2.0, it shows a X icon

In the current sources libgui/graphics/FigureWindow.cc, there is a setWindowIcon (QIcon (global_icon_paths.at (ICON_THEME_OCTAVE))) which would set a path in QIcon rather than an actual name ?


which might give a hint on where to look to fix this

Nicholas Jankowski <nrjank>
Group Member
Thu 13 Mar 2025 07:02:57 PM UTC, comment #5: 

It definitely depends on particularities of the machine.

I'm running Kubuntu 22.04 with Qt5 and I have the Octave logo in the main window, in windows that I pop out from the GUI, and in generated plot windows ("demo sombrero").  In short, everything works perfectly well for me, but apparently not everywhere.

Rik <rik5>
Group administrator
Thu 13 Mar 2025 06:28:53 PM UTC, comment #4: 

@Arun - what OS are you running?  apparently some linux themes just don't show app icons

Nicholas Jankowski <nrjank>
Group Member
Thu 13 Mar 2025 05:05:13 PM UTC, comment #3: 

I get the same behavior on Linux with current default. The main Octave window gets the stylized O logo and figure windows get a generic "window" icon. I had never paid attention to it until this report.

Arun Giridhar <arungiridhar>
Group Member
Thu 13 Mar 2025 03:30:35 PM UTC, comment #2: 

thanks for pointing this out.  Confirming i see the same on windows in 9.1.0 and others, so it does span versions.  I do get the octave icon on the main window, just not on additional figure windows.  If i pop out something like the Editor, that has the correct icon.

copying @ttl to see if he knows where (if?) those sort of generated windows look for a window icon. 

also, can anyone confirm on other platforms? not at my linux box at the moment.

Nicholas Jankowski <nrjank>
Group Member
Thu 13 Mar 2025 11:08:53 AM UTC, comment #1: 

Ah sorry, my system is Windows 10 Pro (22H2) using the Octave 10.0.90 RC. However, this problem exists since at least Octave 8.2.

mspo
Thu 13 Mar 2025 11:06:03 AM UTC, original submission:  

Since Octave 8 (Windows) there is this minor glitch where the Octave icon in the top left of each figure or dialog is missing and replaced with an ugly placeholder. For example, it can be seen using

figure
helpdlg


mspo

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #57043:  helpdlg.base.png added by rik5 (7KiB - image/png)
file #57044:  helpdlg.patched.png added by rik5 (10KiB - image/png)
file #57019:  bug66906-v02.patch added by ttl (1KiB - text/x-patch)
file #57018:  bug66906.patch added by ttl (1KiB - text/x-patch)
file #57012:  bug66906.diff added by rik5 (479B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by arungiridhar (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by mspo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 21 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-03-21 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 10.1.0
    2025-03-21 nrjank StatusConfirmed Ready For Test
        Planned ReleaseNone 10.1.0
    2025-03-20 rik5 Attached File- Added helpdlg.base.png, #57043
        Attached File- Added helpdlg.patched.png, #57044
    2025-03-20 mmuetzel Attached File- Added helpdlg-octave-7.3.0.png, #57041
        Attached File- Added helpdlg-octave-8.4.0.png, #57042
    2025-03-15 ttl Attached File- Added bug66906-v02.patch, #57019
    2025-03-15 ttl Attached File- Added bug66906.patch, #57018
    2025-03-14 rik5 Item GroupNone Other
    2025-03-13 rik5 Attached File- Added bug66906.diff, #57012
    2025-03-13 arungiridhar Operating SystemMicrosoft Windows Any
    2025-03-13 nrjank SummaryOctave icon missing in figures, popups dialogs since Octave 8 Octave icon missing in figures, popups, dialogs since Octave 8
    2025-03-13 nrjank Priority5 - Normal 3 - Low
        StatusNone Confirmed
        SummaryOctave figure icon missing since Octave 8 Octave icon missing in figures, popups dialogs since Octave 8
        Carbon-Copy- Added ttl
    2025-03-13 nrjank Severity3 - Normal 2 - Minor
    2025-03-13 mspo Attached File- Added Screenshot@2025-03-13@102546.png, #57008

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code