Commit Graph

226 Commits

Author SHA1 Message Date
2579e70339 [ fixes several utf8/pango related problems, including bugs #41288,
2003-05-13  Chris Toshok  <toshok@ximian.com>

	[ fixes several utf8/pango related problems, including bugs
	#41288, #42596, #42604 ]

	* configure.in (GAL_CURRENT): bump to 3, per mkestner.
	(GAL_REVISION): drop to 0, per mkestner.

	* gal/e-text/e-text.c (reset_layout_attrs): we need to convert the
	start/end bounds of the object to byte indices for the attribute.
	(reset_layout): in the layout == NULL case don't create the layout
	then immediately set it again with the same text.  also, we need
	to convert selection_start to a byte index before calling
	pango_layout_get_cursor_pos.
	(e_text_draw): remove some #ifdef 0'd code, move the calculation
	of our initial clip_rect below the xpos/ypos assignments so we
	don't duplicate the expression.  Fix the selection drawing in the
	multiline case so that it actually works, instead of assuming that
	all ETexts only have 1 line *boggle*.
	(get_position_from_xy): this needs to return a utf8 offset.
	(e_text_copy_clipboard): convert sel_start/sel_end to byte indices
	before copying.
	(primary_get_cb): same.
	(paste_received): validate the input here, and drop the length
	parameter from e_text_insert.
	(next_word): convert from an utf8 offset on entry to this
	function, and return a utf8 offset when we're done.  also, remove
	the call the g_unichar_validate.  we validate at all points where
	text is inserted.
	(find_offset_into_line): new function used in the backward/forward
	line code.  find the utf8 offset into a line (the number of utf8
	characters from a prior \n or beginning of the string.)
	(_get_position): in general there are lots of changes here because
	text->selection_start/text->selection_end are utf8 offsets, not
	byte offsets. fix E_TEP_START_OF_LINE so that hitting Ctrl-a when
	you're at the beginning of a line doesn't take you to the
	beginning of the previous line.  fix E_TEP_END_OF_LINE in an
	analogous fashion. for E_TEP_FORWARD_CHARACTER we just increment
	by 1.  for E_TEP_BACKWARD_CHARACTER we just decrement by 1.  for
	E_TEP_BACKWARD_WORD we drop the g_unichar_validate call and
	simplify things a bit.  reimplement
	E_TEP_FORWARD_LINE/E_TEP_BACKWARD_LINE so they find the current
	offset into the line, then scan forward/backward for the next/prev
	line, and put us at the right offset on that line.  fix
	E_TEP_SELECT_WORD so double clicking in the space between words
	doesn't select both words - if you double click on the trailing
	edge of the space, it selects the next word.  leading edge selects
	the previous one.  for E_TEP_SELECT_ALL use g_utf8_strlen.
	(e_text_insert): everything that calls this passes a \0 terminated
	string, so we assume it's \0 terminated (the old code did as well,
	with calls to strlen) and drop the length parameter.  also make
	sure this is all utf8 happy.
	(capitalize): use g_utf8_offset_to_pointer instead of just adding
	text->text and start/end, and remove the validate call.  also fix
	the call to e_text_model_delete and use e_text_model_insert_length
	instead of e_text_model_insert.
	(e_text_command): for E_TEP_INSERT, validate the input.  for
	E_TEP_CAPS just use MAX instead of the neat little hack.  also,
	fix the scrolling so that it scrolls properly in both X and Y
	directions (there are still some hiccups but it's much much better
	than previously).
	(e_text_commit_cb): validate the input here.

	* gal/e-text/e-text-model.c (struct _ETextModelPrivate): just use
	a GString here and get rid of MAX_LENGTH.
	(e_text_model_dispose): free GString.
	(e_text_model_real_validate_position): clean this up a bit.
	(e_text_model_real_get_text): return the contents of the GString.
	(e_text_model_real_get_text_length): use g_utf8_strlen here.
	(e_text_model_real_set_text): convert to GString
	(e_text_model_real_insert): just call e_text_model_insert_length
	here instead of duplicating the function.
	(e_text_model_real_insert_length): convert to utf8/gstring.
	i.e. convert @position and @length to a bytes and use
	g_string_insert_len.
	(e_text_model_real_delete): same, with g_string_erase.
	(e_text_model_get_text_length): use g_utf8_strlen
	(e_text_model_strdup_nth_object): convert the length of the object
	to bytes before copying.
	(e_text_model_get_nth_object_bounds): calculate start/end properly
	for u

svn path=/trunk/; revision=21163
2003-05-14 00:42:36 +00:00
5ebb4e4fe6 Fix prototype. Likewise.
2003-05-05  Jeremy Katz  <katzj@redhat.com>

	* gal/e-text/e-completion-callbacks.c
	(e_completion_callbacks_new): Fix prototype.
	* gal/e-text/e-completion-callbacks.h: Likewise.

svn path=/trunk/; revision=21110
2003-05-06 04:56:21 +00:00
24cb028fe8 Fixed typo in gal/e-text/e-text.c.
svn path=/trunk/; revision=21105
2003-05-05 20:37:20 +00:00
cfd486fdd8 return the instantiated object. [bug #42156]
2003-05-01  Mike Kestner  <mkestner@ximian.com>

	* gal/e-text/e-completion-callbacks.c (e_completion_callbacks_new):
	return the instantiated object. [bug #42156]

2003-05-01  Mike Kestner  <mkestner@ximian.com>

	* e-cell-combo.c (e_cell_combo_selection_changed): new
	(e_cell_combo_init): connect to selection_changed on popup_list
	(e_cell_combo_do_popup): block selection_changed while popping up
	[bug #40996]

svn path=/trunk/; revision=21042
2003-05-01 18:21:35 +00:00
47c282f8c1 gal/e-text/e-text.[ch] : break EFont dependency
2003-04-08  Mike Kestner  <mkestner@ximian.com>

	gal/e-text/e-text.[ch] : break EFont dependency

svn path=/trunk/; revision=20763
2003-04-08 17:09:10 +00:00
708189441c set handle_popup to TRUE on the EText.
2003-04-03  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-entry.c (e_entry_init): set handle_popup to TRUE on
	the EText.

	* gal/e-text/e-text.c (e_text_set_property): add setter for
	handle_popup.
	(e_text_get_property): add getter for handle_popup.
	(e_text_event): only do our special popup handling if handle_popup
	is true.  otherwise, pass the event along.
	(e_text_class_init): install the handle_popup property.
	(e_text_init): init handle_popup to FALSE, so we get default
	behavior in most cases.

	* gal/e-text/e-text.h: add "handle_popup" field, so the user of an
	EText can decide whether to handle popups themselves.

svn path=/trunk/; revision=20664
2003-04-03 23:31:22 +00:00
e2e058c6b4 emit a keypress signal. yes, i know this might not correspond to a single
2003-04-03  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_commit_cb): emit a keypress signal.
	yes, i know this might not correspond to a single keypress, but..

svn path=/trunk/; revision=20659
2003-04-03 08:46:53 +00:00
8045179fe8 ifdef gtk_widget_get_clipboard since we need to build against gtk 2.0.
2003-04-02  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_copy_clipboard): ifdef
	gtk_widget_get_clipboard since we need to build against gtk 2.0.
	(e_text_update_primary_selection): same.
	(e_text_paste): same.
	(e_text_do_popup): same.

svn path=/trunk/; revision=20657
2003-04-03 07:55:09 +00:00
edc0d3e040 only connect the signals if !im_context_signals_registered. (e_text_init):
2003-04-02  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_event): only connect the signals if
	!im_context_signals_registered.
	(e_text_init): init im_context_signals_registered = FALSE.

	* gal/e-text/e-text.c (struct _EText): add
	im_context_signals_registered.

svn path=/trunk/; revision=20656
2003-04-03 06:44:40 +00:00
049c9cdaca just disconnect based on DATA, so we only need 1 call. (e_text_event):
2003-04-02  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_dispose): just disconnect based on
	DATA, so we only need 1 call.
	(e_text_event): same.

