[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-devel
Subject: [RFC] Add g_set_application_launcher() to GLib
From: Emmanuele Bassi <ebassi () gmail ! com>
Date: 2005-08-26 13:30:34
Message-ID: 1125063034.7798.19.camel () localhost ! localdomain
[Download RAW message or body]
Hi all.
In oder to decrease API complexity in the RecentManager code, I've
submitted bug #314428 [1], which adds these two new functions:
G_CONST_RETURN gchar *
g_get_application_launcher (void);
void
g_set_application_launcher (const gchar *application_launcher);
This pair of functions will store and retrieve the desktop entry file
name, in order to be indirectely accessed just like the
g_set_application_name() and g_get_application_name() pair.
Rationale: the RecentManager storage specification needs the name and
the command line of the application that is registering a new recently
used resource into the list; since we already store this data inside the
desktop entry file for an application, it should be possible to retrieve
that meta-data from that file, or to directely store the application's
desktop entry filename inside the storage format, like this:
<applications>
<application launcher="gedit.desktop"
timestamp="..."
count="..." />
</applications>
These new functions would allow the RecentManager just to ask a URI of a
resource, instead of a URI *and* a structure:
/* current situation */
struct _EggRecentData
{
...
const gchar *app_name;
const gchar *app_exec;
};
gboolean
egg_recent_manager_add_item (EggRecentManager *manager,
const gchar *uri,
EggRecentData *data,
GError **error);
/* with g_set/get_application_launcher() */
gboolean
egg_recent_manager_add_item (EggRecentManager *manager,
const gchar *uri,
GError **error);
{For those wondering: the other meta-data of the recently used resources
would be set using a egg_recent_manager_add_item_full() function, but
since the other meta-data is not mandatory and can be retrieved from the
resource itself, a simplier API should be enough}
Any comments/thoughts/flames?
Kind regards,
Emmanuele.
[1] http://bugzilla.gnome.org/show_bug.cgi?id=314428
--
Emmanuele Bassi, ebassi@gmail.com |
Log: http://log.emmanuelebassi.net |
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic