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

Use GtkResponseType values in the iso chooser dialog #406

Closed
wants to merge 1 commit into from

Conversation

dashea
Copy link
Contributor

@dashea dashea commented Oct 13, 2015

This will resolve 1265060

This way the GtkFileChooserDialog can perform additional actions on
button clicks, such as entering a folder when clicking "Open" instead of
returning the path to the folder.
@clumens clumens added the ACK label Oct 13, 2015
@vpodzime
Copy link
Contributor

I think we should do this consistently in all places, not just a single one that is broken right now.

@dashea
Copy link
Contributor Author

dashea commented Oct 14, 2015

I think we should do this consistently in all places, not just a single one that is broken right now.

Unless glade decides to expose the GtkResponseType values, I don't think it will help. The iso file chooser is the only subclass of GtkDialog that anaconda uses, and for normal GtkDialogs there is no special meaning attached to any of the responses. The response IDs are always something we'll have to hardcode in glade and match in python, and I don't feel like having a "Yes" button return -8 instead of 1 is any better, especially since I had to grep through some header files to figure out that GTK_RESPONSE_YES is -8.

@vpodzime
Copy link
Contributor

Oh, in that case I'm definitely for using our own magic numbers we have at least some control of. Thanks for the extra info.

@jkonecny12
Copy link
Member

What about using Enum on our side for this. I known it won't be usable in glade file but we can use it on our side. It will be easier to read the code though.

@dashea
Copy link
Contributor Author

dashea commented Oct 16, 2015

What about using Enum on our side for this. I known it won't be usable in glade file but we can use it on our side. It will be easier to read the code though.

I started looking at doing this, and we stray from the Gtk stock buttons pretty quickly. Would it be more clear for the network device "Add" button to return Gtk.ResponseType.OK, or APPLY, or should it stay a custom response type? I don't know, so I'll let someone else try to figure out the answer to that.

@dashea
Copy link
Contributor Author

dashea commented Oct 16, 2015

Pushed.

@dashea dashea closed this Oct 16, 2015
@dashea dashea deleted the iso-chooser-response-type branch February 11, 2016 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants