diff options
Diffstat (limited to 'glabels2/src')
-rw-r--r-- | glabels2/src/Makefile.in | 478 | ||||
-rw-r--r-- | glabels2/src/glabels-ui.xml | 5 | ||||
-rw-r--r-- | glabels2/src/pixmaps/Makefile.in | 191 | ||||
-rw-r--r-- | glabels2/src/stock-pixmaps/Makefile.in | 207 | ||||
-rw-r--r-- | glabels2/src/view-barcode.c | 4 | ||||
-rw-r--r-- | glabels2/src/view-box.c | 4 | ||||
-rw-r--r-- | glabels2/src/view-ellipse.c | 4 | ||||
-rw-r--r-- | glabels2/src/view-highlight.c | 72 | ||||
-rw-r--r-- | glabels2/src/view-image.c | 4 | ||||
-rw-r--r-- | glabels2/src/view-line.c | 4 | ||||
-rw-r--r-- | glabels2/src/view-object.c | 9 | ||||
-rw-r--r-- | glabels2/src/view-text.c | 4 | ||||
-rw-r--r-- | glabels2/src/view.c | 444 | ||||
-rw-r--r-- | glabels2/src/view.h | 79 | ||||
-rw-r--r-- | glabels2/src/wdgt-text-props.c | 89 |
15 files changed, 425 insertions, 1173 deletions
diff --git a/glabels2/src/Makefile.in b/glabels2/src/Makefile.in deleted file mode 100644 index 2ec5081..0000000 --- a/glabels2/src/Makefile.in +++ /dev/null @@ -1,478 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -DATADIRNAME = @DATADIRNAME@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GLABELS_CFLAGS = @GLABELS_CFLAGS@ -GLABELS_LIBS = @GLABELS_LIBS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNOME_INTERFACE_VERSION = @GNOME_INTERFACE_VERSION@ -INSTOBJEXT = @INSTOBJEXT@ -INTLDEPS = @INTLDEPS@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -PACKAGE = @PACKAGE@ -PKG_CONFIG = @PKG_CONFIG@ -POFILES = @POFILES@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -cxxflags_set = @cxxflags_set@ - -LIB_BARCODE_DIR = ../barcode-0.98 - -SUBDIRS = pixmaps stock-pixmaps - -bin_PROGRAMS = glabels glabels-batch - -uidir = $(datadir)/glabels/ui/ - -INCLUDES = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/dialogs $(GLABELS_CFLAGS) -I$(LIB_BARCODE_DIR) -DGNOME_ICONDIR=\""$(datadir)/pixmaps"\" -DGLABELS_LOCALEDIR=\""$(datadir)/locale"\" -DGLABELS_UI_DIR=\""$(datadir)/glabels/ui/"\" -DGLABELS_GLADEDIR=\""$(datadir)/glabels/glade/"\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED - - -glabels_LDFLAGS = -export-dynamic - -glabels_LDADD = $(GLABELS_LIBS) -L$(LIB_BARCODE_DIR) -lbarcode - - -glabels_batch_LDFLAGS = -export-dynamic - -glabels_batch_LDADD = $(GLABELS_LIBS) -L$(LIB_BARCODE_DIR) -lbarcode - - -BUILT_SOURCES = marshal.c marshal.h gnome-recent-marshal.c gnome-recent-marshal.h - - -glabels_SOURCES = glabels.c glabels.h splash.c splash.h mdi.c mdi.h mdi-child.c mdi-child.h stock.c stock.h menus.h menus.c commands.h commands.c file.h file.c recent.h recent.c tools.h tools.c prefs.c prefs.h prefs-dialog.c prefs-dialog.h view.c view.h view-object.c view-object.h view-box.c view-box.h view-ellipse.c view-ellipse.h view-line.c view-line.h view-image.c view-image.h view-text.c view-text.h view-barcode.c view-barcode.h view-highlight.c view-highlight.h merge-properties.c merge-properties.h print.c print.h print-dialog.c print-dialog.h bc.c bc.h bc-gnubarcode.c bc-gnubarcode.h bc-postnet.c bc-postnet.h label.c label.h label-object.c label-object.h label-text.c label-text.h label-box.c label-box.h label-line.c label-line.h label-ellipse.c label-ellipse.h label-image.c label-image.h label-barcode.c label-barcode.h template.c template.h xml-label.c xml-label.h merge.c merge.h merge-text.c merge-text.h merge-ui.c merge-ui.h merge-ui-text.c merge-ui-text.h text-node.c text-node.h wdgt-text-props.c wdgt-text-props.h wdgt-text-entry.c wdgt-text-entry.h wdgt-position.c wdgt-position.h wdgt-size.c wdgt-size.h wdgt-line.c wdgt-line.h wdgt-fill.c wdgt-fill.h wdgt-vector.c wdgt-vector.h wdgt-bc-props.c wdgt-bc-props.h wdgt-bc-style.c wdgt-bc-style.h wdgt-bc-data.c wdgt-bc-data.h wdgt-print-copies.c wdgt-print-copies.h wdgt-print-merge.c wdgt-print-merge.h wdgt-media-select.c wdgt-media-select.h wdgt-mini-preview.c wdgt-mini-preview.h wdgt-rotate-label.c wdgt-rotate-label.h util.c util.h canvas-hacktext.c canvas-hacktext.h bonobo-mdi-child.c bonobo-mdi-child.h bonobo-mdi.c bonobo-mdi.h gnome-recent-model.c gnome-recent-model.h gnome-recent-util.c gnome-recent-util.h gnome-recent-view.c gnome-recent-view.h gnome-recent-view-bonobo.c gnome-recent-view-bonobo.h debug.c debug.h $(BUILT_SOURCES) - - -glabels_batch_SOURCES = glabels-batch.c prefs.c prefs.h print.c print.h bc.c bc.h bc-gnubarcode.c bc-gnubarcode.h bc-postnet.c bc-postnet.h label.c label.h label-object.c label-object.h label-text.c label-text.h label-box.c label-box.h label-line.c label-line.h label-ellipse.c label-ellipse.h label-image.c label-image.h label-barcode.c label-barcode.h template.c template.h xml-label.c xml-label.h merge.c merge.h merge-text.c merge-text.h text-node.c text-node.h util.c util.h debug.c debug.h $(BUILT_SOURCES) - - -ui_DATA = glabels-ui.xml - -EXTRA_DIST = $(ui_DATA) marshal.list gnome-recent-marshal.list - - -CLEANFILES = $(BUILT_SOURCES) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = -PROGRAMS = $(bin_PROGRAMS) - - -DEFS = @DEFS@ -I. -I$(srcdir) -I.. -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -glabels_OBJECTS = glabels.o splash.o mdi.o mdi-child.o stock.o menus.o \ -commands.o file.o recent.o tools.o prefs.o prefs-dialog.o view.o \ -view-object.o view-box.o view-ellipse.o view-line.o view-image.o \ -view-text.o view-barcode.o view-highlight.o merge-properties.o print.o \ -print-dialog.o bc.o bc-gnubarcode.o bc-postnet.o label.o label-object.o \ -label-text.o label-box.o label-line.o label-ellipse.o label-image.o \ -label-barcode.o template.o xml-label.o merge.o merge-text.o merge-ui.o \ -merge-ui-text.o text-node.o wdgt-text-props.o wdgt-text-entry.o \ -wdgt-position.o wdgt-size.o wdgt-line.o wdgt-fill.o wdgt-vector.o \ -wdgt-bc-props.o wdgt-bc-style.o wdgt-bc-data.o wdgt-print-copies.o \ -wdgt-print-merge.o wdgt-media-select.o wdgt-mini-preview.o \ -wdgt-rotate-label.o util.o canvas-hacktext.o bonobo-mdi-child.o \ -bonobo-mdi.o gnome-recent-model.o gnome-recent-util.o \ -gnome-recent-view.o gnome-recent-view-bonobo.o debug.o marshal.o \ -gnome-recent-marshal.o -glabels_DEPENDENCIES = -glabels_batch_OBJECTS = glabels-batch.o prefs.o print.o bc.o \ -bc-gnubarcode.o bc-postnet.o label.o label-object.o label-text.o \ -label-box.o label-line.o label-ellipse.o label-image.o label-barcode.o \ -template.o xml-label.o merge.o merge-text.o text-node.o util.o debug.o \ -marshal.o gnome-recent-marshal.o -glabels_batch_DEPENDENCIES = -CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DATA = $(ui_DATA) - -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -SOURCES = $(glabels_SOURCES) $(glabels_batch_SOURCES) -OBJECTS = $(glabels_OBJECTS) $(glabels_batch_OBJECTS) - -all: all-redirect -.SUFFIXES: -.SUFFIXES: .S .c .o .s -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -mostlyclean-binPROGRAMS: - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) - -distclean-binPROGRAMS: - -maintainer-clean-binPROGRAMS: - -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - list='$(bin_PROGRAMS)'; for p in $$list; do \ - rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ - done - -.c.o: - $(COMPILE) -c $< - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -glabels: $(glabels_OBJECTS) $(glabels_DEPENDENCIES) - @rm -f glabels - $(LINK) $(glabels_LDFLAGS) $(glabels_OBJECTS) $(glabels_LDADD) $(LIBS) - -glabels-batch: $(glabels_batch_OBJECTS) $(glabels_batch_DEPENDENCIES) - @rm -f glabels-batch - $(LINK) $(glabels_batch_LDFLAGS) $(glabels_batch_OBJECTS) $(glabels_batch_LDADD) $(LIBS) - -install-uiDATA: $(ui_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(uidir) - @list='$(ui_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(uidir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(uidir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(uidir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(uidir)/$$p; \ - fi; fi; \ - done - -uninstall-uiDATA: - @$(NORMAL_UNINSTALL) - list='$(ui_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(uidir)/$$p; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. - -@SET_MAKE@ - -all-recursive install-data-recursive install-exec-recursive \ -installdirs-recursive install-recursive uninstall-recursive \ -check-recursive installcheck-recursive info-recursive dvi-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ - rev="$$subdir $$rev"; \ - test "$$subdir" != "." || dot_seen=yes; \ - done; \ - test "$$dot_seen" = "no" && rev=". $$rev"; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = src - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done - for subdir in $(SUBDIRS); do \ - if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ - || exit 1; \ - chmod 777 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ - || exit 1; \ - fi; \ - done -info-am: -info: info-recursive -dvi-am: -dvi: dvi-recursive -check-am: all-am -check: check-recursive -installcheck-am: -installcheck: installcheck-recursive -install-exec-am: install-binPROGRAMS -install-exec: install-exec-recursive - -install-data-am: install-uiDATA -install-data: install-data-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-recursive -uninstall-am: uninstall-binPROGRAMS uninstall-uiDATA -uninstall: uninstall-recursive -all-am: Makefile $(PROGRAMS) $(DATA) -all-redirect: all-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: installdirs-recursive -installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(uidir) - - -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ - mostlyclean-tags mostlyclean-generic - -mostlyclean: mostlyclean-recursive - -clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \ - mostlyclean-am - -clean: clean-recursive - -distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ - distclean-generic clean-am - -distclean: distclean-recursive - -maintainer-clean-am: maintainer-clean-binPROGRAMS \ - maintainer-clean-compile maintainer-clean-tags \ - maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-recursive - -.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ -maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ -mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile uninstall-uiDATA install-uiDATA \ -install-data-recursive uninstall-data-recursive install-exec-recursive \ -uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ -all-recursive check-recursive installcheck-recursive info-recursive \ -dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ -maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -marshal.h: marshal.list $(GLIB_GENMARSHAL) - $(GLIB_GENMARSHAL) $< --header --prefix=gl_marshal > $@ - -marshal.c: marshal.list $(GLIB_GENMARSHAL) - echo "#include \"marshal.h\"" > $@ && \ - $(GLIB_GENMARSHAL) $< --body --prefix=gl_marshal >> $@ - -gnome-recent-marshal.h: gnome-recent-marshal.list $(GLIB_GENMARSHAL) - $(GLIB_GENMARSHAL) $< --header --prefix=gnome_recent > $@ - -gnome-recent-marshal.c: gnome-recent-marshal.list $(GLIB_GENMARSHAL) - echo "#include \"gnome-recent-marshal.h\"" > $@ && \ - $(GLIB_GENMARSHAL) $< --body --prefix=gnome_recent >> $@ - -$(bin_PROGRAMS): $(LIB_BARCODE_DIR)/libbarcode.a - -$(LIB_BARCODE_DIR)/libbarcode.a: - cd $(LIB_BARCODE_DIR); $(MAKE) - -clean: barcode_clean - -barcode_clean: - cd $(LIB_BARCODE_DIR); $(MAKE) clean - -distclean maintainer-clean: barcode_distclean - -barcode_distclean: - cd $(LIB_BARCODE_DIR); $(MAKE) distclean - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/glabels2/src/glabels-ui.xml b/glabels2/src/glabels-ui.xml index 836a082..bc65e65 100644 --- a/glabels2/src/glabels-ui.xml +++ b/glabels2/src/glabels-ui.xml @@ -123,9 +123,10 @@ <cmd name="HelpContents" _label="Contents" _tip="Open the gedit manual" - accel="F1"/> + accel="F1" pixtype="stock" pixname="gtk-help"/> - <cmd name="About" _label="About..." _tip="About this application"/> + <cmd name="About" _label="About..." _tip="About this application" + pixtype="stock" pixname="About"/> <cmd name="BonoboUIDump" _label="Dump XML" _tip="Dump the UI Xml description" hidden="0"/> diff --git a/glabels2/src/pixmaps/Makefile.in b/glabels2/src/pixmaps/Makefile.in deleted file mode 100644 index 2685092..0000000 --- a/glabels2/src/pixmaps/Makefile.in +++ /dev/null @@ -1,191 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = ../.. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -DATADIRNAME = @DATADIRNAME@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GLABELS_CFLAGS = @GLABELS_CFLAGS@ -GLABELS_LIBS = @GLABELS_LIBS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNOME_INTERFACE_VERSION = @GNOME_INTERFACE_VERSION@ -INSTOBJEXT = @INSTOBJEXT@ -INTLDEPS = @INTLDEPS@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -PACKAGE = @PACKAGE@ -PKG_CONFIG = @PKG_CONFIG@ -POFILES = @POFILES@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -cxxflags_set = @cxxflags_set@ - -EXTRA_DIST = collate.xpm nocollate.xpm checkerboard.xpm cursor_text.xbm cursor_text_mask.xbm cursor_box.xbm cursor_box_mask.xbm cursor_line.xbm cursor_line_mask.xbm cursor_ellipse.xbm cursor_ellipse_mask.xbm cursor_image.xbm cursor_image_mask.xbm cursor_barcode.xbm cursor_barcode_mask.xbm - -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../../config.h -CONFIG_CLEAN_FILES = -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/pixmaps/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -tags: TAGS -TAGS: - - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = src/pixmaps - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: -uninstall: uninstall-am -all-am: Makefile -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-generic clean-am - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: tags distdir info-am info dvi-am dvi check check-am \ -installcheck-am installcheck install-exec-am install-exec \ -install-data-am install-data install-am install uninstall-am uninstall \ -all-redirect all-am all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/glabels2/src/stock-pixmaps/Makefile.in b/glabels2/src/stock-pixmaps/Makefile.in deleted file mode 100644 index 0a6dfe9..0000000 --- a/glabels2/src/stock-pixmaps/Makefile.in +++ /dev/null @@ -1,207 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = ../.. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -DATADIRNAME = @DATADIRNAME@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GLABELS_CFLAGS = @GLABELS_CFLAGS@ -GLABELS_LIBS = @GLABELS_LIBS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNOME_INTERFACE_VERSION = @GNOME_INTERFACE_VERSION@ -INSTOBJEXT = @INSTOBJEXT@ -INTLDEPS = @INTLDEPS@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -PACKAGE = @PACKAGE@ -PKG_CONFIG = @PKG_CONFIG@ -POFILES = @POFILES@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -cxxflags_set = @cxxflags_set@ - -IMAGES = stock_arrow_24.png stock_barcode_24.png stock_box_24.png stock_ellipse_24.png stock_image_24.png stock_line_24.png stock_merge_24.png stock_text_24.png - - -VARIABLES1 = stock_arrow_24 $(srcdir)/stock_arrow_24.png stock_barcode_24 $(srcdir)/stock_barcode_24.png stock_box_24 $(srcdir)/stock_box_24.png stock_ellipse_24 $(srcdir)/stock_ellipse_24.png stock_image_24 $(srcdir)/stock_image_24.png stock_line_24 $(srcdir)/stock_line_24.png stock_merge_24 $(srcdir)/stock_merge_24.png stock_text_24 $(srcdir)/stock_text_24.png - - -noinst_DATA = stockpixbufs.h -CLEANFILES = $(noinst_DATA) - -EXTRA_DIST = $(IMAGES) stockpixbufs.h -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../../config.h -CONFIG_CLEAN_FILES = -DATA = $(noinst_DATA) - -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/stock-pixmaps/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -tags: TAGS -TAGS: - - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = src/stock-pixmaps - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: -uninstall: uninstall-am -all-am: Makefile $(DATA) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - - -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-generic clean-am - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: tags distdir info-am info dvi-am dvi check check-am \ -installcheck-am installcheck install-exec-am install-exec \ -install-data-am install-data install-am install uninstall-am uninstall \ -all-redirect all-am all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean - - -stockpixbufs.h: $(IMAGES) - gdk-pixbuf-csource \ - --raw --build-list $(VARIABLES1) > $(srcdir)/stockpixbufs.h || \ - ( rm -f $(srcdir)/stockpixbufs.h && false ) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/glabels2/src/view-barcode.c b/glabels2/src/view-barcode.c index 49bae83..364b24f 100644 --- a/glabels2/src/view-barcode.c +++ b/glabels2/src/view-barcode.c @@ -681,8 +681,8 @@ gl_view_barcode_create_event_handler (GnomeCanvas *canvas, gl_debug (DEBUG_VIEW, "MOTION_NOTIFY"); if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); + event->motion.x, + event->motion.y, &x, &y); gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); return TRUE; diff --git a/glabels2/src/view-box.c b/glabels2/src/view-box.c index 545fd8d..6fe809d 100644 --- a/glabels2/src/view-box.c +++ b/glabels2/src/view-box.c @@ -686,8 +686,8 @@ gl_view_box_create_event_handler (GnomeCanvas *canvas, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); + event->motion.x, + event->motion.y, &x, &y); gl_label_object_set_position (GL_LABEL_OBJECT(object), MIN (x, x0), MIN (y, y0)); gl_debug (DEBUG_VIEW, "BUTTON_MOTION (%f, %f) -> (%f, %f)", event->button.x, event->button.y, x, y); diff --git a/glabels2/src/view-ellipse.c b/glabels2/src/view-ellipse.c index b21c646..fe6100a 100644 --- a/glabels2/src/view-ellipse.c +++ b/glabels2/src/view-ellipse.c @@ -686,8 +686,8 @@ gl_view_ellipse_create_event_handler (GnomeCanvas *canvas, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); + event->motion.x, + event->motion.y, &x, &y); gl_label_object_set_position (GL_LABEL_OBJECT(object), MIN (x, x0), MIN (y, y0)); w = MAX (x, x0) - MIN (x, x0); diff --git a/glabels2/src/view-highlight.c b/glabels2/src/view-highlight.c index 5c148b7..af2e69b 100644 --- a/glabels2/src/view-highlight.c +++ b/glabels2/src/view-highlight.c @@ -314,6 +314,7 @@ highlight_resizable_box (glViewObject *view_object, NULL); g_object_set_data (G_OBJECT (highlight), "object", object); + g_object_set_data (G_OBJECT (highlight), "view", view); g_object_set_data (G_OBJECT (highlight), "outline", outline); @@ -346,7 +347,9 @@ highlight_resizable_box (glViewObject *view_object, g_signal_connect (G_OBJECT (outline), "event", G_CALLBACK (passthrough_event_handler), view_object); + /* send to top, then lower below all items that form the foregound */ gnome_canvas_item_raise_to_top (highlight); + gl_view_raise_fg (view); gl_debug (DEBUG_VIEW, "END"); @@ -420,6 +423,7 @@ highlight_resizable_line (glViewObject *view_object) NULL); g_object_set_data (G_OBJECT (highlight), "object", object); + g_object_set_data (G_OBJECT (highlight), "view", view); g_object_set_data (G_OBJECT (highlight), "outline", outline); @@ -436,7 +440,9 @@ highlight_resizable_line (glViewObject *view_object) gnome_canvas_points_free (points); + /* send to top, then lower below all items that form the foregound */ gnome_canvas_item_raise_to_top (highlight); + gl_view_raise_fg (view); gl_debug (DEBUG_VIEW, "END"); @@ -484,14 +490,17 @@ highlight_simple (glViewObject *view_object) NULL); - g_object_set_data (G_OBJECT (highlight), "outline", outline); - g_object_set_data (G_OBJECT (highlight), "object", object); + g_object_set_data (G_OBJECT (highlight), "view", view); + + g_object_set_data (G_OBJECT (highlight), "outline", outline); g_signal_connect (G_OBJECT (highlight), "event", G_CALLBACK (passthrough_event_handler), view_object); + /* send to top, then lower below all items that form the foregound */ gnome_canvas_item_raise_to_top (highlight); + gl_view_raise_fg (view); gl_debug (DEBUG_VIEW, "END"); @@ -506,6 +515,7 @@ update_resizable_box (GnomeCanvasItem *highlight, glViewHighlightStyle style) { glLabelObject *object; + glView *view; gdouble w, h; GnomeCanvasItem *outline; /* Outline around item */ GnomeCanvasItem *tl, *tr, *bl, *br; /* Handles at four corners */ @@ -518,6 +528,8 @@ update_resizable_box (GnomeCanvasItem *highlight, object = g_object_get_data (G_OBJECT (highlight), "object"); gl_label_object_get_size (object, &w, &h); + view = g_object_get_data (G_OBJECT (highlight), "view"); + outline = g_object_get_data (G_OBJECT (highlight), "outline"); tl = g_object_get_data (G_OBJECT (highlight), "tl"); @@ -592,7 +604,9 @@ update_resizable_box (GnomeCanvasItem *highlight, "y2", h + 1.0, NULL); + /* send to top, then lower below all items that form the foregound */ gnome_canvas_item_raise_to_top (highlight); + gl_view_raise_fg (view); gl_debug (DEBUG_VIEW, "END"); } @@ -604,6 +618,7 @@ static void update_resizable_line (GnomeCanvasItem *highlight) { glLabelObject *object; + glView *view; gdouble dx, dy; GnomeCanvasPoints *points; GnomeCanvasItem *outline; /* Outline around item */ @@ -616,6 +631,8 @@ update_resizable_line (GnomeCanvasItem *highlight) object = g_object_get_data (G_OBJECT (highlight), "object"); gl_label_object_get_size (object, &dx, &dy); + view = g_object_get_data (G_OBJECT (highlight), "view"); + points = gnome_canvas_points_new (2); outline = g_object_get_data (G_OBJECT (highlight), "outline"); @@ -645,7 +662,9 @@ update_resizable_line (GnomeCanvasItem *highlight) gnome_canvas_points_free (points); + /* send to top, then lower below all items that form the foregound */ gnome_canvas_item_raise_to_top (highlight); + gl_view_raise_fg (view); gl_debug (DEBUG_VIEW, "END"); } @@ -657,6 +676,7 @@ static void update_simple (GnomeCanvasItem *highlight) { glLabelObject *object; + glView *view; gdouble w, h; GnomeCanvasItem *outline; /* Outline around item */ @@ -667,6 +687,8 @@ update_simple (GnomeCanvasItem *highlight) object = g_object_get_data (G_OBJECT (highlight), "object"); gl_label_object_get_size (object, &w, &h); + view = g_object_get_data (G_OBJECT (highlight), "view"); + outline = g_object_get_data (G_OBJECT (highlight), "outline"); gnome_canvas_item_set (outline, @@ -674,7 +696,9 @@ update_simple (GnomeCanvasItem *highlight) "y2", h + 0.5, NULL); + /* send to top, then lower below all items that form the foregound */ gnome_canvas_item_raise_to_top (highlight); + gl_view_raise_fg (view); gl_debug (DEBUG_VIEW, "END"); } @@ -746,10 +770,10 @@ tl_resize_event_handler (GnomeCanvasItem * handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); + x = MIN (event->motion.x, x2 - MIN_ITEM_SIZE); + y = MIN (event->motion.y, y2 - MIN_ITEM_SIZE); + w = MAX (x2 - event->motion.x, MIN_ITEM_SIZE); + h = MAX (y2 - event->motion.y, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -843,9 +867,9 @@ tr_resize_event_handler (GnomeCanvasItem * handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { x = x1; - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); + y = MIN (event->motion.y, y2 - MIN_ITEM_SIZE); + w = MAX (event->motion.x - x1, MIN_ITEM_SIZE); + h = MAX (y2 - event->motion.y, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -938,10 +962,10 @@ bl_resize_event_handler (GnomeCanvasItem * handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); + x = MIN (event->motion.x, x2 - MIN_ITEM_SIZE); y = y1; - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); + w = MAX (x2 - event->motion.x, MIN_ITEM_SIZE); + h = MAX (event->motion.y - y1, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -1036,8 +1060,8 @@ br_resize_event_handler (GnomeCanvasItem * handle_item, if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { x = x1; y = y1; - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); + w = MAX (event->motion.x - x1, MIN_ITEM_SIZE); + h = MAX (event->motion.y - y1, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -1127,8 +1151,8 @@ sl_resize_event_handler (GnomeCanvasItem * handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); + x = MIN (event->motion.x, x2 - MIN_ITEM_SIZE); + w = MAX (x2 - event->motion.x, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -1219,7 +1243,7 @@ sr_resize_event_handler (GnomeCanvasItem * handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { x = x1; - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); + w = MAX (event->motion.x - x1, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -1309,8 +1333,8 @@ st_resize_event_handler (GnomeCanvasItem * handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); + y = MIN (event->motion.y, y2 - MIN_ITEM_SIZE); + h = MAX (y2 - event->motion.y, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -1401,7 +1425,7 @@ sb_resize_event_handler (GnomeCanvasItem * handle_item, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { y = y1; - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); + h = MAX (event->motion.y - y1, MIN_ITEM_SIZE); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, w, h); return TRUE; @@ -1496,8 +1520,8 @@ p1_resize_event_handler (GnomeCanvasItem * handle_item, if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { x = x0; y = y0; - dx = (event->button.x - x0); - dy = (event->button.y - y0); + dx = (event->motion.x - x0); + dy = (event->motion.y - y0); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, dx, dy); return TRUE; @@ -1592,8 +1616,8 @@ p2_resize_event_handler (GnomeCanvasItem * handle_item, if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { x = x0; y = y0; - dx = (event->button.x - x0); - dy = (event->button.y - y0); + dx = (event->motion.x - x0); + dy = (event->motion.y - y0); gl_label_object_set_position (object, x, y); gl_label_object_set_size (object, dx, dy); return TRUE; diff --git a/glabels2/src/view-image.c b/glabels2/src/view-image.c index a00db39..a9c8741 100644 --- a/glabels2/src/view-image.c +++ b/glabels2/src/view-image.c @@ -665,8 +665,8 @@ gl_view_image_create_event_handler (GnomeCanvas *canvas, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); + event->motion.x, + event->motion.y, &x, &y); gl_label_object_set_position (GL_LABEL_OBJECT(object), MIN (x, x0), MIN (y, y0)); w = MAX (x, x0) - MIN (x, x0); diff --git a/glabels2/src/view-line.c b/glabels2/src/view-line.c index 27dc800..511f6c9 100644 --- a/glabels2/src/view-line.c +++ b/glabels2/src/view-line.c @@ -634,8 +634,8 @@ gl_view_line_create_event_handler (GnomeCanvas *canvas, case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); + event->motion.x, + event->motion.y, &x, &y); w = x - x0; h = y - y0; gl_label_object_set_size (GL_LABEL_OBJECT(object), diff --git a/glabels2/src/view-object.c b/glabels2/src/view-object.c index 9897b3f..b6dfa1c 100644 --- a/glabels2/src/view-object.c +++ b/glabels2/src/view-object.c @@ -214,6 +214,8 @@ gl_view_object_set_object (glViewObject *view_object, view_object->private->highlight = gl_view_highlight_new (view_object, style); + gl_view_raise_fg (view_object->private->view); + view_object->private->menu = GTK_WIDGET(new_menu (view_object)); g_signal_connect (G_OBJECT (object), "moved", @@ -358,6 +360,8 @@ gl_view_object_show_highlight (glViewObject *view_object) gnome_canvas_item_show (view_object->private->highlight); gnome_canvas_item_raise_to_top (view_object->private->highlight); + gl_view_raise_fg (view_object->private->view); + gl_debug (DEBUG_VIEW, "END"); } @@ -481,9 +485,14 @@ raise_object_cb (GtkWidget * widget, gl_debug (DEBUG_VIEW, "START"); + /* send to top */ gnome_canvas_item_raise_to_top (view_object->private->group); + + /* send highlight to top */ gnome_canvas_item_raise_to_top (view_object->private->highlight); + gl_view_raise_fg (view_object->private->view); + gl_debug (DEBUG_VIEW, "END"); } diff --git a/glabels2/src/view-text.c b/glabels2/src/view-text.c index 228f0c7..f38c4ae 100644 --- a/glabels2/src/view-text.c +++ b/glabels2/src/view-text.c @@ -638,8 +638,8 @@ gl_view_text_create_event_handler (GnomeCanvas *canvas, gl_debug (DEBUG_VIEW, "MOTION_NOTIFY"); if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); + event->motion.x, + event->motion.y, &x, &y); gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); return TRUE; diff --git a/glabels2/src/view.c b/glabels2/src/view.c index d6e3a3d..b6b5d5f 100644 --- a/glabels2/src/view.c +++ b/glabels2/src/view.c @@ -53,7 +53,8 @@ static GtkContainerClass *parent_class; static GdkAtom clipboard_atom = GDK_NONE; #define HOME_SCALE 2.0 -static gdouble scales[] = { 8.0, 6.0, 4.0, 3.0, +static gdouble scales[] = { + 8.0, 6.0, 4.0, 3.0, 2.0, 1.5, 1.0, 0.5, 0.25, 0.0 @@ -63,64 +64,72 @@ static gdouble scales[] = { 8.0, 6.0, 4.0, 3.0, /* Local function prototypes */ /*===========================================*/ -static void gl_view_class_init (glViewClass *class); -static void gl_view_init (glView * view); -static void gl_view_finalize (GObject * object); +static void gl_view_class_init (glViewClass *class); +static void gl_view_init (glView *view); +static void gl_view_finalize (GObject *object); static void gl_view_construct (glView *view); static GtkWidget *gl_view_construct_canvas (glView *view); static void gl_view_construct_selection (glView *view); -static gdouble get_apropriate_scale (gdouble w, gdouble h); +static gdouble get_apropriate_scale (gdouble w, gdouble h); -static void draw_rect_bg (glView * view); -static void draw_rounded_rect_bg (glView * view); -static void draw_round_bg (glView * view); -static void draw_cd_bg (glView * view); +static void draw_rect_bg_fg (glView *view); +static void draw_rounded_rect_bg_fg (glView *view); +static void draw_round_bg_fg (glView *view); +static void draw_cd_bg_fg (glView *view); -static int canvas_event (GnomeCanvas * canvas, - GdkEvent * event, - glView *view); -static int canvas_event_arrow_mode (GnomeCanvas * canvas, - GdkEvent * event, glView *view); +static int canvas_event (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); +static int canvas_event_arrow_mode (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); -static void select_region (glView * view, +static void select_region (glView *view, gdouble x1, gdouble y1, gdouble x2, gdouble y2); -static void select_object (glViewObject *view_object); -static void unselect_object (glViewObject *view_object); -static gboolean object_at (glView * view, +static void select_object (glViewObject *view_object); +static void unselect_object (glViewObject *view_object); +static gboolean object_at (glView *view, gdouble x, gdouble y); -static gboolean object_selected (glViewObject *view_object); -static gboolean multiple_items_selected (glView * view); +static gboolean object_selected (glViewObject *view_object); +static gboolean multiple_items_selected (glView *view); -static int item_event_arrow_mode (GnomeCanvasItem * item, - GdkEvent * event, - glViewObject *view_object); +static int item_event_arrow_mode (GnomeCanvasItem *item, + GdkEvent *event, + glViewObject *view_object); -static GtkWidget *new_selection_menu (glView * view); +static GtkWidget *new_selection_menu (glView *view); -static void popup_selection_menu (glView *view, - glViewObject *view_object, GdkEvent *event); +static void popup_selection_menu (glView *view, + glViewObject *view_object, + GdkEvent *event); -static void move_selected_items (glView * view, gdouble dx, gdouble dy); -static void move_item (GnomeCanvasItem * item, gdouble dx, gdouble dy); +static void move_selected_items (glView *view, + gdouble dx, gdouble dy); +static void move_item (GnomeCanvasItem *item, + gdouble dx, gdouble dy); -static void raise_selection_cb (GtkWidget * widget, glView * view); -static void lower_selection_cb (GtkWidget * widget, glView * view); +static void raise_selection_cb (GtkWidget *widget, glView *view); +static void lower_selection_cb (GtkWidget *widget, glView *view); -static void selection_clear_cb (GtkWidget * widget, - GdkEventSelection * event, gpointer data); +static void selection_clear_cb (GtkWidget *widget, + GdkEventSelection *event, + gpointer data); -static void selection_get_cb (GtkWidget * widget, - GtkSelectionData * selection_data, guint info, - guint time, gpointer data); +static void selection_get_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint info, + guint time, + gpointer data); -static void selection_received_cb (GtkWidget * widget, - GtkSelectionData * selection_data, - guint time, gpointer data); +static void selection_received_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint time, + gpointer data); /****************************************************************************/ /* Boilerplate Object stuff. */ @@ -152,7 +161,7 @@ gl_view_get_type (void) } static void -gl_view_class_init (glViewClass * class) +gl_view_class_init (glViewClass *class) { GObjectClass *object_class = (GObjectClass *) class; @@ -166,7 +175,7 @@ gl_view_class_init (glViewClass * class) } static void -gl_view_init (glView * view) +gl_view_init (glView *view) { gl_debug (DEBUG_VIEW, "START"); @@ -176,7 +185,7 @@ gl_view_init (glView * view) } static void -gl_view_finalize (GObject * object) +gl_view_finalize (GObject *object) { glView *view; @@ -193,7 +202,7 @@ gl_view_finalize (GObject * object) } GtkWidget * -gl_view_new (glLabel * label) +gl_view_new (glLabel *label) { glView *view = g_object_new (gl_view_get_type (), NULL); @@ -212,7 +221,7 @@ gl_view_new (glLabel * label) /* PRIVATE. Construct composite widget. */ /*---------------------------------------------------------------------------*/ static void -gl_view_construct (glView * view) +gl_view_construct (glView *view) { GtkWidget *wvbox, *wscroll; @@ -244,7 +253,7 @@ gl_view_construct (glView * view) /* PRIVATE. Create canvas w/ a background in the shape of the label/card. */ /*---------------------------------------------------------------------------*/ static GtkWidget * -gl_view_construct_canvas (glView * view) +gl_view_construct_canvas (glView *view) { gdouble scale; glLabel *label = view->label; @@ -290,25 +299,27 @@ gl_view_construct_canvas (glView * view) case GL_TEMPLATE_STYLE_RECT: if (label_template->label_round == 0.0) { /* Square corners. */ - draw_rect_bg (view); + draw_rect_bg_fg (view); } else { /* Rounded corners. */ - draw_rounded_rect_bg (view); + draw_rounded_rect_bg_fg (view); } break; case GL_TEMPLATE_STYLE_ROUND: - draw_round_bg (view); + draw_round_bg_fg (view); break; case GL_TEMPLATE_STYLE_CD: - draw_cd_bg (view); + draw_cd_bg_fg (view); break; default: g_warning ("Unknown template label style"); break; } + gl_debug (DEBUG_VIEW, "n_bg_items = %d, n_fg_items = %d", + view->n_bg_items, view->n_fg_items); g_signal_connect (G_OBJECT (view->canvas), "event", G_CALLBACK (canvas_event), view); @@ -350,7 +361,7 @@ gl_view_construct_canvas (glView * view) /* PRIVATE. Create selection targets. */ /*---------------------------------------------------------------------------*/ static void -gl_view_construct_selection (glView * view) +gl_view_construct_selection (glView *view) { gl_debug (DEBUG_VIEW, "START"); @@ -414,7 +425,7 @@ get_apropriate_scale (gdouble w, gdouble h) /* PRIVATE. Draw simple recangular background. */ /*---------------------------------------------------------------------------*/ static void -draw_rect_bg (glView * view) +draw_rect_bg_fg (glView *view) { glLabel *label = view->label; glTemplate *template; @@ -433,6 +444,8 @@ draw_rect_bg (glView * view) view->n_bg_items = 0; view->bg_item_list = NULL; + view->n_fg_items = 0; + view->fg_item_list = NULL; group = gnome_canvas_root (GNOME_CANVAS (view->canvas)); @@ -460,6 +473,18 @@ draw_rect_bg (glView * view) view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); + item = gnome_canvas_item_new (group, + gnome_canvas_rect_get_type (), + "x1", 0.0, + "y1", 0.0, + "x2", w, + "y2", h, + "width_pixels", 2, + "outline_color", "light blue", + NULL); + view->n_fg_items++; + view->fg_item_list = g_list_append (view->fg_item_list, item); + gl_debug (DEBUG_VIEW, "END"); } @@ -467,10 +492,10 @@ draw_rect_bg (glView * view) /* PRIVATE. Draw rounded recangular background. */ /*---------------------------------------------------------------------------*/ static void -draw_rounded_rect_bg (glView * view) +draw_rounded_rect_bg_fg (glView *view) { glLabel *label = view->label; - GnomeCanvasPoints *points; + GnomeCanvasPoints *label_points, *margin_points; gint i_coords, i_theta; glTemplate *template; gdouble r, w, h, m; @@ -486,48 +511,51 @@ draw_rounded_rect_bg (glView * view) view->n_bg_items = 0; view->bg_item_list = NULL; + view->n_fg_items = 0; + view->fg_item_list = NULL; gl_label_get_size (label, &w, &h); template = gl_label_get_template (label); r = template->label_round; m = template->label_margin; - points = gnome_canvas_points_new (4 * (1 + 90 / 5)); + label_points = gnome_canvas_points_new (4 * (1 + 90 / 5)); i_coords = 0; for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + label_points->coords[i_coords++] = r - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + label_points->coords[i_coords++] = r - r * cos (i_theta * M_PI / 180.0); } for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + label_points->coords[i_coords++] = r - r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + label_points->coords[i_coords++] = (h - r) + r * sin (i_theta * M_PI / 180.0); } for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + label_points->coords[i_coords++] = (w - r) + r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + label_points->coords[i_coords++] = (h - r) + r * cos (i_theta * M_PI / 180.0); } for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + label_points->coords[i_coords++] = (w - r) + r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + label_points->coords[i_coords++] = r - r * sin (i_theta * M_PI / 180.0); } + + /* Basic background */ item = gnome_canvas_item_new (group, gnome_canvas_polygon_get_type (), - "points", points, + "points", label_points, "fill_color", "white", NULL); - gnome_canvas_points_free (points); view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); - /* Bounding box @ margin */ + /* Margin outline */ if (template->label_margin >= template->label_round) { /* simple rectangle */ item = gnome_canvas_item_new (group, @@ -548,44 +576,56 @@ draw_rounded_rect_bg (glView * view) h = h - 2 * m; /* rectangle with rounded corners */ - points = gnome_canvas_points_new (4 * (1 + 90 / 5)); + margin_points = gnome_canvas_points_new (4 * (1 + 90 / 5)); i_coords = 0; for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + r - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + r - r * cos (i_theta * M_PI / 180.0); } for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + r - r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + (h - r) + r * sin (i_theta * M_PI / 180.0); } for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + (w - r) + r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + (h - r) + r * cos (i_theta * M_PI / 180.0); } for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + (w - r) + r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = + margin_points->coords[i_coords++] = m + r - r * sin (i_theta * M_PI / 180.0); } item = gnome_canvas_item_new (group, gnome_canvas_polygon_get_type (), - "points", points, + "points", margin_points, "width_pixels", 1, "outline_color", "light blue", NULL); - gnome_canvas_points_free (points); + gnome_canvas_points_free (margin_points); view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); } + /* Foreground outline */ + item = gnome_canvas_item_new (group, + gnome_canvas_polygon_get_type (), + "points", label_points, + "width_pixels", 2, + "outline_color", "light blue", + NULL); + view->n_fg_items++; + view->fg_item_list = g_list_append (view->fg_item_list, item); + + gnome_canvas_points_free (label_points); + gl_debug (DEBUG_VIEW, "END"); } @@ -593,13 +633,11 @@ draw_rounded_rect_bg (glView * view) /* PRIVATE. Draw round background. */ /*---------------------------------------------------------------------------*/ static void -draw_round_bg (glView * view) +draw_round_bg_fg (glView *view) { glLabel *label = view->label; glTemplate *template; - GnomeCanvasPoints *points; - gint i_coords, i_theta; - gdouble r, r1; + gdouble r, m; GnomeCanvasItem *item; GnomeCanvasGroup *group; @@ -614,44 +652,50 @@ draw_round_bg (glView * view) view->n_bg_items = 0; view->bg_item_list = NULL; + view->n_fg_items = 0; + view->fg_item_list = NULL; - r1 = template->label_radius; - points = gnome_canvas_points_new (1 + 360/2); - i_coords = 0; - for (i_theta = 0; i_theta <= 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r1 * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r1 * cos (i_theta * M_PI / 180.0); - } + r = template->label_radius; + m = template->label_margin; + + /* Basic background */ item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, + gnome_canvas_ellipse_get_type (), + "x1", 0.0, + "y1", 0.0, + "x2", 2.0*r, + "y2", 2.0*r, "fill_color", "white", NULL); - gnome_canvas_points_free (points); view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); - /* Bounding box @ margin */ - r = template->label_radius - template->label_margin; - points = gnome_canvas_points_new (360 / 2); - i_coords = 0; - for (i_theta = 0; i_theta < 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r * cos (i_theta * M_PI / 180.0); - } + /* Margin outline */ item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, + gnome_canvas_ellipse_get_type (), + "x1", m, + "y1", m, + "x2", 2.0*r - m, + "y2", 2.0*r - m, "width_pixels", 1, "outline_color", "light blue", NULL); - gnome_canvas_points_free (points); view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); + /* Foreground outline */ + r = template->label_radius; + item = gnome_canvas_item_new (group, + gnome_canvas_ellipse_get_type (), + "x1", 0.0, + "y1", 0.0, + "x2", 2.0*r, + "y2", 2.0*r, + "width_pixels", 2, + "outline_color", "light blue", + NULL); + view->n_fg_items++; + view->fg_item_list = g_list_append (view->fg_item_list, item); + gl_debug (DEBUG_VIEW, "END"); } @@ -659,13 +703,11 @@ draw_round_bg (glView * view) /* PRIVATE. Draw CD style background, circular w/ concentric hole. */ /*---------------------------------------------------------------------------*/ static void -draw_cd_bg (glView * view) +draw_cd_bg_fg (glView *view) { glLabel *label = view->label; glTemplate *template; - GnomeCanvasPoints *points; - gint i_coords, i_theta; - gdouble r, r1, r2; + gdouble m, r1, r2; GnomeCanvasItem *item; GnomeCanvasGroup *group; @@ -680,80 +722,108 @@ draw_cd_bg (glView * view) view->n_bg_items = 0; view->bg_item_list = NULL; + view->n_fg_items = 0; + view->fg_item_list = NULL; r1 = template->label_radius; r2 = template->label_hole; - points = gnome_canvas_points_new (2 * (1 + 360 / 2)); - i_coords = 0; - for (i_theta = 0; i_theta <= 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r1 * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r1 * cos (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r2 * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r2 * cos (i_theta * M_PI / 180.0); - } + m = template->label_margin; + + /* Basic background */ + /* outer circle */ item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, + gnome_canvas_ellipse_get_type (), + "x1", 0.0, + "y1", 0.0, + "x2", 2.0*r1, + "y2", 2.0*r1, "fill_color", "white", NULL); - gnome_canvas_points_free (points); + view->n_bg_items++; + view->bg_item_list = g_list_append (view->bg_item_list, item); + /* hole */ + item = gnome_canvas_item_new (group, + gnome_canvas_ellipse_get_type (), + "x1", r1 - r2, + "y1", r1 - r2, + "x2", r1 + r2, + "y2", r1 + r2, + "fill_color", "gray", + NULL); view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); - /* Bounding box @ margin */ + /* Margin outline */ /* outer margin */ - r = template->label_radius - template->label_margin; - points = gnome_canvas_points_new (360 / 2); - i_coords = 0; - for (i_theta = 0; i_theta < 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r * cos (i_theta * M_PI / 180.0); - } item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, + gnome_canvas_ellipse_get_type (), + "x1", m, + "y1", m, + "x2", 2.0*r1 - m, + "y2", 2.0*r1 - m, "width_pixels", 1, "outline_color", "light blue", NULL); - gnome_canvas_points_free (points); view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); - /* inner margin */ - r = template->label_hole + template->label_margin; - points = gnome_canvas_points_new (360 / 2); - i_coords = 0; - for (i_theta = 0; i_theta < 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r * cos (i_theta * M_PI / 180.0); - } item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, + gnome_canvas_ellipse_get_type (), + "x1", r1 - r2 - m, + "y1", r1 - r2 - m, + "x2", r1 + r2 + m, + "y2", r1 + r2 + m, "width_pixels", 1, "outline_color", "light blue", NULL); - gnome_canvas_points_free (points); view->n_bg_items++; view->bg_item_list = g_list_append (view->bg_item_list, item); + /* Foreground outline */ + /* outer circle */ + item = gnome_canvas_item_new (group, + gnome_canvas_ellipse_get_type (), + "x1", 0.0, + "y1", 0.0, + "x2", 2.0*r1, + "y2", 2.0*r1, + "width_pixels", 2, + "outline_color", "light blue", + NULL); + view->n_fg_items++; + view->fg_item_list = g_list_append (view->fg_item_list, item); + /* hole */ + item = gnome_canvas_item_new (group, + gnome_canvas_ellipse_get_type (), + "x1", r1 - r2, + "y1", r1 - r2, + "x2", r1 + r2, + "y2", r1 + r2, + "width_pixels", 2, + "outline_color", "light blue", + NULL); + view->n_fg_items++; + view->fg_item_list = g_list_append (view->fg_item_list, item); + gl_debug (DEBUG_VIEW, "END"); } /*****************************************************************************/ +/* Raise foreground items to top. */ +/*****************************************************************************/ +void gl_view_raise_fg (glView *view) +{ + GList *p; + + for (p = view->fg_item_list; p != NULL; p = p->next) { + gnome_canvas_item_raise_to_top (GNOME_CANVAS_ITEM(p->data)); + } +} + +/*****************************************************************************/ /* Set arrow mode. */ /*****************************************************************************/ void -gl_view_arrow_mode (glView * view) +gl_view_arrow_mode (glView *view) { static GdkCursor *cursor = NULL; @@ -776,7 +846,7 @@ gl_view_arrow_mode (glView * view) /* Set create text object mode. */ /*****************************************************************************/ void -gl_view_object_create_mode (glView * view, +gl_view_object_create_mode (glView *view, glLabelObjectType type) { GdkCursor *cursor; @@ -834,7 +904,7 @@ gl_view_select_object (glView *view, glViewObject *view_object) /* Select all items. */ /*****************************************************************************/ void -gl_view_select_all (glView * view) +gl_view_select_all (glView *view) { GList *p; @@ -855,7 +925,7 @@ gl_view_select_all (glView * view) /* Remove all selections */ /*****************************************************************************/ void -gl_view_unselect_all (glView * view) +gl_view_unselect_all (glView *view) { GList *p, *p_next; @@ -875,7 +945,7 @@ gl_view_unselect_all (glView * view) /* "Cut" selected items and place in clipboard selections. */ /*****************************************************************************/ void -gl_view_cut (glView * view) +gl_view_cut (glView *view) { gl_debug (DEBUG_VIEW, "START"); @@ -891,7 +961,7 @@ gl_view_cut (glView * view) /* "Copy" selected items to clipboard selections. */ /*****************************************************************************/ void -gl_view_copy (glView * view) +gl_view_copy (glView *view) { GList *p; glViewObject *view_object; @@ -961,7 +1031,7 @@ gl_view_copy (glView * view) /* "Paste" from private clipboard selection. */ /*****************************************************************************/ void -gl_view_paste (glView * view) +gl_view_paste (glView *view) { gl_debug (DEBUG_VIEW, "START"); @@ -1190,7 +1260,7 @@ canvas_event_arrow_mode (GnomeCanvas *canvas, /* PRIVATE. Select all objects within given rectangular region. */ /*---------------------------------------------------------------------------*/ static void -select_region (glView * view, +select_region (glView *view, gdouble x1, gdouble y1, gdouble x2, @@ -1233,7 +1303,7 @@ select_region (glView * view, static void select_object (glViewObject *view_object) { - glView * view; + glView *view; gl_debug (DEBUG_VIEW, "START"); @@ -1257,7 +1327,7 @@ select_object (glViewObject *view_object) static void unselect_object (glViewObject *view_object) { - glView * view; + glView *view; gl_debug (DEBUG_VIEW, "START"); @@ -1277,7 +1347,7 @@ unselect_object (glViewObject *view_object) /* PRIVATE. Return object at (x,y). */ /*---------------------------------------------------------------------------*/ static gboolean -object_at (glView * view, +object_at (glView *view, gdouble x, gdouble y) { @@ -1324,7 +1394,7 @@ object_selected (glViewObject *view_object) /* PRIVATE. Are there multiple objects in our current selection? */ /*---------------------------------------------------------------------------*/ static gboolean -multiple_items_selected (glView * view) +multiple_items_selected (glView *view) { gl_debug (DEBUG_VIEW, ""); @@ -1507,7 +1577,7 @@ item_event_arrow_mode (GnomeCanvasItem *item, /* PRIVATE. create menu for multiple selections. */ /*---------------------------------------------------------------------------*/ GtkWidget * -new_selection_menu (glView * view) +new_selection_menu (glView *view) { GtkWidget *menu, *menuitem; @@ -1585,7 +1655,7 @@ popup_selection_menu (glView *view, /* Delete selected objects. */ /*---------------------------------------------------------------------------*/ void -gl_view_delete_selection (glView * view) +gl_view_delete_selection (glView *view) { GList *p, *p_next; @@ -1605,8 +1675,8 @@ gl_view_delete_selection (glView * view) /* PRIVATE. raise item to front callback. */ /*---------------------------------------------------------------------------*/ static void -raise_selection_cb (GtkWidget * widget, - glView * view) +raise_selection_cb (GtkWidget *widget, + glView *view) { GList *p; @@ -1625,8 +1695,8 @@ raise_selection_cb (GtkWidget * widget, /* PRIVATE. lower item to back callback. */ /*---------------------------------------------------------------------------*/ static void -lower_selection_cb (GtkWidget * widget, - glView * view) +lower_selection_cb (GtkWidget *widget, + glView *view) { GList *p; @@ -1645,7 +1715,7 @@ lower_selection_cb (GtkWidget * widget, /* PRIVATE. move selected items */ /*---------------------------------------------------------------------------*/ static void -move_selected_items (glView * view, +move_selected_items (glView *view, gdouble dx, gdouble dy) { @@ -1670,9 +1740,9 @@ move_selected_items (glView * view, /* PRIVATE. Handle "selection-clear" signal. */ /*---------------------------------------------------------------------------*/ static void -selection_clear_cb (GtkWidget * widget, - GdkEventSelection * event, - gpointer data) +selection_clear_cb (GtkWidget *widget, + GdkEventSelection *event, + gpointer data) { glView *view = GL_VIEW (data); @@ -1691,11 +1761,11 @@ selection_clear_cb (GtkWidget * widget, /* PRIVATE. Handle "selection-get" signal. */ /*---------------------------------------------------------------------------*/ static void -selection_get_cb (GtkWidget * widget, - GtkSelectionData * selection_data, - guint info, - guint time, - gpointer data) +selection_get_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint info, + guint time, + gpointer data) { glView *view = GL_VIEW (data); gchar *buffer; @@ -1722,10 +1792,10 @@ selection_get_cb (GtkWidget * widget, /* PRIVATE. Handle "selection-received" signal. (Result of Paste) */ /*---------------------------------------------------------------------------*/ static void -selection_received_cb (GtkWidget * widget, - GtkSelectionData * selection_data, - guint time, - gpointer data) +selection_received_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint time, + gpointer data) { glView *view = GL_VIEW (data); glLabel *label = NULL; @@ -1790,7 +1860,7 @@ selection_received_cb (GtkWidget * widget, /* Zoom in one "notch" */ /*****************************************************************************/ void -gl_view_zoom_in (glView * view) +gl_view_zoom_in (glView *view) { gint i, i_min; gdouble dist, dist_min; @@ -1821,7 +1891,7 @@ gl_view_zoom_in (glView * view) /* Zoom out one "notch" */ /*****************************************************************************/ void -gl_view_zoom_out (glView * view) +gl_view_zoom_out (glView *view) { gint i, i_min; gdouble dist, dist_min; @@ -1856,8 +1926,8 @@ gl_view_zoom_out (glView * view) /* Set current zoom factor to explicit value. */ /*****************************************************************************/ void -gl_view_set_zoom (glView * view, - gdouble scale) +gl_view_set_zoom (glView *view, + gdouble scale) { gl_debug (DEBUG_VIEW, "START"); @@ -1875,7 +1945,7 @@ gl_view_set_zoom (glView * view, /* Get current zoom factor. */ /*****************************************************************************/ gdouble -gl_view_get_zoom (glView * view) +gl_view_get_zoom (glView *view) { gl_debug (DEBUG_VIEW, ""); diff --git a/glabels2/src/view.h b/glabels2/src/view.h index 813c084..1b3647a 100644 --- a/glabels2/src/view.h +++ b/glabels2/src/view.h @@ -33,10 +33,10 @@ typedef enum { GL_VIEW_STATE_OBJECT_CREATE } glViewState; -#define GL_TYPE_VIEW (gl_view_get_type ()) -#define GL_VIEW(obj) (GTK_CHECK_CAST((obj), GL_TYPE_VIEW, glView )) -#define GL_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW, glViewClass)) -#define GL_IS_VIEW(obj) (GTK_CHECK_TYPE ((obj), GL_TYPE_VIEW)) +#define GL_TYPE_VIEW (gl_view_get_type ()) +#define GL_VIEW(obj) (GTK_CHECK_CAST((obj), GL_TYPE_VIEW, glView )) +#define GL_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW, glViewClass)) +#define GL_IS_VIEW(obj) (GTK_CHECK_TYPE ((obj), GL_TYPE_VIEW)) #define GL_IS_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW)) typedef struct _glView glView; @@ -45,57 +45,62 @@ typedef struct _glViewClass glViewClass; #include "view-object.h" struct _glView { - GtkVBox parent_widget; + GtkVBox parent_widget; - glLabel *label; + glLabel *label; - GtkWidget *canvas; - gdouble scale; - gint n_bg_items; - GList *bg_item_list; + GtkWidget *canvas; + gdouble scale; + gint n_bg_items; + GList *bg_item_list; + gint n_fg_items; + GList *fg_item_list; - glViewState state; + glViewState state; glLabelObjectType create_type; - GList *object_list; - GList *selected_object_list; + GList *object_list; + GList *selected_object_list; - gint have_selection; - glLabel *selection_data; - GtkWidget *invisible; + gint have_selection; + glLabel *selection_data; + GtkWidget *invisible; - GtkWidget *menu; + GtkWidget *menu; }; struct _glViewClass { - GtkVBoxClass parent_class; + GtkVBoxClass parent_class; }; -extern guint gl_view_get_type (void); +extern guint gl_view_get_type (void); -extern GtkWidget *gl_view_new (glLabel * label); +extern GtkWidget *gl_view_new (glLabel *label); -extern void gl_view_arrow_mode (glView * view); -extern void gl_view_object_create_mode (glView * view, - glLabelObjectType type); +extern void gl_view_raise_fg (glView *view); -extern void gl_view_select_object (glView *view, glViewObject *view_object); -extern void gl_view_select_all (glView *view); -extern void gl_view_unselect_all (glView *view); -extern void gl_view_delete_selection (glView *view); +extern void gl_view_arrow_mode (glView *view); +extern void gl_view_object_create_mode (glView *view, + glLabelObjectType type); +extern void gl_view_select_object (glView *view, + glViewObject *view_object); +extern void gl_view_select_all (glView *view); +extern void gl_view_unselect_all (glView *view); +extern void gl_view_delete_selection (glView *view); -extern int gl_view_item_event_handler (GnomeCanvasItem * item, - GdkEvent * event, - glViewObject *view_object); -extern void gl_view_cut (glView * view); -extern void gl_view_copy (glView * view); -extern void gl_view_paste (glView * view); +extern int gl_view_item_event_handler (GnomeCanvasItem *item, + GdkEvent *event, + glViewObject *view_object); -extern void gl_view_zoom_in (glView * view); -extern void gl_view_zoom_out (glView * view); -extern void gl_view_set_zoom (glView * view, gdouble scale); -extern gdouble gl_view_get_zoom (glView * view); +extern void gl_view_cut (glView *view); +extern void gl_view_copy (glView *view); +extern void gl_view_paste (glView *view); + +extern void gl_view_zoom_in (glView *view); +extern void gl_view_zoom_out (glView *view); +extern void gl_view_set_zoom (glView *view, gdouble scale); +extern gdouble gl_view_get_zoom (glView *view); #endif diff --git a/glabels2/src/wdgt-text-props.c b/glabels2/src/wdgt-text-props.c index 7dbbc65..50e01d8 100644 --- a/glabels2/src/wdgt-text-props.c +++ b/glabels2/src/wdgt-text-props.c @@ -43,8 +43,7 @@ enum { LAST_SIGNAL }; -typedef void (*glWdgtTextPropsSignal) (GObject * object, - gpointer data); +typedef void (*glWdgtTextPropsSignal) (GObject *object, gpointer data); /*===========================================*/ /* Private globals */ @@ -58,14 +57,16 @@ static gint wdgt_text_props_signals[LAST_SIGNAL] = { 0 }; /* Local function prototypes */ /*===========================================*/ -static void gl_wdgt_text_props_class_init (glWdgtTextPropsClass * class); -static void gl_wdgt_text_props_instance_init (glWdgtTextProps * text); -static void gl_wdgt_text_props_finalize (GObject * object); -static void gl_wdgt_text_props_construct (glWdgtTextProps * text, gchar * label); +static void gl_wdgt_text_props_class_init (glWdgtTextPropsClass *class); +static void gl_wdgt_text_props_instance_init (glWdgtTextProps *text); +static void gl_wdgt_text_props_finalize (GObject *object); +static void gl_wdgt_text_props_construct (glWdgtTextProps *text, + gchar *label); -static void changed_cb (glWdgtTextProps * text); -static void just_toggled_cb (GtkToggleButton * togglebutton, - gpointer user_data); +static void family_changed_cb (GtkEntry *entry, glWdgtTextProps *text); +static void changed_cb (glWdgtTextProps *text); +static void just_toggled_cb (GtkToggleButton *togglebutton, + gpointer user_data); /*================================================================*/ /* Boilerplate Object stuff. */ @@ -97,7 +98,7 @@ gl_wdgt_text_props_get_type (void) } static void -gl_wdgt_text_props_class_init (glWdgtTextPropsClass * class) +gl_wdgt_text_props_class_init (glWdgtTextPropsClass *class) { GObjectClass *object_class; @@ -119,7 +120,7 @@ gl_wdgt_text_props_class_init (glWdgtTextPropsClass * class) } static void -gl_wdgt_text_props_instance_init (glWdgtTextProps * text) +gl_wdgt_text_props_instance_init (glWdgtTextProps *text) { text->font_family_entry = NULL; text->font_size_spin = NULL; @@ -134,7 +135,7 @@ gl_wdgt_text_props_instance_init (glWdgtTextProps * text) } static void -gl_wdgt_text_props_finalize (GObject * object) +gl_wdgt_text_props_finalize (GObject *object) { glWdgtTextProps *text; @@ -147,7 +148,7 @@ gl_wdgt_text_props_finalize (GObject * object) } GtkWidget * -gl_wdgt_text_props_new (gchar * label) +gl_wdgt_text_props_new (gchar *label) { glWdgtTextProps *text; @@ -162,11 +163,11 @@ gl_wdgt_text_props_new (gchar * label) /* Construct composite widget. */ /*============================================================*/ static void -gl_wdgt_text_props_construct (glWdgtTextProps * text, - gchar * label) +gl_wdgt_text_props_construct (glWdgtTextProps *text, + gchar *label) { GtkWidget *wvbox, *wframe, *wtable, *wlabel, *whbox1, *wcombo; - GList *family_names = NULL; + GList *family_names = NULL; GtkObject *adjust; wvbox = GTK_WIDGET (text); @@ -196,12 +197,12 @@ gl_wdgt_text_props_construct (glWdgtTextProps * text, gtk_combo_set_popdown_strings (GTK_COMBO (wcombo), family_names); gnome_font_family_list_free (family_names); text->font_family_entry = GTK_COMBO (wcombo)->entry; + gtk_combo_set_value_in_list (GTK_COMBO(wcombo), TRUE, FALSE); gtk_entry_set_editable (GTK_ENTRY (text->font_family_entry), FALSE); gtk_widget_set_size_request (wcombo, 200, -1); gtk_box_pack_start (GTK_BOX (whbox1), wcombo, FALSE, FALSE, 0); - g_signal_connect_swapped (G_OBJECT (text->font_family_entry), - "changed", G_CALLBACK (changed_cb), - G_OBJECT (text)); + g_signal_connect (G_OBJECT (text->font_family_entry), + "changed", G_CALLBACK (family_changed_cb), text); /* Font size entry widget */ adjust = gtk_adjustment_new (1.0, 1.0, 250.0, 1.0, 10.0, 10.0); @@ -288,10 +289,28 @@ gl_wdgt_text_props_construct (glWdgtTextProps * text, } /*--------------------------------------------------------------------------*/ +/* PRIVATE. modify widget due to change in selection */ +/*--------------------------------------------------------------------------*/ +static void +family_changed_cb (GtkEntry *entry, + glWdgtTextProps *text) +{ + gchar *family_name; + + family_name = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1); + if ( strlen(family_name) ) { + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (text), + wdgt_text_props_signals[CHANGED], 0); + } + g_free (family_name); +} + +/*--------------------------------------------------------------------------*/ /* PRIVATE. Callback for when any control in the widget has changed. */ /*--------------------------------------------------------------------------*/ static void -changed_cb (glWdgtTextProps * text) +changed_cb (glWdgtTextProps *text) { /* Emit our "changed" signal */ g_signal_emit (G_OBJECT (text), wdgt_text_props_signals[CHANGED], 0); @@ -301,8 +320,8 @@ changed_cb (glWdgtTextProps * text) /* PRIVATE. Justify toggle button callback. */ /*--------------------------------------------------------------------------*/ static void -just_toggled_cb (GtkToggleButton * togglebutton, - gpointer user_data) +just_toggled_cb (GtkToggleButton *togglebutton, + gpointer user_data) { glWdgtTextProps *text = GL_WDGT_TEXT_PROPS (user_data); @@ -343,13 +362,13 @@ just_toggled_cb (GtkToggleButton * togglebutton, /* query values from controls. */ /*====================================================================*/ void -gl_wdgt_text_props_get_params (glWdgtTextProps * text, - gchar ** font_family, - gdouble * font_size, - GnomeFontWeight * font_weight, - gboolean * font_italic_flag, - guint * color, - GtkJustification * just) +gl_wdgt_text_props_get_params (glWdgtTextProps *text, + gchar **font_family, + gdouble *font_size, + GnomeFontWeight *font_weight, + gboolean *font_italic_flag, + guint *color, + GtkJustification *just) { guint8 r, g, b, a; @@ -396,12 +415,12 @@ gl_wdgt_text_props_get_params (glWdgtTextProps * text, /* fill in values and ranges for controls. */ /*====================================================================*/ void -gl_wdgt_text_props_set_params (glWdgtTextProps * text, - gchar * font_family, - gdouble font_size, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - guint color, +gl_wdgt_text_props_set_params (glWdgtTextProps *text, + gchar *font_family, + gdouble font_size, + GnomeFontWeight font_weight, + gboolean font_italic_flag, + guint color, GtkJustification just) { gtk_entry_set_text (GTK_ENTRY (text->font_family_entry), font_family); |