EvWindow *presentation_window;
EvDocument * presentation_document;
gint moveback_monitor;
-} EvDSCWindowPrivate;
+};
#define EV_DSCWINDOW_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_DSCWINDOW, EvDSCWindowPrivate))
return TRUE;
}
+/**
+ * ev_dscwindow_get_control: Get the control instance.
+ *
+ * If there is none, create one.
+ *
+ * Returns: control instance
+ **/
+EvDSCWindow *
+ev_dscwindow_get_control (void)
+{
+ static EvDSCWindow * control = NULL;
+
+ if (!control || !EV_IS_DSCWINDOW (control)) {
+ control = EV_DSCWINDOW (g_object_new (EV_TYPE_DSCWINDOW, NULL));
+ }
+
+ return control;
+}
+
/**
* ev_dscwindow_end: Stop presentation mode.
*/
ev_dscwindow->priv->moveback_monitor = -1;
ev_dscwindow->priv->notesdocument = NULL;
- gtk_window_set_title (GTK_WINDOW (self), _("Presentation Control"));
+ gtk_window_set_title (GTK_WINDOW (ev_dscwindow), _("Presentation Control"));
GtkWidget *h = gtk_hpaned_new ();
GtkWidget *v = gtk_vbox_new (FALSE, 0);
ev_dscwindow->priv->overview_scrolled_window = GTK_WIDGET (g_object_new (
GTK_TYPE_SCROLLED_WINDOW, "shadow-type", GTK_SHADOW_IN, NULL));
- gtk_box_pack_start_defaults (GTK_BOX (v), priv->overview_scrolled_window);
+ gtk_box_pack_start_defaults (GTK_BOX (v), ev_dscwindow->priv->overview_scrolled_window);
ev_dscwindow->priv->model = ev_document_model_new ();
ev_dscwindow->priv->overview = ev_view_new ();
static void
ev_dscwindow_dispose (GObject *obj)
{
- EvDSCWindow * self = EV_DSCWINDOW (obj);
+ EvDSCWindow * ev_dscwindow = EV_DSCWINDOW (obj);
EvDSCWindowPrivate *priv = ev_dscwindow->priv;
/* if (EV_IS_VIEW (priv->overview) {
static void
ev_dscwindow_class_init (EvDSCWindowClass * klass)
{
-/* GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
- * parent_class = g_type_class_peek_parent (klass);
- * g_type_class_add_private (klass, sizeof (EvDSCWindowPrivate));
- * g_object_class->dispose = ev_dscwindow_dispose;
- */
+ GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
+ parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (EvDSCWindowPrivate));
+ g_object_class->dispose = ev_dscwindow_dispose;
}
GtkWidget *