svn path=/trunk/; revision=20655
2003-04-03 06:19:17 +00:00
d2af55db1a [ either fixes #39702 or comes damn, damn close. also, fixes EText to not
2003-04-02  Chris Toshok  <toshok@ximian.com>

	[ either fixes #39702 or comes damn, damn close.  also, fixes EText
	to not suck *nearly* as much. ]
	* gal/util/e-marshal.list: add NONE:POINTER,INT,OBJECT.

	* gal/e-text/e-entry.h: (struct _EEntryClass): popup ->
	populate_popup.

	* gal/e-text/e-entry.c (proxy_changed): rename, the old name was
	too damn long.
	(proxy_activate): same.
	(proxy_populate_popup): same, and change from popup to
	populate_popup.
	(e_entry_init): track change to cb names, and populate_popup.
	also, pass the ECanvas's im_context to the EText.
	(e_entry_class_init): POPUP -> POPULATE_POPUP.

	* gal/e-text/e-text.h (struct _EText): remove the old selection
	stuff, and add im_context/reset_im_context fields.
	(struct _ETextClass): popup -> populate_popup.

	* gal/e-text/e-text.c (e_text_dispose): remove all the
	GtkInvisible based selection stuff, and disconnect from/unref the
	im_context.
	(e_text_set_property): add "im_context" handling.
	(e_text_get_property): same.
	(e_text_event): connect/disconnect from the IM context's signals
	in the FOCUS_CHANGE handler.  in the KEY_PRESS/RELEASE handler,
	use gtk_im_context_filter_keypress if we have an im_context.
	also, use e_text_do_popup now instead of just emitting the "popup"
	signal.
	(e_text_copy_clipboard): new function.
	(e_text_delete_selection): new function.
	(e_text_cut_clipboard): new function.
	(e_text_paste_clipboard): new function.
	(e_text_select_all): new function.
	(primary_get_cb): new function, handle requests for the primary
	selection when we're the owner.
	(primary_clear_cb): new function, unfinished.
	(e_text_update_primary_selection): new function.
	(paste_received): new function, insert pasted text.
	(e_text_paste): new function,
	(popup_menu_detach): new function, not needed really.
	(popup_targets_received): new function, pop up the popup once we
	have the selection information necessary to sensitize the c/c/p
	buttons.
	(e_text_do_popup): new function, request the selection.
	(e_text_reset_im_context): new function.
	(e_text_command): for E_TEP_SELECT, call
	e_text_update_primary_selection.  for E_TEP_DELETE/INSERT,
	_delete_selection -> e_text_delete_selection.  for E_TEP_COPY,
	call e_text_copy_clipboard.  for E_TEP_PASTE/E_TEP_GET_SELECTION
	call e_text_paste.
	(e_text_class_init): change the "popup" signal to
	"populate_popup".  Also, add the "im_context" property.
	(e_text_commit_cb): new function. IM context callback.
	(e_text_retrieve_surrounding_cb): new function.  IM context
	callback.
	(e_text_delete_surrounding_cb): new function.  IM context
	callback.  unfinished.

svn path=/trunk/; revision=20653
2003-04-03 06:06:20 +00:00
9f06cc4980 stop drawing that annoying focus rectangle.
2003-04-01  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_draw): stop drawing that annoying
	focus rectangle.

