summaryrefslogtreecommitdiffstats
path: root/meta-demoapps/recipes-graphics/xournal/files/no-printing.diff
blob: 9fac4980841d524c374d87dafa858ed0a8a8e612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
Upstream-Status: Inappropriate [configuration]

diff -ru xournal-0.2/configure.in xournal-0.2.noprint/configure.in
--- xournal-0.2/configure.in	2006-01-29 22:25:10.000000000 +0000
+++ xournal-0.2.noprint/configure.in	2006-03-17 13:08:01.000000000 +0000
@@ -10,11 +10,16 @@
 AM_PROG_CC_STDC
 AC_HEADER_STDC
 
-pkg_modules="gtk+-2.0 >= 2.4.0 libgnomecanvas-2.0 >= 2.4.0 libgnomeprintui-2.2 >= 2.0.0"
+pkg_modules="gtk+-2.0 >= 2.4.0 libgnomecanvas-2.0 >= 2.4.0"
 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
 AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(PACKAGE_LIBS)
 
+#PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprintui-2.2 >= 2.0.0
+#AC_SUBST(GNOMEPRINT_CFLAGS)
+#AC_SUBST(GNOMEPRINT_LIBS)
+AM_CONDITIONAL(ENABLE_PRINTING, false)
+
 AC_OUTPUT([
 Makefile
 src/Makefile
diff -ru xournal-0.2/src/main.c xournal-0.2.noprint/src/main.c
--- xournal-0.2/src/main.c	2006-01-29 22:22:52.000000000 +0000
+++ xournal-0.2.noprint/src/main.c	2006-03-17 13:14:50.000000000 +0000
@@ -28,7 +28,9 @@
 
 void hide_unimplemented(void)
 {
+#if ENABLE_PRINTING
   gtk_widget_hide(GET_COMPONENT("filePrintOptions"));
+#endif
   gtk_widget_hide(GET_COMPONENT("journalFlatten"));
   gtk_widget_hide(GET_COMPONENT("papercolorOther"));
   gtk_widget_hide(GET_COMPONENT("journalApplyAllPages"));
diff -ru xournal-0.2/src/Makefile.am xournal-0.2.noprint/src/Makefile.am
--- xournal-0.2/src/Makefile.am	2005-12-14 20:54:42.000000000 +0000
+++ xournal-0.2.noprint/src/Makefile.am	2006-03-17 13:07:47.000000000 +0000
@@ -7,12 +7,16 @@
 
 bin_PROGRAMS = xournal
 
+if ENABLE_PRINTING
+PRINT_SOURCE = 	xo-print.c xo-print.h
+endif
+
 xournal_SOURCES = \
 	main.c xournal.h \
 	xo-misc.c xo-misc.h \
 	xo-file.c xo-file.h \
 	xo-paint.c xo-paint.h \
-	xo-print.c xo-print.h \
+	$(PRINT_SOURCE) \
 	xo-support.c xo-support.h \
 	xo-interface.c xo-interface.h \
 	xo-callbacks.c xo-callbacks.h 
diff -ru xournal-0.2/src/xo-callbacks.c xournal-0.2.noprint/src/xo-callbacks.c
--- xournal-0.2/src/xo-callbacks.c	2006-01-29 19:39:22.000000000 +0000
+++ xournal-0.2.noprint/src/xo-callbacks.c	2006-03-17 13:12:01.000000000 +0000
@@ -7,7 +7,9 @@
 #include <gtk/gtk.h>
 #include <libgnomecanvas/libgnomecanvas.h>
 #include <time.h>
+#if ENABLE_PRINTING
 #include <libgnomeprintui/gnome-print-dialog.h>
+#endif
 #include <glib/gstdio.h>
 
 #include "xournal.h"
@@ -17,7 +19,9 @@
 #include "xo-misc.h"
 #include "xo-file.h"
 #include "xo-paint.h"
+#if ENABLE_PRINTING
 #include "xo-print.h"
+#endif
 
 void
 on_fileNew_activate                    (GtkMenuItem     *menuitem,
@@ -261,7 +265,7 @@
 
 }
 
-
+#if ENABLE_PRINTING
 void
 on_filePrint_activate                  (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
@@ -407,7 +411,7 @@
 
   g_free(filename);
 }
-
+#endif
 
 void
 on_fileQuit_activate                   (GtkMenuItem     *menuitem,
diff -ru xournal-0.2/src/xo-callbacks.h xournal-0.2.noprint/src/xo-callbacks.h
--- xournal-0.2/src/xo-callbacks.h	2006-01-26 20:47:00.000000000 +0000
+++ xournal-0.2.noprint/src/xo-callbacks.h	2006-03-17 13:08:45.000000000 +0000
@@ -24,6 +24,7 @@
 on_filePrintOptions_activate           (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
 
+#if ENABLE_PRINTING
 void
 on_filePrint_activate                  (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
@@ -32,6 +33,8 @@
 on_filePrintPDF_activate               (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
 
+#endif
+
 void
 on_fileQuit_activate                   (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
diff -ru xournal-0.2/src/xo-interface.c xournal-0.2.noprint/src/xo-interface.c
--- xournal-0.2/src/xo-interface.c	2006-01-29 18:58:25.000000000 +0000
+++ xournal-0.2.noprint/src/xo-interface.c	2006-03-17 13:11:31.000000000 +0000
@@ -41,10 +41,12 @@
   GtkWidget *fileSave;
   GtkWidget *fileSaveAs;
   GtkWidget *separator1;
+#if ENABLE_PRINTING
   GtkWidget *filePrintOptions;
   GtkWidget *image501;
   GtkWidget *filePrint;
   GtkWidget *filePrintPDF;
+#endif
   GtkWidget *separator2;
   GtkWidget *fileQuit;
   GtkWidget *menuEdit;
@@ -327,6 +329,7 @@
   gtk_container_add (GTK_CONTAINER (menuFile_menu), separator1);
   gtk_widget_set_sensitive (separator1, FALSE);
 
+#if ENABLE_PRINTING
   filePrintOptions = gtk_image_menu_item_new_with_mnemonic ("Print Options");
   gtk_widget_show (filePrintOptions);
   gtk_container_add (GTK_CONTAINER (menuFile_menu), filePrintOptions);
@@ -347,6 +350,7 @@
   gtk_widget_show (separator2);
   gtk_container_add (GTK_CONTAINER (menuFile_menu), separator2);
   gtk_widget_set_sensitive (separator2, FALSE);
+#endif
 
   fileQuit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
   gtk_widget_show (fileQuit);
@@ -1522,6 +1526,7 @@
   g_signal_connect ((gpointer) fileSaveAs, "activate",
                     G_CALLBACK (on_fileSaveAs_activate),
                     NULL);
+#if ENABLE_PRINTING
   g_signal_connect ((gpointer) filePrintOptions, "activate",
                     G_CALLBACK (on_filePrintOptions_activate),
                     NULL);
@@ -1531,6 +1536,7 @@
   g_signal_connect ((gpointer) filePrintPDF, "activate",
                     G_CALLBACK (on_filePrintPDF_activate),
                     NULL);
+#endif
   g_signal_connect ((gpointer) fileQuit, "activate",
                     G_CALLBACK (on_fileQuit_activate),
                     NULL);
@@ -1941,11 +1947,13 @@
   GLADE_HOOKUP_OBJECT (winMain, fileSave, "fileSave");
   GLADE_HOOKUP_OBJECT (winMain, fileSaveAs, "fileSaveAs");
   GLADE_HOOKUP_OBJECT (winMain, separator1, "separator1");
+#if ENABLE_PRINTING
   GLADE_HOOKUP_OBJECT (winMain, filePrintOptions, "filePrintOptions");
   GLADE_HOOKUP_OBJECT (winMain, image501, "image501");
   GLADE_HOOKUP_OBJECT (winMain, filePrint, "filePrint");
   GLADE_HOOKUP_OBJECT (winMain, filePrintPDF, "filePrintPDF");
   GLADE_HOOKUP_OBJECT (winMain, separator2, "separator2");
+#endif
   GLADE_HOOKUP_OBJECT (winMain, fileQuit, "fileQuit");
   GLADE_HOOKUP_OBJECT (winMain, menuEdit, "menuEdit");
   GLADE_HOOKUP_OBJECT (winMain, menuEdit_menu, "menuEdit_menu");