update to match theme callback signature; invoke_monitors looks icky,
2007-07-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (do_close), (do_unlink), (invoke_monitors), (theme_changed_callback), (vfs_module_init): update to match theme callback signature; invoke_monitors looks icky, though (the uri arg was ignored) svn path=/trunk/; revision=7916
This commit is contained in:
parent
63f30c42f4
commit
c80e878eb2
2 changed files with 56 additions and 40 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-07-28 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* theme-method.c: (do_close), (do_unlink), (invoke_monitors),
|
||||||
|
(theme_changed_callback), (vfs_module_init): update to match theme
|
||||||
|
callback signature; invoke_monitors looks icky, though (the uri arg
|
||||||
|
was ignored)
|
||||||
|
|
||||||
2007-07-09 Rodrigo Moya <rodrigo@gnome-db.org>
|
2007-07-09 Rodrigo Moya <rodrigo@gnome-db.org>
|
||||||
|
|
||||||
* Makefile.am: link to $XCURSOR_LIBS, not GNOMECC_CAPPLETS_LIBS.
|
* Makefile.am: link to $XCURSOR_LIBS, not GNOMECC_CAPPLETS_LIBS.
|
||||||
|
|
|
@ -37,8 +37,7 @@ void gnome_vfs_monitor_callback (GnomeVFSMethodHandle *method_handle,
|
||||||
GnomeVFSURI *info_uri,
|
GnomeVFSURI *info_uri,
|
||||||
GnomeVFSMonitorEventType event_type);
|
GnomeVFSMonitorEventType event_type);
|
||||||
|
|
||||||
static void invoke_monitors(gchar *uri, gpointer data);
|
static void invoke_monitors(void);
|
||||||
|
|
||||||
|
|
||||||
/* cc cut-paste */
|
/* cc cut-paste */
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -396,7 +395,7 @@ do_close(GnomeVFSMethod *method,
|
||||||
if (path && len > 8 && !strcmp (path + len - 8, ".tar.bz2"))
|
if (path && len > 8 && !strcmp (path + len - 8, ".tar.bz2"))
|
||||||
transfer_done_tarbz2_idle_cb (path);
|
transfer_done_tarbz2_idle_cb (path);
|
||||||
|
|
||||||
invoke_monitors ("themes:///", NULL);
|
invoke_monitors ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -543,7 +542,7 @@ do_unlink(GnomeVFSMethod *method,
|
||||||
theme = theme_meta_info_find (uri);
|
theme = theme_meta_info_find (uri);
|
||||||
if (theme) {
|
if (theme) {
|
||||||
result = gnome_vfs_unlink (theme->path);
|
result = gnome_vfs_unlink (theme->path);
|
||||||
invoke_monitors (theme->path, NULL);
|
invoke_monitors ();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -560,7 +559,7 @@ G_LOCK_DEFINE_STATIC(monitor_list);
|
||||||
static GList *monitor_list = NULL;
|
static GList *monitor_list = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
invoke_monitors(gchar *uri, gpointer data)
|
invoke_monitors()
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
|
@ -574,6 +573,16 @@ invoke_monitors(gchar *uri, gpointer data)
|
||||||
G_UNLOCK(monitor_list);
|
G_UNLOCK(monitor_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
theme_changed_callback(GnomeThemeType type,
|
||||||
|
gpointer theme,
|
||||||
|
GnomeThemeChangeType change_type,
|
||||||
|
GnomeThemeElement element,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
invoke_monitors();
|
||||||
|
}
|
||||||
|
|
||||||
static GnomeVFSResult
|
static GnomeVFSResult
|
||||||
do_monitor_add(GnomeVFSMethod *method,
|
do_monitor_add(GnomeVFSMethod *method,
|
||||||
GnomeVFSMethodHandle **method_handle,
|
GnomeVFSMethodHandle **method_handle,
|
||||||
|
@ -671,7 +680,7 @@ vfs_module_init (const char *method_name, const char *args)
|
||||||
gnome_theme_init (NULL);
|
gnome_theme_init (NULL);
|
||||||
if (!strcmp (method_name, "themes"))
|
if (!strcmp (method_name, "themes"))
|
||||||
{
|
{
|
||||||
gnome_theme_info_register_theme_change ((GFunc)invoke_monitors, NULL);
|
gnome_theme_info_register_theme_change (theme_changed_callback, NULL);
|
||||||
return &method;
|
return &method;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue