Commit Graph

16 Commits

Author SHA1 Message Date
68b8639345 fix c&p typo.
2002-11-16  Chris Toshok  <toshok@ximian.com>

	* gal/widgets/e-reflow.c (e_reflow_class_init): fix c&p typo.

	* gal/widgets/e-categories-master-list-dialog.c: switch to
	GtkDialogism's.

	* gal/widgets/gal-categories.[ch]: same.

	* gal/widgets/e-categories-master-list-dialog.glade: libglade-convert.

	* gal/widgets/e-categories.glade: same.

	* gal/util/e-text-event-processor.[ch]: subclass this from
	GObject.

	* gal/util/e-text-event-processor-emacs-like.[ch]: clean up the
	gtk cruft a bit.

	* gal/e-text/e-text.c (_get_tep): remove the _sink call.
	(e_text_init): same.

	* gal/e-text/e-text-model.[ch]: subclass this from GObject instead
	of GtkObject.

svn path=/trunk/; revision=18808
2002-11-17 05:40:18 +00:00
d8e4ebebc3 Lots of GObject work.
2002-11-16  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-completion-test.c: Lots of GObject work.

	* gal/e-text/e-completion-view.[ch]: same.

	* gal/e-text/e-completion.[ch]: same.

	* gal/e-text/e-entry.[ch]: same.

	* gal/e-text/e-table-text-model.[ch]: same.

	* gal/e-text/e-text-model-uri.[ch]: same.

	* gal/e-text/e-text-model.[ch]: same.

	* gal/e-text/e-text-test.c: same.

	* gal/e-text/e-text.[ch]: same.

svn path=/trunk/; revision=18800
2002-11-16 23:49:31 +00:00
613453b109 merging the gal-2 branch back to the trunk.
merging the gal-2 branch back to the trunk.

svn path=/trunk/; revision=18471
2002-10-31 21:30:57 +00:00
dc8927136a Changed the license announcement at the top of these files.
2001-10-26  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-paned/e-hpaned.c, gal/e-paned/e-hpaned.h,
	gal/e-paned/e-paned.c, gal/e-paned/e-paned.h,
	gal/e-paned/e-vpaned.c, gal/e-paned/e-vpaned.h,
	gal/e-text/e-completion-match.c, gal/e-text/e-completion-match.h,
	gal/e-text/e-completion-test.c, gal/e-text/e-completion-view.c,
	gal/e-text/e-completion-view.h, gal/e-text/e-completion.c,
	gal/e-text/e-completion.h, gal/e-text/e-entry-test.c,
	gal/e-text/e-entry.c, gal/e-text/e-entry.h,
	gal/e-text/e-table-text-model.c, gal/e-text/e-table-text-model.h,
	gal/e-text/e-text-model-repos.c, gal/e-text/e-text-model-repos.h,
	gal/e-text/e-text-model-test.c, gal/e-text/e-text-model-uri.c,
	gal/e-text/e-text-model-uri.h, gal/e-text/e-text-model.c,
	gal/e-text/e-text-model.h, gal/e-text/e-text.c,
	gal/e-text/e-text.h, gal/util/e-bit-array.c,
	gal/util/e-bit-array.h, gal/util/e-cache.c, gal/util/e-cache.h,
	gal/util/e-iconv.c, gal/util/e-iconv.h, gal/util/e-sorter-array.c,
	gal/util/e-sorter-array.h, gal/util/e-sorter.c,
	gal/util/e-sorter.h, gal/util/e-text-event-processor-emacs-like.c,
	gal/util/e-text-event-processor-emacs-like.h,
	gal/util/e-text-event-processor-types.h,
	gal/util/e-text-event-processor.c,
	gal/util/e-text-event-processor.h, gal/util/e-util.c,
	gal/util/e-util.h, gal/util/e-xml-utils.c, gal/util/e-xml-utils.h,
	gal/widgets/color-group.c, gal/widgets/color-group.h,
	gal/widgets/color-palette.c, gal/widgets/color-palette.h,
	gal/widgets/e-canvas-utils.c, gal/widgets/e-canvas-utils.h,
	gal/widgets/e-canvas-vbox.c, gal/widgets/e-canvas-vbox.h,
	gal/widgets/e-canvas.c, gal/widgets/e-canvas.h,
	gal/widgets/e-categories-master-list-array.c,
	gal/widgets/e-categories-master-list-array.h,
	gal/widgets/e-categories-master-list-combo.c,
	gal/widgets/e-categories-master-list-combo.h,
	gal/widgets/e-categories-master-list-dialog-model.c,
	gal/widgets/e-categories-master-list-dialog-model.h,
	gal/widgets/e-categories-master-list-dialog.c,
	gal/widgets/e-categories-master-list-dialog.h,
	gal/widgets/e-categories-master-list.c,
	gal/widgets/e-categories-master-list.h,
	gal/widgets/e-categories.c, gal/widgets/e-categories.h,
	gal/widgets/e-colors.c, gal/widgets/e-colors.h,
	gal/widgets/e-cursors.c, gal/widgets/e-cursors.h,
	gal/widgets/e-font.c, gal/widgets/e-font.h,
	gal/widgets/e-gui-utils.c, gal/widgets/e-gui-utils.h,
	gal/widgets/e-hscrollbar.c, gal/widgets/e-hscrollbar.h,
	gal/widgets/e-popup-menu.c, gal/widgets/e-popup-menu.h,
	gal/widgets/e-printable.c, gal/widgets/e-printable.h,
	gal/widgets/e-reflow-model.c, gal/widgets/e-reflow-model.h,
	gal/widgets/e-reflow-sorted.c, gal/widgets/e-reflow-sorted.h,
	gal/widgets/e-reflow.c, gal/widgets/e-reflow.h,
	gal/widgets/e-scroll-frame.c, gal/widgets/e-scroll-frame.h,
	gal/widgets/e-selection-model-array.c,
	gal/widgets/e-selection-model-array.h,
	gal/widgets/e-selection-model-simple.c,
	gal/widgets/e-selection-model-simple.h,
	gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h,
	gal/widgets/e-unicode.c, gal/widgets/e-unicode.h,
	gal/widgets/e-vscrollbar.c, gal/widgets/e-vscrollbar.h,
	gal/widgets/gtk-combo-box.c, gal/widgets/gtk-combo-box.h,
	gal/widgets/gtk-combo-stack.c, gal/widgets/gtk-combo-stack.h,
	gal/widgets/gtk-combo-text.c, gal/widgets/gtk-combo-text.h,
	gal/widgets/test-color.c, gal/widgets/test-e-font.c,
	gal/widgets/test-e-font.h, gal/widgets/test-font-loading.c,
	gal/widgets/widget-color-combo.c,
	gal/widgets/widget-color-combo.h,
	gal/widgets/widget-pixmap-combo.c,
	gal/widgets/widget-pixmap-combo.h,
	src/e-table/e-table-sorted-variable.c, tests/test-define-views.c,
	tests/test-shortcut-bar.c, tests/test-table-1.c,
	tests/test-tree-1.c, tests/test-tree-2.c, tests/test-tree-3.c,
	tests/test-unicode.c: Changed the license announcement at the top
	of these files.

