aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2003-03-19 05:47:43 +0800
committerLarry Ewing <lewing@src.gnome.org>2003-03-19 05:47:43 +0800
commit680504834f2f47b14acf01277804051ebec9a1f5 (patch)
treeaac9fca70dea143e42d6d20da9c63167ae211424 /mail
parent529a87dfe59ffffb208bcc3f75f1a3a61b3f72a4 (diff)
downloadgsoc2013-evolution-680504834f2f47b14acf01277804051ebec9a1f5.tar.gz
gsoc2013-evolution-680504834f2f47b14acf01277804051ebec9a1f5.tar.zst
gsoc2013-evolution-680504834f2f47b14acf01277804051ebec9a1f5.zip
fix leak, cleanup variable name, and call gtk_window_set_transient_for
2003-03-18 Larry Ewing <lewing@ximian.com> * mail-callbacks.c (do_mail_print): fix leak, cleanup variable name, and call gtk_window_set_transient_for with a parent that is actually a GtkWindow. (mark_as_unseen): use g_source_remove. svn path=/trunk/; revision=20348
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-callbacks.c14
2 files changed, 15 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cde04fd3ec..de3ad4a369 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2003-03-18 Larry Ewing <lewing@ximian.com>
+
+ * mail-callbacks.c (do_mail_print): fix leak, cleanup variable
+ name, and call gtk_window_set_transient_for with a parent that is
+ actually a GtkWindow.
+ (mark_as_unseen): use g_source_remove.
+
2003-03-18 Jeffrey Stedfast <fejj@ximian.com>
* mail-config-druid.c (mail_config_druid_new): Set the type hint
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 3b8267221c..560ea7650c 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2056,7 +2056,7 @@ mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path)
/* Remove the automatic mark-as-read timer first */
if (fb->seen_id) {
- gtk_timeout_remove (fb->seen_id);
+ g_source_remove (fb->seen_id);
fb->seen_id = 0;
}
@@ -2714,7 +2714,7 @@ expunge_folder (BonoboUIComponent *uih, void *user_data, const char *path)
/* disable the message list so user can't click on them while we expunge */
/* nasty hack to find out if some widget inside the message list is focussed ... */
- top = gtk_widget_get_toplevel((GtkWidget *)fb->message_list);
+ top = GTK_WINDOW (gtk_widget_get_toplevel((GtkWidget *)fb->message_list));
focus = top?top->focus_widget:NULL;
while (focus && focus != (GtkWidget *)fb->message_list)
focus = focus->parent;
@@ -2891,7 +2891,7 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
if (!preview) {
dialog = (GtkDialog *) gnome_print_dialog_new (NULL, _("Print Message"), GNOME_PRINT_DIALOG_COPIES);
gtk_dialog_set_default_response (dialog, GNOME_PRINT_DIALOG_RESPONSE_PRINT);
- gtk_window_set_transient_for ((GtkWindow *) dialog, (GtkWindow *) fb);
+ gtk_window_set_transient_for ((GtkWindow *) dialog, (GtkWindow *) gtk_widget_get_toplevel ((GtkWidget *) fb));
switch (gtk_dialog_run (dialog)) {
case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
@@ -2948,16 +2948,18 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
gtk_widget_destroy (w);
if (preview){
- GtkWidget *preview;
+ GtkWidget *pw;
- preview = gnome_print_job_preview_new (print_master, _("Print Preview"));
- gtk_widget_show (preview);
+ pw = gnome_print_job_preview_new (print_master, _("Print Preview"));
+ gtk_widget_show (pw);
} else {
int result = gnome_print_job_print (print_master);
if (result == -1)
e_notice (FB_WINDOW (fb), GTK_MESSAGE_ERROR, _("Printing of message failed"));
}
+
+ g_object_unref (print_master);
}
/* This is pretty evil. FolderBrowser's API should be extended to allow these sorts of