rendered paste body? bindings/python/geditcommands.c
? gedit/gedit-enum-types.c
? gedit/gedit-enum-types.h
? help/sv/.xml2po.mo
? help/sv/gedit.xml
? help/sv/legal.xml
Index: gedit/gedit-tab.c
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-tab.c,v
retrieving revision 1.15
diff -u -p -r1.15 gedit-tab.c
--- gedit/gedit-tab.c 17 Aug 2006 19:55:29 -0000 1.15
+++ gedit/gedit-tab.c 24 Aug 2006 13:37:21 -0000
@@ -1973,9 +1973,18 @@ print_preview_destroyed (GtkWidget *prev
tab->priv->print_preview = NULL;
if (tab->priv->state == GEDIT_TAB_STATE_SHOWING_PRINT_PREVIEW)
+ {
gedit_tab_set_state (tab, GEDIT_TAB_STATE_NORMAL);
+ }
else
- gtk_widget_show (tab->priv->view_scrolled_window);
+ {
+ /* This should happen only when printing while showing the print
+ * preview. In this case let us continue whithout changing
+ * the state and show the document. See bug #352658 */
+ gtk_widget_show (tab->priv->view_scrolled_window);
+
+ g_return_if_fail (tab->priv->state == GEDIT_TAB_STATE_PRINTING);
+ }
}
static void
@@ -1986,8 +1995,7 @@ set_print_preview (GeditTab *tab, GtkWi
if (tab->priv->print_preview != NULL)
gtk_widget_destroy (tab->priv->print_preview);
-
-
+
tab->priv->print_preview = print_preview;
gtk_box_pack_end (GTK_BOX (tab),
@@ -2072,10 +2080,18 @@ print_finished_cb (GtkSourcePrintJob *pj
g_object_unref (gjob);
gedit_print_job_save_config (GEDIT_PRINT_JOB (pjob));
-
+
g_object_unref (pjob);
+
+ if (tab->priv->print_preview != NULL)
+ {
+ /* If we were printing while showing the print preview,
+ see bug #352658 */
+ gtk_widget_destroy (tab->priv->print_preview);
+ g_return_if_fail (tab->priv->state == GEDIT_TAB_STATE_PRINTING);
+ }
- gedit_tab_set_state (tab, GEDIT_TAB_STATE_NORMAL);
+ gedit_tab_set_state (tab, GEDIT_TAB_STATE_NORMAL);
}
static void
@@ -2089,8 +2105,16 @@ print_cancelled (GeditMessageArea *area,
g_object_unref (tab->priv->print_job);
set_message_area (tab, NULL); /* destroy the message area */
+
+ if (tab->priv->print_preview != NULL)
+ {
+ /* If we were printing while showing the print preview,
+ see bug #352658 */
+ gtk_widget_destroy (tab->priv->print_preview);
+ g_return_if_fail (tab->priv->state == GEDIT_TAB_STATE_PRINTING);
+ }
- gedit_tab_set_state (tab, GEDIT_TAB_STATE_NORMAL);
+ gedit_tab_set_state (tab, GEDIT_TAB_STATE_NORMAL);
}
static void