svn path=/trunk/; revision=14158
2001-10-26 18:33:33 +00:00
69b2e6d8ee Use e_strdup_append_strings here instead of g_strdup_printf because
2001-10-11  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-table-text-model.c (e_table_text_model_insert,
	e_table_text_model_insert_length, e_table_text_model_delete),
	gal/e-text/e-text-model.c (e_text_model_real_insert,
	e_text_model_real_insert_length): Use e_strdup_append_strings here
	instead of g_strdup_printf because printf("%.*s") is locale
	dependent on some systems.

	* gal/util/e-util.c (e_strdup_append_strings): New function to
	append a bunch of strings with optional lengths.

svn path=/trunk/; revision=13581
2001-10-11 16:17:41 +00:00
c5f392ca0e add E_OBJECT_CLASS_ADD_SIGNALS and E_OBJECT_CLASS_TYPE to ease migration
2001-10-05  Michael Meeks  <michael@ximian.com>

	* gal/util/e-util.h: add E_OBJECT_CLASS_ADD_SIGNALS and
	E_OBJECT_CLASS_TYPE to ease migration to Gnome 2.0 from
	a single source base.

	* All C files:
	s/object_class->type,/E_OBJECT_CLASS_TYPE (object_class),/g;
	s/gtk_object_class_add_signals([^\(]*)\(([^,]*),([^,]*),([^\)]*)/
	E_OBJECT_CLASS_ADD_SIGNALS\1(\2,\3,\4/;

svn path=/trunk/; revision=13428
2001-10-04 23:52:20 +00:00
f6be515182 Added a max length of 2047 to the standard ETextModel. Fixes Ximian bug
2001-10-02  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text-model.c (MAX_LENGTH): Added a max length of
	2047 to the standard ETextModel.  Fixes Ximian bug #3021.

svn path=/trunk/; revision=13298
2001-10-02 12:31:05 +00:00
9ca73ebd87 Bumped version up to 0.10.99.2.
2001-08-09  Jon Trowbridge  <trow@ximian.com>

	* configure.in: Bumped version up to 0.10.99.2.

	* gal/e-text/e-entry.c (e_entry_class_init): Added
	"completion_popup" signal.
	(e_entry_show_popup): Emit "completion_popup" signal if the popup
	has appeared or disappeared.
	(e_entry_enable_completion_full): Listen for "cancel_completion"
	signals from our model, and disable our completion if get one.
	(e_entry_completion_popup_is_visible): Added.  Returns TRUE if the
	completion popup is on the screen.

	* gal/e-text/e-text-model.c (e_text_model_class_init): Added
	"cancel_completion" signal.
	(e_text_model_cancel_completion): Added.  Emits
	"cancel_completion" signal.

svn path=/trunk/; revision=11824
2001-08-09 06:44:59 +00:00
8940bcc90c Fix headers. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto. Same. Ditto. Same
2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>

	* gal/e-text/e-entry.c: Fix headers.
	* gal/e-text/e-table-text-model.[ch]: Ditto.
	* gal/e-text/e-table-text-model-uri.c: Ditto.
	* gal/e-text/e-text-model-uri.[ch]: Ditto.
	* gal/e-text/e-text-model.[ch]: Ditto.
	* gal/e-text/e-text.[ch]: Ditto.
	* gal/util/e-text-event-processor-emacs-like.[ch]: Ditto.
	* gal/util/e-text-event-processor.[ch]: Same.
	* gal/util/e-util.h: Ditto.
	* gal/util/e-xml-utils.[ch]: Same here.
	* gal/widgets/color-group.[ch]: Ditto.
	* gal/widgets/color-palette.[ch]: Ditto.
	* gal/widgets/e-canvas-utils.h: Ditto.
	* gal/widgets/e-canvas-vbox.[ch]: Ditto.
	* gal/widgets/e-canvas.[ch]: Ditto.
	* gal/widgets/e-categories.h: Ditto.
	* gal/widgets/e-colors.[ch]: Ditto.
	* gal/widgets/e-cursors.c: Ditto.
	* gal/widgets/e-gui-utils.c: Ditto
	* gal/widgets/e-popup-menu.[ch]: Same.
	* gal/widgets/e-reflow-sorted.c: Same.
	* gal/widgets/e-reflow.[ch]: Same.
	* gal/widgets/e-selection-model.c: Same
	* gal/widgets/e-unicode.[ch]: Same.
	* gal/widgets/gtk-combo-stack.[ch]: Same.
	* gal/widgets/widget-color-combo.[ch]: Same.
	* gal/widgets/widget-pixmap-combo.[ch]: Same.

svn path=/trunk/; revision=9168
2001-04-04 07:33:09 +00:00
267af7a6fa Renamed "temp" as "new_text", to avoid confusion.
2001-03-12  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-text-model.c (e_text_model_real_insert_length):
	Renamed "temp" as "new_text", to avoid confusion.
	(e_text_model_real_delete): Renamed "temp" as "new_text", to avoid
	confusion.

svn path=/trunk/; revision=8640
2001-03-12 19:18:46 +00:00
0e3e3e9914 Added. Allows you to attach an ECompletion to an EEntry, and have that
2001-02-19  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-entry.c (e_entry_enable_completion_full): Added.
        Allows you to attach an ECompletion to an EEntry, and have that
        ECompletion be used for (obviously enough) completions.

        * gal/e-text/e-completion-view.h, gal/e-text/e-completion-view.c:
        Added.  ECompletionView is a widget for displaying the results of
        a completion request in a format that is appropriate for a
        drop-down window.

        * gal/e-text/e-completion.h, gal/e-text/e-completion.c: Added.
        ECompletion is a "pure virtual base class" for completion-type
        operations.  It is implemented so that completions can be either
        synchronous or asynchronous.

        * gal/e-text/e-text.c: Lots of changes to accomodate the
        ETextModel changes.  First of all, we render embedded text objects
        as being underlined.  We also cause the model to emit the
        appropriate object activation signal when an embedded object is
        double-clicked.  Also, all of the code that moves the cursor in
        response to user input has been removed.  Instead, the EText now
        listens for "reposition" events from the underlying model, and
        bases all cursor motions on those.
        (get_bounds_item_relative): Fixed bug in the handling of
        differently-anchored text.  Being differently-anchored is not a
        crime or a perversion --- it is an alternative lifestyle that we
        have to respect.

        * gal/e-text/e-text-model-uri.h, gal/e-text/e-text-model-uri.c: A
        sample ETextModel that converts URIs into embedded objects that
        get opened in the browser when you double-click them.

        * gal/e-text/e-text-model-repos.h,
        gal/e-text/e-text-model-repos.c: Added.  A group of simple
        structures & functions for handling various cursor movement rules.
        These are the sorts of things that are passed as arguments to
        ETextModel "reposition" event handlers.

        * gal/e-text/e-text-model.h, gal/e-text/e-text-model.c: Privitized
        the ETextModel struct and "methodized" all of the operations, so
        that derived classes can do arbitrarily respond to get/set
        requests in arbitrarily strange ways.  Also added the concept of
        declaring regions of the text as "embedded text objects".
        Finally, caused operations that change the text to emit a
        "reposition" signal that passes information that can be used by a
        view (like an EText) to move the cursor or selection in an
        intelligent way in response to those changes.  This means that you
        can now open two ETexts that look at the same ETextModel, and have
        the cursor in one do the right thing when you edit the other.  (As
	opposed to producing a lot of potential segfaults, as it was
	before.)

svn path=/trunk/; revision=8280
2001-02-19 22:47:23 +00:00
2dee35819c Reverted the latest change to EText since we're in feature freeze.
2001-01-30  Christopher James Lahey  <clahey@helixcode.com>

	* Reverted the latest change to EText since we're in feature freeze.

svn path=/trunk/; revision=7912
2001-01-30 11:54:53 +00:00
b0046a3699 Connect to the model's "position" signal. (e_text_init): Set default value
2001-01-29  Jon Trowbridge  <trow@gnu.org>

	* gal/e-text/e-text.c (e_text_init): Connect to the model's
	"position" signal.
	(e_text_init): Set default value for rgba_object as blue.
	(e_text_destroy): Disconnect model position signal.
	(fix_selection): Some extra sanity checking to keep the selection
	from spilling outside of the bounds of the text string as it
	expands or contracts.  Should be obsolete due to the changes to
	objectify_uris --- but I'll leave this in here for now, in an
	attempt to avoid non-\0-terminated strings, segfaults, and all of
	that fun stuff.
	(e_text_text_model_position): Move our cursor according to the
	suggestions made by our ETextModel, via the "position" signal.
	(text_width_with_objects): Check that text is not NULL.
	(text_draw_with_objects): Accept an extra GdkGC for use in drawing
	objects.
	(e_text_set_arg): Properly handle the "position" signal when
	changing models.
	(e_text_draw): Initialize the GC for drawing objects, if
	necessary.
	(_insert): Comment out the code that adjustes text->selection_*.
	The cursor is now moved by the ETextModel directly via the
	position signal, not by the view.

	* gal/e-text/e-text-model-uri.c (objectify_uris): Add more
	sophisticated uri recognition via regular expressions.
	(objectify_uris): Changed to track position changes as model->text
	expands and contracts along with the objects.  Block the
	objectification of any chunks of text that straddle our current
	position.
	(e_text_model_uri_set_text): Added position info to objectify_uris
	call.
	(e_text_model_uri_insert): Added position info to objectify_uris
	call.
	(e_text_model_uri_insert_length): Added position info to
	objectify_uris call.
	(e_text_model_uri_delete): Added position info to objectify_uris
	call.

	* gal/e-text/e-text-model.c (e_text_model_class_init): Added a
	"position" signal that allows the ETextModel to send cursor
	positioning information back to any view.  We need this for text
	with objects, where the text string can grow and shrink in ways
	that the view doesn't expect.
	(e_text_model_real_insert): Added sanity checking of args and a
	position emission.
	(e_text_model_real_insert_length): Added sanity checking of args
	and a position emission.
	(e_text_model_real_delete): Added sanity checking of args.
	(e_text_model_suggest_position): A wrapper around the "position"
	signal emitter.

svn path=/trunk/; revision=7894
2001-01-29 20:27:38 +00:00
8c1c827496 Added; a new test program that demonstrates objects in ETexts.
2001-01-26  Jon Trowbridge  <trow@gnu.org>

        * gal/e-text/e-text-model-test.c: Added; a new test program that
        demonstrates objects in ETexts.

        * gal/e-text/e-text-model-uri.c: Added; a text model that converts
        URIs in the text into objects that are passed off to the GNOME URI
        handler when activated.  This is actually still extremely broken;
        I got it just working enough to test out my EText changes.

        * gal/e-text/e-text.c: A whole lot of changes, designed to make
        ETextModel objects render properly.  The basic idea of the changes
        is pretty simple, though.
        (text_width_with_objects): First of all, this function is an
        alternative to e_font_utf8_text_width that takes into the account
        the embedded \1s in the text string and properly accounts for the
        width of the object strings.
        (unicode_strlen_with_objects): Next, this function finds the
        proper strlen of a string, expanding the \1s.
        (text_draw_with_objects): Finally, this is just a replacement for
        e_font_draw_utf8_text that does the right thing for objects.  I've
        gone through all of e-text.c and replace calls by those original
        functions with my new object-enabled alternatives.
        (split_into_lines): Some tweaking to get line breaking to work
        properly.  Made \1 into a "break character", so that we can break
        lines between multiple adjacent objects.  (Which seemed like the
        right thing to do, but there may be cases where that is
        undesireable.)
        (_get_position_from_xy): Fixed to properly handle embedded
        objects, and to get the right selection semantics for objects.
        (Or at least semantics that feel right to me.)  Also fixed a bug
        that caused selection, etc. to not work properly if the text was
        anchored anywhere other than with GTK_ANCHOR_NORTH*.
        (_get_position): Hacked to cause objects to activate when they are
        double-clicked.  There is probably a better way to do this.

        * gal/e-text/e-text-model.c (e_text_model_real_object_count):
        Provide a default implementation of an object counter.  Derived
        classes might want to override this for efficiency reasons.
        (e_text_model_strdup_expanded_text): Added.  Allocates and returns
        a string contains the model's text with the objects "expanded"
        within.

        * gal/e-text/e-text-model.h: Added obj_count, get_nth_obj, and
        activate_nth_obj virtual methods to ETextModelClass.

svn path=/trunk/; revision=7842
2001-01-26 22:10:51 +00:00
bc9f58d42a Return "" instead of NULL.
2000-07-09  Christopher James Lahey  <clahey@helixcode.com>

	* widgets/e-text/e-text-model.c (e_text_model_real_get_text):
	Return "" instead of NULL.

svn path=/trunk/; revision=4003
2000-07-09 07:17:15 +00:00
1f7ba945b1 Rearranged SUBDIRS for dependencies.
2000-03-12  Christopher James Lahey  <clahey@helixcode.com>

        * widgets/Makefile.am: Rearranged SUBDIRS for dependencies.

        * widgets/e-text/e-text-model.c, widgets/e-text-model.h: New
        object which stores a piece of text data.  All methods are
        virtual.

        * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Modified this
        to use an ETextModel for its data.

        * widgets/e-text/Makefile.am: Added e-text-model.c and e-text-model.h.

        * widgets/e-minicard/test-minicard-label.c: Made this work again.

        * widgets/e-minicard/e-minicard.c,
        widgets/e-minicard/e-minicard.h: Made this use an ETableModel to
        get its data.

        * widgets/e-minicard/e-minicard-label.c,
        widgets/e-minicard/e-minicard-label.h: Added the ability to set
        the text model used for the contained text widget.

        * widgets/e-minicard/Makefile.am: Added e-table since e-minicard
        is now dependent on an e-table-model for its data.

        * e-util/e-canvas.c, e-util/e-canvas.h: Fixed some bugs here to
        speed up reflow and to make it fail less often.

        * addressbook/demo, addressbook/demo/.cvsignore,
        addressbook/demo/Makefile.am, addressbook/demo/demo.c,
        addressbook/demo/spec: A new program to test ETable and EMinicard
        integration.

        * configure.in: Added addressbook/demo/Makefile.

        * addressbook/Makefile.am: Added the demo/ subdirectory.

in widgets/e-table/:

2000-03-12  Christopher James Lahey  <clahey@helixcode.com>

        * e-table.c: Made this use an ECanvas.  Fixed a bug where
        e_table_new_from_spec_file was calling e_table_construct instead
        of e_table_construct_from_spec_file.

        * e-table-item.c, e-table-header-item.c, e-table-column-item.c:
        Switched these to use GTK_TYPE_OBJECT and GTK_VALUE_OBJECT instead
        of GTK_TYPE_POINTER and GTK_TYPE_OBJECT.

        * e-cell-text.c: Got rid of a crashing bug.

        * e-table-text-model.c, e-table-text-model.h: A new object which
        is an e-text-model which uses an e-table-model for its data.

        * Makefile.am: Added e-table-text-model.c and
        e-table-text-model.h.

        * .cvsignore: Added table-example-1 and table-example-2.

svn path=/trunk/; revision=2101
2000-03-12 07:59:42 +00:00