Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new programName option to linux options #2817

Merged

Conversation

lyimmi
Copy link
Contributor

@lyimmi lyimmi commented Aug 8, 2023

Description

When the program's executable name differs from the human readable name in a .desktop file sometimes the window manager won't draw the correct icon for it and if multiple instances are running the grouping can be weird too.

This PR aims to help with this issue by adding a new linux application option named ProgramName. This value is set when a new frontend instance is created by calling GTK's g_set_prgname() function.

Fixes #2800 (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Tested on existing and on newly created applications by creating different .desktop files with program names icons and executable filenames.

Tested on: Ubuntu 22.04.3 LTS, Ubuntu 23.04, !Pop_OS 22.04
Wayland and X11

  • Windows
  • macOS
  • Linux

Test Configuration

# System

OS           | Ubuntu  
Version      | 22.04   
ID           | ubuntu  
Go Version   | go1.20.4
Platform     | linux   
Architecture | amd64   

# Wails

Version         | v2.5.1
Package Manager | apt   

# Dependencies

Dependency | Package Name          | Status    | Version                
*docker    | docker.io             | Installed | 24.0.5                 
gcc        | build-essential       | Installed | 12.9ubuntu3            
libgtk-3   | libgtk-3-dev          | Installed | 3.24.33-1ubuntu2       
libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.40.4-0ubuntu0.22.04.1
npm        | npm                   | Installed | 8.19.2                 
*nsis      | nsis                  | Available | 3.08-2                 
pkg-config | pkg-config            | Installed | 0.29.2-1ubuntu3        
* - Optional Dependency

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@lyimmi lyimmi marked this pull request as ready for review August 8, 2023 15:55
Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this. Just a small comment 👍

Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@leaanthony leaanthony merged commit e72e4aa into wailsapp:master Aug 9, 2023
11 checks passed
@lyimmi lyimmi deleted the feature/2800_new_app_option_program_name branch August 9, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Linux] new app option to set GTK's program name (g_set_prgname)
2 participants