diff options
author | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2007-08-11 10:52:07 +0000 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2007-08-11 10:52:07 +0000 |
commit | 695200df13cc790fa66fb1dd4827fdb0ee40ff9b (patch) | |
tree | c82f035a5f4e4b50f2c63c716ad3d45ba9f9d08e | |
parent | 3098b2d2470618b02ab35ab713f4ca2c26faa820 (diff) | |
download | pidgin-soc.2007.finchfeat.tar.gz |
Fix a memory leak.soc.2007.finchfeat
Fix a compile warning.
Make sure there's no new API nor nothing.
-rw-r--r-- | finch/gntsound.c | 6 | ||||
-rw-r--r-- | finch/gntsound.h | 50 | ||||
-rw-r--r-- | finch/libgnt/gntbindable.c | 3 |
3 files changed, 13 insertions, 46 deletions
diff --git a/finch/gntsound.c b/finch/gntsound.c index 2bc287f679..86d184bf42 100644 --- a/finch/gntsound.c +++ b/finch/gntsound.c @@ -281,7 +281,7 @@ account_signon_cb(PurpleConnection *gc, gpointer data) mute_login_sounds_timeout = purple_timeout_add_seconds(10, unmute_login_sounds_cb, NULL); } -void * +static void * finch_sound_get_handle() { static int handle; @@ -619,7 +619,7 @@ finch_sound_set_active_profile(const char *name) purple_prefs_set_string(FINCH_PREFS_ROOT "/sound/actprofile", name); } -gboolean +static gboolean finch_sound_profile_exists(const char *name) { gchar * tmp; @@ -897,6 +897,7 @@ finch_sounds_show_all(void) itr = list = finch_sound_get_profiles(); for (; itr; itr = itr->next) { gnt_tree_add_row_after(GNT_TREE(tree), itr->data, gnt_tree_create_row(GNT_TREE(tree), itr->data), NULL, NULL); + g_free(itr->data); } g_list_free(list); @@ -1036,7 +1037,6 @@ finch_sounds_show_all(void) load_pref_window(finch_sound_get_active_profile()); gnt_widget_show(win); - } static PurpleSoundUiOps sound_ui_ops = diff --git a/finch/gntsound.h b/finch/gntsound.h index 0b4eab3bf7..688d2ad47b 100644 --- a/finch/gntsound.h +++ b/finch/gntsound.h @@ -28,62 +28,37 @@ #include "sound.h" /**********************************************************************/ -/** @name GNT Sound API */ +/** @name GNT Sound API */ /**********************************************************************/ /*@{*/ /** -* Get the prefs option for an event. -* -* @param event The event. -* @return The option. -*/ -const char *finch_sound_get_event_option(PurpleSoundEventID event); - -/** -* Get the label for an event. -* -* @param event The event. -* @return The label. -*/ -const char *finch_sound_get_event_label(PurpleSoundEventID event); - -/* * Get the name of the active sound profile. * - * @return the name + * @return The name of the profile */ const char *finch_sound_get_active_profile(void); /** * Set the active profile. If the profile doesn't exist, nothing is changed. * - * + * @param name The name of the profile */ void finch_sound_set_active_profile(const char *name); /** - * Returns whether a profile exists or not. - * - * @parame name The name of the profile to check for - * return Existance value - * - */ -gboolean finch_sound_profile_exists(const char *name); - - -/** * Get a list of available sound profiles. * - * @return A list of strings denoting sound profile names. Free this list when you're done with it. + * @return A list of strings denoting sound profile names. + * Caller must free the list (but not the data). */ GList *finch_sound_get_profiles(void); /** -* Gets GNT sound UI ops. -* -* @return The UI operations structure. -*/ + * Gets GNT sound UI ops. + * + * @return The UI operations structure. + */ PurpleSoundUiOps *finch_sound_get_ui_ops(void); /** @@ -91,13 +66,6 @@ PurpleSoundUiOps *finch_sound_get_ui_ops(void); */ void finch_sounds_show_all(void); -/** -* Get the handle for the GNT sound system. -* -* @return The handle to the sound system -*/ -void *finch_sound_get_handle(void); - /*@}*/ #endif diff --git a/finch/libgnt/gntbindable.c b/finch/libgnt/gntbindable.c index 50e39ca0b6..ba2ca2506a 100644 --- a/finch/libgnt/gntbindable.c +++ b/finch/libgnt/gntbindable.c @@ -111,7 +111,7 @@ gnt_bindable_rebinding_activate(GntBindable *data, gpointer bindable) GntWidget *label; GntWidget *bind_button, *cancel_button; GntWidget *button_box; - GList *current_row_data, *itr; + GList *current_row_data; char *tmp; GntWidget *win = gnt_window_new(); GntTree *tree = GNT_TREE(data); @@ -450,7 +450,6 @@ reset_binding_window(GntBindableClass *window, gpointer k) gboolean gnt_bindable_build_help_window(GntBindable *bindable) { - GntWidget *tree; GntBindableClass *klass = GNT_BINDABLE_GET_CLASS(bindable); char *title; |