+2005-06-19 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * cut-n-paste/recent-files/egg-recent-view-gtk.c:
+ (egg_recent_view_gtk_finalize):
+
+ Fix memory leak
+
+ * cut-n-paste/toolbar-editor/Makefile.am:
+
+ Fix location of cursor icon.
+
+ * pdf/ev-poppler.cc:
+ * shell/ev-page-action.c: (build_new_tree_cb), (match_selected_cb),
+ (display_completion_text), (match_completion):
+ * shell/ev-sidebar-links.c: (ev_sidebar_links_dispose),
+ (selection_changed_callback), (create_loading_model),
+ (print_section_cb), (links_page_num_func),
+ (update_page_callback_foreach):
+ * shell/ev-window.c: (ev_window_dispose):
+
+ Small memory fixes. Links model now store objects instead
+ of pointers to improve memory management.
+
2005-06-19 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* shell/ev-window.c: (zoom_control_changed_cb):
g_object_unref (view->client);
g_object_unref (view->tooltips);
+
+ egg_recent_view_gtk_clear (view);
}
static void
libtoolbareditor_la_CPPFLAGS = \
-I$(top_builddir)/lib/egg \
- -DCURSOR_DIR=\"$(pkgdatadir)/art\" \
$(AM_CPPFLAGS)
libtoolbareditor_la_CFLAGS = \
$(TOOLBAR_EDITOR_CFLAGS) \
+ -DCURSOR_DIR=\"$(pkgdatadir)\" \
$(AM_CFLAGS)
BUILT_SOURCES = \
if (iter != NULL) {
model = (GtkTreeModel *) gtk_tree_store_new (EV_DOCUMENT_LINKS_COLUMN_NUM_COLUMNS,
G_TYPE_STRING,
- G_TYPE_POINTER,
+ G_TYPE_OBJECT,
G_TYPE_BOOLEAN);
build_tree (pdf_document, model, NULL, iter);
poppler_index_iter_free (iter);
-1);
}
+ if (link)
+ g_object_unref (link);
+
return FALSE;
}
g_signal_emit (proxy, widget_signals[WIDGET_ACTIVATE_LINK], 0, link);
+ if (link)
+ g_object_unref (link);
+
gtk_tree_iter_free (iter);
return TRUE;
-1);
g_object_set (renderer, "text", ev_link_get_title (link), NULL);
+
+ if (link)
+ g_object_unref (link);
gtk_tree_iter_free (iter);
}
if (link) {
text = ev_link_get_title (link);
+ g_object_unref (link);
}
gtk_tree_iter_free (iter);
sidebar->priv->job = NULL;
}
+ if (sidebar->priv->model) {
+ g_object_unref (sidebar->priv->model);
+ sidebar->priv->model = NULL;
+ }
+
if (sidebar->priv->document) {
g_object_unref (sidebar->priv->document);
sidebar->priv->document = NULL;
ev_page_cache_set_link (ev_sidebar_links->priv->page_cache, link);
g_signal_handler_unblock (ev_sidebar_links->priv->page_cache,
ev_sidebar_links->priv->page_changed_id);
+
+ g_object_unref (link);
}
}
/* Creates a fake model to indicate that we're loading */
retval = (GtkTreeModel *)gtk_list_store_new (EV_DOCUMENT_LINKS_COLUMN_NUM_COLUMNS,
G_TYPE_STRING,
- G_TYPE_POINTER,
+ G_TYPE_OBJECT,
G_TYPE_BOOLEAN);
gtk_list_store_append (GTK_LIST_STORE (retval), &iter);
-1);
first_page = ev_link_get_page (link) + 1;
+ if (link)
+ g_object_unref (link);
+
if (gtk_tree_model_iter_next (model, &iter)) {
gtk_tree_model_get (model, &iter,
EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
-1);
last_page = ev_link_get_page (link);
+
+ if (link)
+ g_object_unref (link);
} else {
last_page = -1;
}
"visible", FALSE,
NULL);
}
+
+ if (link)
+ g_object_unref (link);
}
/* Public Functions */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sidebar_links->priv->tree_view));
gtk_tree_selection_select_path (selection, path);
-
+
+ g_object_unref (link);
return TRUE;
}
}
+
+ if (link)
+ g_object_unref (link);
return FALSE;
}
priv->recent_model = NULL;
}
+ if (priv->recent_view) {
+ g_object_unref (priv->recent_view);
+ priv->recent_view = NULL;
+ }
+
+
if (priv->ui_manager) {
g_object_unref (priv->ui_manager);
priv->ui_manager = NULL;