Fix naming of "user_data" arguments for better introspection

This commit is contained in:
Rico Tzschichholz 2012-11-16 21:23:47 +01:00
parent 395fbefd3c
commit 90952ac5c8
4 changed files with 9 additions and 9 deletions

View File

@ -696,13 +696,13 @@ handle_preference_update_int (GSettings *settings,
*/ */
void void
meta_prefs_add_listener (MetaPrefsChangedFunc func, meta_prefs_add_listener (MetaPrefsChangedFunc func,
gpointer data) gpointer user_data)
{ {
MetaPrefsListener *l; MetaPrefsListener *l;
l = g_new (MetaPrefsListener, 1); l = g_new (MetaPrefsListener, 1);
l->func = func; l->func = func;
l->data = data; l->data = user_data;
listeners = g_list_prepend (listeners, l); listeners = g_list_prepend (listeners, l);
} }
@ -713,7 +713,7 @@ meta_prefs_add_listener (MetaPrefsChangedFunc func,
*/ */
void void
meta_prefs_remove_listener (MetaPrefsChangedFunc func, meta_prefs_remove_listener (MetaPrefsChangedFunc func,
gpointer data) gpointer user_data)
{ {
GList *tmp; GList *tmp;
@ -723,7 +723,7 @@ meta_prefs_remove_listener (MetaPrefsChangedFunc func,
MetaPrefsListener *l = tmp->data; MetaPrefsListener *l = tmp->data;
if (l->func == func && if (l->func == func &&
l->data == data) l->data == user_data)
{ {
g_free (l); g_free (l);
listeners = g_list_delete_link (listeners, tmp); listeners = g_list_delete_link (listeners, tmp);

View File

@ -87,7 +87,7 @@ typedef void (* MetaWindowMenuFunc) (MetaWindowMenu *menu,
guint32 timestamp, guint32 timestamp,
MetaMenuOp op, MetaMenuOp op,
int workspace, int workspace,
gpointer data); gpointer user_data);
/* when changing this enum, there are various switch statements /* when changing this enum, there are various switch statements
* you have to update * you have to update

View File

@ -71,12 +71,12 @@ typedef enum
} MetaPreference; } MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref, typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
gpointer data); gpointer user_data);
void meta_prefs_add_listener (MetaPrefsChangedFunc func, void meta_prefs_add_listener (MetaPrefsChangedFunc func,
gpointer data); gpointer user_data);
void meta_prefs_remove_listener (MetaPrefsChangedFunc func, void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
gpointer data); gpointer user_data);
void meta_prefs_init (void); void meta_prefs_init (void);

View File

@ -128,7 +128,7 @@ gboolean meta_window_is_ancestor_of_transient (MetaWindow *window,
MetaWindow *transient); MetaWindow *transient);
typedef gboolean (*MetaWindowForeachFunc) (MetaWindow *window, typedef gboolean (*MetaWindowForeachFunc) (MetaWindow *window,
void *data); void *user_data);
void meta_window_foreach_transient (MetaWindow *window, void meta_window_foreach_transient (MetaWindow *window,
MetaWindowForeachFunc func, MetaWindowForeachFunc func,