Added gtkhtml,libhildonhelp and maemopad
[oespirit1] / gtkhtml / gtkhtml_090_dependency_removal.diff
1 diff -r -U5 gtkhtml-3.24.4/config.h.in gtkhtml-3.24.4/config.h.in
2 --- gtkhtml-3.24.4/config.h.in  2008-09-22 04:21:36.000000000 +0200
3 +++ gtkhtml-3.24.4/config.h.in  2008-10-16 10:00:20.000000000 +0200
4 @@ -23,10 +23,12 @@
5  #undef GETTEXT_PACKAGE
6  #undef GTKHTML_RELEASE
7  #undef GTKHTML_RELEASE_STRING
8  #undef HAVE_OLD_SOUP
9  
10 +#undef DISABLE_PRINTING
11 +#undef DISABLE_GNOME
12  
13  /* No deprecated bonobo functions */
14  #undef BONOBO_DISABLE_DEPRECATED
15  
16  /* Editor API Version */
17 diff -r -U5 gtkhtml-3.24.4/configure.in gtkhtml-3.24.4/configure.in
18 --- gtkhtml-3.24.4/configure.in 2008-09-21 15:40:43.000000000 +0200
19 +++ gtkhtml-3.24.4/configure.in 2008-10-16 10:30:12.000000000 +0200
20 @@ -3,10 +3,12 @@
21  AC_INIT(gtkhtml/gtkhtml.c)
22  AM_CONFIG_HEADER(config.h)
23  
24  PACKAGE=gtkhtml
25  
26 +AC_PROG_MAKE_SET
27 +
28  # Required Package Versions
29  m4_define([gtk_minimum_version], [2.12.0])
30  m4_define([gail_minimum_version], [1.1.0])
31  m4_define([gnome_icon_theme_minimum_version], [1.2.0])
32  m4_define([libbonobo_minimum_version], [2.20.3])
33 @@ -68,26 +70,93 @@
34  esac
35  AC_MSG_RESULT([$os_win32])
36  AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
37  AC_SUBST(SOEXT)
38  
39 -GNOME_COMPILE_WARNINGS(yes)
40 -CFLAGS="$CFLAGS $warning_flags"
41 +dnl GNOME_COMPILE_WARNINGS(yes)
42 +dnl CFLAGS="$CFLAGS $warning_flags"
43  
44  AC_SUBST(CFLAGS)
45  AC_SUBST(CPPFLAGS)
46  AC_SUBST(LDFLAGS)
47  
48  AM_GLIB_GNU_GETTEXT
49  
50 -GAIL_MODULES="gail >= gail_minimum_version"
51 -PKG_CHECK_MODULES(GAIL, $GAIL_MODULES)
52 -AC_SUBST(GAIL_CFLAGS)
53 -AC_SUBST(GAIL_LIBS)
54 -AC_SUBST(GAIL_MODULES)
55 +dnl
56 +dnl do we want a11y support?
57 +dnl
58 +GAIL_MODULES=""
59 +AC_ARG_ENABLE(a11y,
60 +             [ --enable-a11y   Enable Accessibility (requires gail) [default=yes]],
61 +             [ac_cv_enable_a11y=$enableval],[ac_cv_enable_a11y=yes])
62 +AC_MSG_CHECKING([whether to enable a11y])
63 +if test "$ac_cv_enable_a11y" = yes; then
64 +       AC_MSG_RESULT(yes)
65 +       GAIL_MODULES="gail >= gail_minimum_version"
66 +       PKG_CHECK_MODULES(GAIL, $GAIL_MODULES)
67 +       AC_SUBST(GAIL_CFLAGS)
68 +       AC_SUBST(GAIL_LIBS)
69 +       AC_SUBST(GAIL_MODULES)
70 +       A11Y_DIR="a11y"
71 +       AC_SUBST(A11Y_DIR)
72 +       A11Y_LA="../a11y/libgtkhtml-a11y.la"
73 +       AC_SUBST(A11Y_LA)
74 +else
75 +       AC_MSG_RESULT(no)
76 +       AC_DEFINE(DISABLE_A11Y)
77 +       CFLAGS="-DDISABLE_A11Y $CFLAGS"
78 +       PC_CFLAGS="-DDISABLE_A11Y $PC_CFLAGS"
79 +fi
80 +
81 +
82 +dnl
83 +dnl do we want printing support?
84 +dnl
85 +GNOMEPRINT_MODULES=""
86 +AC_ARG_ENABLE(printing,
87 +             [ --enable-printing Enable Printing [default=yes]],
88 +             [ac_cv_enable_printing=$enableval],[ac_cv_enable_printing=yes])
89 +AC_MSG_CHECKING([whether to enable printing])
90 +if test "$ac_cv_enable_printing" = yes; then
91 +       AC_MSG_RESULT(yes)
92 +       GNOME_TEST_PROGRAMS="gtest test-suite test-stress"
93 +else
94 +       AC_MSG_RESULT(no)
95 +       AC_DEFINE(DISABLE_PRINTING)
96 +       CFLAGS="-DDISABLE_PRINTING $CFLAGS"
97 +       PC_CFLAGS="-DDISABLE_PRINTING $PC_CFLAGS"
98 +fi
99 +AM_CONDITIONAL(HAVE_PRINTING, test x$ac_cv_enable_printing != xno)
100 +  
101 +dnl
102 +dnl do we want gnome support?
103 +dnl
104 +GNOME_MODULES=""
105 +AC_ARG_ENABLE(gnome,
106 +             [ --enable-gnome Enable Gnome  (requires many things) [default=yes]],
107 +             [ac_cv_enable_gnome=$enableval],[ac_cv_enable_gnome=yes])
108 +AC_MSG_CHECKING([whether to enable gnome])
109 +if test "$ac_cv_enable_gnome" = yes; then
110 +       AC_MSG_RESULT(yes)
111 +       GNOME_MODULES="libgnomeui-2.0 >= libgnomeui_minimum_version"
112 +
113 +       dnl **************************************************
114 +       dnl * Gnome Icon Theme
115 +       dnl **************************************************
116 +       PKG_CHECK_MODULES(GIT, gnome-icon-theme >= 1.2.0)
117 +else
118 +       GNOME_MODULES=""
119 +       AC_MSG_RESULT(no)
120 +       AC_DEFINE(DISABLE_GNOME)
121 +       CFLAGS="-DDISABLE_GNOME $CFLAGS"
122 +       PC_CFLAGS="-DDISABLE_GNOME $PC_CFLAGS"
123 +fi
124 +
125 +dnl libglade only needed on windows?
126 +dnl GTKHTML_MODULES="$GNOME_MODULES $GAIL_MODULES libglade-2.0 >= libglade_minimum_version enchant iso-codes"
127 +GTKHTML_MODULES="$GNOME_MODULES $GAIL_MODULES gtk+-2.0 >= gtk_minimum_version gconf-2.0"
128  
129 -GTKHTML_MODULES="gtk+-2.0 >= gtk_minimum_version libgnomeui-2.0 >= libgnomeui_minimum_version libglade-2.0 >= libglade_minimum_version enchant gconf-2.0 iso-codes"
130  PKG_CHECK_MODULES(GTKHTML, $GTKHTML_MODULES)
131  AC_SUBST(GTKHTML_CFLAGS)
132  AC_SUBST(GTKHTML_LIBS)
133  AC_SUBST(GTKHTML_MODULES)
134  
135 @@ -96,13 +165,25 @@
136          AC_HELP_STRING([--with-bonobo-editor],
137                  [build the older Bonobo-based editor [[default=no]]]),
138          bonobo_editor="$withval", bonobo_editor="no")
139  if test "x$bonobo_editor" = "xyes"; then
140          EDITOR_MODULES="${GTKHTML_MODULES} libbonobo-2.0 >= libbonobo_minimum_version libbonoboui-2.0 >= libbonoboui_minimum_version"
141 +        # These are still needed for 'dist' targets.
142 +        BONOBO_IDL_INCLUDES="-I`$PKG_CONFIG --variable=idldir libbonobo-2.0` -I`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
143 +        AC_SUBST(BONOBO_IDL_INCLUDES)
144 +        ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
145 +        AC_SUBST(ORBIT_IDL)
146 +
147          PKG_CHECK_MODULES(EDITOR, $EDITOR_MODULES)
148          AC_SUBST(EDITOR_CFLAGS)
149          AC_SUBST(EDITOR_LIBS)
150 +
151 +        EDITOR_DIR="components"
152 +        AC_SUBST(EDITOR_DIR)
153 +else
154 +        AC_MSG_RESULT(no)
155 +        AC_DEFINE(DISABLE_EDITOR)
156  fi
157  AM_CONDITIONAL(BONOBO_EDITOR, test x$bonobo_editor = xyes)
158  
159  # Glade catalog files
160  AC_ARG_WITH(glade-catalog,
161 @@ -113,31 +194,20 @@
162  if test "x$glade_catalog" = "xyes"; then
163         PKG_CHECK_MODULES(GLADEUI, gladeui-1.0)
164  fi
165  AM_CONDITIONAL(GLADE_CATALOG, test x$glade_catalog = xyes)
166  
167 -# These are still needed for 'dist' targets.
168 -BONOBO_IDL_INCLUDES="-I`$PKG_CONFIG --variable=idldir libbonobo-2.0` -I`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
169 -AC_SUBST(BONOBO_IDL_INCLUDES)
170 -ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
171 -AC_SUBST(ORBIT_IDL)
172 -
173  dnl **********************************
174  dnl soup for testgtkhtml
175  dnl **********************************
176  
177  PKG_CHECK_MODULES(SOUP, libsoup-2.4, have_soup="yes", have_soup="no")
178  AM_CONDITIONAL(HAVE_SOUP, test x$have_soup != xno)
179  AC_SUBST(SOUP_CFLAGS)
180  AC_SUBST(SOUP_LIBS)
181  
182  dnl **************************************************
183 -dnl * Gnome Icon Theme
184 -dnl **************************************************
185 -PKG_CHECK_MODULES(GIT, gnome-icon-theme >= gnome_icon_theme_minimum_version)
186 -
187 -dnl **************************************************
188  dnl * iso-codes
189  dnl **************************************************
190  
191  AC_MSG_CHECKING([for iso-codes package])
192  have_iso_codes=no
193 @@ -214,10 +284,12 @@
194  
195  AC_SUBST(GTKHTML_CURRENT)
196  AC_SUBST(GTKHTML_REVISION)
197  AC_SUBST(GTKHTML_AGE)
198  
199 +AC_SUBST(PC_CFLAGS)
200 +
201  dnl **************
202  dnl Done.
203  dnl **************
204  
205  AC_OUTPUT([
206 @@ -237,7 +309,12 @@
207  
208  echo "
209  
210  Configuration:
211  
212 +       accessibility support:          $ac_cv_enable_a11y
213 +       gnome-print support:            $ac_cv_enable_printing
214 +       gnome support:                  $ac_cv_enable_gnome
215 +       bonobo-editor component:        $bonobo_editor
216 +
217         Editor component type:          ${GNOME_GTKHTML_EDITOR_TYPE}
218  "
219 diff -r -U5 gtkhtml-3.24.4/gtkhtml/gtkhtml.c gtkhtml-3.24.4/gtkhtml/gtkhtml.c
220 --- gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2008-10-16 09:59:50.000000000 +0200
221 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2008-10-16 10:53:23.000000000 +0200
222 @@ -24,11 +24,17 @@
223  
224  #include <gdk/gdkkeysyms.h>
225  #include <glib/gi18n-lib.h>
226  #include <string.h>
227  
228 +#ifndef DISABLE_GNOME
229 +#include <libgnome/gnome-util.h>
230 +#endif
231 +
232 +#ifndef DISABLE_A11Y
233  #include "../a11y/factory.h"
234 +#endif
235  
236  #include "htmlcolorset.h"
237  #include "htmlcluev.h"
238  #include "htmlcursor.h"
239  #include "htmldrawqueue.h"
240 @@ -67,11 +73,10 @@
241  #include "gtkhtml-search.h"
242  #include "gtkhtml-stream.h"
243  #include "gtkhtml-private.h"
244  #include "gtkhtml-properties.h"
245  #include "math.h"
246 -#include <libgnome/gnome-util.h>
247  
248  enum DndTargetType {
249         DND_TARGET_TYPE_MESSAGE_RFC822,
250         DND_TARGET_TYPE_X_UID_LIST,
251         DND_TARGET_TYPE_TEXT_URI_LIST,
252 @@ -3044,11 +3049,14 @@
253         html_class->scroll            = scroll;
254         html_class->cursor_move       = cursor_move;
255         html_class->command           = command;
256  
257         add_bindings (klass);
258 +
259 +#ifndef DISABLE_A11Y
260         gtk_html_accessibility_init ();
261 +#endif /* ndef DISABLE_A11Y */
262  
263         filename = g_build_filename (PREFIX, "share", GTKHTML_RELEASE_STRING, "keybindingsrc.emacs", NULL);
264         gtk_rc_parse (filename);
265         g_free (filename);
266         html_class->emacs_bindings = gtk_binding_set_find ("gtkhtml-bindings-emacs");
267 @@ -4053,11 +4061,11 @@
268         g_return_val_if_fail (GTK_IS_HTML (html), NULL);
269  
270         return html->priv->base_url;
271  }
272  
273 -\f
274 +#ifndef DISABLE_PRINTING
275  /* Printing.  */
276  void
277  gtk_html_print_page (GtkHTML *html, GtkPrintContext *context)
278  {
279         g_return_if_fail (html != NULL);
280 @@ -4081,11 +4089,11 @@
281         html_engine_print (
282                 html->engine, context, header_height, footer_height,
283                 header_print, footer_print, user_data);
284  }
285  
286 -\f
287 +#endif /* ndef DISABLE_PRINTING */
288  /* Editing.  */
289  
290  void
291  gtk_html_set_paragraph_style (GtkHTML *html,
292                               GtkHTMLParagraphStyle style)
293 @@ -6075,11 +6083,11 @@
294  void
295  gtk_html_set_images_blocking (GtkHTML *html, gboolean block)
296  {
297         html->engine->block_images = block;
298  }
299 -
300 +#ifndef DISABLE_PRINTING
301  gint
302  gtk_html_print_page_get_pages_num (GtkHTML *html,
303                                    GtkPrintContext *context,
304                                    gdouble header_height,
305                                    gdouble footer_height)
306 @@ -6103,10 +6111,11 @@
307         return html_engine_print_operation_run (
308                 html->engine, operation, action, parent,
309                 calc_header_height, calc_footer_height,
310                 draw_header, draw_footer, user_data, error);
311  }
312 +#endif /* ndef DISABLE_PRINTING */
313  
314  gboolean
315  gtk_html_has_undo (GtkHTML *html)
316  {
317         return html_undo_has_undo_steps (html->engine->undo);
318 diff -r -U5 gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.c gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.c
319 --- gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.c   2008-06-13 05:05:58.000000000 +0200
320 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.c   2008-10-16 10:50:53.000000000 +0200
321 @@ -117,11 +117,13 @@
322         old_remove(container, child);
323  
324         gtk_html_embedded_changed(GTK_HTML_EMBEDDED(container));
325  }
326  
327 +#ifndef DISABLE_PRINTING
328  typedef void (*draw_print_signal)(GtkObject *, gpointer, gpointer);
329 +#endif /* ndef DISABLE_PRINTING */
330  typedef void (*draw_gdk_signal)(GtkObject *, gpointer, gpointer, gint, gint, gpointer);
331  
332  static void
333  draw_gdk_signal_marshaller (GClosure     *closure,
334                             GValue       *return_value,
335 @@ -186,21 +188,21 @@
336                               G_STRUCT_OFFSET (GtkHTMLEmbeddedClass, draw_gdk),
337                               NULL, NULL,
338                               draw_gdk_signal_marshaller, G_TYPE_NONE, 4,
339                               G_TYPE_POINTER, G_TYPE_POINTER,
340                               G_TYPE_INT, G_TYPE_INT);
341 -
342 +#ifndef DISABLE_PRINTING
343         signals [DRAW_PRINT] =
344                 g_signal_new ("draw_print",
345                               G_TYPE_FROM_CLASS (object_class),
346                               G_SIGNAL_RUN_FIRST,
347                               G_STRUCT_OFFSET (GtkHTMLEmbeddedClass, draw_print),
348                               NULL, NULL,
349                               g_cclosure_marshal_VOID__POINTER,
350                               G_TYPE_NONE, 1,
351                               G_TYPE_POINTER);
352 -
353 +#endif /* ndef DISABLE_PRINTING */
354         gobject_class->finalize = gtk_html_embedded_finalize;
355  
356         widget_class->size_request = gtk_html_embedded_size_request;
357         widget_class->size_allocate = gtk_html_embedded_size_allocate;
358  
359 diff -r -U5 gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.h gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.h
360 --- gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.h   2008-07-18 08:18:37.000000000 +0200
361 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml-embedded.h   2008-10-16 10:00:55.000000000 +0200
362 @@ -54,11 +54,13 @@
363          GtkBinClass parent_class;
364  
365          void (*changed)(GtkHTMLEmbedded *);
366          void (*draw_gdk)(GtkHTMLEmbedded *, GdkPixmap *, GdkGC *,
367                           gint, gint);
368 +#ifndef DISABLE_PRINTING
369          void (*draw_print)(GtkHTMLEmbedded *, GtkPrintContext *);
370 +#endif /* ndef DISABLE_PRINTING */
371  };
372  
373  /* FIXME: There needs to be a way for embedded objects in forms to encode
374     themselves for a form */
375  
376 diff -r -U5 gtkhtml-3.24.4/gtkhtml/gtkhtml.h gtkhtml-3.24.4/gtkhtml/gtkhtml.h
377 --- gtkhtml-3.24.4/gtkhtml/gtkhtml.h    2008-08-18 06:54:55.000000000 +0200
378 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml.h    2008-10-16 10:49:41.000000000 +0200
379 @@ -208,11 +208,11 @@
380  
381  /* Animated Images */
382  void                       gtk_html_set_animate                   (GtkHTML                   *html,
383                                                                    gboolean                   animate);
384  gboolean                   gtk_html_get_animate                   (const GtkHTML             *html);
385 -
386 +#ifndef DISABLE_PRINTING
387  /* Printing support.  */
388  void                      gtk_html_print_page_with_header_footer (GtkHTML                   *html,
389                                                                    GtkPrintContext           *context,
390                                                                    gdouble                    header_height,
391                                                                    gdouble                    footer_height,
392 @@ -233,11 +233,11 @@
393                                                                    GtkHTMLPrintCalcHeight      calc_footer_height,
394                                                                    GtkHTMLPrintDrawFunc        draw_header,
395                                                                    GtkHTMLPrintDrawFunc        draw_footer,
396                                                                    gpointer                    user_data,
397                                                                    GError                    **error);
398 -
399 +#endif /* ndef DISABLE_PRINTING */
400  /* Title.  */
401  const gchar               *gtk_html_get_title                     (GtkHTML                   *html);
402  void                       gtk_html_set_title                     (GtkHTML                   *html, const char *title);
403  
404  /* Anchors.  */
405 diff -r -U5 gtkhtml-3.24.4/gtkhtml/gtkhtml-types.h gtkhtml-3.24.4/gtkhtml/gtkhtml-types.h
406 --- gtkhtml-3.24.4/gtkhtml/gtkhtml-types.h      2008-04-11 13:14:42.000000000 +0200
407 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml-types.h      2008-10-16 10:47:22.000000000 +0200
408 @@ -49,11 +49,11 @@
409  /* FIXME 1st param should be Engine */
410  typedef gboolean (* GtkHTMLSaveReceiverFn)   (gpointer     engine,
411                                               const gchar *data,
412                                               size_t       len,
413                                               gpointer     user_data);
414 -
415 +#ifndef DISABLE_PRINTING
416  typedef gint    (*GtkHTMLPrintCalcHeight) (GtkHTML *html,
417                                            GtkPrintOperation *operation,
418                                             GtkPrintContext *context,
419                                             gpointer user_data);
420  typedef void    (*GtkHTMLPrintDrawFunc)   (GtkHTML *html,
421 @@ -63,7 +63,7 @@
422                                            PangoRectangle *rec,
423                                            gpointer user_data);
424  
425  typedef void (*GtkHTMLPrintCallback) (GtkHTML *html, GtkPrintContext *print_context,
426                                       gdouble x, gdouble y, gdouble width, gdouble height, gpointer user_data);
427 -
428 +#endif /* ndef DISABLE_PRINTING */
429  #endif
430 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmlengine.c gtkhtml-3.24.4/gtkhtml/htmlengine.c
431 --- gtkhtml-3.24.4/gtkhtml/htmlengine.c 2008-10-16 09:59:50.000000000 +0200
432 +++ gtkhtml-3.24.4/gtkhtml/htmlengine.c 2008-10-16 10:02:08.000000000 +0200
433 @@ -48,11 +48,13 @@
434  #include "htmlengine-edit.h"
435  #include "htmlengine-edit-cursor.h"
436  #include "htmlengine-edit-movement.h"
437  #include "htmlengine-edit-cut-and-paste.h"
438  #include "htmlengine-edit-selection-updater.h"
439 +#ifndef DISABLE_PRINTING
440  #include "htmlengine-print.h"
441 +#endif /* ndef DISABLE_PRINTING */
442  #include "htmlcolor.h"
443  #include "htmlinterval.h"
444  #include "htmlobject.h"
445  #include "htmlsettings.h"
446  #include "htmltext.h"
447 @@ -4382,13 +4384,13 @@
448  
449         engine->selection_updater = html_engine_edit_selection_updater_new (engine);
450  
451         engine->search_info = NULL;
452         engine->need_spell_check = FALSE;
453 -
454 +#ifndef DISABLE_PRINTING
455         html_engine_print_set_min_split_index (engine, .75);
456 -
457 +#endif /* ndef DISABLE_PRINTING */
458         engine->block = FALSE;
459         engine->block_images = FALSE;
460         engine->save_data = FALSE;
461         engine->saved_step_count = -1;
462  
463 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmlengine-print.c gtkhtml-3.24.4/gtkhtml/htmlengine-print.c
464 --- gtkhtml-3.24.4/gtkhtml/htmlengine-print.c   2008-04-11 13:14:42.000000000 +0200
465 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-print.c   2008-10-16 10:01:30.000000000 +0200
466 @@ -18,10 +18,13 @@
467     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
468     Boston, MA 02110-1301, USA.
469  */
470  
471  #include <config.h>
472 +
473 +#ifndef DISABLE_PRINTING
474 +
475  #include <gtk/gtk.h>
476  #include <glib/gi18n-lib.h>
477  #include "gtkhtml.h"
478  #include "gtkhtmldebug.h"
479  #include "gtkhtml-private.h"
480 @@ -511,5 +514,7 @@
481                 operation, "end-print",
482                 G_CALLBACK (engine_print_end_print), &data);
483  
484         return gtk_print_operation_run (operation, action, parent, error);
485  }
486 +
487 +#endif /* ndef DISABLE_PRINTING */
488 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmlengine-print.h gtkhtml-3.24.4/gtkhtml/htmlengine-print.h
489 --- gtkhtml-3.24.4/gtkhtml/htmlengine-print.h   2008-04-11 13:14:42.000000000 +0200
490 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-print.h   2008-10-16 10:46:24.000000000 +0200
491 @@ -20,10 +20,12 @@
492  */
493  
494  #ifndef _HTMLENGINE_PRINT_H
495  #define _HTMLENGINE_PRINT_H
496  
497 +#ifndef DISABLE_PRINTING
498 +
499  #include <gtk/gtk.h>
500  #include "htmlengine.h"
501  
502  void   html_engine_print               (HTMLEngine *engine,
503                                          GtkPrintContext *context,
504 @@ -48,7 +50,7 @@
505                                     GtkHTMLPrintCalcHeight calc_footer_height,
506                                     GtkHTMLPrintDrawFunc draw_header,
507                                     GtkHTMLPrintDrawFunc draw_footer,
508                                     gpointer user_data,
509                                     GError **error);
510 -
511 +#endif /* ndef DISABLE_PRINTING */
512  #endif
513 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmlframe.c gtkhtml-3.24.4/gtkhtml/htmlframe.c
514 --- gtkhtml-3.24.4/gtkhtml/htmlframe.c  2008-07-18 08:18:37.000000000 +0200
515 +++ gtkhtml-3.24.4/gtkhtml/htmlframe.c  2008-10-16 10:48:54.000000000 +0200
516 @@ -165,11 +165,11 @@
517        gint tx, gint ty)
518  {
519         HTMLFrame   *frame  = HTML_FRAME (o);
520         HTMLEngine   *e       = GTK_HTML (frame->html)->engine;
521         GdkRectangle paint;
522 -
523 +#ifndef DISABLE_PRINTING
524         if (GTK_OBJECT_TYPE (e->painter) == HTML_TYPE_PRINTER) {
525                 gint pixel_size = html_painter_get_pixel_size (e->painter);
526  
527                 if (!html_object_intersect (o, &paint, x, y, width, height))
528                         return;
529 @@ -178,25 +178,30 @@
530                                   x, y,
531                                   width - pixel_size * (html_engine_get_left_border (e) + html_engine_get_right_border (e)),
532                                   height - pixel_size * (html_engine_get_top_border (e) + html_engine_get_bottom_border (e)),
533                                   tx + pixel_size * html_engine_get_left_border (e), ty + pixel_size * html_engine_get_top_border (e));
534         } else
535 +#endif /* ndef DISABLE_PRINTING */
536                 (*HTML_OBJECT_CLASS (parent_class)->draw) (o, p, x, y, width, height, tx, ty);
537  }
538  
539  static void
540  set_painter (HTMLObject *o, HTMLPainter *painter)
541  {
542         HTMLFrame *frame;
543  
544         frame = HTML_FRAME (o);
545 -       if (G_OBJECT_TYPE (GTK_HTML (frame->html)->engine->painter) != HTML_TYPE_PRINTER) {
546 +#ifndef DISABLE_PRINTING
547 +       if (G_OBJECT_TYPE (GTK_HTML (frame->html)->engine->painter) != HTML_TYPE_PRINTER)
548 +#endif /* ndef DISABLE_PRINTING */
549                 frame_set_gdk_painter (frame, GTK_HTML (frame->html)->engine->painter);
550 -       }
551 -
552 +#ifdef DISABLE_PRINTING
553 +    html_engine_set_painter (GTK_HTML (frame->html)->engine, frame->gdk_painter);
554 +#else /* def DISABLE_PRINTING */
555         html_engine_set_painter (GTK_HTML (frame->html)->engine,
556                                  GTK_OBJECT_TYPE (painter) != HTML_TYPE_PRINTER ? frame->gdk_painter : painter);
557 +#endif
558  }
559  
560  static void
561  forall (HTMLObject *self,
562         HTMLEngine *e,
563 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmliframe.c gtkhtml-3.24.4/gtkhtml/htmliframe.c
564 --- gtkhtml-3.24.4/gtkhtml/htmliframe.c 2008-07-18 08:18:37.000000000 +0200
565 +++ gtkhtml-3.24.4/gtkhtml/htmliframe.c 2008-10-16 10:45:41.000000000 +0200
566 @@ -164,10 +164,11 @@
567        HTMLPainter *p,
568        gint x, gint y,
569        gint width, gint height,
570        gint tx, gint ty)
571  {
572 +#ifndef DISABLE_PRINTING
573         HTMLIFrame   *iframe  = HTML_IFRAME (o);
574         HTMLEngine   *e       = GTK_HTML (iframe->html)->engine;
575         GdkRectangle paint;
576  
577         if (GTK_OBJECT_TYPE (e->painter) == HTML_TYPE_PRINTER) {
578 @@ -180,25 +181,30 @@
579                                   x, y,
580                                   width - pixel_size * (html_engine_get_left_border (e) + html_engine_get_right_border (e)),
581                                   height - pixel_size * (html_engine_get_top_border (e) + html_engine_get_bottom_border (e)),
582                                   tx + pixel_size * html_engine_get_left_border (e), ty + pixel_size * html_engine_get_top_border (e));
583         } else
584 +#endif /* ndef DISABLE_PRINTING */
585                 (*HTML_OBJECT_CLASS (parent_class)->draw) (o, p, x, y, width, height, tx, ty);
586  }
587  
588  static void
589  set_painter (HTMLObject *o, HTMLPainter *painter)
590  {
591         HTMLIFrame *iframe;
592  
593         iframe = HTML_IFRAME (o);
594 -       if (G_OBJECT_TYPE (GTK_HTML (iframe->html)->engine->painter) != HTML_TYPE_PRINTER) {
595 +#ifndef DISABLE_PRINTING
596 +       if (G_OBJECT_TYPE (GTK_HTML (iframe->html)->engine->painter) != HTML_TYPE_PRINTER)
597 +#endif
598                 iframe_set_gdk_painter (iframe, GTK_HTML (iframe->html)->engine->painter);
599 -       }
600 -
601 +#ifdef DISABLE_PRINTING
602 +    html_engine_set_painter (GTK_HTML (iframe->html)->engine, iframe->gdk_painter);
603 +#else /* def DISABLE_PRINTING */
604         html_engine_set_painter (GTK_HTML (iframe->html)->engine,
605                                  G_OBJECT_TYPE (painter) != HTML_TYPE_PRINTER ? iframe->gdk_painter : painter);
606 +#endif /* ndef DISABLE_PRINTING */
607  }
608  
609  static void
610  forall (HTMLObject *self,
611         HTMLEngine *e,
612 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmlimage.c gtkhtml-3.24.4/gtkhtml/htmlimage.c
613 --- gtkhtml-3.24.4/gtkhtml/htmlimage.c  2008-06-13 05:05:58.000000000 +0200
614 +++ gtkhtml-3.24.4/gtkhtml/htmlimage.c  2008-10-16 10:43:40.000000000 +0200
615 @@ -383,14 +383,14 @@
616  
617         if (painter->widget && GTK_IS_HTML (painter->widget))
618                 e = html_object_engine (HTML_OBJECT (image), GTK_HTML (painter->widget)->engine);
619         else
620                 return;
621 -
622 +#ifndef DISABLE_PRINTING
623         if (HTML_IS_PRINTER (painter))
624                 return;
625 -
626 +#endif
627         p = HTML_GDK_PAINTER (painter);
628         /* printf ("draw_image_focus\n"); */
629  
630         gdk_gc_set_foreground (p->gc, &html_colorset_get_color_allocated (e->settings->color_set,
631                                                                           painter, HTMLTextColor)->color);
632 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmlprinter.c gtkhtml-3.24.4/gtkhtml/htmlprinter.c
633 --- gtkhtml-3.24.4/gtkhtml/htmlprinter.c        2008-07-18 08:18:37.000000000 +0200
634 +++ gtkhtml-3.24.4/gtkhtml/htmlprinter.c        2008-10-16 10:02:28.000000000 +0200
635 @@ -18,10 +18,13 @@
636     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
637     Boston, MA 02110-1301, USA.
638  */
639  
640  #include <config.h>
641 +
642 +#ifndef DISABLE_PRINTING
643 +
644  #include "gtkhtml-compat.h"
645  
646  #include <string.h>
647  #include <ctype.h>
648  
649 @@ -721,5 +724,7 @@
650         painter = HTML_PAINTER (printer);
651  
652         printer->scale = scale;
653         painter->engine_to_pango = scale;
654  }
655 +
656 +#endif /* ndef DISABLE_PRINTING */
657 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmlprinter.h gtkhtml-3.24.4/gtkhtml/htmlprinter.h
658 --- gtkhtml-3.24.4/gtkhtml/htmlprinter.h        2008-07-18 08:18:37.000000000 +0200
659 +++ gtkhtml-3.24.4/gtkhtml/htmlprinter.h        2008-10-16 10:02:34.000000000 +0200
660 @@ -23,10 +23,12 @@
661  #define _HTMLPRINTER_H
662  
663  #include <gtk/gtk.h>
664  #include "htmlpainter.h"
665  
666 +#ifndef DISABLE_PRINTING
667 +
668  #define HTML_TYPE_PRINTER                 (html_printer_get_type ())
669  #define HTML_PRINTER(obj)                 (G_TYPE_CHECK_INSTANCE_CAST((obj), HTML_TYPE_PRINTER, HTMLPrinter))
670  #define HTML_PRINTER_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), HTML_TYPE_PRINTER, HTMLPrinterClass))
671  #define HTML_IS_PRINTER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HTML_TYPE_PRINTER))
672  #define HTML_IS_PRINTER_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), HTML_TYPE_PRINTER))
673 @@ -56,6 +58,7 @@
674  gdouble      html_printer_scale_to_gnome_print        (HTMLPrinter       *printer,
675                                                        gint               x);
676  void         html_printer_set_scale                   (HTMLPrinter       *printer,
677                                                        gdouble            scale);
678  
679 +#endif /* ndef DISABLE_PRINTING */
680  #endif /* _HTMLPRINTER_H */
681 diff -r -U5 gtkhtml-3.24.4/gtkhtml/htmltextslave.c gtkhtml-3.24.4/gtkhtml/htmltextslave.c
682 --- gtkhtml-3.24.4/gtkhtml/htmltextslave.c      2008-04-11 13:14:42.000000000 +0200
683 +++ gtkhtml-3.24.4/gtkhtml/htmltextslave.c      2008-10-16 10:42:53.000000000 +0200
684 @@ -860,14 +860,14 @@
685  
686         if (painter->widget && GTK_IS_HTML (painter->widget))
687                 e = html_object_engine (HTML_OBJECT (slave->owner), GTK_HTML (painter->widget)->engine);
688         else
689                 return;
690 -
691 +#ifndef DISABLE_PRINTING
692         if (HTML_IS_PRINTER (painter))
693                 return;
694 -
695 +#endif /* ndef DISABLE_PRINTING */
696         p = HTML_GDK_PAINTER (painter);
697         /* printf ("draw_text_focus\n"); */
698  
699         gdk_gc_set_foreground (p->gc, &html_colorset_get_color_allocated (e->settings->color_set,
700                                                                           painter, HTMLTextColor)->color);
701 diff -r -U5 gtkhtml-3.24.4/gtkhtml/libgtkhtml.pc.in gtkhtml-3.24.4/gtkhtml/libgtkhtml.pc.in
702 --- gtkhtml-3.24.4/gtkhtml/libgtkhtml.pc.in     2008-04-11 13:14:42.000000000 +0200
703 +++ gtkhtml-3.24.4/gtkhtml/libgtkhtml.pc.in     2008-10-16 10:02:54.000000000 +0200
704 @@ -8,6 +8,6 @@
705  Name: libgtkhtml
706  Description: libgtkhtml
707  Requires: @GTKHTML_MODULES@
708  Version: @VERSION@
709  Libs: -L${libdir} -lgtkhtml-@GTKHTML_API_VERSION@
710 -Cflags: -I${includedir}/libgtkhtml-@GTKHTML_API_VERSION@
711 +Cflags: -I${includedir}/libgtkhtml-@GTKHTML_API_VERSION@ @PC_CFLAGS@
712 diff -r -U5 gtkhtml-3.24.4/gtkhtml/Makefile.am gtkhtml-3.24.4/gtkhtml/Makefile.am
713 --- gtkhtml-3.24.4/gtkhtml/Makefile.am  2008-05-12 09:18:34.000000000 +0200
714 +++ gtkhtml-3.24.4/gtkhtml/Makefile.am  2008-10-16 10:33:55.000000000 +0200
715 @@ -207,22 +207,25 @@
716         htmlengine-edit-table.h                 \
717         $(PLATFORM_DEP_SOURCES)                 \
718         $(NULL)
719  
720  libgtkhtml_3_14_la_LDFLAGS = -version-info $(GTKHTML_CURRENT):$(GTKHTML_REVISION):$(GTKHTML_AGE) -no-undefined
721 -libgtkhtml_3_14_la_LIBADD = $(GTKHTML_LIBS) ../a11y/libgtkhtml-a11y.la $(GAIL_LIBS) $(REGEX_LIBS)
722 +libgtkhtml_3_14_la_LIBADD = $(GTKHTML_LIBS) $(A11Y_LA) $(GAIL_LIBS) $(REGEX_LIBS)
723  
724  dist-hook:
725         mkdir $(distdir)/tests
726         cp -f $(srcdir)/tests/*.html $(distdir)/tests
727         cp -f $(srcdir)/tests/*.jpg $(distdir)/tests
728  
729  if HAVE_SOUP
730  test_programs = testgtkhtml
731  endif
732 -noinst_PROGRAMS = $(test_programs) gtest test-suite test-stress
733 +if HAVE_PRINTING
734 +gnome_test_programs = gtest test-suite test-stress
735 +endif
736  
737 +noinst_PROGRAMS = $(test_programs) $(gnome_test_programs) 
738  
739  testgtkhtml_SOURCES =          \
740         testgtkhtml.c           \
741         htmlurl.h               \
742         htmlurl.c
743 diff -r -U5 gtkhtml-3.24.4/Makefile.am gtkhtml-3.24.4/Makefile.am
744 --- gtkhtml-3.24.4/Makefile.am  2008-08-01 08:36:01.000000000 +0200
745 +++ gtkhtml-3.24.4/Makefile.am  2008-10-16 10:03:52.000000000 +0200
746 @@ -1,11 +1,10 @@
747  SUBDIRS =                                      \
748 -       a11y                                    \
749 +       $(A11Y_DIR)                             \
750         gtkhtml                                 \
751 -       components                              \
752 -       art                                     \
753 -       po
754 +       $(EDITOR_DIR)                   \
755 +       art
756  
757  CLEANFILES =                                   \
758         po/.intltool-merge-cache
759  
760  DISTCLEANFILES =                               \