diff options
author | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-04-19 03:31:26 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-04-19 03:31:26 +0000 |
commit | 4e36d31d8871ae0288bd13387b604dc209846bf8 (patch) | |
tree | be2435edbd71ac2ca7b883d63920cac774b91bb7 /nautilus-widgets | |
parent | efe511715719298649f6aa5fdb2b630158e48500 (diff) | |
download | nautilus-4e36d31d8871ae0288bd13387b604dc209846bf8.tar.gz |
Simplify be removing all arguments from callbacks save for the user data.
* nautilus-widgets/nautilus-preferences.c,
nautilus-widgets/nautilus-preferences.h:
Simplify be removing all arguments from callbacks save for the
user data.
(nautilus_preferences_add_string_callback): Rename to
nautilus_preferences_add_callback since string preferences are the
default.
* libnautilus-extensions/nautilus-global-preferences.c:
(user_level_changed_callback): Simplify a bit. Update for new
simple preference callbacks.
libnautilus-extensions/nautilus-icon-container.c,
libnautilus-extensions/nautilus-icon-factory.c,
libnautilus-extensions/nautilus-list.c: Update for new simple
preference callbacks.
* src/file-manager/fm-directory-view.c,
src/file-manager/fm-icon-view.c: Update for new simple
preference callbacks.
src/file-manager/fm-icon-text-window.c: Update for new
simple preference callbacks and removed unecessary usage of
icon_view_text_attribute_changed_callback. Use
synch_menus_with_preference directly instead.
Diffstat (limited to 'nautilus-widgets')
-rw-r--r-- | nautilus-widgets/nautilus-preferences.c | 12 | ||||
-rw-r--r-- | nautilus-widgets/nautilus-preferences.h | 21 |
2 files changed, 14 insertions, 19 deletions
diff --git a/nautilus-widgets/nautilus-preferences.c b/nautilus-widgets/nautilus-preferences.c index 9054c54a2..1e7c35c42 100644 --- a/nautilus-widgets/nautilus-preferences.c +++ b/nautilus-widgets/nautilus-preferences.c @@ -450,9 +450,7 @@ pref_callback_info_invoke_func (gpointer data, g_assert (preference_name != NULL); - (* pref_callback_info->callback_proc) (preferences, - preference_name, - pref_callback_info->callback_data); + (* pref_callback_info->callback_proc) (pref_callback_info->callback_data); g_free (preference_name); } @@ -839,10 +837,10 @@ nautilus_preferences_add_enum_callback (NautilusPreferences *preferences, } gboolean -nautilus_preferences_add_string_callback (NautilusPreferences *preferences, - const char *name, - NautilusPreferencesCallback callback_proc, - gpointer callback_data) +nautilus_preferences_add_callback (NautilusPreferences *preferences, + const char *name, + NautilusPreferencesCallback callback_proc, + gpointer callback_data) { PrefHashNode *pref_hash_node; diff --git a/nautilus-widgets/nautilus-preferences.h b/nautilus-widgets/nautilus-preferences.h index b82f9a371..c0de924ac 100644 --- a/nautilus-widgets/nautilus-preferences.h +++ b/nautilus-widgets/nautilus-preferences.h @@ -52,9 +52,7 @@ struct NautilusPreferences * A callback which you can register to to be notified when a particular * preference changes. */ -typedef void (*NautilusPreferencesCallback) (NautilusPreferences *preferences, - const char *name, - gpointer callback_data); +typedef void (*NautilusPreferencesCallback) (gpointer callback_data); struct NautilusPreferencesClass { @@ -63,7 +61,7 @@ struct NautilusPreferencesClass GtkType nautilus_preferences_get_type (void); GtkObject * nautilus_preferences_new (const char *domain); -NautilusPreference * nautilus_preferences_get_preference (const NautilusPreferences *preferences, +NautilusPreference * nautilus_preferences_get_preference (const NautilusPreferences *preferences, const char *name); void nautilus_preferences_set_info (NautilusPreferences *preferences, const char *name, @@ -83,7 +81,7 @@ gboolean nautilus_preferences_add_boolean_callback (NautilusPrefer const char *name, NautilusPreferencesCallback callback, gpointer callback_data); -gboolean nautilus_preferences_add_string_callback (NautilusPreferences *preferences, +gboolean nautilus_preferences_add_callback (NautilusPreferences *preferences, const char *name, NautilusPreferencesCallback callback, gpointer callback_data); @@ -94,24 +92,23 @@ gboolean nautilus_preferences_remove_callback (NautilusPrefer void nautilus_preferences_set_boolean (NautilusPreferences *preferences, const char *name, gboolean value); -gboolean nautilus_preferences_get_boolean (const NautilusPreferences *preferences, +gboolean nautilus_preferences_get_boolean (const NautilusPreferences *preferences, const char *name, - gboolean default_value); + gboolean default_value); void nautilus_preferences_set_enum (NautilusPreferences *preferences, const char *name, int value); -int nautilus_preferences_get_enum (const NautilusPreferences *preferences, +int nautilus_preferences_get_enum (const NautilusPreferences *preferences, const char *name, - int default_value); + int default_value); void nautilus_preferences_set (NautilusPreferences *preferences, const char *name, const char *value); -char * nautilus_preferences_get (const NautilusPreferences *preferences, +char * nautilus_preferences_get (const NautilusPreferences *preferences, const char *name, - const gchar *default_value); + const gchar *default_value); NautilusPreferences *nautilus_preferences_get_global_preferences (void); - BEGIN_GNOME_DECLS #endif /* NAUTILUS_PREFERENCES_H */ |