+2004-12-31 Marco Pesenti Gritti <marco@gnome.org>
+
+ * ps/ggvutils.c:
+ * ps/ggvutils.h:
+ * ps/gsio.h:
+ * ps/gtkgs.c: (gtk_gs_set_zoom):
+
+ Cleanups
+
2004-12-31 Marco Pesenti Gritti <marco@gnome.org>
* ps/gtkgs.c: (gtk_gs_set_zoom), (gtk_gs_set_zoom_mode):
NULL,
};
-gfloat ggv_zoom_levels[] = {
- 1.0 / 6.0, 1.0 / 5.0, 1.0 / 4.0, 1.0 / 3.0, 1.0 / 2.0, 3.0 / 4.0, 1.0,
- 3.0 / 2.0, 2.0, 3.0, 4.0, 5.0, 6.0
-};
-
-const gchar *ggv_zoom_level_names[] = {
- "1:6", "1:5", "1:4", "1:3",
- "1:2", "3:4", "1:1", "3:2",
- "2:1", "3:1", "4:1", "5:1",
- "6:1",
-};
-
-const gint ggv_max_zoom_levels = (sizeof(ggv_zoom_levels) / sizeof(gfloat)) - 1;
-
/* If file exists and is a regular file then return its length, else -1 */
gint
ggv_file_length(const gchar * filename)
#include "gtkgs.h"
extern GtkGSPaperSize ggv_paper_sizes[];
-extern gfloat ggv_zoom_levels[];
-extern const gchar *ggv_zoom_level_names[];
-extern const gint ggv_max_zoom_levels;
/* If file exists and is a regular file then return its length, else -1 */
gint ggv_file_length(const gchar * filename);
#ifndef __GS_IO_H__
#define __GS_IO_H__
-#include <gtkgs.h>
+#include <glib.h>
G_BEGIN_DECLS
typedef struct _GtkGSDocSink GtkGSDocSink;
-gchar *gtk_gs_get_pages(GtkGS * gs, gint * pages);
-gchar *gtk_gs_get_document(GtkGS * gs);
-
GtkGSDocSink *gtk_gs_doc_sink_new(void);
void gtk_gs_doc_sink_free(GtkGSDocSink * sink);
void gtk_gs_doc_sink_write(GtkGSDocSink * sink, const gchar * buf, int len);
default:
break;
}
- if(zoom < ggv_zoom_levels[0])
- zoom = ggv_zoom_levels[0];
- else if(zoom > ggv_zoom_levels[ggv_max_zoom_levels])
- zoom = ggv_zoom_levels[ggv_max_zoom_levels];
+
if(fabs(gs->zoom_factor - zoom) > 0.001) {
gs->zoom_factor = zoom;
set_up_page(gs);