Printing is enabled unconditionally with gtk >= 2.10.0 now

This commit is contained in:
Yevgen Muntyan 2006-07-05 14:14:02 -05:00
parent 1cc54983ce
commit 3925c87e0b
5 changed files with 9 additions and 46 deletions

View File

@ -9,12 +9,6 @@ if you are not familiar with configure).
configure has the following medit-specific options:
--enable-printing enable printing support with GTK-2.9
This option exists for the period until GTK-2.10 is released. GTK has
printing support since 2.9, but it's not stable yet, therefore current code
may be broken with future versions of GTK. Use this option only if you are
ready to have broken builds (bug reports about those are still welcome).
--enable-debug enable debug options (default = NO)
--enable-all-gcc-warnings
enable most of gcc warnings and turn on -pedantic

View File

@ -39,34 +39,6 @@ AC_DEFUN([_MOO_CHECK_VERSION],[
])
##############################################################################
# _MOO_CHECK_GTK_PRINTING
#
AC_DEFUN([_MOO_CHECK_GTK_PRINTING],[
AC_ARG_ENABLE([printing], AC_HELP_STRING([--enable-printing], [whether to enable printing support with gtk >= 2.9 (default = NO, it is UNSTABLE)]), [
if test x$enable_printing = "xyes"; then
MOO_ENABLE_PRINTING="yes"
else
MOO_ENABLE_PRINTING="no"
fi
],[
MOO_ENABLE_PRINTING="no"
])
if test $GTK_MINOR_VERSION -lt 9; then
AC_MSG_NOTICE([GTK version is $GTK_VERSION, no printing])
MOO_ENABLE_PRINTING="no"
elif test x$MOO_ENABLE_PRINTING = xno; then
AC_MSG_NOTICE([printing disabled])
else
AC_DEFINE(MOO_ENABLE_PRINTING, 1, [enable printing])
AC_MSG_NOTICE([printing enabled])
fi
AM_CONDITIONAL(MOO_ENABLE_PRINTING, test x$MOO_ENABLE_PRINTING = xyes)
])
##############################################################################
# _MOO_CHECK_BROKEN_GTK_THEME
#
@ -93,6 +65,5 @@ AC_DEFUN([MOO_PKG_CHECK_GTK_VERSIONS],[
_MOO_CHECK_VERSION(GLIB, glib-2.0)
_MOO_CHECK_VERSION(GDK, gdk-2.0)
_MOO_CHECK_GTK_PRINTING
_MOO_CHECK_BROKEN_GTK_THEME
])

View File

@ -238,10 +238,6 @@ show_system_info (void)
g_string_append (text, "Broken gtk theme: yes\n");
#endif
#ifdef MOO_ENABLE_PRINTING
g_string_append (text, "Printing enabled: yes\n");
#endif
gtk_text_buffer_set_text (buffer, text->str, -1);
g_string_free (text, TRUE);

View File

@ -148,7 +148,7 @@ $(mooedit)/mooprint-glade.h: $(mooedit_srcdir)/glade/mooprint.glade $(XML2H)
sh $(XML2H) MOO_PRINT_GLADE_XML $(mooedit_srcdir)/glade/mooprint.glade \
> $(mooedit)/mooprint-glade.h
if MOO_ENABLE_PRINTING
if GTK_2_10
mooedit_sources += $(mooedit_printing_sources)
else
mooedit_extra_dist = $(mooedit_printing_sources)

View File

@ -32,12 +32,14 @@
#include "mooutils/moocompat.h"
#include "mooutils/mooglade.h"
#include "moofileview/moofilesystem.h"
#ifdef MOO_ENABLE_PRINTING
#include "mooedit/mootextprint.h"
#endif
#include <string.h>
#include <gtk/gtk.h>
#if GTK_CHECK_VERSION(2,10,0)
#define ENABLE_PRINTING
#include "mooedit/mootextprint.h"
#endif
#define ACTIVE_DOC moo_edit_window_get_active_doc
#define ACTIVE_PAGE(window) (moo_notebook_get_current_page (window->priv->notebook))
@ -228,7 +230,7 @@ static void line_numbers_toggled (MooEditWindow *window,
gboolean active);
#ifdef MOO_ENABLE_PRINTING
#ifdef ENABLE_PRINTING
static void action_page_setup (MooEditWindow *window);
static void action_print (MooEditWindow *window);
#endif
@ -728,7 +730,7 @@ moo_edit_window_class_init (MooEditWindowClass *klass)
"no-accel", TRUE,
NULL);
#ifdef MOO_ENABLE_PRINTING
#ifdef ENABLE_PRINTING
moo_window_class_new_action (window_class, "PageSetup",
"display-name", "Page Setup",
"label", "Page Setup",
@ -1301,7 +1303,7 @@ action_prev_ph (MooEditWindow *window)
}
#ifdef MOO_ENABLE_PRINTING
#ifdef ENABLE_PRINTING
static void
action_page_setup (MooEditWindow *window)
{