svn path=/trunk/; revision=20626
2003-04-02 02:53:39 +00:00
0929cef791 [ fixes bug #39508 ] add back in some suitably pango-ized code to get
2003-04-01  Chris Toshok  <toshok@ximian.com>

	[ fixes bug #39508 ]
	* gal/e-text/e-text.c (e_text_command): add back in some suitably
	pango-ized code to get EText's scrolling horizontally as you move
	the cursor.

svn path=/trunk/; revision=20625
2003-04-02 02:49:00 +00:00
6590f32a3e set the popup to insensitive when we pop it down. hack to force it to lose
2003-03-26  Not Zed  <NotZed@Ximian.com>

	* gal/e-text/e-entry.c (e_entry_show_popup): set the popup to
	insensitive when we pop it down.  hack to force it to lose focus,
	fix for #39719.

svn path=/trunk/; revision=20531
2003-03-26 23:46:20 +00:00
9b5ba0524e Added prototype for show_pango_rectangle()
2003-03-10  Jeffrey Stedfast  <fejj@ximian.com>

	* gal/e-text/e-text.c: Added prototype for show_pango_rectangle()

svn path=/trunk/; revision=20233
2003-03-10 15:27:21 +00:00
c8a10fa6da fix drawing bugs, and disable the stupid looking focus rect, since I can't
2003-03-07  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (e_text_draw): fix drawing bugs, and disable
	the stupid looking focus rect, since I can't find a theme that
	uses them.
	(e_text_event): force redraw in the focus-out case if the cursor
	is shown (so we can erase it), and also trick ourselves into
	drawing it immediately (by setting it to FALSE) in the focus-in
	case.

svn path=/trunk/; revision=20223
2003-03-07 22:57:40 +00:00
b6fadac1f1 Don't unref the GtkInvisible - instead, destroy it.
2003-02-24  Hans Petter Jansson  <hpj@ximian.com>

	* gal/e-text/e-text.c (e_text_dispose): Don't unref the GtkInvisible -
	instead, destroy it.

svn path=/trunk/; revision=20040
2003-02-24 19:07:09 +00:00
18d96c5ff3 ignore test-completion.
2003-02-09  Chris Toshok  <toshok@ximian.com>

	* tests/.cvsignore: ignore test-completion.

	* tests/test-completion.c: new program, completion test.

	* tests/Makefile.am (noinst_PROGRAMS): add test-completion.

	* gal/e-text/Makefile.am: remove e-completion-test from the build
	here, moving it to ../../tests.

	* gal/e-text/e-completion.c (e_completion_class_init): we've
	removed the restart, cancel, clear, and lost signals.  Also, we've
	renamed some so it's easier to tell from the name which it is
	(virtual func or signal.)
	(e_completion_dispose): remove call to clear_search_stack, as we
	don't do auto-refinement anymore.
	(e_completion_clear): gone.
	(e_completion_push_search): gone.
	(e_completion_pop_search): gone.
	(e_completion_clear_search_stack): gone.
	(e_completion_refine_search): gone.
	(e_completion_unrefine_search): gone.
	(e_completion_begin_search): substantially clear this up, since we
	don't have the refinement stuff anymore.  Also, the call to
	request_completion is a virtual function call, not a signal.
	(e_completion_match_count): always return matches->len here, never
	match_count, which is gone (with the refinement stuff)
	(e_completion_foreach_match): remove the hit_count stuff.
	(e_completion_restart): gone.
	(e_completion_lost_match): gone.
	(e_completion_end_search): remove the sorting stuff from here (and
	the call to restart.)  the etable sorting stuff will have to take
	up the slack, but for now there's no reason to restart the search
	here.

	* gal/e-text/e-completion.h (struct _ECompletionClass): straighten
	out what's a virtual function and what's a signal, instead of
	using signals for both.  Also, remove the auto_refine stuff, as
	it's not used.

	* gal/e-text/e-completion-view.c (e_completion_view_size_request):
	make the damn drop down window bigger (100 pixels, or the
	requisition height, whichever is bigger.)
	(e_completion_view_disconnect): remove handling for signals that
	are gone.
	(restart_completion_cb): gone.
	(cancel_completion_cb): gone.
	(clear_completion_cb): gone.
	(lost_completion_cb): gone.
	(e_completion_view_construct): track new names of ECompletion
	signals.

	* gal/e-text/e-completion-view.h (struct _ECompletionView): remove
	restart_signal_id, cancel_signal_id, clear_signal_id, and
	lost_signal_id.

	* gal/e-text/e-entry.c (get_borders): new function, ala gtkentry.
	(canvas_size_request): use get_borders instead of computing it
	here.
	(e_entry_init): remove duplicate assignment of
	emulate_label_resize.
	(e_entry_show_popup): remove some ifdef'ed crap.
	(e_entry_start_completion): don't cancel the completion before
	starting again.  This keeps the popup from disappearing.

	* gal/e-text/e-completion-match.c (e_completion_match_construct):
	no more hit_count.

	* gal/e-text/e-completion-match.h (struct _ECompletionMatch):
	remove hit_count.

	* gal/e-text/e-completion-callbacks.[ch]: new class so we can use
	callbacks instead of subclassing.

svn path=/trunk/; revision=19859
2003-02-10 02:21:47 +00:00
9a00cb7215 replaced e scroll frame with gtk scrolled window
svn path=/trunk/; revision=19735
2003-02-04 19:01:48 +00:00
12a5962e32 (e_text_dispose): Renamed from
e_text_destroy; chain up to ::dispose instead of ::destroy.
(e_text_dispose, e_text_class_init): Override ::dispose, not
::destroy.

svn path=/trunk/; revision=19577
2003-01-22 22:54:17 +00:00
99df61da47 reverse part of the patch from 1/15.
2003-01-17  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (show_pango_rectangle): reverse part of the
	patch from 1/15.

svn path=/trunk/; revision=19510
2003-01-17 23:31:36 +00:00
fdabee2040 pass pango_context_get_language to pango_context_get_metrics.
2003-01-17  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_request): pass
	pango_context_get_language to pango_context_get_metrics.

svn path=/trunk/; revision=19507
2003-01-17 23:23:47 +00:00
da621e5406 apply the patch NotZed and I came up with to fix the height of the
2003-01-15  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c (show_pango_rectangle): apply the patch
	NotZed and I came up with to fix the height of the evolution
	composer entries.

svn path=/trunk/; revision=19486
2003-01-15 21:45:51 +00:00
2f949ea127 add call to e_table_model_pre_change here to reduce spew.
2003-01-15  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-completion-view.c (begin_completion_cb): add call
	to e_table_model_pre_change here to reduce spew.
	(cancel_completion_cb): same.
	(completion_cb): same.
	(end_completion_cb): same.
	(clear_completion_cb): same.
	(lost_completion_cb): same.

svn path=/trunk/; revision=19478
2003-01-15 18:28:23 +00:00
09ea004d13 use PangoFontMetrics here instead of using the ascent/descent of the
2003-01-14  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-entry.c (canvas_size_request): use PangoFontMetrics
	here instead of using the ascent/descent of the GtkStyle's font.

svn path=/trunk/; revision=19468
2003-01-14 22:33:46 +00:00
84fabde6ba lots of stuff, add 2 e-text widgets, 1 readonly, the other writable (that
2002-12-08  Chris Toshok  <toshok@ximian.com>

	* tests/test-text.c: lots of stuff, add 2 e-text widgets, 1
	readonly, the other writable (that uses the uri model..)

	* gal/e-text/e-text.[ch]: lots of pango changes.  we don't do
	*anything* with gdk/e fonts now.  everything is pango.  There are
	still some issues while editting but display should more or less
	work properly now, and without all the performance problems.

	* gal/e-text/e-completion-view.c (e_completion_view_expose_event):
	use gtk_widget_send_expose instead of gtk_widget_event so we don't
	get the annoying gtk warning.

	* gal/e-text/e-entry.c (e_entry_dispose): make sure both the gdk
	and gtk grabs are removed.
	(e_entry_class_init): fill_color_gdk is a boxed type, not pointer.

	* gal/e-text/e-text-model-uri.h (E_TYPE_TEXT_MODEL_URI): oops,
	this should be e_text_model_uri_get_type, not
	e_text_model_get_type.

svn path=/trunk/; revision=19054
2002-12-08 21:44:08 +00:00
42e49504cb rework this from the gal-2 branch, clahey's patch, and the stuff i'd done
2002-11-29  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.c: rework this from the gal-2 branch, clahey's
	patch, and the stuff i'd done since.  it's working *MUCH* better
	now.

svn path=/trunk/; revision=18957
2002-11-30 06:14:58 +00:00
f5b3a0e2e5 commit clahey's original pango work.
2002-11-19  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-text.[ch]: commit clahey's original pango work.

svn path=/trunk/; revision=18850
2002-11-19 23:59:20 +00:00
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
b5d027f428 only clear choices if cv->choices != NULL. (e_completion_view_disconnect):
2002-11-11  Chris Toshok  <toshok@ximian.com>

	* gal/e-text/e-completion-view.c (e_completion_view_destroy): only
	clear choices if cv->choices != NULL.
	(e_completion_view_disconnect): zero out cancel_signal_id.

svn path=/trunk/; revision=18718
2002-11-12 03:28:38 +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
f533402ce6 take a clip_height and use it to set the maximum number of lines if
2002-09-10  JP Rosevear  <jpr@ximian.com>

	* gal/e-text/e-text.c (line_splitter): take a clip_height and use
	it to set the maximum number of lines if necessary
	(split_into_lines): pass clip_height arg

svn path=/trunk/; revision=18032
2002-09-10 17:24:50 +00:00
3146e7f80e Added debugging printfs. (e_text_request_paste): Fixed the order of
2002-06-05  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c: Added debugging printfs.
	(e_text_request_paste): Fixed the order of setting
	last_type_request before calling gtk_selection_convert due to a
	reentrancy bug.

svn path=/trunk/; revision=17119
2002-06-05 16:52:45 +00:00
1e3dc5a343 Reflow and redraw when the style gets set.
2002-06-03  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c, gal/e-text/e-text.h (e_text_style_set):
	Reflow and redraw when the style gets set.

svn path=/trunk/; revision=17086
2002-06-03 21:04:43 +00:00
57a8777026 Switch from gnome_canvas_item_grab to e_canvas_item_grab.
2002-05-09  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c: Switch from gnome_canvas_item_grab to
	e_canvas_item_grab.

	* gal/widgets/e-canvas.c, gal/widgets/e-canvas.h
	(e_canvas_item_grab, e_canvas_item_ungrab): Added these functions.

From gal/e-table/ChangeLog:

2002-05-09  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c, e-table-item.h: Switched from
	gnome_canvas_item_grab to e_canvas_item_grab.

svn path=/trunk/; revision=16738
2002-05-09 22:12:01 +00:00
8c9242e061 Make the style here match the proper widget style to emulate a label or an
2002-05-02  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_draw): Make the style here match the
	proper widget style to emulate a label or an entry.

svn path=/trunk/; revision=16670
2002-05-02 22:55:49 +00:00
e1f208de7d Set the gettext-domain here.
2002-05-01  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-completion-view.c (simple_spec),
	gal/widgets/e-categories-master-list-dialog.c (SPEC),
	gal/widgets/e-categories.c (INITIAL_SPEC): Set the gettext-domain
	here.

	* gal/util/e-i18n.h (E_I18N_DOMAIN): #define as makes sense in the
	different cases.

From gal/e-table/ChangeLog:

2002-05-01  Christopher James Lahey  <clahey@ximian.com>

	* e-table-config.c, e-table-config.h, e-table-specification.c,
	e-table-specification.h, e-table-utils.c, e-table-utils.h,
	e-table.c, e-table.h: Made these pay attention to the
	gettext-domain in the etspec.

	* e-table-config.c: Set the gettext-domain in the etspec here.

From gal/menus/ChangeLog:

2002-05-01  Christopher James Lahey  <clahey@ximian.com>

	* gal-define-views-dialog.c (SPEC),
	gal-view-instance-save-as-dialog.c (SPEC): Set the gettext-domain
	here.

svn path=/trunk/; revision=16658
2002-05-01 23:26:42 +00:00
0a226a0483 Ansification patch from danw.
2002-04-25  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-paned/e-paned.c, gal/e-text/e-entry.c,
	gal/util/e-bit-array.c, gal/util/e-sorter-array.c,
	gal/util/e-sorter.c, gal/util/e-text-event-processor.c,
	gal/widgets/color-group.c, gal/widgets/color-palette.c,
	gal/widgets/e-canvas-vbox.c, gal/widgets/e-canvas.c,
	gal/widgets/e-canvas.h,
	gal/widgets/e-categories-master-list-array.c,
	gal/widgets/e-categories-master-list-combo.c,
	gal/widgets/e-categories-master-list-dialog-model.c,
	gal/widgets/e-categories-master-list-dialog.c,
	gal/widgets/e-categories.c, gal/widgets/e-reflow-model.c,
	gal/widgets/e-reflow.c, gal/widgets/e-selection-model-array.c,
	gal/widgets/e-selection-model-simple.c,
	gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h,
	gal/widgets/gtk-combo-box.c, gal/widgets/gtk-combo-stack.c,
	gal/widgets/widget-color-combo.c,
	gal/widgets/widget-pixmap-combo.c: Ansification patch from danw.

svn path=/trunk/; revision=16589
2002-04-25 20:05:40 +00:00
78492a5deb Don't show the popup if the entry->item doesn't have focus.
* gal/e-text/e-entry.c (e_entry_show_popup): Don't show the popup
if the entry->item doesn't have focus.

svn path=/trunk/; revision=16345
2002-04-04 15:34:09 +00:00
2b466c4caf If tab is hit and the cursor is still in the entry, move down into the
2002-02-28  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-completion-view.c
	(e_completion_view_key_press_handler): If tab is hit and the
	cursor is still in the entry, move down into the entry otherwise
	unbrowse.

svn path=/trunk/; revision=15878
2002-02-28 22:42:05 +00:00
9f1ac34671 Bumped the version number to 0.19.99.5.
2002-02-07  Christopher James Lahey  <clahey@ximian.com>

	* configure.in: Bumped the version number to 0.19.99.5.

	* gal/Makefile.am (libgal_la_LIBADD): Added
	menus/gal-view-instance-save-as-dialog.lo.

	* gal/e-text/e-text.c (next_word): Contains refactored code from
	the E_TEP_FORWARD_WORD case of e_text_command.
	(e_text_command): Implemented E_TEP_CAPS.

From gal/menus/ChangeLog:

2002-02-07  Christopher James Lahey  <clahey@ximian.com>

	* Makefile.am (glade_DATA): Added
	gal-view-instance-save-as-dialog.glade.
	(libgalmenus_la_SOURCES): Added
	gal-view-instance-save-as-dialog.c.
	(libgalmenusinclude_HEADERS): Added
	gal-view-instance-save-as-dialog.h.

	* gal-view-collection.c, gal-view-collection.h
	(gal_view_collection_append_with_title): Added this new version of
	the append function that sets the title and returns the new id as
	well.
	(gal_view_collection_set_nth_view): Added this function to save
	over another view.
	(gal_view_collection_get_default_view,
	gal_view_collection_set_default_view): Added the concept of a
	default view for GalViewCollections.

	* gal-view-etable.c, gal-view-etable.h
	(gal_view_etable_attach_table, gal_view_etable_attach_tree,
	gal_view_etable_detach): Added functions to set the state of a
	table or tree and then send GalView "changed" signals whenever
	that state changes.
	(gal_view_etable_set_state): New function to set the ETableState
	of a GalViewETable.

	* gal-view-instance-save-as-dialog.c,
	gal-view-instance-save-as-dialog.glade,
	gal-view-instance-save-as-dialog.h: New dialog to save the current
	custom view as a named view.

	* gal-view-instance.c, gal-view-instance.h
	(gal_view_instance_set_custom_view): New function to set the state
	of an instance to custom view and set the custom view to a
	particular GalView.
	(gal_view_instance_exists): New function to check if this
	particular instance has ever been opened before.  Use before
	gal_view_instance_load.
	(gal_view_instance_save_as): New function to open a save as
	dialog.
	(gal_view_instance_load): Added this function which used to be
	part of _construct.  This function can be called multiple times,
	and those extra times will be ignored.  This is so you can set a
	default view before loading.
	(gal_view_instance_get_default_view,
	gal_view_instance_set_default_view): Set the default view for this
	instance.  If unset, this falls back to the default view for the
	corresponding GalViewCollection.

svn path=/trunk/; revision=15590
2002-02-07 10:22:59 +00:00
994338982f Request a reflow and an update when the text model changes. Fixes Ximian
2002-01-20  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_text_model_changed): Request a
	reflow and an update when the text model changes.  Fixes Ximian
	bug #16459.
	(e_text_set_arg): (ARG_TEXT) Don't set the number of lines to one
	here.

