diff options
author | Roger Leigh <rleigh@debian.org> | 2008-10-26 17:28:54 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2008-10-26 17:28:54 +0000 |
commit | 33a17feb28af2d2aeabc8c7ab5ef509ea3de15a7 (patch) | |
tree | d444cf1a245694bd049a9e6722c41b8f280ad429 /src/gutenprintui2 | |
parent | 9d82a443d65ea3e4e015ba6988208231fa8fdc77 (diff) |
Imported Upstream version 5.2.1
Diffstat (limited to 'src/gutenprintui2')
-rw-r--r-- | src/gutenprintui2/Makefile.in | 39 | ||||
-rw-r--r-- | src/gutenprintui2/panel.c | 124 | ||||
-rw-r--r-- | src/gutenprintui2/plist.c | 5 |
3 files changed, 128 insertions, 40 deletions
diff --git a/src/gutenprintui2/Makefile.in b/src/gutenprintui2/Makefile.in index 8e850a6..35e10e3 100644 --- a/src/gutenprintui2/Makefile.in +++ b/src/gutenprintui2/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,7 +17,7 @@ # Variables #export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -#export STP_DATA_PATH = $(top_srcdir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/xml VPATH = @srcdir@ @@ -46,7 +46,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \ $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \ $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac @@ -80,7 +81,7 @@ libgutenprintui2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(libgutenprintui2_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LIBGUTENPRINTUI2_TRUE@am_libgutenprintui2_la_rpath = -rpath \ @BUILD_LIBGUTENPRINTUI2_TRUE@ $(libdir) -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -139,6 +140,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIALOG = @DIALOG@ DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ DVIPDF = @DVIPDF@ DVIPS = @DVIPS@ ECHO = @ECHO@ @@ -159,6 +161,7 @@ GIMP2_LIBS = @GIMP2_LIBS@ GIMPTOOL2_CHECK = @GIMPTOOL2_CHECK@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GNUCFLAGS = @GNUCFLAGS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ @@ -191,6 +194,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -211,9 +215,10 @@ MAINT = @MAINT@ MAINTAINER_CFLAGS = @MAINTAINER_CFLAGS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -240,6 +245,7 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ @@ -389,8 +395,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done @@ -398,8 +404,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: @@ -552,8 +558,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -565,8 +571,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -576,13 +582,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/src/gutenprintui2/panel.c b/src/gutenprintui2/panel.c index cf262e5..1a915e5 100644 --- a/src/gutenprintui2/panel.c +++ b/src/gutenprintui2/panel.c @@ -1,5 +1,5 @@ /* - * "$Id: panel.c,v 1.17 2008/01/22 02:36:42 rlk Exp $" + * "$Id: panel.c,v 1.18 2008/07/09 01:32:40 rlk Exp $" * * Main window code for Print plug-in for the GIMP. * @@ -261,6 +261,7 @@ static void set_printer_defaults (void); static void redraw_color_swatch (void); static void color_update (GtkAdjustment *adjustment); static void dimension_update (GtkAdjustment *adjustment); +static void integer_update (GtkAdjustment *adjustment); static void set_controls_active (GtkObject *checkbutton, gpointer optno); static void update_adjusted_thumbnail (gboolean regenerate_image); @@ -882,6 +883,7 @@ populate_options(const stp_vars_t *v) break; case STP_PARAMETER_TYPE_DOUBLE: case STP_PARAMETER_TYPE_DIMENSION: + case STP_PARAMETER_TYPE_INT: if (opt->info.flt.adjustment) { gtk_widget_destroy @@ -971,6 +973,14 @@ populate_options(const stp_vars_t *v) opt->info.flt.scale = 1.0; opt->is_active = desc.is_active; break; + case STP_PARAMETER_TYPE_INT: + opt->info.flt.adjustment = NULL; + opt->info.flt.upper = desc.bounds.integer.upper; + opt->info.flt.lower = desc.bounds.integer.lower; + opt->info.flt.deflt = desc.deflt.dimension; + opt->info.flt.scale = 1.0; + opt->is_active = desc.is_active; + break; case STP_PARAMETER_TYPE_CURVE: opt->info.curve.label = NULL; opt->info.curve.button = NULL; @@ -1057,6 +1067,7 @@ populate_option_table(GtkWidget *table, int p_class) { case STP_PARAMETER_TYPE_STRING_LIST: case STP_PARAMETER_TYPE_DIMENSION: + case STP_PARAMETER_TYPE_INT: case STP_PARAMETER_TYPE_DOUBLE: case STP_PARAMETER_TYPE_CURVE: case STP_PARAMETER_TYPE_BOOLEAN: @@ -1182,6 +1193,25 @@ populate_option_table(GtkWidget *table, int p_class) stp_set_dimension_parameter_active(pv->v, desc->name, STP_PARAMETER_INACTIVE); break; + case STP_PARAMETER_TYPE_INT: + add_reset_button(opt, table, 4, vpos[desc->p_level][desc->p_type]); + stpui_create_scale_entry(opt, GTK_TABLE(table), 0, + vpos[desc->p_level][desc->p_type]++, + gettext(desc->text), 200, 0, + opt->info.flt.deflt, + opt->info.flt.lower, + opt->info.flt.upper, + 1, 10, 0, TRUE, 0, 0, NULL, + !(desc->is_mandatory)); + stpui_set_adjustment_tooltip(opt->info.flt.adjustment, + gettext(desc->help)); + g_signal_connect(G_OBJECT(opt->info.flt.adjustment), + "value_changed", + G_CALLBACK(integer_update), opt); + if (desc->p_level > MAXIMUM_PARAMETER_LEVEL) + stp_set_int_parameter_active(pv->v, desc->name, + STP_PARAMETER_INACTIVE); + break; case STP_PARAMETER_TYPE_CURVE: xcurve = stp_get_curve_parameter(pv->v, opt->fast_desc->name); if (xcurve) @@ -1209,10 +1239,6 @@ populate_option_table(GtkWidget *table, int p_class) stp_set_boolean_parameter_active(pv->v, desc->name, STP_PARAMETER_INACTIVE); break; - case STP_PARAMETER_TYPE_INT: - stp_set_int_parameter_active(pv->v, opt->fast_desc->name, - STP_PARAMETER_INACTIVE); - break; case STP_PARAMETER_TYPE_RAW: stp_set_raw_parameter_active(pv->v, opt->fast_desc->name, STP_PARAMETER_INACTIVE); @@ -1259,6 +1285,7 @@ set_options_active(const char *omit) break; case STP_PARAMETER_TYPE_DOUBLE: case STP_PARAMETER_TYPE_DIMENSION: + case STP_PARAMETER_TYPE_INT: adj = opt->info.flt.adjustment; if (adj) { @@ -3088,6 +3115,21 @@ do_color_updates (void) else set_adjustment_active(opt, FALSE, TRUE); break; + case STP_PARAMETER_TYPE_INT: + if (stp_check_int_parameter(pv->v, opt->fast_desc->name, + STP_PARAMETER_INACTIVE)) + { + gtk_adjustment_set_value + (GTK_ADJUSTMENT(opt->info.flt.adjustment), + (stp_get_int_parameter(pv->v, opt->fast_desc->name))); + } + if (stp_check_int_parameter(pv->v, opt->fast_desc->name, + STP_PARAMETER_ACTIVE) || + opt->fast_desc->is_mandatory) + set_adjustment_active(opt, TRUE, TRUE); + else + set_adjustment_active(opt, FALSE, TRUE); + break; case STP_PARAMETER_TYPE_CURVE: if (stp_check_curve_parameter(pv->v, opt->fast_desc->name, STP_PARAMETER_ACTIVE) || @@ -5205,6 +5247,30 @@ dimension_update (GtkAdjustment *adjustment) } static void +integer_update (GtkAdjustment *adjustment) +{ + int i; + for (i = 0; i < current_option_count; i++) + { + option_t *opt = &(current_options[i]); + if (opt->fast_desc->p_type == STP_PARAMETER_TYPE_INT && + opt->fast_desc->p_level <= MAXIMUM_PARAMETER_LEVEL && + opt->info.flt.adjustment && + adjustment == GTK_ADJUSTMENT(opt->info.flt.adjustment)) + { + invalidate_preview_thumbnail (); + if (stp_get_int_parameter(pv->v, opt->fast_desc->name) != + (int) adjustment->value) + { + stp_set_int_parameter(pv->v, opt->fast_desc->name, + (int) adjustment->value); + update_adjusted_thumbnail(FALSE); + } + } + } +} + +static void set_controls_active (GtkObject *checkbutton, gpointer xopt) { option_t *opt = (option_t *) xopt; @@ -5231,7 +5297,7 @@ set_controls_active (GtkObject *checkbutton, gpointer xopt) case STP_PARAMETER_TYPE_DIMENSION: set_adjustment_active(opt, TRUE, FALSE); if (! stp_check_dimension_parameter(pv->v, opt->fast_desc->name, - STP_PARAMETER_INACTIVE)) + STP_PARAMETER_INACTIVE)) { stp_describe_parameter(pv->v, opt->fast_desc->name, &desc); stp_set_dimension_parameter(pv->v, opt->fast_desc->name, @@ -5241,6 +5307,19 @@ set_controls_active (GtkObject *checkbutton, gpointer xopt) stp_set_dimension_parameter_active(pv->v, opt->fast_desc->name, STP_PARAMETER_ACTIVE); break; + case STP_PARAMETER_TYPE_INT: + set_adjustment_active(opt, TRUE, FALSE); + if (! stp_check_int_parameter(pv->v, opt->fast_desc->name, + STP_PARAMETER_INACTIVE)) + { + stp_describe_parameter(pv->v, opt->fast_desc->name, &desc); + stp_set_int_parameter(pv->v, opt->fast_desc->name, + desc.deflt.integer); + stp_parameter_description_destroy(&desc); + } + stp_set_int_parameter_active(pv->v, opt->fast_desc->name, + STP_PARAMETER_ACTIVE); + break; case STP_PARAMETER_TYPE_CURVE: set_curve_active(opt, TRUE, FALSE); if (! stp_check_curve_parameter(pv->v, opt->fast_desc->name, @@ -5303,6 +5382,11 @@ set_controls_active (GtkObject *checkbutton, gpointer xopt) stp_set_dimension_parameter_active(pv->v, opt->fast_desc->name, STP_PARAMETER_INACTIVE); break; + case STP_PARAMETER_TYPE_INT: + set_adjustment_active(opt, FALSE, FALSE); + stp_set_int_parameter_active(pv->v, opt->fast_desc->name, + STP_PARAMETER_INACTIVE); + break; case STP_PARAMETER_TYPE_CURVE: set_curve_active(opt, FALSE, FALSE); stp_set_curve_parameter_active(pv->v, opt->fast_desc->name, @@ -5340,39 +5424,39 @@ set_one_default(option_t *opt) { case STP_PARAMETER_TYPE_DOUBLE: active = stp_get_float_parameter_active(pv->v, opt->fast_desc->name); - stp_set_float_parameter(pv->v, opt->fast_desc->name, - opt->info.flt.deflt); - stp_set_float_parameter_active(pv->v, opt->fast_desc->name, - active); + stp_set_float_parameter(pv->v, opt->fast_desc->name, opt->info.flt.deflt); + stp_set_float_parameter_active(pv->v, opt->fast_desc->name, active); break; case STP_PARAMETER_TYPE_DIMENSION: unit_scaler = units[pv->unit].scale; - active = stp_get_dimension_parameter_active(pv->v, - opt->fast_desc->name); + active = stp_get_dimension_parameter_active(pv->v, opt->fast_desc->name); stp_set_dimension_parameter(pv->v, opt->fast_desc->name, opt->info.flt.deflt * unit_scaler); - stp_set_dimension_parameter_active(pv->v, opt->fast_desc->name, - active); + stp_set_dimension_parameter_active(pv->v, opt->fast_desc->name, active); + break; + case STP_PARAMETER_TYPE_INT: + unit_scaler = units[pv->unit].scale; + active = stp_get_int_parameter_active(pv->v, opt->fast_desc->name); + stp_set_int_parameter(pv->v, opt->fast_desc->name, + (int) opt->info.flt.deflt); + stp_set_int_parameter_active(pv->v, opt->fast_desc->name, active); break; case STP_PARAMETER_TYPE_BOOLEAN: active = stp_get_boolean_parameter_active(pv->v, opt->fast_desc->name); stp_set_boolean_parameter(pv->v, opt->fast_desc->name, opt->info.bool.deflt); - stp_set_boolean_parameter_active(pv->v, opt->fast_desc->name, - active); + stp_set_boolean_parameter_active(pv->v, opt->fast_desc->name, active); break; case STP_PARAMETER_TYPE_STRING_LIST: active = stp_get_string_parameter_active(pv->v, opt->fast_desc->name); stp_set_string_parameter(pv->v, opt->fast_desc->name, opt->info.list.default_val); - stp_set_string_parameter_active(pv->v, opt->fast_desc->name, - active); + stp_set_string_parameter_active(pv->v, opt->fast_desc->name, active); break; case STP_PARAMETER_TYPE_FILE: active = stp_get_file_parameter_active(pv->v, opt->fast_desc->name); stp_set_file_parameter(pv->v, opt->fast_desc->name, ""); - stp_set_file_parameter_active(pv->v, opt->fast_desc->name, - active); + stp_set_file_parameter_active(pv->v, opt->fast_desc->name, active); break; default: break; diff --git a/src/gutenprintui2/plist.c b/src/gutenprintui2/plist.c index e8b5aec..77e8cab 100644 --- a/src/gutenprintui2/plist.c +++ b/src/gutenprintui2/plist.c @@ -1,5 +1,5 @@ /* - * "$Id: plist.c,v 1.17 2008/01/31 12:56:09 m0m Exp $" + * "$Id: plist.c,v 1.18 2008/07/04 14:29:28 rlk Exp $" * * Print plug-in for the GIMP. * @@ -1631,7 +1631,6 @@ stpui_print(const stpui_plist_t *printer, stpui_image_t *image) _exit(0); } } - /* NOTREACHED */ write(syncfd[1], "Done", 5); _exit(0); } @@ -1835,5 +1834,5 @@ stpui_print(const stpui_plist_t *printer, stpui_image_t *image) } /* - * End of "$Id: plist.c,v 1.17 2008/01/31 12:56:09 m0m Exp $". + * End of "$Id: plist.c,v 1.18 2008/07/04 14:29:28 rlk Exp $". */ |