]> www.fi.muni.cz Git - evince.git/commitdiff
Still no output - how odd.
authorMichael Meeks <mmeeks@src.gnome.org>
Wed, 9 Jun 1999 22:46:15 +0000 (22:46 +0000)
committerMichael Meeks <mmeeks@src.gnome.org>
Wed, 9 Jun 1999 22:46:15 +0000 (22:46 +0000)
pdf/xpdf/ChangeLog
pdf/xpdf/Makefile.in
pdf/xpdf/gpdf.cc

index 5da3a36c02018b9244aa0e60be8d905d348f252f..8197e5afabddd72d23a3123913f1fe9148523e07 100644 (file)
@@ -1,3 +1,7 @@
+1999-06-09  Michael Meeks  <michael@edenproject.org>
+
+       * gpdf.cc (main): Add error init.
+
 1999-06-03  Michael Meeks  <michael@edenproject.org>
 
        * GOutputDev.cc (GOutputDev): Actually set up pixmapW & H
index 29372f6504abefa7ad4cbef6ebfdd925c39049d0..e7934a60394826a21496a3bb0ce5bd475abb65a3 100644 (file)
@@ -15,7 +15,7 @@ LTKSRCDIR = $(srcdir)/../ltk
 LTKLIBDIR = ../ltk
 
 #CXXFLAGS = @CXXFLAGS@ @DEFS@ @OPTIONS@ -I$(GOOSRCDIR) -I$(LTKSRCDIR) -I$(srcdir) @X_CFLAGS@ @Xpm_CFLAGS@
-CXXFLAGS = @CXXFLAGS@ @DEFS@ @OPTIONS@ -I$(GOOSRCDIR) -I$(LTKSRCDIR) `gnome-config --cflags gnomeui` -I$(srcdir) @Xpm_CFLAGS@ @X_CFLAGS@
+CXXFLAGS = @CXXFLAGS@ @DEFS@ @OPTIONS@ -I$(GOOSRCDIR) -I$(LTKSRCDIR) -g `gnome-config --cflags gnomeui` -I$(srcdir) @Xpm_CFLAGS@ @X_CFLAGS@
 XLIBS = @Xpm_LIBS@ @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@
 
 OTHERLIBS = @LIBS@
index 5eff140135117bc259a96d241574dffde11de882..4ff49ea18e96207dcfdb28cfbf0880dd5487036c 100644 (file)
@@ -38,7 +38,7 @@
 #include "config.h"
 
 GBool printCommands = gFalse;
-gint  gpdf_debug;
+gint  gpdf_debug=1;
 poptContext ctx;
 
 #define DOC_ROOT_MAGIC 0xad3f556d
@@ -107,11 +107,31 @@ doc_config_event (GtkWidget *widget, void *ugly)
   gdk_color_white (gtk_widget_get_default_colormap(), &doc->paper);
   doc->out    = new GOutputDev (doc->pixmap, doc->paper);
 
+
+  {
+    GdkGCValues gcValues;
+    GdkGC *strokeGC;
+    
+    gdk_color_white (gtk_widget_get_default_colormap (), &gcValues.foreground);
+    gdk_color_black (gtk_widget_get_default_colormap (), &gcValues.background);
+    gcValues.line_width = 1;
+    gcValues.line_style = GDK_LINE_SOLID;
+    strokeGC = gdk_gc_new_with_values (
+      doc->pixmap, &gcValues, 
+      (enum GdkGCValuesMask)(GDK_GC_FOREGROUND | GDK_GC_BACKGROUND | GDK_GC_LINE_WIDTH | GDK_GC_LINE_STYLE));
+
+    gdk_draw_rectangle (doc->pixmap,
+                       strokeGC,
+                       TRUE,
+                       0, 0,
+                       widget->allocation.width,
+                       widget->allocation.height);
+  }
   return TRUE;
 }
 
 static gint
-doc_redraw_event (GtkWidget *widget, void *ugly)
+doc_redraw_event (GtkWidget *widget, GdkEventExpose *event)
 {
   DOC_ROOT *doc = hack_global;
 
@@ -121,15 +141,17 @@ doc_redraw_event (GtkWidget *widget, void *ugly)
   if (doc->out && doc->pdf) {
     printf ("There are %d pages\n", doc->pdf->getNumPages());
 
-    doc->pdf->displayPage(doc->out, 1, 72, 0, gTrue);
-    gdk_draw_pixmap (widget->window,
-                    widget->style->white_gc,
-                    doc->pixmap,
-                    0, 0,
-                    0, 0,
-                    widget->allocation.width,
-                    widget->allocation.height);
-    
+//    doc->pdf->displayPage(doc->out, 1, 86, 0, gTrue);
+    gdk_draw_line (doc->pixmap,
+                  widget->style->black_gc,
+                  event->area.x, event->area.y,
+                  event->area.width, event->area.height);
+    gdk_draw_pixmap(widget->window,
+                   widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+                   doc->pixmap,
+                   event->area.x, event->area.y,
+                   event->area.x, event->area.y,
+                   event->area.width, event->area.height);
   } else
     printf ("Null pointer error %p %p\n", doc->out, doc->pdf);
   
@@ -230,6 +252,8 @@ main (int argc, char *argv [])
   gnome_init_with_popt_table (
     "gpdf", "0.1", argc, argv,
     gpdf_popt_options, 0, &ctx);
+
+  errorInit();
   
   initParams (xpdfConfigFile); /* Init font path */