svn path=/trunk/; revision=15411
2002-01-21 01:57:23 +00:00
784886d534 Added #include <libgnome/gnome-defs.h>.
2002-01-16  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-entry.h, gal/e-text/e-table-text-model.h,
	gal/e-text/e-text-model-uri.h, gal/e-text/e-text.h,
	gal/util/e-i18n.h, gal/widgets/e-canvas-utils.h,
	gal/widgets/e-gui-utils.h, gal/widgets/e-printable.h,
	gal/widgets/gtk-combo-stack.h: Added #include
	<libgnome/gnome-defs.h>.

svn path=/trunk/; revision=15340
2002-01-16 17:21:25 +00:00
4e788c6fec Handle the case of a 0 length string properly here.
2002-01-14  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (line_splitter): Handle the case of a 0
	length string properly here.

svn path=/trunk/; revision=15323
2002-01-14 21:28:42 +00:00
0336d7c12f Reworked to fix bugs related to breaking text on newlines. Some fairly
2001-12-27  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-text.c (split_into_lines): Reworked to fix bugs
	related to breaking text on newlines.  Some fairly substantial
	code duplication was removed in the process.

svn path=/trunk/; revision=15219
2001-12-28 02:24:27 +00:00
5f447101dd Don't crash if the text string is NULL. (text_draw_with_objects): Don't
2001-12-10  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-text.c (text_width_with_objects): Don't crash if
        the text string is NULL.
        (text_draw_with_objects): Don't crash if the text string is NULL.
        (Fixes #16359)

svn path=/trunk/; revision=14954
2001-12-10 17:50:14 +00:00
335e0c6bf6 Only popup entries that have focus. Fixes the lingering completion popup
2001-11-08  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-entry.c (full_cb): Only popup entries that have
        focus.  Fixes the lingering completion popup bug.

svn path=/trunk/; revision=14626
2001-11-08 17:28:52 +00:00
114411716d Calc height here if we need it to check the y position of the cursor.
2001-10-30  Christopher James Lahey  <clahey@ximian.com>

	* gal/e-text/e-text.c (e_text_reflow): Calc height here if we need
	it to check the y position of the cursor.

svn path=/trunk/; revision=14443
2001-10-30 08:22:21 +00:00
b14590968a Added. Makes our popup window a transient of the toplevel.
2001-10-29  Jon Trowbridge  <trow@ximian.com>

	* gal/e-text/e-entry.c (e_entry_make_completion_window_transient):
	Added.  Makes our popup window a transient of the toplevel.
	(e_entry_enable_completion_full): Try to make our popup a
	transient.
	(e_entry_realize): Also try to make our popup a transient here, in
	case the entry wasn't packed before we enabled completion.  This
	is all an attempt to fix bug #13791.

svn path=/trunk/; revision=14390
2001-10-30 01:05:17 +00:00