Added MOO_ENABLE_PRINTING
parent
aff4419923
commit
ba649ef5f9
6
INSTALL
6
INSTALL
|
@ -9,6 +9,12 @@ if you are not familiar with configure).
|
||||||
|
|
||||||
configure has the following medit-specific options:
|
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-debug enable debug options (default = NO)
|
||||||
--enable-all-gcc-warnings
|
--enable-all-gcc-warnings
|
||||||
enable most of gcc warnings and turn on -pedantic
|
enable most of gcc warnings and turn on -pedantic
|
||||||
|
|
|
@ -26,11 +26,6 @@ AC_DEFUN([_MOO_CHECK_VERSION],[
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# 2.9 counts as 2.10
|
|
||||||
if test $[]$1[]_MINOR_VERSION -ge 9; then
|
|
||||||
moo_ver_2_10=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_RESULT($[]$1[]_MAJOR_VERSION.$[]$1[]_MINOR_VERSION.$[]$1[]_MICRO_VERSION)
|
AC_MSG_RESULT($[]$1[]_MAJOR_VERSION.$[]$1[]_MINOR_VERSION.$[]$1[]_MICRO_VERSION)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -52,4 +47,26 @@ AC_DEFUN([MOO_PKG_CHECK_GTK_VERSIONS],[
|
||||||
_MOO_CHECK_VERSION(GTK, gtk+-2.0)
|
_MOO_CHECK_VERSION(GTK, gtk+-2.0)
|
||||||
_MOO_CHECK_VERSION(GLIB, glib-2.0)
|
_MOO_CHECK_VERSION(GLIB, glib-2.0)
|
||||||
_MOO_CHECK_VERSION(GDK, gdk-2.0)
|
_MOO_CHECK_VERSION(GDK, gdk-2.0)
|
||||||
|
|
||||||
|
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)
|
||||||
])
|
])
|
||||||
|
|
42
moo.kdevelop
42
moo.kdevelop
|
@ -27,7 +27,7 @@
|
||||||
</ignoreparts>
|
</ignoreparts>
|
||||||
<projectdirectory>.</projectdirectory>
|
<projectdirectory>.</projectdirectory>
|
||||||
<absoluteprojectpath>false</absoluteprojectpath>
|
<absoluteprojectpath>false</absoluteprojectpath>
|
||||||
<description/>
|
<description></description>
|
||||||
<secondaryLanguages>
|
<secondaryLanguages>
|
||||||
<language>C</language>
|
<language>C</language>
|
||||||
</secondaryLanguages>
|
</secondaryLanguages>
|
||||||
|
@ -49,21 +49,21 @@
|
||||||
</run>
|
</run>
|
||||||
<configurations>
|
<configurations>
|
||||||
<debug>
|
<debug>
|
||||||
<configargs>--enable-debug=full --enable-all-gcc-warnings</configargs>
|
<configargs>--enable-debug=full --enable-all-gcc-warnings --enable-printing</configargs>
|
||||||
<builddir>build/debug</builddir>
|
<builddir>build/debug</builddir>
|
||||||
<ccompiler>kdevgccoptions</ccompiler>
|
<ccompiler>kdevgccoptions</ccompiler>
|
||||||
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||||
<f77compiler>kdevg77options</f77compiler>
|
<f77compiler>kdevg77options</f77compiler>
|
||||||
<cflags>-O0 -g3</cflags>
|
<cflags>-O0 -g3</cflags>
|
||||||
<topsourcedir/>
|
<topsourcedir></topsourcedir>
|
||||||
<cppflags/>
|
<cppflags></cppflags>
|
||||||
<ccompilerbinary/>
|
<ccompilerbinary></ccompilerbinary>
|
||||||
<cxxcompilerbinary/>
|
<cxxcompilerbinary></cxxcompilerbinary>
|
||||||
<f77compilerbinary/>
|
<f77compilerbinary></f77compilerbinary>
|
||||||
<f77flags/>
|
<f77flags></f77flags>
|
||||||
<envvars/>
|
<envvars/>
|
||||||
<ldflags/>
|
<ldflags></ldflags>
|
||||||
<cxxflags/>
|
<cxxflags></cxxflags>
|
||||||
</debug>
|
</debug>
|
||||||
<gtk-print>
|
<gtk-print>
|
||||||
<configargs>--enable-debug --enable-all-gcc-warnings --without-python --prefix=/usr/local/gtk-print</configargs>
|
<configargs>--enable-debug --enable-all-gcc-warnings --without-python --prefix=/usr/local/gtk-print</configargs>
|
||||||
|
@ -221,15 +221,15 @@
|
||||||
</kdevautoproject>
|
</kdevautoproject>
|
||||||
<kdevdebugger>
|
<kdevdebugger>
|
||||||
<general>
|
<general>
|
||||||
<dbgshell/>
|
<dbgshell></dbgshell>
|
||||||
<programargs>--g-fatal-warnings</programargs>
|
<programargs>--g-fatal-warnings</programargs>
|
||||||
<breakonloadinglibs>true</breakonloadinglibs>
|
<breakonloadinglibs>true</breakonloadinglibs>
|
||||||
<separatetty>false</separatetty>
|
<separatetty>false</separatetty>
|
||||||
<floatingtoolbar>true</floatingtoolbar>
|
<floatingtoolbar>true</floatingtoolbar>
|
||||||
<gdbpath/>
|
<gdbpath></gdbpath>
|
||||||
<configGdbScript/>
|
<configGdbScript></configGdbScript>
|
||||||
<runShellScript/>
|
<runShellScript></runShellScript>
|
||||||
<runGdbScript/>
|
<runGdbScript></runGdbScript>
|
||||||
</general>
|
</general>
|
||||||
<display>
|
<display>
|
||||||
<staticmembers>true</staticmembers>
|
<staticmembers>true</staticmembers>
|
||||||
|
@ -291,16 +291,16 @@
|
||||||
</kdevdoctreeview>
|
</kdevdoctreeview>
|
||||||
<kdevfilecreate>
|
<kdevfilecreate>
|
||||||
<filetypes>
|
<filetypes>
|
||||||
<type icon="source" ext="g" name="GAP source" create="template" >
|
<type icon="source" ext="g" create="template" name="GAP source" >
|
||||||
<descr>A new empty GAP source file</descr>
|
<descr>A new empty GAP source file</descr>
|
||||||
</type>
|
</type>
|
||||||
<type icon="source_cpp" ext="cpp" name="C++ Source" create="template" >
|
<type icon="source_cpp" ext="cpp" create="template" name="C++ Source" >
|
||||||
<descr>A new empty C++ file.</descr>
|
<descr>A new empty C++ file.</descr>
|
||||||
</type>
|
</type>
|
||||||
<type icon="source_h" ext="h" name="C/C++ Header" create="template" >
|
<type icon="source_h" ext="h" create="template" name="C/C++ Header" >
|
||||||
<descr>A new empty header file for C/C++.</descr>
|
<descr>A new empty header file for C/C++.</descr>
|
||||||
</type>
|
</type>
|
||||||
<type icon="source_c" ext="c" name="C Source" create="template" >
|
<type icon="source_c" ext="c" create="template" name="C Source" >
|
||||||
<descr>A new empty C file.</descr>
|
<descr>A new empty C file.</descr>
|
||||||
</type>
|
</type>
|
||||||
</filetypes>
|
</filetypes>
|
||||||
|
@ -327,7 +327,7 @@
|
||||||
</codecompletion>
|
</codecompletion>
|
||||||
<references/>
|
<references/>
|
||||||
<creategettersetter>
|
<creategettersetter>
|
||||||
<prefixGet/>
|
<prefixGet></prefixGet>
|
||||||
<prefixSet>set</prefixSet>
|
<prefixSet>set</prefixSet>
|
||||||
<prefixVariable>m_,_</prefixVariable>
|
<prefixVariable>m_,_</prefixVariable>
|
||||||
<parameterName>theValue</parameterName>
|
<parameterName>theValue</parameterName>
|
||||||
|
@ -337,7 +337,7 @@
|
||||||
<qt>
|
<qt>
|
||||||
<used>false</used>
|
<used>false</used>
|
||||||
<version>3</version>
|
<version>3</version>
|
||||||
<root/>
|
<root></root>
|
||||||
</qt>
|
</qt>
|
||||||
</kdevcppsupport>
|
</kdevcppsupport>
|
||||||
<kdevdocumentation>
|
<kdevdocumentation>
|
||||||
|
|
|
@ -100,7 +100,7 @@ mooedit_sources = \
|
||||||
$(mooedit)/mootextview.c \
|
$(mooedit)/mootextview.c \
|
||||||
$(mooedit)/moousertools.c
|
$(mooedit)/moousertools.c
|
||||||
|
|
||||||
mooedit_gtk_2_10_sources = \
|
mooedit_printing_sources = \
|
||||||
$(mooedit)/mootextprint.c \
|
$(mooedit)/mootextprint.c \
|
||||||
$(mooedit)/mootextprint.h
|
$(mooedit)/mootextprint.h
|
||||||
|
|
||||||
|
@ -148,10 +148,10 @@ $(mooedit)/statusbar-glade.h: $(mooedit_srcdir)/glade/statusbar.glade $(XML2H)
|
||||||
sh $(XML2H) STATUSBAR_GLADE_XML $(mooedit_srcdir)/glade/statusbar.glade \
|
sh $(XML2H) STATUSBAR_GLADE_XML $(mooedit_srcdir)/glade/statusbar.glade \
|
||||||
> $(mooedit)/statusbar-glade.h
|
> $(mooedit)/statusbar-glade.h
|
||||||
|
|
||||||
if GTK_2_10
|
if MOO_ENABLE_PRINTING
|
||||||
mooedit_sources += $(mooedit_gtk_2_10_sources)
|
mooedit_sources += $(mooedit_printing_sources)
|
||||||
else
|
else
|
||||||
mooedit_extra_dist = $(mooedit_gtk_2_10_sources)
|
mooedit_extra_dist = $(mooedit_printing_sources)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
moo_extra_dist += $(mooedit_extra_dist) $(mooedit_tools_DATA)
|
moo_extra_dist += $(mooedit_extra_dist) $(mooedit_tools_DATA)
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
* See COPYING file that comes with this distribution.
|
* See COPYING file that comes with this distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MOOEDIT_COMPILATION
|
#define MOOEDIT_COMPILATION
|
||||||
#include "mooedit/statusbar-glade.h"
|
#include "mooedit/statusbar-glade.h"
|
||||||
#include "mooedit/mooedit-private.h"
|
#include "mooedit/mooedit-private.h"
|
||||||
|
@ -28,7 +32,7 @@
|
||||||
#include "mooutils/moocompat.h"
|
#include "mooutils/moocompat.h"
|
||||||
#include "mooutils/mooglade.h"
|
#include "mooutils/mooglade.h"
|
||||||
#include "moofileview/moofilesystem.h"
|
#include "moofileview/moofilesystem.h"
|
||||||
#if GTK_CHECK_VERSION(2,9,0)
|
#ifdef MOO_ENABLE_PRINTING
|
||||||
#include "mooedit/mootextprint.h"
|
#include "mooedit/mootextprint.h"
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -211,7 +215,7 @@ static void moo_edit_window_next_ph (MooEditWindow *window);
|
||||||
static void moo_edit_window_prev_ph (MooEditWindow *window);
|
static void moo_edit_window_prev_ph (MooEditWindow *window);
|
||||||
|
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(2,9,0)
|
#ifdef MOO_ENABLE_PRINTING
|
||||||
static void moo_edit_window_page_setup (MooEditWindow *window);
|
static void moo_edit_window_page_setup (MooEditWindow *window);
|
||||||
static void moo_edit_window_print (MooEditWindow *window);
|
static void moo_edit_window_print (MooEditWindow *window);
|
||||||
#endif
|
#endif
|
||||||
|
@ -670,7 +674,7 @@ moo_edit_window_class_init (MooEditWindowClass *klass)
|
||||||
"condition::sensitive", "has-open-document",
|
"condition::sensitive", "has-open-document",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(2,9,0)
|
#ifdef MOO_ENABLE_PRINTING
|
||||||
moo_window_class_new_action (window_class, "PageSetup",
|
moo_window_class_new_action (window_class, "PageSetup",
|
||||||
"name", "Page Setup",
|
"name", "Page Setup",
|
||||||
"label", "Page Setup",
|
"label", "Page Setup",
|
||||||
|
@ -1149,7 +1153,7 @@ moo_edit_window_prev_ph (MooEditWindow *window)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(2,9,0)
|
#ifdef MOO_ENABLE_PRINTING
|
||||||
static void
|
static void
|
||||||
moo_edit_window_page_setup (MooEditWindow *window)
|
moo_edit_window_page_setup (MooEditWindow *window)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue