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

[Bug] - Error when using special characters in Bottles v1 #40

Closed
erazemk opened this issue Nov 21, 2020 · 2 comments
Closed

[Bug] - Error when using special characters in Bottles v1 #40

erazemk opened this issue Nov 21, 2020 · 2 comments
Labels

Comments

@erazemk
Copy link

erazemk commented Nov 21, 2020

Your hint (Microsoft Office) implies that the user can name the prefix whatever they want including having spaces, which doesn't work.

Here's the relevant error message:

Error: [BOTTLE_NAME_ERROR] Bottle name can not contain special characters
Traceback (most recent call last):
  File "/usr/share/com.github.mirkobrombin.bottles/bottles/headerbar.py", line 125, in on_save_clicked
    self.wine.create_bottle(name, arch)
  File "/usr/share/com.github.mirkobrombin.bottles/bottles/wine.py", line 274, in create_bottle
    if self.check_special_chars(name):
  File "/usr/share/com.github.mirkobrombin.bottles/bottles/wine.py", line 259, in check_special_chars
    message_dialog = Gtk.MessageDialog.new_with_image_from_icon_name(
AttributeError: type object 'MessageDialog' has no attribute 'new_with_image_from_icon_name'

In my opinion the most user friendly way (maybe not the simplest) would be to add an error message if the name contains special characters.

@mirkobrombin
Copy link
Member

mirkobrombin commented Nov 21, 2020

The application (should) already popup a message for this.

https://github.com/mirkobrombin/Bottles/blob/4e34404060f0e7ca615ee1700fda7d178b90a49d/bottles/wine.py#L259

An update must have broken something because the attribute new_with_image_from_icon_name cannot be found anymore for MessageDialog object.

I will check for a solution, thanks for feedback.

@mirkobrombin mirkobrombin changed the title Specify that the user can't use spaces in prefix name [Bug] - Error when using special characters in Bottles v1 Dec 12, 2020
mirkobrombin added a commit that referenced this issue Dec 17, 2020
@mirkobrombin
Copy link
Member

Fixed in V1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants