summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6d0a98)
raw | patch | inline | side by side (parent: e6d0a98)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 12 Jun 2008 07:22:49 +0000 (07:22 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 12 Jun 2008 07:22:49 +0000 (07:22 +0000) |
src/inkview.cpp | patch | blob | history |
diff --git a/src/inkview.cpp b/src/inkview.cpp
index 5f41f15993642387cb7bddb2be67c1dd4592d202..3fc5bd6eb89ba7f736265319d2b0869f3a0345e6 100644 (file)
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
}
ss.slides[ss.length++] = strdup (argv[i]);
- ss.doc = sp_document_new (ss.slides[ss.current], TRUE, false);
- if (!ss.doc && ++ss.current >= ss.length) {
- /* No loadable documents */
- return 1;
+ if (!ss.doc) {
+ ss.doc = sp_document_new (ss.slides[ss.current], TRUE, false);
+ if (!ss.doc)
+ ++ss.current;
}
#ifdef WITH_INKJAR
}
g_signal_connect (G_OBJECT (w), "delete_event", (GCallback) sp_svgview_main_delete, &ss);
g_signal_connect (G_OBJECT (w), "key_press_event", (GCallback) sp_svgview_main_key_press, &ss);
- ss.view = sp_svg_view_widget_new (ss.doc);
- sp_svg_view_widget_set_resize (SP_SVG_VIEW_WIDGET (ss.view), FALSE, sp_document_width (ss.doc), sp_document_height (ss.doc));
sp_document_ensure_up_to_date (ss.doc);
+ ss.view = sp_svg_view_widget_new (ss.doc);
sp_document_unref (ss.doc);
+ sp_svg_view_widget_set_resize (SP_SVG_VIEW_WIDGET (ss.view), FALSE,
+ sp_document_width (ss.doc), sp_document_height (ss.doc));
gtk_widget_show (ss.view);
gtk_container_add (GTK_CONTAINER (w), ss.view);
sp_svgview_set_document(struct SPSlideShow *ss, SPDocument *doc, int current)
{
if (doc && doc != ss->doc) {
- reinterpret_cast<SPSVGView*>(SP_VIEW_WIDGET_VIEW (ss->view))->setDocument (doc);
sp_document_ensure_up_to_date (doc);
+ reinterpret_cast<SPSVGView*>(SP_VIEW_WIDGET_VIEW (ss->view))->setDocument (doc);
if (ss->doc) {
delete ss->doc;
}