projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f19d5b6
)
Corrected ref and unref of mail operations.
author
Felipe Erias Morandeira
<femorandeira@igalia.com>
Fri, 14 Dec 2007 12:30:42 +0000
(12:30 +0000)
committer
Felipe Erias Morandeira
<femorandeira@igalia.com>
Fri, 14 Dec 2007 12:30:42 +0000
(12:30 +0000)
pmo-trunk-r3918
src/maemo/modest-main-window.c
patch
|
blob
|
history
src/maemo/modest-msg-view-window.c
patch
|
blob
|
history
src/modest-mail-operation-queue.c
patch
|
blob
|
history
src/widgets/modest-window-mgr.c
patch
|
blob
|
history
diff --git
a/src/maemo/modest-main-window.c
b/src/maemo/modest-main-window.c
index
e827044
..
60ebdf6
100644
(file)
--- a/
src/maemo/modest-main-window.c
+++ b/
src/maemo/modest-main-window.c
@@
-2216,8
+2216,12
@@
on_mail_operation_started (ModestMailOperation *mail_op,
/* Add operation observers and change toolbar if neccessary*/
tmp = priv->progress_widgets;
if (mode == TOOLBAR_MODE_TRANSFER) {
/* Add operation observers and change toolbar if neccessary*/
tmp = priv->progress_widgets;
if (mode == TOOLBAR_MODE_TRANSFER) {
- if (mode_changed && (G_OBJECT (self) == modest_mail_operation_get_source(mail_op)))
- set_toolbar_transfer_mode(self);
+ if (mode_changed) {
+ if (G_OBJECT (self) == modest_mail_operation_get_source(mail_op)) {
+ set_toolbar_transfer_mode(self);
+ }
+ g_object_unref (G_OBJECT (mail_op));
+ }
while (tmp) {
modest_progress_object_add_operation (MODEST_PROGRESS_OBJECT (tmp->data),
while (tmp) {
modest_progress_object_add_operation (MODEST_PROGRESS_OBJECT (tmp->data),
diff --git
a/src/maemo/modest-msg-view-window.c
b/src/maemo/modest-msg-view-window.c
index
7246417
..
85e3c5d
100644
(file)
--- a/
src/maemo/modest-msg-view-window.c
+++ b/
src/maemo/modest-msg-view-window.c
@@
-2195,6
+2195,7
@@
on_mail_operation_started (ModestMailOperation *mail_op,
}
}
}
}
}
}
+ g_object_unref (G_OBJECT (mail_op));
}
static void
}
static void
diff --git
a/src/modest-mail-operation-queue.c
b/src/modest-mail-operation-queue.c
index
19cb4ed
..
a05c8fd
100644
(file)
--- a/
src/modest-mail-operation-queue.c
+++ b/
src/modest-mail-operation-queue.c
@@
-385,7
+385,8
@@
on_find_by_source_foreach (gpointer op, gpointer data)
FindBySourceInfo *info = (FindBySourceInfo*) data;
if ( info->source == modest_mail_operation_get_source (MODEST_MAIL_OPERATION (op))) {
FindBySourceInfo *info = (FindBySourceInfo*) data;
if ( info->source == modest_mail_operation_get_source (MODEST_MAIL_OPERATION (op))) {
- *(info->new_list) = g_slist_prepend (*(info->new_list), MODEST_MAIL_OPERATION (op));
+ g_object_ref (G_OBJECT (op));
+ *(info->new_list) = g_slist_prepend (*(info->new_list), MODEST_MAIL_OPERATION (op));
}
}
}
}
diff --git
a/src/widgets/modest-window-mgr.c
b/src/widgets/modest-window-mgr.c
index
80731e7
..
6d03595
100644
(file)
--- a/
src/widgets/modest-window-mgr.c
+++ b/
src/widgets/modest-window-mgr.c
@@
-796,6
+796,7
@@
modest_window_mgr_unregister_window (ModestWindowMgr *self,
if (type == MODEST_MAIL_OPERATION_TYPE_RECEIVE || type == MODEST_MAIL_OPERATION_TYPE_OPEN) {
modest_mail_operation_cancel (pending_ops->data);
}
if (type == MODEST_MAIL_OPERATION_TYPE_RECEIVE || type == MODEST_MAIL_OPERATION_TYPE_OPEN) {
modest_mail_operation_cancel (pending_ops->data);
}
+ g_object_unref (G_OBJECT (pending_ops->data));
tmp_list = pending_ops;
pending_ops = g_slist_next (pending_ops);
g_slist_free_1 (tmp_list);
tmp_list = pending_ops;
pending_ops = g_slist_next (pending_ops);
g_slist_free_1 (tmp_list);