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

Please add a Gtk.MessageDialog #10

Open
misterhsp opened this issue Nov 5, 2022 · 8 comments
Open

Please add a Gtk.MessageDialog #10

misterhsp opened this issue Nov 5, 2022 · 8 comments

Comments

@misterhsp
Copy link

misterhsp commented Nov 5, 2022

Please add a Gtk.MessageDialog to e.g. display an error or a hint. And close button.

Thanks ...

@misterhsp
Copy link
Author

I tried this, but the dialog does not appear. No error message.

    def error(self, error_msg):
        self.dialog = Gtk.MessageDialog(
             buttons = Gtk.ButtonsType.OK,
             modal = True,
             title = ("Error"),
             text = (error_msg),
             transient_for = self)
        self.dialog.connect('response', lambda d,i: d.destroy())
        self.dialog.show()

There seems to be something missing I think...

...

@Taiko2k
Copy link
Owner

Taiko2k commented Nov 12, 2022

In a quick test that code above does seem to work for me

@misterhsp
Copy link
Author

misterhsp commented Nov 12, 2022 via email

@misterhsp
Copy link
Author

misterhsp commented Nov 12, 2022 via email

@Taiko2k
Copy link
Owner

Taiko2k commented Nov 12, 2022

Just to double check, you did call the error() function at some point?

@misterhsp
Copy link
Author

misterhsp commented Nov 12, 2022 via email

@misterhsp
Copy link
Author

misterhsp commented Nov 12, 2022 via email

@misterhsp
Copy link
Author

Do you maybe already have an example gtk4 grid?

thanks

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

No branches or pull requests

2 participants