aboutsummaryrefslogtreecommitdiffstats
path: root/embed/print-dialog.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-11-03 02:53:36 +0800
committerChristian Persch <chpe@src.gnome.org>2003-11-03 02:53:36 +0800
commit3a4e04be99f31b2fbf4515efd5bc369630dc4006 (patch)
tree716f2315bc6d1bb9bf9948917c41788cece72539 /embed/print-dialog.c
parent1ea57d5ec0e658a86e5eb61842c34dcbc1f54120 (diff)
downloadgsoc2013-epiphany-3a4e04be99f31b2fbf4515efd5bc369630dc4006.tar
gsoc2013-epiphany-3a4e04be99f31b2fbf4515efd5bc369630dc4006.tar.gz
gsoc2013-epiphany-3a4e04be99f31b2fbf4515efd5bc369630dc4006.tar.bz2
gsoc2013-epiphany-3a4e04be99f31b2fbf4515efd5bc369630dc4006.tar.lz
gsoc2013-epiphany-3a4e04be99f31b2fbf4515efd5bc369630dc4006.tar.xz
gsoc2013-epiphany-3a4e04be99f31b2fbf4515efd5bc369630dc4006.tar.zst
gsoc2013-epiphany-3a4e04be99f31b2fbf4515efd5bc369630dc4006.zip
Don't unref the print dialogue twice when shown from mozilla.
2003-11-02 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/PrintingPromptService.cpp: * embed/print-dialog.c: (print_dialog_new), (print_dialog_new_with_parent), (print_dialog_print), (print_cancel_button_cb), (print_preview_button_cb): Don't unref the print dialogue twice when shown from mozilla.
Diffstat (limited to 'embed/print-dialog.c')
-rwxr-xr-xembed/print-dialog.c39
1 files changed, 32 insertions, 7 deletions
diff --git a/embed/print-dialog.c b/embed/print-dialog.c
index efecf68d5..841804cc1 100755
--- a/embed/print-dialog.c
+++ b/embed/print-dialog.c
@@ -82,7 +82,8 @@ enum
TO_PROP,
FROM_PROP,
COLOR_PROP,
- ORIENTATION_PROP
+ ORIENTATION_PROP,
+ PREVIEW_PROP
};
enum
@@ -112,6 +113,7 @@ EphyDialogProperty properties [] =
{ FROM_PROP, "from_spinbutton", NULL, PT_NORMAL, NULL },
{ COLOR_PROP, "print_color_radiobutton", CONF_PRINT_COLOR, PT_NORMAL, NULL },
{ ORIENTATION_PROP, "orient_p_radiobutton", CONF_PRINT_ORIENTATION, PT_NORMAL, NULL },
+ { PREVIEW_PROP, "preview_button", NULL, PT_NORMAL, NULL },
{ -1, NULL, NULL }
};
@@ -210,8 +212,17 @@ print_dialog_new (EphyEmbed *embed,
"embed", embed,
NULL));
- if (!embed) dialog->only_collect_info = TRUE;
- dialog->ret_info = ret_info;
+ if (ret_info != NULL)
+ {
+ GtkWidget *button;
+
+ dialog->only_collect_info = TRUE;
+ dialog->ret_info = ret_info;
+
+ button = ephy_dialog_get_control (EPHY_DIALOG (dialog),
+ PREVIEW_PROP);
+ gtk_widget_hide (button);
+ }
return EPHY_DIALOG(dialog);
}
@@ -228,8 +239,17 @@ print_dialog_new_with_parent (GtkWidget *window,
"ParentWindow", window,
NULL));
- if (!embed) dialog->only_collect_info = TRUE;
- dialog->ret_info = ret_info;
+ if (ret_info != NULL)
+ {
+ GtkWidget *button;
+
+ dialog->only_collect_info = TRUE;
+ dialog->ret_info = ret_info;
+
+ button = ephy_dialog_get_control (EPHY_DIALOG (dialog),
+ PREVIEW_PROP);
+ gtk_widget_hide (button);
+ }
return EPHY_DIALOG(dialog);
}
@@ -373,6 +393,8 @@ print_dialog_print (EphyDialog *dialog)
if(EPHY_PRINT_DIALOG(dialog)->only_collect_info && EPHY_PRINT_DIALOG(dialog)->ret_info)
{
*(EPHY_PRINT_DIALOG(dialog)->ret_info) = info;
+
+ return;
}
else
{
@@ -419,6 +441,11 @@ void
print_cancel_button_cb (GtkWidget *widget,
EphyDialog *dialog)
{
+ if (EPHY_PRINT_DIALOG (dialog)->only_collect_info)
+ {
+ return;
+ }
+
g_object_unref (G_OBJECT(dialog));
}
@@ -437,5 +464,3 @@ print_preview_button_cb (GtkWidget *widget,
if(!(EPHY_PRINT_DIALOG(dialog)->only_collect_info))
print_dialog_preview (dialog);
}
-
-