Set application title under Gnome 3

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Set application title under Gnome 3

Post by fishnet37222 »

I've noticed that when I run a wxWidgets application under Gnome 3, the name that's displayed in the top bar is the name of the executable with the first letter capitalized. Is it possible to set it to a more user-friendly string? I tried calling both wxApp::SetAppName() and wxApp::SetAppDisplayName() with no effect.

I'm using wxWidgets 3.1.0 on Ubuntu 17.10 with GCC version 7.2.0.
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Set application title under Gnome 3

Post by ONEEYEMAN »

Hi,
This application has a frame, right?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: Set application title under Gnome 3

Post by fishnet37222 »

The application has a frame. You can look at the code on GitHub if you want.

https://github.com/fishnet37222/mymusiccollection
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Set application title under Gnome 3

Post by ONEEYEMAN »

Hi,
So why not use SetTitle() on the frame?
Or just check documentation on how to set the title properly?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: Set application title under Gnome 3

Post by fishnet37222 »

I'm passing the title for the window in the constructor as in the following line.

Code: Select all

MainWindow::MainWindow() : wxFrame(nullptr, wxID_ANY, "My Music Collection")
That sets the title for the window without any issues. However, the title displayed in the Gnome 3 top bar still shows the name of the executable. This is the bar that runs across the top of the screen in Gnome 3, not the title bar of the window.
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Set application title under Gnome 3

Post by ONEEYEMAN »

Hi,
Is this what you are looking for?
Just try calling gtk_window_set_wmclass() and if it changes see if there is a wxWidgets call that does it.

If not - you can make a patch implementing it and submit it to trac.wxwidgets.org. You will have to register and be approved once.

Thank you.
Post Reply