PROP_0,
PROP_DOCUMENT,
PROP_CURRENT_PAGE,
+ PROP_PAGE,
PROP_ROTATION,
PROP_INVERTED_COLORS
};
}
pview->current_page = page;
- g_object_notify (G_OBJECT(pview), "current_page");
+ g_object_notify (G_OBJECT(pview), "page");
if (pview->page_cache)
ev_page_cache_set_page_range (pview->page_cache, page, page);
case PROP_CURRENT_PAGE:
pview->current_page = g_value_get_uint (value);
break;
+ case PROP_PAGE:
+ pview->current_page = g_value_get_uint (value);
+ break;
case PROP_ROTATION:
ev_view_presentation_set_rotation (pview, g_value_get_uint (value));
break;
EvViewPresentation *pview = EV_VIEW_PRESENTATION (object);
switch (prop_id) {
- case PROP_CURRENT_PAGE:
+ case PROP_PAGE:
g_value_set_uint (value, ev_view_presentation_get_current_page (pview));
break;
case PROP_ROTATION:
EV_TYPE_DOCUMENT,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (gobject_class,
+ PROP_PAGE,
+ g_param_spec_uint ("page",
+ "Current Page",
+ "The current page",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_CURRENT_PAGE,
g_param_spec_uint ("current_page",
"Current Page",
"The current page",
0, G_MAXUINT, 0,
- G_PARAM_READWRITE));
+ G_PARAM_WRITABLE |
+ G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class,
PROP_ROTATION,
g_param_spec_uint ("rotation",
ev_dscwindow_window_placement (EvDSCWindow *ev_dscwindow)
{
gint num_monitors = get_num_monitors (GTK_WINDOW (ev_dscwindow));
- g_printf ("num_monitors: %d \n",num_monitors);
//if (num_monitors == 2) {
GtkWindow * presentation_window = GTK_WINDOW (ev_dscwindow->priv->presentation_window);
GdkScreen * screen = gtk_window_get_screen (presentation_window);
EvDSCWindow *ev_dscwindow)
{
gint page = ev_document_model_get_page (model);
- g_printf("m_page:%d\n",page);
if(page != ev_view_presentation_get_current_page (ev_dscwindow->priv->presentation_view))
ev_view_presentation_set_page (EV_VIEW_PRESENTATION(ev_dscwindow->priv->presentation_view), page);
}
EvDSCWindow *ev_dscwindow)
{
gint page = ev_view_presentation_get_current_page (pview);
- g_printf("p_page:%d\n",page);
ev_document_model_set_page (ev_dscwindow->priv->model, page);
}
ev_dscwindow->priv->presentation_view = EV_VIEW_PRESENTATION(pview);
ev_document_model_set_document(ev_dscwindow->priv->model,
document);
- g_signal_connect (ev_dscwindow->priv->presentation_view,
- "notify::current_page",
+ g_signal_connect (G_OBJECT(ev_dscwindow->priv->presentation_view),
+ "notify::page",
G_CALLBACK (ev_dscwindow_presentation_page_changed_cb),
ev_dscwindow);
ev_dscwindow_window_placement (ev_dscwindow);
GtkWidget *v = gtk_vbox_new (FALSE, 0);
ev_dscwindow->priv->model = ev_document_model_new ();
- g_signal_connect (ev_dscwindow->priv->model,
+ g_signal_connect (G_OBJECT(ev_dscwindow->priv->model),
"notify::page",
G_CALLBACK (ev_dscwindow_page_changed_cb),
ev_dscwindow);