Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Bug]: If Bottle name contains "<" the name does not display in the main menu

Open JordanPlayz158 opened this issue 9 months ago • 4 comments

Describe the bug

As the title suggests, the bug is that when you include the "<" character in the Bottle name (not sure of any others with this issue but "|", "=", and ">" seem to be fine displaying in bottle name), in the main menu it displays "Bottle name" (but on the bottle page it displays fine), not a big deal but figured I'd document it.

To Reproduce

Rename a bottle with the "<" symbol included (ex. how I found this, I put the prefix of "DXVK <=2.2 REQUIRED | " in one of my bottle names) and restart (only shows bug after restart)

Example of how the bug looks like Bottle name: https://cdn.jordanplayz158.xyz/uploads/d5c455cef09c00710f937792c0e4ed8b1409464f.png Bottle name from Bottles list after restart: https://cdn.jordanplayz158.xyz/uploads/55efedd7fb43888f039c94de5a3b49669f06930c.png

Package

Flatpak from Flathub

Distribution

Nobara 38 (Fedora 38 fork)

Debugging Information

Official Package: true
Version: '51.9'
DE/WM: plasma
Display:
    X.org: true
    X.org (port): :0
    Wayland: true
Graphics:
    vendors:
        amd:
            vendor: amd
            envs:
                DRI_PRIME: '1'
            icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.5.5-200.fsync.fc38.x86_64
Disk:
    Total: 12562538496
    Free: 12562382848
RAM:
    MemTotal: 23.4GiB
    MemAvailable: 14.4GiB
Bottles_envs: null

Troubleshooting Logs

17:45:52 (INFO) Bottles Started! 
17:45:54 (INFO) Performing Bottles checks… 
17:45:54 (INFO) Dxvks found:
         - dxvk-2.3
         - dxvk-2.2
 
17:45:54 (INFO) Vkd3ds found:
         - vkd3d-proton-2.10
 
17:45:54 (INFO) Latencyflexs found:
         - latencyflex-v0.1.1
 
17:45:54 (INFO) Runners found:
         - caffe-7.20
         - wine-ge-proton8-17
         - sys-wine-8.0.2
 
17:45:54 (INFO) Bottles found:
         - FoliageVsUndead
         - FNAF World <
 

(bottles:2): Gtk-WARNING **: 17:45:54.288: Failed to set text 'FNAF World <' from markup due to error parsing markup: Error on line 1 char 23: “<” is not a valid name
17:45:54 (INFO) Catalog installers loaded 
17:45:54 (INFO) Catalog dependencies loaded 
17:45:54 (INFO) Catalog components loaded

Additional context

No response

JordanPlayz158 avatar Sep 30 '23 21:09 JordanPlayz158

Seems like the set_title() method of Adw.ActionRow breaks if the string contains an "<". It's a GTK/libadwaita bug, not a Bottles one.

koplo199 avatar Oct 03 '23 09:10 koplo199

As stated in the documentation of set_title(), it is read as a Pango markup string, unless explicit disabled. I guess, it fails due to a non-closed markup element.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/method.PreferencesRow.set_title.html

cybin avatar Oct 26 '23 14:10 cybin

Hmm, so it is possible for Bottles to fix if they disable Pango markup before setting title?

JordanPlayz158 avatar Oct 26 '23 17:10 JordanPlayz158

Yes, I think so. I've edited bottles/fronted/ui/new.blp and it is not complaining any more. It creates the bottle and stores the name correcly in bottle.yml.

          .AdwPreferencesGroup {
            .AdwEntryRow entry_name {
              use-markup: false;
              title: _("Name");

But it is not working any way. It must be set throughout the project and I couldn't find the places where to set it. So, I can create a bottle, but it will not be shown in the list.

cybin avatar Oct 26 '23 19:10 cybin