Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-12-31 17:41:57 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2004-12-31 17:41:57 (GMT)
commitfcab4c9c165a9fa0718e160dd9e88bc1b3e97c59 (patch)
tree0dfbad86ff5130c974aa7e7ec3fee616a70c5b01
parentcd7799a4529617f8cc5206fa242e7833018cea30 (diff)
Cleanups
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
-rw-r--r--ChangeLog9
-rw-r--r--ps/ggvutils.c14
-rw-r--r--ps/ggvutils.h3
-rw-r--r--ps/gsio.h5
-rw-r--r--ps/gtkgs.c5
5 files changed, 11 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 66ce787..7da0f54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
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):
Ensure the page is rerendered when changing zoom
diff --git a/ps/ggvutils.c b/ps/ggvutils.c
index bea0412..5670a11 100644
--- a/ps/ggvutils.c
+++ b/ps/ggvutils.c
@@ -57,20 +57,6 @@ const gchar *ggv_orientation_labels[] = {
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)
diff --git a/ps/ggvutils.h b/ps/ggvutils.h
index 093b4c1..c9b2f20 100644
--- a/ps/ggvutils.h
+++ b/ps/ggvutils.h
@@ -26,9 +26,6 @@
#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);
diff --git a/ps/gsio.h b/ps/gsio.h
index 31a7823..3f83cb0 100644
--- a/ps/gsio.h
+++ b/ps/gsio.h
@@ -23,15 +23,12 @@
#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);
diff --git a/ps/gtkgs.c b/ps/gtkgs.c
index a710ab5..d1586c9 100644
--- a/ps/gtkgs.c
+++ b/ps/gtkgs.c
@@ -1736,10 +1736,7 @@ gtk_gs_set_zoom(GtkGS * gs, gfloat zoom)
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);