Current desktop detection / app access - take 2.

Michael Meeks michael at ximian.com
Fri May 28 11:28:07 EEST 2004


Hi William,

On Thu, 2004-05-27 at 15:46 -0400, William Jon McCann wrote:
> Does do_gtk_thing (or if you are after desktop integration 
> do_gnome_thing) involve using gnome_vfs, gtk_dialog, etc?

	Well; the VFS question, is trivial and also comes down to:

switch (desktop-fragment-vfs) [
	case GNOME_VFS:
		use_gnome_vfs();
		break;
	case KIO:
	default:
		use_kio();
		break;
}

	ie. very similar, very simple, _no_ bogus/spurious g_assert_not_reached
paranoia. No combinatorial explosion, no odd orders of complexity.

> Does this imply that you will be linking the application to the 
> libraries for every desktop under the sun?  Or will you have to do:

	OO.o uses shared libraries and a virtualisation / abstraction layer
anyhow: most large, portable ISV's applications will do the same - it's
a madness to suppose they 'already' use some recent versions of Gtk+  or
Qt as their exclusive cross-platform layer. So it comes down to:

bool do_gnome_thing()
{
	if (dlopen("libgnomething"))
		... use it ...
		return true;
	return false;
}

	And an ultimate fallback to some raw-X OO.o underneath it all.

	Of course - currently for desktops like 'rox' etc. you will ~always get
a plain-X setup, since there is no good way to detect what toolkit you
want integrated with; and the hacks for using gtk+ are gnome
specific :-)

	So - claiming that no detection at all is in some way more desktop
neutral is just bogus :-) Good of you to cut/paste Mark's unhelpful
switch statement with some conditional compiles.

> This seems pretty difficult to maintain.  How will this discover new 
> desktops?  Handle package addition / removal?

	You can write a program that will automatically discover new desktops
and standards and then integrate perfectly with them ? without having to
write code - wow ;-) I'd like to use that.

	Regards,

		Michael.

-- 
 michael at ximian.com  <><, Pseudo Engineer, itinerant idiot






More information about the xdg mailing list