Open Hjdskes opened 11 years ago
It's something I certainly want to do at some point - I've got quite a backlog of work to finish up here before the next release (gtk3 support is not one of them). Free time is an issue lately. Also, I'm a full time Python developer now, and have really grown to love the language - I think the future of Nitrogen is a Python rewrite - it just feels more natural. The tricky part about that is getting the X interaction correct - because it's in C++, we've always been able to just drop to using plain GTK and Xlib where needed. I have a bunch of bookmarks saved that I have to reacquaint myself with.
The biggest hurdle for me to port Nitrogen to GTK3 myself is the fact that Gdk::Colormap, Gdk::Pixmap and Gdk::GC have been deprecated. Some simple conversions (e.g. Gdk::Color::color.parse
to Gdk::Color:color.set
) I can do myself, but those major things I just don't have the knowledge for.
The two files that would need most editing, are SetBG.cc and Thumbview.cc. Other than those two, main.cc needs a single edit (the one I mentioned above, color.parse
-> color.set
) and NPrefsWindow.cc needs a single one (Gtk::Dialog(_("Preferences"), parent, true, false),
-> Gtk::Dialog(_("Preferences"), parent, true),
). The rest I don't know.
I honestly think that if you can find replacement for those deprecated functions (are they called that in C++?), it shouldn't have to be that much of an effort. I'm not saying that I think you have enough time, though. By all means, it's your application and I'm not trying to push you to do anything.
Perhaps, if you could tell me which replacement I would have to use, I can come up with something. I'm certainly willing to give it a try!
Cool, thanks for the research. Have you looked at the coming refactor for 1.7? I made a PR to make it more visible as I continue to work on it - nearly done. It's #25 - and moves a bunch of stuff around, mostly to do with how SetBG.cc is laid out.
I am not surprised to learn Gdk::Colormap
and Gdk::GC
are deprecated, but very surprised to learn about Gdk::Pixmap
- that's a fundamental part of X that it wraps, and is really the basis for how we set things. Maybe it was replaced by a more generic Drawable
class? Or maybe something more Cairo related... I know my research into Python led me there, where they lean on Cairo to provide access to a drawable/pixmap.
I had not looked into the pull request, no. It might make it a little easier, but in order to be sure on that I'd have to incorporate the changes first and then see.
I'm currently working on something else, but seeing as I'm kinda stuck there (:P) I might just drop it and start looking into this full-time.
how it's going? :3
i've recently ported arandr to gtk3, and i would like to help with nitrogen as part of my goodbye-gtk2 initiative: https://github.com/themix-project/oomox-gtk-theme/issues/45
@actionless I have something going in a project I no longer maintain. It might provide you a good start: https://github.com/Hjdskes/phosphorus
thanks for info! let's wait for author's reply; since i think it would be better to have it upstream instead of forking
Hi all, I'm certainly open to Nitrogen getting to gtk3 (finally!) @Hjdskes did some great work leading the charge with phosphorus, if stuff can be folded back in here that would be great. I'm not sure I have the capacity to lead that myself yet, so I'd be happy if someone else were to get it started.
i didn't had big experience with c++ yet but i hope while porting existing code / merging with another port i think it should be not so hard for me
i'll create a PR as soon as i'll have something
@Hjdskes is your fork still mergeable back or there are some incompatible changes?
Phosphorus is a from scratch project and written in C instead of Nitrogen's C++, so no, we can't fold anything back. However, you can copy ideas such as the plugin architecture.
motivation behind plugins is totally reasonable though i think both porting nitrogen to gtk3 and to pear plugins could be too much
@Hjdskes do you have sorta todo list of phosphorus as of its current archived state?
@Hjdskes do you have sorta todo list of phosphorus as of its current archived state?
Not really, sorry. Last I remember running it it was functional in that it opens a window and loads a directory of wallpapers. There are plugins for GNOME and pure X11 desktops (window managers). I don't think there is support for multimonitor setups, but I might be wrong.
I suggest compiling it and giving it a go, that should give you an impression of the state it's in :)
Phosphorus' issues list looks like a good roadmap of what was remaining.
Hello,
I'm just curious whether or not you are considering/thinking about porting Nitrogen to GTK3. I changed Nitrogen's depends from gtkmm2/gtk2 to gtkmm3/gtk3 and on a first quick look, it doesn't look like it will require lots of changes to the code. However, I'm only starting to get coding in C and C++ I'm completely unfamiliar with. I tried porting some myself but alas, I couldn't get far.
Could you share your views on this? Perhaps you could offer Nitrogen in GTK3 in a new branch on GitHub, or make it possible through some configure flags.
I look forward to your replies. Regards,
Unia