r18703 - gnucash/trunk - Bump minimum required versions of gtk+, goffice and gtkhtml
Geert Janssens
gjanssens at code.gnucash.org
Sun Feb 21 13:30:32 EST 2010
Author: gjanssens
Date: 2010-02-21 13:30:32 -0500 (Sun, 21 Feb 2010)
New Revision: 18703
Trac: http://svn.gnucash.org/trac/changeset/18703
Removed:
gnucash/trunk/checks/gnomeprint/
Modified:
gnucash/trunk/checks/Makefile.am
gnucash/trunk/configure.in
gnucash/trunk/src/gnome-utils/dialog-options.c
gnucash/trunk/src/gnome-utils/dialog-preferences.c
gnucash/trunk/src/gnome-utils/dialog-transfer.c
gnucash/trunk/src/gnome-utils/dialog-utils.c
gnucash/trunk/src/gnome-utils/gnc-date-edit.c
gnucash/trunk/src/gnome-utils/gnc-main-window.c
gnucash/trunk/src/gnome-utils/gnc-tree-view.c
gnucash/trunk/src/gnome-utils/print-session.c
gnucash/trunk/src/gnome-utils/print-session.h
gnucash/trunk/src/gnome/dialog-print-check.c
gnucash/trunk/src/gnome/dialog-sx-from-trans.c
gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
gnucash/trunk/src/html/Makefile.am
gnucash/trunk/src/html/gnc-html-graph-gog-gtkhtml.c
gnucash/trunk/src/html/gnc-html-graph-gog.c
gnucash/trunk/src/html/gnc-html-gtkhtml.c
gnucash/trunk/src/html/gnc-html-webkit.c
gnucash/trunk/src/register/register-gnome/combocell-gnome.c
gnucash/trunk/src/register/register-gnome/datecell-gnome.c
gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
Log:
Bump minimum required versions of gtk+, goffice and gtkhtml
gtk+: 2.10
goffice: 0.5.1
gtkhtml: 3.14
Modified: gnucash/trunk/checks/Makefile.am
===================================================================
--- gnucash/trunk/checks/Makefile.am 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/checks/Makefile.am 2010-02-21 18:30:32 UTC (rev 18703)
@@ -1,26 +1,16 @@
checksdir = ${GNC_CHECKS_DIR}
-if HAVE_GTK_2_10
checks_DATA = \
deluxe.chk \
liberty.chk \
quicken.chk \
- voucher.chk \
- quicken_wallet.chk
-else
-checks_DATA = \
- gnomeprint/deluxe.chk \
- gnomeprint/quicken.chk \
- gnomeprint/quicken_wallet.chk
-endif
+ quicken_wallet.chk \
+ voucher.chk
EXTRA_DIST = \
deluxe.chk \
liberty.chk \
quicken.chk \
quicken_wallet.chk \
- voucher.chk \
- gnomeprint/deluxe.chk \
- gnomeprint/quicken.chk \
- gnomeprint/quicken_wallet.chk
+ voucher.chk
\ No newline at end of file
Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/configure.in 2010-02-21 18:30:32 UTC (rev 18703)
@@ -253,7 +253,7 @@
else
AC_MSG_RESULT(no)
fi
-AM_CONDITIONAL(HAVE_GLIB_2_8, test "x$HAVE_GLIB_2_8" = "xyes")
+AM_CONDITIONAL(HAVE_GLIB_2_12, test "x$HAVE_GLIB_2_12" = "xyes")
AC_MSG_CHECKING([for untested GLIB versions (glib >= 2.13.0)])
if $PKG_CONFIG 'glib-2.0 >= 2.13.0'
@@ -1039,28 +1039,16 @@
fi
GNOME_COMPILE_WARNINGS
- PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8)
+ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10)
AS_SCRUB_INCLUDE(GTK_CFLAGS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
- HAVE_UNTESTED_GTK=yes
- AC_MSG_CHECKING(for GTK - version >= 2.10.0)
- if $PKG_CONFIG 'gtk+-2.0 >= 2.10.0'
- then
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_GTK_2_10,1,[System has gtk 2.10.0 or better])
- HAVE_GTK_2_10=yes
- else
- AC_MSG_RESULT(no)
- fi
- AM_CONDITIONAL(HAVE_GTK_2_10, test "x$HAVE_GTK_2_10" = "xyes" )
-
- AC_MSG_CHECKING([for untested GDK versions (gdk > 2.11.0)])
+ AC_MSG_CHECKING([for untested GTK versions (gtk > 2.11.0)])
if $PKG_CONFIG 'gtk+-2.0 > 2.11.0'
then
AC_MSG_RESULT(yes)
- HAVE_UNTESTED_GDK=yes
+ HAVE_UNTESTED_GTK=yes
fi
PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 >= 2.4)
@@ -1088,46 +1076,15 @@
AC_SUBST(GLADE_LIBS)
# checks for goffice
- goffice=0
- goffice_with_cairo=0
- have_goffice_0_5=0
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.8 >= 0.7.0, [goffice=1], [
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.6 >= 0.6.0, [goffice=1], [
- PKG_CHECK_MODULES(GOFFICE, libgoffice-0.5 >= 0.5.1, [goffice=1], [goffice=0])
+ PKG_CHECK_MODULES(GOFFICE, libgoffice-0.5 >= 0.5.1, [goffice=1], [AC_MSG_ERROR([Cannot find libgoffice.>= 0.5.1])])
])
])
- if test x$goffice = x1
- then
- AC_DEFINE(HAVE_GOFFICE_0_5,1,[System has goffice 0.5.1 or better])
- AC_DEFINE(GOFFICE_WITH_CAIRO,1,[GOffice has been built with cairo support])
- have_goffice_0_5=1
- goffice_with_cairo=1
- else
- PKG_CHECK_MODULES(GOFFICE, libgoffice-0.4 >= 0.4.0, [goffice=1], [
- PKG_CHECK_MODULES(GOFFICE, libgoffice-0.3 >= 0.3.0, [goffice=1], [
- PKG_CHECK_MODULES(GOFFICE, libgoffice-1 >= 0.0.4, [goffice=1], [
- AC_MSG_ERROR([Cannot find libgoffice.])
- ])
- ])
- ])
- fi
AS_SCRUB_INCLUDE(GOFFICE_CFLAGS)
AC_SUBST(GOFFICE_CFLAGS)
AC_SUBST(GOFFICE_LIBS)
- if test x$goffice_with_cairo = x0
- then
- saved_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${GOFFICE_CFLAGS} ${CPPFLAGS}"
- AC_CHECK_HEADER(goffice/graph/gog-renderer-cairo.h, [
- AC_DEFINE(GOFFICE_WITH_CAIRO,1,[GOffice has been built with cairo support])
- goffice_with_cairo=1
- ], [
- goffice_with_cairo=0
- ])
- CPPFLAGS="${saved_CPPFLAGS}"
- fi
-
### --------------------------------------------------------------------------
### determine the HTML engine
@@ -1143,24 +1100,7 @@
# check for gtkhtml >= 3.14 with gtkprint support
gtkhtml=0
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.14, [
- if test "x$HAVE_GTK_2_10" != "xyes"; then
- AC_MSG_NOTICE([Found libgtkhtml-3.14, but not gtk+-2.0 >= 2.10])
- elif test "x$goffice_with_cairo" != "x1"; then
- AC_MSG_NOTICE([Found libgtkhtml-3.14, but goffice lacks a cairo renderer])
- else
- gtkhtml=1
- AC_DEFINE(GTKHTML_USES_GTKPRINT,1,[GtkHTML uses GtkPrint for printing operations])
- fi
- ], [gtkhtml=0])
- AM_CONDITIONAL(GTKHTML_USES_GTKPRINT,test "x$gtkhtml" = "x1")
-
- # GOffice >= 0.5 requires GtkHTML >= 3.14
- if test x$have_goffice_0_5 = x1 -a x$gtkhtml = x0 ; then
- AC_MSG_ERROR([Goffice uses Cairo/GtkPrint but didn't find GtkHTML with GtkPrint support])
- fi
-
- # check for gtkhtml >= 3.16 (includes gtk_html_print_operation_run())
- if test x$gtkhtml = x1; then
+ # check for gtkhtml >= 3.16 (includes gtk_html_print_operation_run())
AC_MSG_CHECKING(for GtkHTML - version >= 3.16.0)
if $PKG_CONFIG 'libgtkhtml-3.14 >= 3.16.0'; then
AC_MSG_RESULT(yes)
@@ -1169,32 +1109,14 @@
else
AC_MSG_RESULT(no)
fi
- fi
+ ], [
+ AC_MSG_ERROR([cannot find GtkHTML >= 3.14])
+ ])
+ ;;
- # fallback to older gtkhtml versions and gnomeprint
- if test x$gtkhtml = x0
- then
- PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.8 , [gtkhtml=1], [
- PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.6 , [gtkhtml=1], [
- PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.2 , [gtkhtml=1], [
- PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.1 , [gtkhtml=1], [
- AC_MSG_ERROR([Could not find a working gtkhtml version (need 3.1, 3.2, 3.6, 3.8 or 3.14)])
- ])
- ])
- ])
- ])
-
- PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2)
- AS_SCRUB_INCLUDE(GNOME_PRINT_CFLAGS)
- AC_SUBST(GNOME_PRINT_CFLAGS)
- AC_SUBST(GNOME_PRINT_LIBS)
- fi
- ;;
-
webkit)
PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= "1.0")
AC_DEFINE(WANT_WEBKIT,1,[Use webkit instead of gtkhtml])
- AM_CONDITIONAL(GTKHTML_USES_GTKPRINT,false)
;;
*) AC_MSG_ERROR([Invalid HTML engine: must be gtkhtml or webkit]) ;;
esac
@@ -1207,6 +1129,7 @@
AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
dnl if Mac OSX, also scrub /sw/include
dnl GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I/sw/include ;;" | sed -e "s;-I/sw/include$;;")
+
case $host_os in
darwin*)
GTKHTML_CFLAGS=`echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include ;;" | ${SED} -e "s;-I/sw/include$;;"`
@@ -1247,8 +1170,6 @@
CFLAGS="${CFLAGS} -Wall"
fi
- ### AM conditionals that need to be set
- AM_CONDITIONAL(HAVE_GTK_2_10, false)
fi
### End of gui-only checks
@@ -1274,26 +1195,6 @@
fi
-if test x${HAVE_UNTESTED_GDK} = "xyes"
-then
- allow_deprecated=true
-else
- allow_deprecated=false
-fi
-AC_ARG_ENABLE(deprecated-gdk,
- [AS_HELP_STRING([--disable-deprecated-gdk],[don't use deprecated gdk functions])],
- [case "${enableval}" in
- no) allow_deprecated=false ;;
- *) allow_deprecated=true ;;
- esac]
- )
-if test x${allow_deprecated} != "xtrue"
-then
- AC_DEFINE(GDK_DISABLE_DEPRECATED,1, [Don't use deprecated gdk functions])
- AC_DEFINE(GDK_PIXBUF_DISABLE_DEPRECATED,1, [Don't use deprecated gdk-pixbuf functions])
-fi
-
-
if test x${HAVE_UNTESTED_GTK} = "xyes"
then
allow_deprecated=true
@@ -1301,7 +1202,7 @@
allow_deprecated=false
fi
AC_ARG_ENABLE(deprecated-gtk,
- [AS_HELP_STRING([--disable-deprecated-gtk],[don't use deprecated gtk functions])],
+ [AS_HELP_STRING([--disable-deprecated-gtk],[don't use deprecated gtk, gdk or gdk-pixbuf functions])],
[case "${enableval}" in
no) allow_deprecated=false ;;
*) allow_deprecated=true ;;
@@ -1310,6 +1211,8 @@
if test x${allow_deprecated} != "xtrue"
then
AC_DEFINE(GTK_DISABLE_DEPRECATED,1, [Don't use deprecated gtk functions])
+ AC_DEFINE(GDK_DISABLE_DEPRECATED,1, [Don't use deprecated gdk functions])
+ AC_DEFINE(GDK_PIXBUF_DISABLE_DEPRECATED,1, [Don't use deprecated gdk-pixbuf functions])
fi
Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome/dialog-print-check.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -49,8 +49,6 @@
#include "Split.h"
#include "Transaction.h"
-#define USE_GTKPRINT HAVE_GTK_2_10
-
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnc.printing.checks"
@@ -122,12 +120,7 @@
* this enry specifies a separator line. */
} format_combo_col;
-#if USE_GTKPRINT
-# define GncPrintContext GtkPrintContext
-#else
-# define GncPrintContext GnomePrintContext
-# define GNOMEPRINT_CLIP_EXTRA 2
-#endif
+#define GncPrintContext GtkPrintContext
/* Used by glade_xml_signal_autoconnect_full */
@@ -1560,11 +1553,7 @@
/* nothing to do - defaults to blank */
}
-#if USE_GTKPRINT
gtk_widget_destroy(glade_xml_get_widget (xml, "lower_left"));
-#else
- gtk_widget_destroy(glade_xml_get_widget (xml, "upper_left"));
-#endif
gnc_ui_print_restore_dialog(pcd);
gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pcd->dialog));
@@ -1582,15 +1571,12 @@
draw_grid(GncPrintContext * context, gint width, gint height, const gchar *font)
{
const double dash_pattern[2] = { 1.0, 5.0 };
-#if USE_GTKPRINT
PangoFontDescription *desc;
PangoLayout *layout;
cairo_t *cr;
-#endif
gchar *text;
gint i;
-#if USE_GTKPRINT
/* Initialize for printing text */
layout = gtk_print_context_create_pango_layout(context);
desc = pango_font_description_from_string(font);
@@ -1598,65 +1584,41 @@
pango_font_description_free(desc);
pango_layout_set_alignment(layout, PANGO_ALIGN_LEFT);
pango_layout_set_width(layout, -1);
-#endif
/* Set up the line to draw with. */
-#if USE_GTKPRINT
cr = gtk_print_context_get_cairo_context(context);
cairo_save(cr);
cairo_set_line_width(cr, 1.0);
cairo_set_line_cap(cr, CAIRO_LINE_JOIN_ROUND);
cairo_set_dash(cr, dash_pattern, 2, 0);
-#else
- gnome_print_gsave(context);
- gnome_print_setlinewidth(context, 1.0);
- gnome_print_setlinecap(context, 2);
- gnome_print_setdash(context, 2, dash_pattern, 0);
-#endif
/* Draw horizontal lines */
for (i = -200; i < (height + 200); i += 50) {
text = g_strdup_printf("%d", (int)i);
-#if USE_GTKPRINT
cairo_move_to(cr, -200, i);
cairo_line_to(cr, width + 200, i);
cairo_stroke(cr);
pango_layout_set_text(layout, text, -1);
cairo_move_to(cr, 0, i);
pango_cairo_show_layout(cr, layout);
-#else
- gnome_print_line_stroked(context, -200, i, width + 200, i);
- gnome_print_moveto(context, 0, i);
- gnome_print_show(context, text);
-#endif
g_free(text);
}
/* Draw vertical lines */
for (i = -200; i < (width + 200); i += 50) {
text = g_strdup_printf("%d", (int)i);
-#if USE_GTKPRINT
cairo_move_to(cr, i, -200);
cairo_line_to(cr, i, height + 200);
cairo_stroke(cr);
pango_layout_set_text(layout, text, -1);
cairo_move_to(cr, i, 0);
pango_cairo_show_layout(cr, layout);
-#else
- gnome_print_line_stroked(context, i, -200, i, height + 200);
- gnome_print_moveto(context, i, 0);
- gnome_print_show(context, text);
-#endif
g_free(text);
}
/* Clean up after ourselves */
-#if USE_GTKPRINT
cairo_restore(cr);
g_object_unref(layout);
-#else
- gnome_print_grestore(context);
-#endif
}
@@ -1668,7 +1630,6 @@
draw_text(GncPrintContext * context, const gchar * text, check_item_t * data,
PangoFontDescription *default_desc)
{
-#if USE_GTKPRINT
PangoFontDescription *desc;
PangoLayout *layout;
cairo_t *cr;
@@ -1725,48 +1686,10 @@
cairo_restore(cr);
g_object_unref(layout);
return width;
-#else
- gdouble x0, x1, y0, y1;
- gchar *new_text;
- if ((NULL == text) || (strlen(text) == 0))
- return 0.0;
-
- /* Clip text to the enclosing rectangle */
- gnome_print_gsave(context);
- if (data->w && data->h) {
- g_debug("Text clip rectangle, coords %f,%f, size %f,%f",
- data->x, data->y - data->h, data->w, data->h);
- x0 = data->x - GNOMEPRINT_CLIP_EXTRA;
- x1 = data->x + data->w + GNOMEPRINT_CLIP_EXTRA;
- y0 = data->y - GNOMEPRINT_CLIP_EXTRA;
- y1 = data->y + data->h + GNOMEPRINT_CLIP_EXTRA;
- gnome_print_moveto(context, x0, y0);
- gnome_print_lineto(context, x0, y1);
- gnome_print_lineto(context, x1, y1);
- gnome_print_lineto(context, x1, y0);
- gnome_print_lineto(context, x0, y0);
- gnome_print_clip(context);
- }
-
- /* Draw the text */
- g_debug("Text move to %f,%f, print '%s'", data->x, data->y,
- text ? text : "(null)");
- gnome_print_moveto(context, data->x, data->y);
- if ( data->blocking ) {
- new_text = g_strdup_printf("***%s***", text);
- gnome_print_show(context, new_text);
- g_free(new_text);
- } else {
- gnome_print_show(context, text);
- }
- gnome_print_grestore(context);
- return 0.0;
-#endif
}
-#if USE_GTKPRINT
/** Find and load the specified image. If the specified filename isn't an
* absolute path name, this code will also look in the gnucash system check
* format directory, and then in the user's private check format
@@ -1867,7 +1790,6 @@
cairo_restore(cr);
gtk_widget_destroy(GTK_WIDGET(image));
}
-#endif
#define DATE_FMT_HEIGHT 8
@@ -1890,7 +1812,6 @@
check_item_t * data, PangoFontDescription *default_desc,
gdouble width)
{
-#if USE_GTKPRINT
PangoFontDescription *date_desc;
check_item_t date_item;
gchar *text = NULL, *expanded = NULL;
@@ -1950,7 +1871,6 @@
if (expanded)
g_free(expanded);
pango_font_description_free(date_desc);
-#endif
}
@@ -2061,11 +1981,9 @@
g_free(text);
break;
-#if USE_GTKPRINT
case PICTURE:
draw_picture(context, item);
break;
-#endif
default:
text = g_strdup_printf("(unknown check field, type %d)", item->type);
@@ -2078,7 +1996,6 @@
}
-#if USE_GTKPRINT
/** Print each of the items that in the description of a single check. This
* function uses helper functions to print text based and picture based
* items. */
@@ -2152,63 +2069,8 @@
draw_page_items(context, page_nr, format, user_data);
}
-#else
static void
-draw_page_format(PrintSession * ps, check_format_t * format, gpointer user_data)
-{
- PrintCheckDialog *pcd = (PrintCheckDialog *) user_data;
- GnomePrintConfig *config;
- gint i;
- GSList *elem;
- check_item_t *item;
- gdouble width, height, x, y, multip;
-
- config = gnome_print_job_get_config(ps->job);
- gnome_print_job_get_page_size_from_config(config, &width, &height);
-
- gnome_print_gsave(ps->context);
- gnome_print_translate(ps->context, format->trans_x, format->trans_y);
- g_debug("Page translated by %f,%f", format->trans_x, format->trans_y);
- gnome_print_rotate(ps->context, format->rotation);
- g_debug("Page rotated by %f degrees", format->rotation);
-
- /* The grid is useful when determining check layouts */
- if (format->show_grid) {
- draw_grid(ps->context, width, height, pcd->default_font);
- }
-
- /* Translate all subsequent check items if requested. */
- i = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->position_combobox));
- if ((i >= 0) && (i < pcd->position_max)) {
- y = height - (format->height * (i + 1));
- gnome_print_translate(ps->context, 0, y);
- g_debug("Check translated by %f (pre-defined)", y);
- } else {
- multip = pcd_get_custom_multip(pcd);
- x = multip * gtk_spin_button_get_value(pcd->translation_x);
- y = multip * gtk_spin_button_get_value(pcd->translation_y);
- gnome_print_translate(ps->context, x, y);
- g_debug("Check translated by %f (custom)", y);
- }
-
- /* Draw layout boxes if requested. Also useful when determining check
- * layouts. */
- if (format->show_boxes) {
- for (elem = format->items; elem; elem = g_slist_next(elem)) {
- item = elem->data;
- if (!item->w || !item->h)
- continue;
- gnome_print_rect_stroked(ps->context, item->x, item->y, item->w,
- item->h);
- }
- }
-
- draw_page_items(ps->context, 1, format, user_data);
-}
-#endif
-
-static void
draw_page_custom(GncPrintContext * context, gint page_nr, gpointer user_data)
{
PrintCheckDialog *pcd = (PrintCheckDialog *) user_data;
@@ -2216,9 +2078,7 @@
PangoFontDescription *desc;
Transaction *trans;
gnc_numeric amount;
-#if USE_GTKPRINT
cairo_t *cr;
-#endif
const gchar *date_format;
gchar *text = NULL, buf[100];
check_item_t item = { 0 };
@@ -2234,21 +2094,13 @@
multip = pcd_get_custom_multip(pcd);
degrees = gtk_spin_button_get_value(pcd->check_rotation);
-#if USE_GTKPRINT
cr = gtk_print_context_get_cairo_context(context);
cairo_rotate(cr, degrees * DEGREES_TO_RADIANS);
-#else
- gnome_print_rotate(context, degrees);
-#endif
g_debug("Page rotated by %f degrees", degrees);
x = multip * gtk_spin_button_get_value(pcd->translation_x);
y = multip * gtk_spin_button_get_value(pcd->translation_y);
-#if USE_GTKPRINT
cairo_translate(cr, x, y);
-#else
- gnome_print_translate(context, x, y);
-#endif
g_debug("Page translated by %f,%f", x, y);
item.x = multip * gtk_spin_button_get_value(pcd->payee_x);
@@ -2311,7 +2163,6 @@
pango_font_description_free(desc);
}
-#if USE_GTKPRINT
/* Print a page of checks. Today, check printing only prints one check at a
* time. When its extended to print multiple checks, this will need to take
* into account the number of checks to print, the number of checks on a page,
@@ -2373,36 +2224,8 @@
g_object_unref(print);
}
-#else
static void
-gnc_ui_print_check_dialog_ok_cb(PrintCheckDialog * pcd)
-{
- PrintSession *ps;
- GnomeFont *oldfont;
- check_format_t *format;
-
- ps = gnc_print_session_create(TRUE);
- oldfont = ps->default_font;
- ps->default_font = gnome_font_find_closest_from_full_name(pcd->default_font);
- gnome_print_setfont(ps->context, ps->default_font);
- g_object_unref(oldfont);
-
- format = pcd->selected_format;
- if (format) {
- draw_page_format(ps, format, pcd);
- } else {
- draw_page_custom(ps->context, 1, pcd);
- }
-
- gnc_print_session_done(ps);
- gnc_print_session_destroy(ps);
-}
-#endif
-
-
-
-static void
gnc_print_check_set_sensitive (GtkWidget *widget, gpointer data)
{
gboolean sensitive = GPOINTER_TO_INT(data);
Modified: gnucash/trunk/src/gnome/dialog-sx-from-trans.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -362,12 +362,7 @@
w = GTK_WIDGET(glade_xml_get_widget( sxfti->gxml, SXFTD_EX_CAL_FRAME ));
sxfti->dense_cal_model = gnc_dense_cal_store_new(num_marks);
sxfti->example_cal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model(GNC_DENSE_CAL_MODEL(sxfti->dense_cal_model)));
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(sxfti->example_cal);
-#else
- g_object_ref(G_OBJECT(sxfti->example_cal));
- gtk_object_sink(GTK_OBJECT(sxfti->example_cal));
-#endif
g_assert(sxfti->example_cal);
gnc_dense_cal_set_num_months( sxfti->example_cal, SXFTD_EXCAL_NUM_MONTHS );
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -353,12 +353,7 @@
priv->dense_cal_model = gnc_sx_instance_dense_cal_adapter_new(GNC_SX_INSTANCE_MODEL(priv->instances));
priv->gdcal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model(GNC_DENSE_CAL_MODEL(priv->dense_cal_model)));
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(priv->gdcal);
-#else
- g_object_ref(G_OBJECT(priv->gdcal));
- gtk_object_sink(GTK_OBJECT(priv->gdcal));
-#endif
gnc_dense_cal_set_months_per_col(priv->gdcal, 4);
gnc_dense_cal_set_num_months(priv->gdcal, 12);
Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -751,12 +751,7 @@
/* Create the tooltips */
tooltips = gtk_tooltips_new ();
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(tooltips);
-#else
- g_object_ref (tooltips);
- gtk_object_sink (GTK_OBJECT (tooltips));
-#endif
/* Iterate over the options and create a radio button for each one */
for (i = 0; i < num_values; i++)
@@ -1303,12 +1298,7 @@
propertybox->tips = gtk_tooltips_new();
propertybox->option_db = odb;
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(propertybox->tips);
-#else
- g_object_ref (propertybox->tips);
- gtk_object_sink (GTK_OBJECT (propertybox->tips));
-#endif
num_sections = gnc_option_db_num_sections(odb);
default_section_name = gnc_option_db_get_default_section(odb);
Modified: gnucash/trunk/src/gnome-utils/dialog-preferences.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-preferences.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/dialog-preferences.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -27,7 +27,7 @@
/** @file dialog-preferences.c
@brief Dialog for handling user preferences.
@author Copyright (c) 2005 David Hampton <hampton at employees.org>
-
+
These functions are the external API available for the new user
preference dialog. Preferences are now stored in GConf. This
code ends up being nothing more than a pretty interface to set
@@ -121,7 +121,7 @@
* @internal
*
* @param unused A pointer to the changed gconf entry.
- *
+ *
* @param dialog A pointer to the preferences dialog.
*/
static void
@@ -152,9 +152,9 @@
* @internal
*
* @param a A pointer to the first add-in.
- *
+ *
* @param b A pointer to the second add-in.
- *
+ *
* @return Zero if the tab name is the same in both add-ins. Non-zero otherwise.
*/
static gint
@@ -175,9 +175,9 @@
* @internal
*
* @param filename The name of a glade file.
- *
+ *
* @param widgetname The name of the widget to extract from the glade file.
- *
+ *
* @param tabname The name this page of preferences should have in
* the dialog notebook.
*
@@ -221,7 +221,7 @@
if (ptr) {
/* problem? */
preexisting = ptr->data;
-
+
if (preexisting->full_page) {
g_warning("New tab %s(%s/%s/%s) conflicts with existing tab %s(%s/%s/full)",
add_in->tabname, add_in->filename, add_in->widgetname,
@@ -293,7 +293,7 @@
*
* @param xml A pointer to glade xml file currently being added to
* the dialog.
- *
+ *
* @param dialog A pointer to the dialog. The hash table is stored
* as a pointer off the dialog so that it can be found in the
* callback from gconf. */
@@ -371,7 +371,7 @@
* @internal
*
* @param widget A pointer to the widget to move.
- *
+ *
* @param data A pointer to a data structure passed in by the caller.
* This data structure contains pointers to the old and new tables,
* plus the row offset into the new table.
@@ -414,7 +414,7 @@
* @internal
*
* @param data A pointer to an addition data structure.
- *
+ *
* @param user_data A pointer to the dialog.
*/
static void
@@ -515,11 +515,7 @@
gtk_container_foreach(GTK_CONTAINER(new_content), gnc_prefs_move_table_entry,
©data);
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(new_content);
-#else
- gtk_object_sink(GTK_OBJECT(new_content));
-#endif
LEAVE("added content to page");
}
@@ -565,7 +561,7 @@
* @internal
*
* @param gde A pointer to the GtkFontButton that was changed.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -654,7 +650,7 @@
* @internal
*
* @param button A pointer to the radio button that was clicked.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -756,7 +752,7 @@
* @internal
*
* @param button A pointer to the check button that was clicked.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -830,7 +826,7 @@
* @internal
*
* @param button A pointer to the spin button that was clicked.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -906,7 +902,7 @@
* @internal
*
* @param box A pointer to the combo box that was changed.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -981,7 +977,7 @@
* @internal
*
* @param gce A pointer to the currency_edit that was changed.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -1089,7 +1085,7 @@
* @internal
*
* @param entry A pointer to the entry that was changed.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -1163,7 +1159,7 @@
* @internal
*
* @param period A pointer to the GncPeriodSelect that was changed.
- *
+ *
* @param user_data Unused.
*/
static void
@@ -1252,7 +1248,7 @@
* @internal
*
* @param gde A pointer to the date_edit that was changed.
- *
+ *
* @param user_data Unused.
*/
static void
Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -84,7 +84,7 @@
GtkTreeView * to_tree_view;
gnc_commodity * to_commodity;
- QuickFill * qf; /* Quickfill on transfer descriptions,
+ QuickFill * qf; /* Quickfill on transfer descriptions,
defaults to matching on the "From" account. */
XferDirection quickfill; /* direction match on the account instead. */
@@ -298,10 +298,10 @@
Account *from_account;
gboolean curr_active;
- from_account =
+ from_account =
gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
- to_account =
+ to_account =
gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_TO);
curr_active = (xferData->exch_rate ||
@@ -313,7 +313,7 @@
gtk_widget_set_sensitive(xferData->price_edit,
curr_active && gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON(xferData->price_radio)));
- gtk_widget_set_sensitive(xferData->to_amount_edit,
+ gtk_widget_set_sensitive(xferData->to_amount_edit,
curr_active && gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON(xferData->amount_radio)));
gtk_widget_set_sensitive(xferData->price_radio, curr_active);
@@ -395,7 +395,7 @@
return;
commodity = xaccAccountGetCommodity(account);
- gtk_label_set_text(GTK_LABEL(xferData->from_currency_label),
+ gtk_label_set_text(GTK_LABEL(xferData->from_currency_label),
gnc_commodity_get_printname(commodity));
xferData->from_commodity = commodity;
@@ -463,7 +463,7 @@
}
type = xaccAccountGetType(account);
- return ((type != ACCT_TYPE_INCOME) && (type != ACCT_TYPE_EXPENSE));
+ return ((type != ACCT_TYPE_INCOME) && (type != ACCT_TYPE_EXPENSE));
}
static void
@@ -1107,7 +1107,7 @@
* Return: none *
\********************************************************************/
void
-gnc_xfer_dialog_is_exchange_dialog (XferDialog *xferData,
+gnc_xfer_dialog_is_exchange_dialog (XferDialog *xferData,
gnc_numeric *exch_rate)
{
GNCAmountEdit *gae;
@@ -1148,10 +1148,10 @@
if (xferData == NULL)
return;
- account = gnc_transfer_dialog_get_selected_account (xferData,
+ account = gnc_transfer_dialog_get_selected_account (xferData,
XFER_DIALOG_FROM);
if (account == NULL)
- account = gnc_transfer_dialog_get_selected_account (xferData,
+ account = gnc_transfer_dialog_get_selected_account (xferData,
XFER_DIALOG_TO);
gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (xferData->amount_edit), amount);
@@ -1240,7 +1240,7 @@
gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (xferData->price_edit),
exchange_rate);
-
+
gnc_xfer_update_to_amount (xferData);
}
@@ -1416,11 +1416,11 @@
/* create from split */
from_split = xaccMallocSplit(xferData->book);
- xaccTransAppendSplit(trans, from_split);
+ xaccTransAppendSplit(trans, from_split);
/* create to split */
to_split = xaccMallocSplit(xferData->book);
- xaccTransAppendSplit(trans, to_split);
+ xaccTransAppendSplit(trans, to_split);
xaccAccountBeginEdit(from_account);
xaccAccountInsertSplit(from_account, from_split);
@@ -1454,7 +1454,7 @@
gnc_commodity *to = xferData->to_commodity;
/* only continue if the currencies are DIFFERENT and are
- * not both euroland currencies
+ * not both euroland currencies
*/
if (!gnc_commodity_equal (from, to) &&
!(gnc_is_euro_currency (from) && gnc_is_euro_currency (to)))
@@ -1610,7 +1610,7 @@
prc = gnc_pricedb_lookup_latest(xferData->pricedb, from, to);
rate = gnc_price_get_value (prc);
- gnc_amount_edit_set_amount(GNC_AMOUNT_EDIT(xferData->price_edit), rate);
+ gnc_amount_edit_set_amount(GNC_AMOUNT_EDIT(xferData->price_edit), rate);
LEAVE("quote retrieved");
@@ -1641,12 +1641,7 @@
xferData->tips = gtk_tooltips_new();
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(xferData->tips);
-#else
- g_object_ref (xferData->tips);
- gtk_object_sink (GTK_OBJECT (xferData->tips));
-#endif
/* default to quickfilling off of the "From" account. */
xferData->quickfill = XFER_DIALOG_FROM;
@@ -1836,7 +1831,7 @@
/********************************************************************\
* gnc_xfer_dialog *
* opens up a window to do an automatic transfer between accounts *
- * *
+ * *
* Args: parent - the parent of the window to be created *
* initial - the initial account in the from/to fields *
* Return: XferDialog structure *
@@ -1987,7 +1982,7 @@
}
}
-void gnc_xfer_dialog_toggle_currency_table( XferDialog *xferData,
+void gnc_xfer_dialog_toggle_currency_table( XferDialog *xferData,
gboolean show_table )
{
if (xferData && xferData->curr_xfer_table)
@@ -2058,7 +2053,7 @@
LEAVE("ok");
return TRUE;
}
-
+
/* else run the dialog again */
}
@@ -2143,7 +2138,7 @@
void gnc_xfer_dialog_set_txn_cb(XferDialog *xferData,
- gnc_xfer_dialog_cb handler,
+ gnc_xfer_dialog_cb handler,
gpointer user_data)
{
g_assert(xferData);
@@ -2154,7 +2149,7 @@
gboolean gnc_xfer_dialog_run_exchange_dialog(
- XferDialog *xfer, gnc_numeric *exch_rate, gnc_numeric amount,
+ XferDialog *xfer, gnc_numeric *exch_rate, gnc_numeric amount,
Account *reg_acc, Transaction *txn, gnc_commodity *xfer_com)
{
gboolean swap_amounts = FALSE;
@@ -2175,38 +2170,38 @@
return FALSE;
}
swap_amounts = TRUE;
-
+
/* We know that "amount" is always in the reg_com currency.
* Unfortunately it is possible that neither xfer_com or txn_cur are
* the same as reg_com, in which case we need to convert to the txn
* currency... Or, if the register commodity is the xfer_com, then we
* need to flip-flop the commodities and the exchange rates.
*/
-
+
} else if (gnc_commodity_equal(reg_com, txn_cur)) {
/* we're working in the txn currency. Great. Nothing to do! */
swap_amounts = FALSE;
-
+
} else if (gnc_commodity_equal(reg_com, xfer_com)) {
/* We're working in the xfer commodity. Great. Just swap the
amounts. */
swap_amounts = TRUE;
-
+
/* XXX: Do we need to check for expanded v. non-expanded
accounts here? */
-
+
} else {
/* UGGH -- we're not in either. That means we need to convert
* 'amount' from the register commodity to the txn currency.
*/
gnc_numeric rate = xaccTransGetAccountConvRate(txn, reg_acc);
-
+
/* XXX: should we tell the user we've done the conversion? */
amount = gnc_numeric_div(
- amount, rate,
+ amount, rate,
gnc_commodity_get_fraction(txn_cur), GNC_DENOM_REDUCE);
}
-
+
/* enter the accounts */
if (swap_amounts) {
gnc_xfer_dialog_select_to_currency(xfer, txn_cur);
@@ -2221,21 +2216,21 @@
}
gnc_xfer_dialog_hide_to_account_tree(xfer);
gnc_xfer_dialog_hide_from_account_tree(xfer);
-
+
gnc_xfer_dialog_set_amount(xfer, amount);
-
+
/*
* When we flip, we should tell the dialog so it can deal with the
* pricedb properly.
*/
-
+
/* Set the exchange rate */
gnc_xfer_dialog_set_exchange_rate(xfer, *exch_rate);
-
+
/* and run it... */
if (gnc_xfer_dialog_run_until_done(xfer) == FALSE)
return TRUE;
-
+
/* If we swapped the amounts for the dialog, then make sure we swap
* it back now...
*/
Modified: gnucash/trunk/src/gnome-utils/dialog-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-utils.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/dialog-utils.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -98,12 +98,7 @@
tooltips = gtk_tooltips_new();
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(tooltips);
-#else
- g_object_ref (tooltips);
- gtk_object_sink (GTK_OBJECT (tooltips));
-#endif
for (i = 0; i < num_options; i++)
{
Modified: gnucash/trunk/src/gnome-utils/gnc-date-edit.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-date-edit.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/gnc-date-edit.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -297,11 +297,7 @@
if (GTK_IS_WINDOW (toplevel))
{
gtk_window_group_add_window (
-#ifdef HAVE_GTK_2_10
gtk_window_get_group (GTK_WINDOW (toplevel)),
-#else
- _gtk_window_get_group (GTK_WINDOW (toplevel)),
-#endif
GTK_WINDOW (gde->cal_popup));
gtk_window_set_transient_for (GTK_WINDOW (gde->cal_popup),
GTK_WINDOW (toplevel));
@@ -861,10 +857,8 @@
gde->cal_popup = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_set_name (gde->cal_popup, "gnc-date-edit-popup-window");
-#ifdef HAVE_GTK_2_10
- gtk_window_set_type_hint (GTK_WINDOW (gde->cal_popup),
- GDK_WINDOW_TYPE_HINT_COMBO);
-#endif
+ gtk_window_set_type_hint (GTK_WINDOW (gde->cal_popup),
+ GDK_WINDOW_TYPE_HINT_COMBO);
gtk_widget_set_events (GTK_WIDGET(gde->cal_popup),
gtk_widget_get_events (GTK_WIDGET(gde->cal_popup)) |
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -1,4 +1,4 @@
-/*
+/*
* gnc-main-window.c -- GtkWindow which represents the
* GnuCash main window.
*
@@ -66,9 +66,7 @@
// +JSLED
//#include "gnc-html.h"
#include "gnc-autosave.h"
-#ifdef HAVE_GTK_2_10
-# include "print-session.h"
-#endif
+#include "print-session.h"
#ifdef MAC_INTEGRATION
#include <igemacintegration/ige-mac-menu.h>
#endif
@@ -120,17 +118,13 @@
/* Callbacks */
static void gnc_main_window_add_widget (GtkUIManager *merge, GtkWidget *widget, GncMainWindow *window);
static void gnc_main_window_switch_page (GtkNotebook *notebook, GtkNotebookPage *notebook_page, gint pos, GncMainWindow *window);
-#ifdef HAVE_GTK_2_10
static void gnc_main_window_page_reordered (GtkNotebook *notebook, GtkWidget *child, guint pos, GncMainWindow *window);
-#endif
static void gnc_main_window_plugin_added (GncPlugin *manager, GncPlugin *plugin, GncMainWindow *window);
static void gnc_main_window_plugin_removed (GncPlugin *manager, GncPlugin *plugin, GncMainWindow *window);
static void gnc_main_window_engine_commit_error_callback( gpointer data, QofBackendError errcode );
/* Command callbacks */
-#ifdef HAVE_GTK_2_10
static void gnc_main_window_cmd_page_setup (GtkAction *action, GncMainWindow *window);
-#endif
static void gnc_main_window_cmd_file_properties (GtkAction *action, GncMainWindow *window);
static void gnc_main_window_cmd_file_close (GtkAction *action, GncMainWindow *window);
static void gnc_main_window_cmd_file_quit (GtkAction *action, GncMainWindow *window);
@@ -247,16 +241,14 @@
{ "FileOpenMenuAction", GTK_STOCK_OPEN, N_("_Open"), "", NULL, NULL },
{ "FileImportAction", NULL, N_("_Import"), NULL, NULL, NULL },
{ "FileExportAction", NULL, N_("_Export"), NULL, NULL, NULL },
- { "FilePrintAction", GTK_STOCK_PRINT, N_("_Print..."), "<control>p",
+ { "FilePrintAction", GTK_STOCK_PRINT, N_("_Print..."), "<control>p",
N_("Print the currently active page"), NULL },
-#ifdef HAVE_GTK_2_10
-# ifndef GTK_STOCK_PAGE_SETUP
-# define GTK_STOCK_PAGE_SETUP NULL
-# endif
+#ifndef GTK_STOCK_PAGE_SETUP
+# define GTK_STOCK_PAGE_SETUP NULL
+#endif
{ "FilePageSetupAction", GTK_STOCK_PAGE_SETUP, N_("Pa_ge Setup..."), "<control><shift>p",
N_("Specify the page size and orientation for printing"),
G_CALLBACK (gnc_main_window_cmd_page_setup) },
-#endif
{ "FilePropertiesAction", GTK_STOCK_PROPERTIES, N_("Proper_ties"), "<Alt>Return",
N_("Edit the properties of the current file"),
G_CALLBACK (gnc_main_window_cmd_file_properties) },
@@ -269,10 +261,10 @@
/* Edit menu */
- { "EditCutAction", GTK_STOCK_CUT, N_("Cu_t"), NULL,
+ { "EditCutAction", GTK_STOCK_CUT, N_("Cu_t"), NULL,
N_("Cut the current selection and copy it to clipboard"),
G_CALLBACK (gnc_main_window_cmd_edit_cut) },
- { "EditCopyAction", GTK_STOCK_COPY, N_("_Copy"), NULL,
+ { "EditCopyAction", GTK_STOCK_COPY, N_("_Copy"), NULL,
N_("Copy the current selection to clipboard"),
G_CALLBACK (gnc_main_window_cmd_edit_copy) },
{ "EditPasteAction", GTK_STOCK_PASTE, N_("_Paste"), NULL,
@@ -284,9 +276,9 @@
/* View menu */
- { "ViewSortByAction", NULL, N_("_Sort By..."), NULL,
+ { "ViewSortByAction", NULL, N_("_Sort By..."), NULL,
N_("Select sorting criteria for this page view"), NULL },
- { "ViewFilterByAction", NULL, N_("_Filter By..."), NULL,
+ { "ViewFilterByAction", NULL, N_("_Filter By..."), NULL,
N_("Select the account types that should be displayed."), NULL },
{ "ViewRefreshAction", GTK_STOCK_REFRESH, N_("_Refresh"), "<control>r",
N_("Refresh this window"),
@@ -484,7 +476,7 @@
* @param data A data structure containing state about the
* window/page restoration process. */
static void
-gnc_main_window_restore_page (GncMainWindow *window,
+gnc_main_window_restore_page (GncMainWindow *window,
GncMainWindowSaveData *data)
{
GncMainWindowPrivate *priv;
@@ -494,11 +486,11 @@
GError *error = NULL;
ENTER("window %p, data %p (key file %p, window %d, page start %d, page num %d)",
- window, data, data->key_file, data->window_num, data->page_offset,
+ window, data, data->key_file, data->window_num, data->page_offset,
data->page_num);
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
- page_group = g_strdup_printf(PAGE_STRING,
+ page_group = g_strdup_printf(PAGE_STRING,
data->page_offset + data->page_num);
page_type = g_key_file_get_string(data->key_file, page_group,
PAGE_TYPE, &error);
@@ -767,7 +759,7 @@
/* We use the same struct for reading and for writing, so we cast
away the const. */
data.key_file = (GKeyFile *) keyfile;
- window_count = g_key_file_get_integer(data.key_file, STATE_FILE_TOP,
+ window_count = g_key_file_get_integer(data.key_file, STATE_FILE_TOP,
WINDOW_COUNT, &error);
if (error) {
g_warning("error reading group %s key %s: %s",
@@ -793,7 +785,7 @@
{
GtkAction *action;
GncMainWindow *window;
-
+
/* The default state should be to have an Account Tree page open
* in the window. */
DEBUG("no saved state file");
@@ -1129,9 +1121,9 @@
gboolean needs_save, do_shutdown;
session = gnc_get_current_session();
- needs_save = qof_book_not_saved(qof_session_get_book(session)) &&
+ needs_save = qof_book_not_saved(qof_session_get_book(session)) &&
!gnc_file_save_in_progress();
- do_shutdown = !needs_save ||
+ do_shutdown = !needs_save ||
(needs_save && !gnc_main_window_prompt_for_save(GTK_WIDGET(window)));
if (do_shutdown) {
@@ -1308,7 +1300,7 @@
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
page = priv->current_page;
if (page) {
- /* The Gnome HIG 2.0 recommends the application name not be used. (p16)
+ /* The Gnome HIG 2.0 recommends the application name not be used. (p16)
* but several developers prefer to use it anyway. */
title = g_strdup_printf("%s%s - %s - GnuCash", dirty, filename,
gnc_plugin_page_get_page_name(page));
@@ -1316,7 +1308,7 @@
title = g_strdup_printf("%s%s - GnuCash", dirty, filename);
}
g_free(filename);
-
+
return title;
}
@@ -1810,7 +1802,7 @@
label = gtk_notebook_get_menu_label (GTK_NOTEBOOK(priv->notebook),
page->notebook_page);
gtk_label_set_text(GTK_LABEL(label), name);
-
+
/* Force an update of the window title */
gnc_main_window_update_title(window);
g_free(old_page_long_name);
@@ -2252,9 +2244,7 @@
priv->usage_order = g_list_prepend (priv->usage_order, page);
gtk_notebook_append_page_menu (notebook, page->notebook_page,
tab_hbox, menu_label);
-#ifdef HAVE_GTK_2_10
gtk_notebook_set_tab_reorderable (notebook, page->notebook_page, TRUE);
-#endif
gnc_plugin_page_inserted (page);
gtk_notebook_set_current_page (notebook, -1);
if (GNC_PLUGIN_PAGE_GET_CLASS(page)->window_changed)
@@ -2476,7 +2466,7 @@
if (!g_object_get_data (G_OBJECT (page), PLUGIN_PAGE_IMMUTABLE)) {
GtkWidget *close_image, *close_button;
GtkRequisition requisition;
-
+
close_button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE);
close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
@@ -2490,7 +2480,7 @@
gtk_widget_show (close_button);
else
gtk_widget_hide (close_button);
-
+
g_signal_connect_swapped (G_OBJECT (close_button), "clicked",
G_CALLBACK(gnc_main_window_close_page), page);
@@ -2805,7 +2795,7 @@
(GNC_PLUGIN_PAGE_GET_CLASS(page)->update_edit_menu_actions)(page, hide);
return;
}
-
+
if (GTK_IS_EDITABLE (widget))
{
gboolean has_selection;
@@ -2928,7 +2918,7 @@
/* CS: This callback functions will set the statusbar text to the
* "tooltip" property of the currently selected GtkAction.
*
- * This code is directly copied from gtk+/test/testmerge.c.
+ * This code is directly copied from gtk+/test/testmerge.c.
* Thanks to (L)GPL! */
typedef struct _ActionStatus ActionStatus;
struct _ActionStatus {
@@ -2952,16 +2942,16 @@
{
ActionStatus *data;
gchar *tooltip;
-
+
data = g_object_get_data (G_OBJECT (widget), "action-status");
-
- if (data)
+
+ if (data)
{
g_object_get (data->action, "tooltip", &tooltip, NULL);
-
- gtk_statusbar_push (GTK_STATUSBAR (data->statusbar), 0,
+
+ gtk_statusbar_push (GTK_STATUSBAR (data->statusbar), 0,
tooltip ? tooltip : "");
-
+
g_free (tooltip);
}
}
@@ -2976,14 +2966,14 @@
if (data)
gtk_statusbar_pop (GTK_STATUSBAR (data->statusbar), 0);
}
-
+
static void
connect_proxy (GtkUIManager *merge,
GtkAction *action,
GtkWidget *proxy,
GtkWidget *statusbar)
{
- if (GTK_IS_MENU_ITEM (proxy))
+ if (GTK_IS_MENU_ITEM (proxy))
{
ActionStatus *data;
@@ -3003,9 +2993,9 @@
data->action = g_object_ref (action);
data->statusbar = g_object_ref (statusbar);
- g_object_set_data_full (G_OBJECT (proxy), "action-status",
+ g_object_set_data_full (G_OBJECT (proxy), "action-status",
data, action_status_destroy);
-
+
g_signal_connect (proxy, "select", G_CALLBACK (set_tip), NULL);
g_signal_connect (proxy, "deselect", G_CALLBACK (unset_tip), NULL);
}
@@ -3049,10 +3039,8 @@
gtk_widget_show (priv->notebook);
g_signal_connect (G_OBJECT (priv->notebook), "switch-page",
G_CALLBACK (gnc_main_window_switch_page), window);
-#ifdef HAVE_GTK_2_10
g_signal_connect (G_OBJECT (priv->notebook), "page-reordered",
G_CALLBACK (gnc_main_window_page_reordered), window);
-#endif
gtk_box_pack_start (GTK_BOX (main_vbox), priv->notebook,
TRUE, TRUE, 0);
@@ -3077,8 +3065,8 @@
gnc_gtk_action_group_set_translation_domain (priv->action_group, GETTEXT_PACKAGE);
gtk_action_group_add_actions (priv->action_group, gnc_menu_actions,
gnc_menu_n_actions, window);
- gtk_action_group_add_toggle_actions (priv->action_group,
- toggle_actions, n_toggle_actions,
+ gtk_action_group_add_toggle_actions (priv->action_group,
+ toggle_actions, n_toggle_actions,
window);
gtk_action_group_add_radio_actions (priv->action_group,
radio_entries, n_radio_entries,
@@ -3141,7 +3129,7 @@
if (!gnc_is_extra_enabled()) {
GtkAction* action;
- action = gtk_action_group_get_action(priv->action_group,
+ action = gtk_action_group_get_action(priv->action_group,
"ExtensionsAction");
gtk_action_set_visible(action, FALSE);
}
@@ -3173,7 +3161,7 @@
gtk_widget_hide(menu);
ige_mac_menu_set_menu_bar (GTK_MENU_SHELL (menu));
- item = gtk_ui_manager_get_widget (window->ui_merge,
+ item = gtk_ui_manager_get_widget (window->ui_merge,
"/menubar/File/FileQuit");
if (GTK_IS_MENU_ITEM (item))
ige_mac_menu_set_quit_menu_item (GTK_MENU_ITEM (item));
@@ -3181,7 +3169,7 @@
/* the about group */
group = ige_mac_menu_add_app_menu_group ();
- item = gtk_ui_manager_get_widget (window->ui_merge,
+ item = gtk_ui_manager_get_widget (window->ui_merge,
"/menubar/Help/HelpAbout");
if (GTK_IS_MENU_ITEM (item))
ige_mac_menu_add_app_menu_item (group, GTK_MENU_ITEM (item), _("About GnuCash"));
@@ -3189,7 +3177,7 @@
/* the preferences group */
group = ige_mac_menu_add_app_menu_group ();
- item = gtk_ui_manager_get_widget (window->ui_merge,
+ item = gtk_ui_manager_get_widget (window->ui_merge,
"/menubar/Edit/EditPreferences");
if (GTK_IS_MENU_ITEM (item))
ige_mac_menu_add_app_menu_item (group, GTK_MENU_ITEM (item), NULL);
@@ -3313,7 +3301,6 @@
LEAVE(" ");
}
-#ifdef HAVE_GTK_2_10
/** This function is invoked when a GtkNotebook tab gets reordered by
* drag and drop. It adjusts the list installed_pages to reflect the new
* ordering so that GnuCash saves and restores the tabs correctly.
@@ -3351,7 +3338,6 @@
LEAVE(" ");
}
-#endif
static void
gnc_main_window_plugin_added (GncPlugin *manager,
@@ -3377,7 +3363,6 @@
/* Command callbacks */
-#ifdef HAVE_GTK_2_10
static void
gnc_main_window_cmd_page_setup (GtkAction *action,
GncMainWindow *window)
@@ -3389,7 +3374,6 @@
gtk_window = gnc_window_get_gtk_window(GNC_WINDOW(window));
gnc_ui_page_setup(gtk_window);
}
-#endif
static void
gnc_main_window_cmd_file_properties (GtkAction *action, GncMainWindow *window)
@@ -3633,7 +3617,7 @@
g_return_if_fail(GTK_IS_ACTION(action));
g_return_if_fail(GTK_IS_RADIO_ACTION(current));
g_return_if_fail(GNC_IS_MAIN_WINDOW(old_window));
-
+
ENTER("action %p, current %p, window %p", action, current, old_window);
value = gtk_radio_action_get_current_value(current);
new_window = g_list_nth_data(active_windows, value);
@@ -3993,7 +3977,7 @@
/* CS: Code copied from gtk/gtkactiongroup.c */
static gchar *
-dgettext_swapped (const gchar *msgid,
+dgettext_swapped (const gchar *msgid,
const gchar *domainname)
{
/* CS: Pass this through dgettext if and only if msgid is
@@ -4003,24 +3987,24 @@
/*
* This is copied into GnuCash from Gtk in order to fix problems when
- * empty msgids were passed through gettext().
+ * empty msgids were passed through gettext().
*
* See http://bugzilla.gnome.org/show_bug.cgi?id=326200 . If that bug
* is fixed in the gtk that we can rely open, then
* gnc_gtk_action_group_set_translation_domain can be replaced by
* gtk_action_group_set_translation_domain again.
*/
-void
+void
gnc_gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
const gchar *domain)
{
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
- gtk_action_group_set_translate_func (action_group,
+ gtk_action_group_set_translate_func (action_group,
(GtkTranslateFunc)dgettext_swapped,
g_strdup (domain),
g_free);
-}
+}
/* CS: End of code copied from gtk/gtkactiongroup.c */
void
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -1,5 +1,5 @@
-/*
- * gnc-tree-view.c -- new GtkTreeView with extra features used by
+/*
+ * gnc-tree-view.c -- new GtkTreeView with extra features used by
* all the tree views in gnucash
*
* Copyright (C) 2003,2005 David Hampton <hampton at employees.org>
@@ -171,7 +171,7 @@
0,
(GInstanceInitFunc) gnc_tree_view_init
};
-
+
gnc_tree_view_type = g_type_register_static (GTK_TYPE_TREE_VIEW,
GNC_TREE_VIEW_NAME,
&our_info, 0);
@@ -219,7 +219,7 @@
"Show the column menu so user can change what columns are visible.",
FALSE,
G_PARAM_READWRITE));
-
+
/* GObject signals */
gobject_class->finalize = gnc_tree_view_finalize;
@@ -386,7 +386,7 @@
{
GncTreeView *view = GNC_TREE_VIEW (object);
GncTreeViewPrivate *priv;
-
+
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
switch (prop_id)
{
@@ -418,7 +418,7 @@
GParamSpec *pspec)
{
GncTreeView *view = GNC_TREE_VIEW (object);
-
+
switch (prop_id)
{
case PROP_GCONF_SECTION:
@@ -627,7 +627,7 @@
/* Store the values in gconf */
gconf_section = priv->gconf_section;
- gnc_gconf_set_string(gconf_section, GCONF_KEY_SORT_COLUMN,
+ gnc_gconf_set_string(gconf_section, GCONF_KEY_SORT_COLUMN,
column_pref_name, NULL);
gnc_gconf_set_string(gconf_section, GCONF_KEY_SORT_ORDER,
gnc_enum_to_nick(GTK_TYPE_SORT_TYPE, order), NULL);
@@ -810,7 +810,7 @@
LEAVE("1, no pref name");
return TRUE;
}
-
+
/* Using gconf? */
if (priv->gconf_section) {
if (priv->seen_gconf_visibility) {
@@ -821,14 +821,14 @@
return visible;
}
- visible = column ?
+ visible = column ?
(g_object_get_data(G_OBJECT(column), DEFAULT_VISIBLE) != NULL) : FALSE;
LEAVE("%d, gconf but using defaults", visible);
return visible;
}
/* Check the default columns list */
- visible = column ?
+ visible = column ?
(g_object_get_data(G_OBJECT(column), DEFAULT_VISIBLE) != NULL) : FALSE;
LEAVE("defaults says %d", visible);
return visible;
@@ -1000,7 +1000,7 @@
continue;
columns = g_slist_append(columns, column);
}
-
+
/* Then reorder the columns */
g_signal_handler_block(view, priv->columns_changed_cb_id);
for (prev = NULL, tmp = columns; tmp; tmp = g_slist_next(tmp)) {
@@ -1145,7 +1145,7 @@
g_list_foreach(columns, (GFunc)gnc_tree_view_update_visibility, view);
g_list_free(columns);
}
-
+
LEAVE(" ");
}
@@ -1372,12 +1372,7 @@
/* Create the menu if we don't have one already */
if (!priv->column_menu) {
priv->column_menu = gtk_menu_new();
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(priv->column_menu);
-#else
- g_object_ref(priv->column_menu);
- gtk_object_sink(GTK_OBJECT(priv->column_menu));
-#endif
}
/* Create the check menu item */
@@ -1654,7 +1649,7 @@
}
}
-static gint
+static gint
gnc_tree_view_count_visible_columns(GncTreeView *view)
{
GList *columns, *node;
@@ -1663,8 +1658,8 @@
columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(view));
for (node = columns; node; node = node->next) {
GtkTreeViewColumn *col = GTK_TREE_VIEW_COLUMN(node->data);
-
- if (g_object_get_data(G_OBJECT(col), DEFAULT_VISIBLE) ||
+
+ if (g_object_get_data(G_OBJECT(col), DEFAULT_VISIBLE) ||
g_object_get_data(G_OBJECT(col), ALWAYS_VISIBLE))
count++;
}
@@ -1754,7 +1749,7 @@
g_object_set_data(G_OBJECT(column), PREF_NAME, (gpointer)pref_name);
if (data_column == 0)
g_object_set_data(G_OBJECT(column), ALWAYS_VISIBLE, GINT_TO_POINTER(1));
- g_object_set_data(G_OBJECT(column), MODEL_COLUMN,
+ g_object_set_data(G_OBJECT(column), MODEL_COLUMN,
GINT_TO_POINTER(data_column));
/* Get visibility */
@@ -2002,7 +1997,7 @@
if (g_list_length(renderers) > 0)
cr = GTK_CELL_RENDERER(renderers->data);
g_list_free(renderers);
-
+
return cr;
}
@@ -2081,10 +2076,10 @@
GtkTreeViewColumn *c = NULL;
gint seen = 0;
gboolean wrapped = FALSE;
-
+
cols = gtk_tree_view_get_columns(tv);
g_return_val_if_fail(g_list_length(cols) > 0, FALSE);
-
+
node = g_list_find(cols, *col);
g_return_val_if_fail(node, FALSE);
do {
@@ -2098,7 +2093,7 @@
seen++;
if (c == *col) break;
} while (!seen);
-
+
g_list_free(cols);
*col = c;
return wrapped;
@@ -2116,7 +2111,7 @@
}
void
-gnc_tree_view_keynav(GncTreeView *view, GtkTreeViewColumn **col,
+gnc_tree_view_keynav(GncTreeView *view, GtkTreeViewColumn **col,
GtkTreePath *path, GdkEventKey *event)
{
GtkTreeView *tv = GTK_TREE_VIEW(view);
Modified: gnucash/trunk/src/gnome-utils/print-session.c
===================================================================
--- gnucash/trunk/src/gnome-utils/print-session.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/print-session.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -22,40 +22,28 @@
#include "config.h"
-#ifdef HAVE_GTK_2_10
-# include <gtk/gtkprintoperation.h>
-#endif
+#include <gtk/gtkprintoperation.h>
-#if !WANT_WEBKIT && !defined(GTKHTML_USES_GTKPRINT)
-# include <gnome.h>
-# include <glib/gi18n.h>
-# include <libgnomeprint/gnome-font.h>
-# include <libgnomeprintui/gnome-print-job-preview.h>
-#endif
-
#include "print-session.h"
#include "gnc-gconf-utils.h" /* for gnc_gconf_set_string() */
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnc.printing"
-#ifdef HAVE_GTK_2_10
/* Do not treat -Wstrict-aliasing warnings as errors because of problems of the
* G_LOCK* macros as declared by glib. See
* http://bugzilla.gnome.org/show_bug.cgi?id=316221 for additional information.
*/
-# if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
-# pragma GCC diagnostic warning "-Wstrict-aliasing"
-# endif
+#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
+# pragma GCC diagnostic warning "-Wstrict-aliasing"
+#endif
static GtkPrintSettings *print_settings = NULL;
static GtkPageSetup *page_setup = NULL;
G_LOCK_DEFINE_STATIC(print_settings);
G_LOCK_DEFINE_STATIC(page_setup);
-#endif
-#ifdef HAVE_GTK_2_10
void
gnc_print_operation_save_print_settings(GtkPrintOperation *op)
{
@@ -123,126 +111,3 @@
if (old_page_setup)
g_object_unref(old_page_setup);
}
-#endif /* HAVE_GTK_2_10 */
-
-
-#if !WANT_WEBKIT && !defined(GTKHTML_USES_GTKPRINT)
-static void gnc_print_session_fontsel_cb(GtkButton *widget, gpointer user_data)
-{
- PrintSession *ps = (PrintSession *)user_data;
- GtkWidget *dialog;
- gint response;
-
- dialog = gtk_font_selection_dialog_new("GnuCash Print Font");
- if (ps->pango_font_string == NULL) {
- GtkStyle *style = gtk_style_new();
- ps->pango_font_string = pango_font_description_to_string(style->font_desc);
- g_object_unref(style);
- }
- if (ps->pango_font_string != NULL)
- gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *)dialog, ps->pango_font_string);
-
- response = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
-
- switch (response) {
- case GTK_RESPONSE_OK:
- g_free(ps->pango_font_string);
- ps->pango_font_string = gtk_font_selection_dialog_get_font_name((GtkFontSelectionDialog *)dialog);
- gnc_gconf_set_string(NULL, "pango_font_string", ps->pango_font_string, NULL);
- break;
-
- default:
- break;
- }
-}
-
-PrintSession *
-gnc_print_session_create(gboolean hand_built_pages)
-{
- PrintSession * ps = g_new0(PrintSession, 1);
- GnomePrintConfig *config;
- GtkWidget *dialog;
- GtkWidget *button;
- gint response;
-
- ps->default_font = NULL;
- ps->pango_font_string = gnc_gconf_get_string (NULL, "pango_font_string", NULL);
-
- /* Ask the user what to do with the output */
- config = gnome_print_config_default();
- ps->job = gnome_print_job_new(config);
- g_object_unref(config);
- dialog = gnome_print_dialog_new(ps->job, (guchar *) _("Print GnuCash Document"), 0);
-
- button = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT);
- g_signal_connect(button, "clicked", G_CALLBACK(gnc_print_session_fontsel_cb), ps);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), button);
- gtk_button_box_set_child_secondary((GtkButtonBox *)GTK_DIALOG(dialog)->action_area, button, TRUE);
- gtk_widget_show(button); /* shouldn't be needed but is */
-
- response = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
-
- switch (response) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- break;
-
- default:
- gnc_print_session_destroy(ps);
- return NULL;
- }
-
- ps->hand_built_pages = hand_built_pages;
- ps->print_type = response;
- ps->context = gnome_print_job_get_context(ps->job);
-
- ps->default_font = gnome_font_find_closest((guchar *)"Sans Regular", 12);
-
- if (hand_built_pages) {
- gnome_print_beginpage(ps->context, (guchar *)"");
- gnome_print_setrgbcolor(ps->context, 0.0, 0.0, 0.0);
- gnome_print_setfont(ps->context, ps->default_font);
- }
- return ps;
-}
-
-void
-gnc_print_session_destroy(PrintSession * ps)
-{
- g_object_unref(ps->job);
- if (ps->default_font != NULL)
- g_object_unref(ps->default_font);
- g_free(ps->pango_font_string);
-
- g_free(ps);
-}
-
-
-void
-gnc_print_session_done(PrintSession * ps)
-{
- GtkWidget *widget;
-
- if (ps->hand_built_pages) {
- gnome_print_showpage(ps->context);
- }
- gnome_print_job_close (ps->job);
-
- switch (ps->print_type) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- gnome_print_job_print(ps->job);
- break;
-
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- widget = gnome_print_job_preview_new(ps->job, (guchar*)"Print Preview");
- gtk_widget_show(widget);
- break;
-
- default:
- break;
- }
- gnc_print_session_destroy(ps);
-}
-#endif /* !GTKHTML_USES_GTKPRINT */
Modified: gnucash/trunk/src/gnome-utils/print-session.h
===================================================================
--- gnucash/trunk/src/gnome-utils/print-session.h 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/gnome-utils/print-session.h 2010-02-21 18:30:32 UTC (rev 18703)
@@ -1,5 +1,5 @@
/********************************************************************\
- * print-session.h -- data structures for printing via gnome print *
+ * print-session.h -- data structures for printing via gnome print *
* (GnuCash) *
* Copyright (C) 2000 Bill Gribble <grib at billgribble.com> *
* *
@@ -34,8 +34,6 @@
/** @addtogroup Basic Session Functions
@{ */
-#ifdef HAVE_GTK_2_10
-
#include <gtk/gtkprintoperation.h>
/**
@@ -63,62 +61,7 @@
*/
void gnc_ui_page_setup(GtkWindow *parent);
-#endif /* HAVE_GTK_2_10 */
-
-#if !WANT_WEBKIT && !defined(GTKHTML_USES_GTKPRINT)
-
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <libgnomeprintui/gnome-print-preview.h>
-
-typedef struct {
- gboolean hand_built_pages;
- gint print_type;
-
- GnomePrintJob * job;
- GnomePrintContext * context; /* Convenience only. Owned by the job */
- GnomeFont * default_font;
- guchar * pango_font_string;
-} PrintSession;
-
-
-/** Create a new print 'session'. Once created, a series of commands
- * can be issued on the session to create the output page. The
- * output will be printed when the session is done. This function
- * will present the standard print/preview selection box to the user
- * and wait for the result.
- *
- * If the hand_built_pages argument is set to TRUE, this function
- * will perform a couple of extra setup steps. Specifically it will
- * call the gnome begin page, set color and set font functions. The
- * code will also call close page when the #gnc_print_session_done
- * function is called.
- *
- * @param hand_built_pages If TRUE, this funciton will perform extra setup.
- *
- * @return A pointer to the data structure describing this print session.
- */
-PrintSession * gnc_print_session_create(gboolean hand_built_pages);
-
-
-/** Destroy a print 'session' without producing any output.
- *
- * @param ps A pointer to the session to be destroyed.
- */
-void gnc_print_session_destroy(PrintSession * ps);
-
-
-/** Finish a print 'session'. The output from this session will be
- * printed to the device selected when the session was created.
- *
- * @param ps A pointer to the session to be closed.
- */
-void gnc_print_session_done(PrintSession * ps);
-
-#endif /* !GTKHTML_USES_GTKPRINT */
-
/** @} */
/** @} */
Modified: gnucash/trunk/src/html/Makefile.am
===================================================================
--- gnucash/trunk/src/html/Makefile.am 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/html/Makefile.am 2010-02-21 18:30:32 UTC (rev 18703)
@@ -77,13 +77,8 @@
libgncmod_html_la_LIBADD += \
${GTKHTML_LIBS}
-if !GTKHTML_USES_GTKPRINT
- AM_CPPFLAGS += ${GNOME_PRINT_CFLAGS}
- libgncmod_html_la_LIBADD += ${GNOME_PRINT_LIBS}
endif
-endif
-
if BUILDING_FROM_SVN
swig-gnc-html.c: gnc-html.i gnc-html.h \
${top_srcdir}/src/base-typemaps.i
@@ -94,11 +89,6 @@
EXTRA_DIST = \
gnc-html.i
-if !GTKHTML_USES_GTKPRINT
- AM_CPPFLAGS += ${GNOME_PRINT_CFLAGS}
- libgncmod_html_la_LIBADD += ${GNOME_PRINT_LIBS}
-endif
-
CLEANFILES = $(BUILT_SOURCES) gnucash
MAINTAINERCLEANFILES = swig-html.c
Modified: gnucash/trunk/src/html/gnc-html-graph-gog-gtkhtml.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog-gtkhtml.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/html/gnc-html-graph-gog-gtkhtml.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -38,16 +38,7 @@
#include <goffice/graph/gog-chart.h>
#include <goffice/graph/gog-graph.h>
#include <goffice/graph/gog-object.h>
-#if defined(HAVE_GOFFICE_0_5)
-# include <goffice/graph/gog-renderer.h>
-#elif defined(GOFFICE_WITH_CAIRO)
-# include <goffice/graph/gog-renderer-cairo.h>
-#else
-# include <goffice/graph/gog-renderer-pixbuf.h>
-#endif
-#ifndef GTKHTML_USES_GTKPRINT
-# include <goffice/graph/gog-renderer-gnome-print.h>
-#endif
+#include <goffice/graph/gog-renderer.h>
/* everything inside the following #ifndef can be safely removed when gnucash
requires libgoffice >= 0.7.5. */
#ifndef GOG_TYPE_GRAPH
@@ -81,11 +72,7 @@
static int handle_linechart( GncHtml* html, gpointer eb, gpointer d );
static int handle_scatter( GncHtml* html, gpointer eb, gpointer d );
-#ifdef GTKHTML_USES_GTKPRINT
static void draw_print_cb(GtkHTMLEmbedded *eb, cairo_t *cr, gpointer graph);
-#else
-static void draw_print_cb(GtkHTMLEmbedded *eb, GnomePrintContext *context, gpointer graph);
-#endif
static double * read_doubles(const char * string, int nvalues);
@@ -400,41 +387,17 @@
return TRUE;
}
-#ifdef GTKHTML_USES_GTKPRINT
static void
draw_print_cb(GtkHTMLEmbedded *eb, cairo_t *cr, gpointer unused)
{
GogGraph *graph = GOG_GRAPH(g_object_get_data(G_OBJECT(eb), "graph"));
-# ifdef HAVE_GOFFICE_0_5
GogRenderer *rend = g_object_new(GOG_TYPE_RENDERER, "model", graph, NULL);
-# else
- GogRendererCairo *rend = g_object_new(GOG_RENDERER_CAIRO_TYPE, "model", graph,
- "cairo", cr, "is-vector", TRUE, NULL);
-# endif
/* assuming pixel size is 0.5, cf. gtkhtml/src/htmlprinter.c */
cairo_scale(cr, 0.5, 0.5);
cairo_translate(cr, 0, -eb->height);
-# ifdef HAVE_GOFFICE_0_5
gog_renderer_render_to_cairo(rend, cr, eb->width, eb->height);
-# else
- gog_renderer_cairo_update(rend, eb->width, eb->height, 1.0);
-# endif
g_object_unref(rend);
}
-
-#else /* !GTKHTML_USES_GTKPRINT */
-static void
-draw_print_cb(GtkHTMLEmbedded *eb, GnomePrintContext *context, gpointer unused)
-{
- GogGraph *graph = GOG_GRAPH (g_object_get_data (G_OBJECT (eb), "graph"));
-
- /* assuming pixel size is 0.5, cf. gtkhtml/src/htmlprinter.c */
- gnome_print_scale (context, 0.5, 0.5);
-
- gnome_print_translate (context, 0, eb->height);
- gog_graph_print_to_gnome_print (graph, context, eb->width, eb->height);
-}
-#endif /* GTKHTML_USES_GTKPRINT */
Modified: gnucash/trunk/src/html/gnc-html-graph-gog.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-graph-gog.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/html/gnc-html-graph-gog.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -33,16 +33,8 @@
#include <goffice/graph/gog-chart.h>
#include <goffice/graph/gog-graph.h>
#include <goffice/graph/gog-object.h>
-#if defined(HAVE_GOFFICE_0_5)
-# include <goffice/graph/gog-renderer.h>
-#elif defined(GOFFICE_WITH_CAIRO)
-# include <goffice/graph/gog-renderer-cairo.h>
-#else
-# include <goffice/graph/gog-renderer-pixbuf.h>
-#endif
-#if !WANT_WEBKIT && !defined(GTKHTML_USES_GTKPRINT)
-# include <goffice/graph/gog-renderer-gnome-print.h>
-#endif
+#include <goffice/graph/gog-renderer.h>
+
/* everything inside the following #ifndef can be safely removed when gnucash
requires libgoffice >= 0.7.5, the contents of the #else block must stay. */
#ifndef GOG_TYPE_GRAPH
@@ -110,13 +102,8 @@
static GdkPixbuf*
create_graph_pixbuf( GogObject *graph, int width, int height )
{
-#if defined(HAVE_GOFFICE_0_5)
GogRenderer *renderer;
-#elif defined(GOFFICE_WITH_CAIRO)
- GogRendererCairo *cairo_renderer;
-#else
- GogRendererPixbuf *pixbuf_renderer;
-#endif
+
GdkPixbuf *buf;
gboolean update_status;
@@ -126,26 +113,10 @@
// gnumeric uses. We probably _should_ do something like that, though.
gog_object_update (GOG_OBJECT (graph));
-#if defined(HAVE_GOFFICE_0_5)
renderer = GOG_RENDERER(g_object_new( GOG_TYPE_RENDERER, "model", graph, NULL ));
update_status = gog_renderer_update( renderer, width, height );
buf = gog_renderer_get_pixbuf( renderer );
g_object_set_data_full( G_OBJECT(buf), "renderer", renderer, g_object_unref );
-#elif defined(GOFFICE_WITH_CAIRO)
- cairo_renderer = GOG_RENDERER_CAIRO(g_object_new( GOG_RENDERER_CAIRO_TYPE,
- "model", graph,
- NULL ));
- update_status = gog_renderer_cairo_update( cairo_renderer, width, height, 1.0 );
- buf = gog_renderer_cairo_get_pixbuf( cairo_renderer );
- g_object_set_data_full( G_OBJECT(buf), "renderer", cairo_renderer, g_object_unref );
-#else
- pixbuf_renderer = GOG_RENDERER_PIXBUF(g_object_new( GOG_RENDERER_PIXBUF_TYPE,
- "model", graph,
- NULL));
- update_status = gog_renderer_pixbuf_update( pixbuf_renderer, width, height, 1.0 );
- buf = gog_renderer_pixbuf_get( pixbuf_renderer );
- g_object_set_data_full( G_OBJECT(buf), "renderer", pixbuf_renderer, g_object_unref );
-#endif
g_object_set_data_full( G_OBJECT(buf), "graph", graph, g_object_unref );
return buf;
Modified: gnucash/trunk/src/html/gnc-html-gtkhtml.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-gtkhtml.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/html/gnc-html-gtkhtml.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -122,12 +122,7 @@
gtk_container_add( GTK_CONTAINER(priv->base.container),
GTK_WIDGET(priv->html) );
-#ifdef HAVE_GTK_2_10
g_object_ref_sink( priv->base.container );
-#else
- g_object_ref( priv->base.container );
- gtk_object_sink( GTK_OBJECT(priv->base.container) );
-#endif
/* signals */
g_signal_connect( priv->html, "url_requested",
@@ -930,7 +925,6 @@
return TRUE;
}
-#ifdef GTKHTML_USES_GTKPRINT
static void
draw_page_cb(GtkPrintOperation *operation, GtkPrintContext *context,
gint page_nr, gpointer user_data)
@@ -969,27 +963,7 @@
g_object_unref(print);
}
-#else /* !GTKHTML_USES_GTKPRINT */
static void
-impl_gtkhtml_print( GncHtml* self )
-{
- PrintSession *ps;
- GncHtmlGtkhtmlPrivate* priv;
-
- priv = GNC_HTML_GTKHTML_GET_PRIVATE(self);
- ps = gnc_print_session_create( FALSE );
- if ( ps == NULL )
- {
- /* user cancelled */
- return;
- }
-
- gtk_html_print( GTK_HTML(priv->html), ps->context );
- gnc_print_session_done( ps );
-}
-#endif /* GTKHTML_USES_GTKPRINT */
-
-static void
impl_gtkhtml_set_parent( GncHtml* self, GtkWindow* parent )
{
GncHtmlGtkhtmlPrivate* priv;
Modified: gnucash/trunk/src/html/gnc-html-webkit.c
===================================================================
--- gnucash/trunk/src/html/gnc-html-webkit.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/html/gnc-html-webkit.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -122,12 +122,7 @@
gtk_container_add( GTK_CONTAINER(priv->base.container),
GTK_WIDGET(priv->web_view) );
-#ifdef HAVE_GTK_2_10
g_object_ref_sink( priv->base.container );
-#else
- g_object_ref( priv->base.container );
- gtk_object_sink( GTK_OBJECT(priv->base.container) );
-#endif
/* signals */
g_signal_connect( priv->web_view, "navigation-requested",
Modified: gnucash/trunk/src/register/register-gnome/combocell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -100,8 +100,8 @@
static gpointer
gnc_combo_cell_autopop_init (gpointer unused)
{
- auto_pop_combos = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- KEY_AUTO_RAISE_LISTS,
+ auto_pop_combos = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
+ KEY_AUTO_RAISE_LISTS,
NULL);
gnc_gconf_general_register_cb(KEY_AUTO_RAISE_LISTS,
@@ -338,9 +338,9 @@
cell->cell.gui_realize = NULL;
}
-void
+void
gnc_combo_cell_set_sort_enabled (ComboCell *cell, gboolean enabled)
-{
+{
PopBox *box;
if (cell == NULL)
@@ -410,9 +410,9 @@
cell->shared_store = data;
}
-void
+void
gnc_combo_cell_add_menu_item (ComboCell *cell, const char * menustr)
-{
+{
PopBox *box;
if (cell == NULL)
@@ -439,7 +439,7 @@
gtk_list_store_set(box->tmp_store, &iter, 0, menustr, -1);
}
- /* If we're going to be using a pre-fab quickfill,
+ /* If we're going to be using a pre-fab quickfill,
* then don't fill it in here */
if (FALSE == box->use_quickfill_cache)
{
@@ -447,9 +447,9 @@
}
}
-void
+void
gnc_combo_cell_add_account_menu_item (ComboCell *cell, char * menustr)
-{
+{
PopBox *box;
gchar *menu_copy, *value_copy;
@@ -479,7 +479,7 @@
unblock_list_signals (cell);
}
- /* If we're going to be using a pre-fab quickfill,
+ /* If we're going to be using a pre-fab quickfill,
* then don't fill it in here */
if (FALSE == box->use_quickfill_cache)
{
@@ -510,7 +510,7 @@
gboolean pop_list;
glong newval_chars;
glong change_chars;
-
+
newval_chars = g_utf8_strlen (newval, newval_len);
change_chars = g_utf8_strlen (change, change_len);
@@ -630,7 +630,7 @@
if ((match_str != NULL) &&
(strncmp (match_str, bcell->value,
- strlen (bcell->value)) == 0) &&
+ strlen (bcell->value)) == 0) &&
(strcmp (match_str, bcell->value) != 0))
{
gnc_basic_cell_set_value_internal (bcell,
@@ -674,7 +674,7 @@
int i = *start_selection;
const char *c;
gunichar uc;
-
+
c = g_utf8_offset_to_pointer (bcell->value, i);
while (*c)
{
@@ -720,7 +720,7 @@
match_str = gnc_quickfill_string (match);
if ((match_str != NULL) &&
- (strncmp (match_str, bcell->value, strlen (bcell->value)) == 0) &&
+ (strncmp (match_str, bcell->value, strlen (bcell->value)) == 0) &&
(strcmp (match_str, bcell->value) != 0))
{
gnc_basic_cell_set_value_internal (bcell, match_str);
@@ -753,12 +753,7 @@
box->item_list = gnc_item_edit_new_list(box->item_edit, cell->shared_store);
else
box->item_list = gnc_item_edit_new_list(box->item_edit, box->tmp_store);
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(box->item_list);
-#else
- g_object_ref (box->item_list);
- gtk_object_sink (GTK_OBJECT(box->item_list));
-#endif
/* to mark cell as realized, remove the realize method */
cell->cell.gui_realize = NULL;
Modified: gnucash/trunk/src/register/register-gnome/datecell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/datecell-gnome.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/register/register-gnome/datecell-gnome.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -1,6 +1,6 @@
/********************************************************************\
* datecell-gnome.c -- implement date cell handler in gnome *
- * *
+ * *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
@@ -324,7 +324,7 @@
cell->cell.gui_realize = NULL;
}
-void
+void
gnc_date_cell_set_value (DateCell *cell, int day, int mon, int year)
{
PopBox *box = cell->cell.gui_private;
@@ -354,7 +354,7 @@
unblock_picker_signals (cell);
}
-void
+void
gnc_date_cell_set_value_secs (DateCell *cell, time_t secs)
{
PopBox *box = cell->cell.gui_private;
@@ -365,8 +365,8 @@
box->date = *stm;
qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
- box->date.tm_mday,
- box->date.tm_mon + 1,
+ box->date.tm_mday,
+ box->date.tm_mon + 1,
box->date.tm_year + 1900);
gnc_basic_cell_set_value_internal (&cell->cell, buff);
@@ -394,7 +394,7 @@
gnc_parse_date (&(box->date), cell->cell.value);
qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
- box->date.tm_mday,
+ box->date.tm_mday,
box->date.tm_mon + 1,
box->date.tm_year + 1900);
@@ -481,35 +481,35 @@
gboolean ok = TRUE;
const gchar *c;
gunichar uc;
-
+
/* accept only numbers or a date separator. Note that the
* separator of '-' (for DATE_FORMAT_ISO) takes precedence
- * over the accelerator below! */
+ * over the accelerator below! */
c = change;
while (*c)
{
uc = g_utf8_get_char (c);
-
+
if (!g_unichar_isdigit (uc) && (separator != uc))
ok = FALSE;
if (separator == uc)
count++;
-
+
c = g_utf8_next_char (c);
- }
-
+ }
+
c = _cell->value;
while (*c)
{
uc = g_utf8_get_char (c);
-
+
if (separator == uc)
count++;
c = g_utf8_next_char (c);
}
-
+
if (2 < count)
ok = FALSE;
@@ -549,12 +549,7 @@
box->sheet = sheet;
box->item_edit = item_edit;
box->date_picker = gnc_item_edit_new_date_picker (box->item_edit);
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(box->date_picker);
-#else
- g_object_ref (box->date_picker);
- gtk_object_sink (GTK_OBJECT(box->date_picker));
-#endif
/* to mark cell as realized, remove the realize method */
cell->cell.gui_realize = NULL;
@@ -660,7 +655,7 @@
ts->tv_nsec = 0;
}
-static void
+static void
gnc_date_cell_set_value_internal (BasicCell *_cell, const char *str)
{
DateCell *cell = (DateCell *) _cell;
@@ -670,8 +665,8 @@
gnc_parse_date (&(box->date), str);
qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
- box->date.tm_mday,
- box->date.tm_mon + 1,
+ box->date.tm_mday,
+ box->date.tm_mon + 1,
box->date.tm_year + 1900);
gnc_basic_cell_set_value_internal (_cell, buff);
Modified: gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2010-02-21 17:23:43 UTC (rev 18702)
+++ gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2010-02-21 18:30:32 UTC (rev 18703)
@@ -652,7 +652,7 @@
gnucash_sheet_clear_styles (sheet);
g_hash_table_destroy (sheet->cursor_styles);
- g_hash_table_destroy (sheet->dimensions_hash_table);
+ g_hash_table_destroy (sheet->dimensions_hash_table);
if (G_OBJECT_CLASS (sheet_parent_class)->finalize)
(*G_OBJECT_CLASS (sheet_parent_class)->finalize)(object);
@@ -786,9 +786,9 @@
sheet->insert_signal);
g_signal_handler_block (G_OBJECT (sheet->entry),
sheet->delete_signal);
-
+
gtk_entry_set_text (GTK_ENTRY (sheet->entry), retval);
-
+
g_signal_handler_unblock (G_OBJECT (sheet->entry),
sheet->delete_signal);
g_signal_handler_unblock (G_OBJECT (sheet->entry),
@@ -879,13 +879,13 @@
if (old_text == NULL)
old_text = "";
old_text_len = strlen (old_text);
-
+
old_position = *position;
/* we set new_text_gs to what the entry contents would be if
the insert was processed */
new_text_gs = g_string_new ("");
-
+
i = 0;
c = old_text;
//Copy old text up to insert position
@@ -894,7 +894,7 @@
uc = g_utf8_get_char (c);
g_string_append_unichar (new_text_gs, uc);
c = g_utf8_next_char (c);
- i++;
+ i++;
}
//Copy inserted text
@@ -905,15 +905,15 @@
{
uc = g_utf8_get_char (c);
g_string_append_unichar (new_text_gs, uc);
- c = g_utf8_next_char (c);
+ c = g_utf8_next_char (c);
}
-
+
new_text = new_text_gs->str;
new_text_len = new_text_gs->len;
-
+
change_text = change_text_gs->str;
change_text_len = change_text_gs->len;
-
+
editable = GTK_EDITABLE (sheet->entry);
gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
@@ -932,9 +932,9 @@
sheet->insert_signal);
g_signal_handler_block (G_OBJECT (sheet->entry),
sheet->delete_signal);
-
+
gtk_entry_set_text (GTK_ENTRY (sheet->entry), retval);
-
+
g_signal_handler_unblock (G_OBJECT (sheet->entry),
sheet->delete_signal);
g_signal_handler_unblock (G_OBJECT (sheet->entry),
@@ -1016,7 +1016,7 @@
new_text_gs = g_string_new ("");
i = 0;
c = old_text;
- while (*c && (i < start_pos))
+ while (*c && (i < start_pos))
{
uc = g_utf8_get_char (c);
g_string_append_unichar (new_text_gs, uc);
@@ -1024,17 +1024,17 @@
i++;
}
- c = g_utf8_offset_to_pointer (old_text, end_pos);
+ c = g_utf8_offset_to_pointer (old_text, end_pos);
while (*c)
{
uc = g_utf8_get_char (c);
g_string_append_unichar (new_text_gs, uc);
c = g_utf8_next_char (c);
- }
+ }
new_text = new_text_gs->str;
new_text_len = new_text_gs->len;
-
+
editable = GTK_EDITABLE (sheet->entry);
gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
@@ -1052,14 +1052,14 @@
sheet->insert_signal);
g_signal_handler_block (G_OBJECT (sheet->entry),
sheet->delete_signal);
-
+
gtk_entry_set_text (GTK_ENTRY (sheet->entry), retval);
-
+
g_signal_handler_unblock (G_OBJECT (sheet->entry),
sheet->delete_signal);
g_signal_handler_unblock (G_OBJECT (sheet->entry),
sheet->insert_signal);
-
+
g_signal_stop_emission_by_name (G_OBJECT(sheet->entry),
"delete_text");
}
@@ -1385,7 +1385,7 @@
{
gtk_grab_add(widget);
sheet->grabbed = TRUE;
- gnc_item_edit_set_has_selection
+ gnc_item_edit_set_has_selection
(GNC_ITEM_EDIT(sheet->item_editor), TRUE);
}
@@ -1615,9 +1615,9 @@
sheet->insert_signal);
g_signal_handler_block (G_OBJECT (sheet->entry),
sheet->delete_signal);
-
+
gtk_entry_set_text (GTK_ENTRY (sheet->entry), new_text);
-
+
g_signal_handler_unblock (G_OBJECT (sheet->entry),
sheet->delete_signal);
g_signal_handler_unblock (G_OBJECT (sheet->entry),
@@ -1992,7 +1992,7 @@
if (!style)
continue;
- if (cell_col < style->ncols)
+ if (cell_col < style->ncols)
for (cell_row = 0; cell_row < style->nrows; cell_row++)
{
VirtualLocation virt_loc;
@@ -2046,7 +2046,7 @@
height = MAX (sheet->height, widget->allocation.height);
width = MAX (sheet->width, widget->allocation.width);
- if (width != (int)x || height != (int)y)
+ if (width != (int)x || height != (int)y)
gnome_canvas_set_scroll_region (GNOME_CANVAS(sheet),
0, 0, width, height);
}
@@ -2282,7 +2282,7 @@
break;
case COLOR_SPLIT:
- case COLOR_SPLIT_ACTIVE:
+ case COLOR_SPLIT_ACTIVE:
widget = sheet->split_color;
break;
}
@@ -2304,7 +2304,7 @@
case COLOR_PRIMARY_ACTIVE:
case COLOR_SECONDARY_ACTIVE:
- case COLOR_SPLIT_ACTIVE:
+ case COLOR_SPLIT_ACTIVE:
color = &style->base[GTK_STATE_SELECTED];
break;
}
@@ -2479,14 +2479,10 @@
/* The entry widget */
sheet->entry = gtk_entry_new ();
-#ifdef HAVE_GTK_2_10
g_object_ref_sink(sheet->entry);
-#else
- g_object_ref(sheet->entry);
- gtk_object_sink(GTK_OBJECT(sheet->entry));
-#endif
- /*gtk_layout_put (GTK_LAYOUT (sheet), sheet->entry, 0, 0);*/
+ /*gtk_layout_put (GTK_LAYOUT (sheet), sheet->entry, 0, 0);*/
+
/* set up the editor */
sheet->item_editor = gnc_item_edit_new(sheet_group, sheet, sheet->entry);
@@ -2637,7 +2633,7 @@
GTK_FILL,
0, 0);
gtk_widget_show(header_canvas);
-
+
gtk_table_attach (GTK_TABLE(widget), sheet,
0, 1, 1, 2,
GTK_FILL | GTK_EXPAND | GTK_SHRINK,
@@ -2661,7 +2657,7 @@
0, 0);
reg->vscrollbar = scrollbar;
gtk_widget_show(scrollbar);
-
+
scrollbar = gtk_hscrollbar_new(GNUCASH_SHEET(sheet)->hadj);
gtk_table_attach (GTK_TABLE(widget), GTK_WIDGET(scrollbar),
0, 1, 3, 4,
More information about the gnucash-changes
mailing list