aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chp@cvs.gnome.org>2003-08-09 01:34:57 +0800
committerChristian Persch <chpe@src.gnome.org>2003-08-09 01:34:57 +0800
commitf8c58a77e108232aa48688eee250bed33f359b22 (patch)
treea90af842bfc9765cefe2b15e866fb15e77b8519c
parent6dc137cb066c3eeb93fb69816cb55dcbc703b96d (diff)
downloadgsoc2013-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.
-rw-r--r--ChangeLog7
-rw-r--r--src/bookmarks/ephy-topics-selector.c18
2 files changed, 14 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ddf3f4fb..a139c4fae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-08-08 Christian Persch <chp@cvs.gnome.org>
+ * src/bookmarks/ephy-topics-selector: (topic_toggled), (topic_clicked),
+ (topic_key_pressed):
+
+ Fix mem leak.
+
+2003-08-08 Christian Persch <chp@cvs.gnome.org>
+
* lib/widgets/ephy-node-view.c: (cell_renderer_edited):
Fix mem leak.
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;