Re: [glade--]Re: Gnomemm-2 support in glade--
Christof Petig <[email protected]>
| Newsgroups | gmane.comp.gnome.glademm |
|---|---|
| Organization | Adolf Petig GmbH & Co. KG |
| Message-ID | <[email protected]> |
Hi Peter,
thank you for your continued work.
But I'm not happy with one of the choices you made:
> Pkg_Version gtk_version;
> + Pkg_Version gtk2_version;
> Pkg_Version gtkmm_version;
> + Pkg_Version gtkmm2_version;
No, I'm not glad with introducing two variables. And another variable
which selects which one of them is actually significant.
I really prefer the way I did: look for exactly one version of gnome,
depending on Configuration.gnome2 and use only that.
Perhaps I should introduce a gnome1/2() method which selects the
appropriate default values [from the preprocessor defines]. (Note: I did
not object to two preprocessor symbols, that's right).
[done]
Can you test my solution and tell me where any problems lie?
> + int pos;
> + if (GNOME2) {
> + while ((pos = placement.find("BONOBO_DOCK_")) != std::string::npos) {
> + placement.replace(pos, strlen("BONOBO_DOCK_"), "Gnome::Bonobo::DOCK_");
> + }
> + }
We should unify that with the method Gtkmm2Namespace uses (perhaps
integrate it in the same Function, there's not a high probability of
collision with non gnome programs if you replace BONOBO_DOCK
unconditionally).
> + // Convert to Gnome 2;
> + while ((pos = options.find("BONOBO_DOCK_ITEM_BEH_")) != std::string::npos) {
> + options.replace(pos, strlen("BONOBO_DOCK_ITEM_BEH_"),
> + "Gnome::Bonobo::DOCK_ITEM_BEH_");
also.
> + if (pt == "GNOME_PREFERENCES_USER")
> + return "Gnome::UI::PREFERENCES_USER";
> + if (pt == "GNOME_PREFERENCES_ALWAYS")
> + return "Gnome::UI::PREFERENCES_ALWAYS";
> + return "Gnome::UI::PREFERENCES_NEVER";
dito.
Yours
Christof