aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/ephy-window.c21
2 files changed, 27 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a48d0ca9..f5cc7ad9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-10-06 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-window.c: (ephy_window_set_property),
+ (ephy_window_get_property), (ephy_window_class_init),
+ (ephy_window_set_print_preview):
+
+ Notify when entering or leaving print preview mode. Fixes bug #154591.
+
2004-10-05 Christian Persch <chpe@cvs.gnome.org>
* data/epiphany.schemas.in:
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 319bfc98b..4c669882f 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -372,7 +372,8 @@ enum
{
PROP_0,
PROP_ACTIVE_TAB,
- PROP_CHROME
+ PROP_CHROME,
+ PROP_PPV_MODE
};
static GObjectClass *parent_class = NULL;
@@ -2009,6 +2010,9 @@ ephy_window_set_property (GObject *object,
case PROP_CHROME:
ephy_window_set_chrome (window, g_value_get_flags (value));
break;
+ case PROP_PPV_MODE:
+ ephy_window_set_print_preview (window, g_value_get_boolean (value));
+ break;
}
}
@@ -2028,6 +2032,9 @@ ephy_window_get_property (GObject *object,
case PROP_CHROME:
g_value_set_flags (value, window->priv->chrome);
break;
+ case PROP_PPV_MODE:
+ g_value_set_boolean (value, window->priv->ppv_mode);
+ break;
}
}
@@ -2095,7 +2102,15 @@ ephy_window_class_init (EphyWindowClass *klass)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof(EphyWindowPrivate));
+ g_object_class_install_property (object_class,
+ PROP_PPV_MODE,
+ g_param_spec_boolean ("print-preview-mode",
+ "Print preview mode",
+ "Whether the window is in print preview mode",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_type_class_add_private (object_class, sizeof (EphyWindowPrivate));
}
static void
@@ -2438,6 +2453,8 @@ ephy_window_set_print_preview (EphyWindow *window, gboolean enabled)
window->priv->ppview_toolbar = NULL;
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
}
+
+ g_object_notify (G_OBJECT (window), "print-preview-mode");
}
/**