Re: Announce: gio merged
- From: Yevgen Muntyan <muntyan tamu edu>
- To: Alexander Larsson <alexl redhat com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Announce: gio merged
- Date: Wed, 28 Nov 2007 17:15:25 -0600
Alexander Larsson wrote:
On Tue, 2007-11-27 at 10:11 -0600, Yevgen Muntyan wrote:
Does GAppInfo make sense on Windows and Mac? It doesn't
build on win32, and it's not quite clear whether the fix is
to provide stubs or to remove the code completely.
What is it for, are normal applications going to use it? Perhaps
it's an X-specific (that is, specific to platforms which use freedesktop.org
specs) functionality needed by Nautilus and friends,
while on win32 and mac all that's needed is some
g_open_file_somehow()? Perhaps applications do need
some information about "what application handles this
file type or this file", but then probably some special API
should be provided exactly for that, while a xdg desktop
wrapper should be left for X, as X-specific API.
I haven't built of Win32 in a while, so I can't say anything about the
current state. However, GAppInfo is clearly not X-specific in any way,
as its an abstract interface. There is even an Win32 implementation
gwin32appinfo.c (that at least used to work last time I tried it).
Well, here are the functions from the header:
This is not exactly unix-specific, but is indeed very unixish.
const char *g_app_info_get_id
const char *g_app_info_get_name
const char *g_app_info_get_description
Desktop files here, and stubs on win32.
const char *g_app_info_get_executable
GIcon * g_app_info_get_icon
Desktop file too.
This one, isn't it from desktop file, when you have "foobar %u" line?
const char *desktop_env);
This one - desktop file, show in the menus or not, right?
const char *content_type,
GAppInfo *g_app_info_get_default_for_type (const char *content_type,
freedesktop.org thing. I guess Internet Explorer will tell about its
ideas of how to handle different content types, but most interesting
ones are in f.d.o. own database, will glib have its own mime type
database on windows? (And on mac)
const char *extension,
const char *content_type,
Same thing - applications do or do not support certain mime types,
but only on xdg you can know that.
Then, GAppLaunchContext is X-specific - display and startup notification.
All in all, it *looks* like a glib wrapper around xdg desktop
files mechanics, which is X-specific. It surely can all be implemented
on all platforms (partly with stubs), but is it needed?
Win32 is different (and dumber); Mac has yet a different set of notions
about applications, starting applications, and opening files (especially
this one, how it chooses applications for files is total mystery). Why
have rich f.d.o. API on platforms where it doesn't make sense? After
all, it's glib, not *gnome*-vfs. This stuff could do well in Gtk maybe.
Or maybe I am wrong, don't know.
] [Thread Prev