+2005-06-18 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * shell/ev-page-action.c: (match_selected_cb),
+ (display_completion_text), (match_completion), (update_model):
+ * shell/ev-sidebar-links.c: (ev_sidebar_links_dispose),
+ (expand_open_links):
+ * shell/ev-sidebar.c: (ev_sidebar_destroy),
+ (ev_sidebar_menu_item_activate_cb), (ev_sidebar_add_page),
+ (ev_sidebar_set_document):
+ * shell/ev-window.c: (ev_window_xfer_job_cb),
+ (sidebar_widget_model_set), (sidebar_page_main_widget_update_cb):
+
+ Fixed lot's of memory leaks, for example, memory leak on reload,
+ described in bug 307793.
+
2005-06-18 Marco Pesenti Gritti <mpg@redhat.com>
* pdf/ev-poppler.cc:
-1);
g_signal_emit (proxy, widget_signals[WIDGET_ACTIVATE_LINK], 0, link);
+
+ gtk_tree_iter_free (iter);
return TRUE;
}
-1);
g_object_set (renderer, "text", ev_link_get_title (link), NULL);
+
+ gtk_tree_iter_free (iter);
}
static gboolean
-1);
- if (link)
+ if (link) {
text = ev_link_get_title (link);
+ }
+
+ gtk_tree_iter_free (iter);
if (text && key ) {
gchar *normalized_text;
(GtkCellLayoutDataFunc) display_completion_text,
proxy, NULL);
gtk_entry_set_completion (GTK_ENTRY (proxy->entry), completion);
+
+ g_object_unref (model);
}
}
{
EvSidebarLinks *sidebar = EV_SIDEBAR_LINKS (object);
- if (sidebar->priv->document) {
- g_object_unref (sidebar->priv->document);
- sidebar->priv->document = NULL;
- sidebar->priv->page_cache = NULL;
- }
-
if (sidebar->priv->job) {
g_signal_handlers_disconnect_by_func (sidebar->priv->job,
job_finished_callback, sidebar);
sidebar->priv->job = NULL;
}
+ if (sidebar->priv->document) {
+ g_object_unref (sidebar->priv->document);
+ sidebar->priv->document = NULL;
+ sidebar->priv->page_cache = NULL;
+ }
+
+
G_OBJECT_CLASS (ev_sidebar_links_parent_class)->dispose (object);
}
expand_open_links (GtkTreeView *tree_view, GtkTreeModel *model, GtkTreeIter *parent)
{
GtkTreeIter iter;
- EvLink *link;
gboolean expand;
if (gtk_tree_model_iter_children (model, &iter, parent)) {
do {
gtk_tree_model_get (model, &iter,
- EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
EV_DOCUMENT_LINKS_COLUMN_EXPAND, &expand,
-1);
if (expand) {
gtk_menu_detach (GTK_MENU (ev_sidebar->priv->menu));
ev_sidebar->priv->menu = NULL;
}
+
+ if (ev_sidebar->priv->page_model) {
+ g_object_unref (ev_sidebar->priv->page_model);
+ ev_sidebar->priv->page_model = NULL;
+ }
+
(* GTK_OBJECT_CLASS (ev_sidebar_parent_class)->destroy) (object);
}
} else {
valid = gtk_tree_model_iter_next (ev_sidebar->priv->page_model, &iter);
}
+ g_object_unref (item);
+ g_free (title);
}
}
gtk_label_set_text (GTK_LABEL (ev_sidebar->priv->label), label_title);
gtk_notebook_set_current_page (GTK_NOTEBOOK (ev_sidebar->priv->notebook),
index);
+ g_free (label_title);
}
void
} else {
gtk_widget_set_sensitive (menu_widget, FALSE);
}
+ g_object_unref (widget);
+ g_object_unref (menu_widget);
}
if (!has_pages) {
G_CALLBACK (ev_window_load_job_cb),
ev_window);
ev_job_queue_add_job (ev_window->priv->load_job, EV_JOB_PRIORITY_HIGH);
+ g_object_unref (document);
}
}
action = gtk_action_group_get_action (ev_window->priv->action_group, PAGE_SELECTOR_ACTION);
ev_page_action_set_model (EV_PAGE_ACTION (action), model);
+ g_object_unref (model);
}
g_object_get (ev_sidebar_page, "main_widget", &widget, NULL);
- if (widget != NULL) {
- g_signal_connect_object (widget, "focus_in_event",
- G_CALLBACK (view_actions_focus_in_cb),
+ if (widget != NULL) {
+ g_signal_connect_object (widget, "focus_in_event",
+ G_CALLBACK (view_actions_focus_in_cb),
ev_window, 0);
- g_signal_connect_object (widget, "focus_out_event",
- G_CALLBACK (view_actions_focus_out_cb),
+ g_signal_connect_object (widget, "focus_out_event",
+ G_CALLBACK (view_actions_focus_out_cb),
ev_window, 0);
+ g_object_unref (widget);
}
}