diff options
author | Christian Persch <chp@cvs.gnome.org> | 2003-08-09 01:34:57 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-08-09 01:34:57 +0800 |
commit | f8c58a77e108232aa48688eee250bed33f359b22 (patch) | |
tree | a90af842bfc9765cefe2b15e866fb15e77b8519c /src/bookmarks/ephy-topics-selector.c | |
parent | 6dc137cb066c3eeb93fb69816cb55dcbc703b96d (diff) | |
download | gsoc2013-epiphany-f8c58a77e108232aa48688eee250bed33f359b22.tar gsoc2013-epiphany-f8c58a77e108232aa48688eee250bed33f359b22.tar.gz gsoc2013-epiphany-f8c58a77e108232aa48688eee250bed33f359b22.tar.bz2 gsoc2013-epiphany-f8c58a77e108232aa48688eee250bed33f359b22.tar.lz gsoc2013-epiphany-f8c58a77e108232aa48688eee250bed33f359b22.tar.xz gsoc2013-epiphany-f8c58a77e108232aa48688eee250bed33f359b22.tar.zst gsoc2013-epiphany-f8c58a77e108232aa48688eee250bed33f359b22.zip |
Fix mem leak.
2003-08-08 Christian Persch <chp@cvs.gnome.org>
* src/bookmarks/ephy-topics-selector: (topic_toggled), (topic_clicked),
(topic_key_pressed):
Fix mem leak.
Diffstat (limited to 'src/bookmarks/ephy-topics-selector.c')
-rw-r--r-- | src/bookmarks/ephy-topics-selector.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/bookmarks/ephy-topics-selector.c b/src/bookmarks/ephy-topics-selector.c index 9a2a72df5..9d8447731 100644 --- a/src/bookmarks/ephy-topics-selector.c +++ b/src/bookmarks/ephy-topics-selector.c @@ -239,12 +239,10 @@ fill_model (EphyTopicsSelector *editor) } static void -topic_toggled (GtkCellRendererToggle *cell, - char *path_str, +topic_toggled (GtkTreePath *path, EphyTopicsSelector *selector) { GtkTreeModel *model = selector->priv->model; - GtkTreePath *path = gtk_tree_path_new_from_string (path_str); GtkTreeIter iter; gboolean has_topic; @@ -318,9 +316,8 @@ topic_clicked (GtkTreeView *tree_view, &path, NULL, NULL, NULL)) { - gchar *path_str = gtk_tree_path_to_string (path); - topic_toggled (NULL, path_str, selector); - g_free(path_str); + topic_toggled (path, selector); + gtk_tree_path_free (path); } @@ -334,8 +331,7 @@ topic_key_pressed (GtkTreeView *tree_view, { GtkTreeSelection *sel = NULL; GtkTreeIter iter; - GtkTreePath *path = NULL; - gchar *path_str; + GtkTreePath *path; switch (event->keyval) { @@ -347,9 +343,9 @@ topic_key_pressed (GtkTreeView *tree_view, if (gtk_tree_selection_get_selected (sel, NULL, &iter)) { path = gtk_tree_model_get_path (selector->priv->model, &iter); - path_str = gtk_tree_path_to_string (path); - topic_toggled (NULL, path_str, selector); - g_free(path_str); + + topic_toggled (path, selector); + gtk_tree_path_free (path); } return TRUE; |