Open MadameMalady opened 1 year ago
Just run that code when you want to show the about window, plus add the line dialog.set_visible(True)
. (Ive updated to code snippet in the tutorial with this)
Okay, maybe I'm being thick, but this is what I did (see attached) : and it didn't work, also getting errors abt an unprintable character x.x
I'm still learning python and app development, sorry if this is obvious I want Show_About to pull up the libadwaita about window
Oh right, so the 2nd adw code block is supposed to replace the first. That might not have been clear. So remove everything that starts with self.about
.
Btw one being assigned to self.about
and the other dialog
, the difference doesn't really matter since that object isn't going to be used again, I just should have been more consistent.
As for that invalid character, not sure why that's there, it seems to be a special kind of space, so maybe delete and retype the spaces in lines where you get that error.
I removed everything that started with self.about, and re-did those spaces manually, I now get a different issue abt mismatched indentation:
It seems like something has gone weird with a copy and paste you did. I'd suggest erasing that whole code block and writing it out manually. You can omit the informational dialog.set_
* lines for the purposes of testing.
I re-wrote the lines
dialog = Adw.AboutWindow(transient_for=app.get_active_window())
dialog.set_visable(True)
into the definition for Show_About, and I now get:
AttributeError: 'gi.repository.Adw' object has no attribute 'AboutWindow'
Is it possible that some syntax was updated? I think I'll stick with the gdk about window for now, the adwaita one is pretty but I'm struggling a lot to get it working, thanks for trying to help, and for writing these tutorials at all, there's not a lot of resources for ppl trying to learn to make gnome apps yet.
in the 'Better About Window' tab, you showcase some code for an adwaita AboutWindow, but (unless I missed it, and I checked code examples) I can't find a complete usage example of that, and the documentation isn't too much help since it's all for C....
Would you be willing to show an Adw.AboutWindow example that shows where the: dialog = Adw.AboutWindow(transient_for=app.get_active_window())
and following line(s) are defined?
I was able to make an about window with the section for Gtk.AboutDialouge, but I don't understand the small 'dialog' snippets for the Adw.AboutWindow