Commit Graph

15 Commits

Author SHA1 Message Date
8db565271c added cast
2004-06-10  Radek Doulik  <rodo@ximian.com>

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add.c
	(idle_do_action): added cast

	* gal/a11y/e-table/gal-a11y-e-cell-tree.c
	(gal_a11y_e_cell_tree_new): added cast

	* gal/a11y/e-table/gal-a11y-e-cell.c: added #include
<gtk/gtkwindow.h>

	* gal/e-text/e-text.c (_get_position): removed unused variable

	* gal/e-text/e-completion.c: #if 0'ed e_completion_sort

	* tests/test-text.c (create_entry): removed unused variables
	added #include "gal/widgets/e-canvas-utils.h"
	added #include "gal/e-text/e-text-model.h"
	(create_text): removed unused variables
	(create_ro_text): ditto

	* tests/test-table-1.c (create_table): added cast

	* tests/test-completion.c (main): added cast

	* gal/a11y/e-text/gal-a11y-e-text.c (et_get_text): return NULL if
	check fails
	added #include <string.h> for strlen
	(et_get_text_after_offset): fixed typo defalut --> default
	(et_get_text_at_offset): ditto
	(et_get_character_extents): removed unused variables
	(et_set_selection): ditto
	(_et_command_cb): added default: label to quiet compiler

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
	(gal_a11y_e_table_click_to_add_factory_create_accessible): return
	NULL if check fails

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add.c
	(idle_do_action): fixed wrong cast
	(idle_do_action): removed unused variables
	(etcta_ref_child): return NULL if check fails
	(gal_a11y_e_table_click_to_add_new): ditto
	(gal_a11y_e_table_click_to_add_new): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-table-item-factory.c
	(gal_a11y_e_table_item_factory_create_accessible): return NULL if
	fails
	(gal_a11y_e_table_item_factory_create_accessible): added cast
	(gal_a11y_e_table_item_factory_create_accessible): removed unused
	variable

	* gal/a11y/e-table/gal-a11y-e-table-item.c (eti_dispose): removed
	unused variable
	(eti_get_parent): ditto
	(eti_get_n_children): ditto
	(eti_ref_child): ditto
	(eti_get_index_in_parent): ditto
	(eti_ref_accessible_at_point): return value (NULL)
	(cell_destroyed): removed unused variable
	(cell_destroyed): ditto
	(table_add_row_selection): ditto
	added #inclued <string.h> for memset, memmove
	(eti_rows_inserted): removed unused variable
	(eti_rows_deleted): ditto
	(eti_header_structure_changed): ditto

	* gal/a11y/e-table/gal-a11y-e-cell-popup.c
	(gal_a11y_e_cell_popup_class_init): removed unused variable
	added #include "gal-a11y-e-cell-registry.h"
	(popup_cell_action): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-toggle.c (toggle_cell_action):
	removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-tree.c: added #include
	"gal-a11y-e-cell-registry.h"
	(gal_a11y_e_cell_tree_new): add cast
	(gal_a11y_e_cell_tree_new): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-text.c: added #include
	<string.h>
	(ect_remove_selection): removed unused variable
	(ect_copy_text): added cast
	(ect_delete_text): ditto
	(ect_paste_text): ditto
	(ect_init): ditto

	* gal/a11y/e-table/gal-a11y-e-cell.c (eti_grab_focus): added cast
	(eti_grab_focus): ditto
	(eti_grab_focus): return TRUE (grab was successful)
	added #include <atk/atkstateset.h>

	* gal/a11y/e-table/gal-a11y-e-tree.c: added #include
	"gal-a11y-e-table-item.h"
	(gal_a11y_e_tree_new): removed unused variable

	* gal/e-text/e-text.c (_do_tooltip): removed unused variable
	(e_text_event): added cast
	(primary_clear_cb): removed unused variable
	(_get_position): ditto
	(_get_position): ditto
	#if 0'ed unused prototypes

	* gal/e-text/e-text-model.c (e_text_model_real_insert_length):
	removed unused variables

	* gal/e-text/e-completion.c (e_completion_sort): #if'0 ed, as it's
	not used anywhere

	* gal/widgets/e-reflow.c (items_inserted): remove unused variables

	* gal/widgets/e-categories.c (e_categories_get_property): remove
	unused variable

	* gal/widgets/e-categories-master-list-dialog.c
	(dialog_destroyed): added cast

	* gal/widgets/e-categories-master-list-combo.c
	(ecmlc_ecml_changed): remove unused variable

	* gal/widgets/color-palette.c: include string.h for memset
	prototype

svn path=/trunk/; revision=26289
2004-06-10 17:01:14 +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
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
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
87b3e9277f Patch to fix few 64bit issues
Tue Aug 28 18:29:28 2001  George Lebl <jirka@5z.com>

	Patch to fix few 64bit issues

	* gal/e-table/e-table-header-item.c (ethi_draw) (ethi_start_drag)
	  gal/widgets/e-categories.c (e_categories_value_at)
	  (e_categories_value_to_string):
	  Use GINT_TO_POINTER and GPOINTER_TO_INT to cast between pointers
	  and ints to fix 64bit issues connected with that.

	* gal/e-table/e-table-sorting-utils.c
	  (e_table_sorting_utils_tree_check_position)
	  gal/util/e-sorter-array.c (e_sorter_array_append):
	  Use size_t for size not ints to fix crashes

	* gal/e-text/e-completion-match.c, gal/e-text/e-completion.c:
	  Include <string.h>

svn path=/trunk/; revision=12507
2001-08-29 01:30:26 +00:00
fd7cce6091 Added "hit_count" to ECompletionMatch. Used by search
2001-08-16  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-completion-match.h: Added "hit_count" to
        ECompletionMatch.  Used by search refinement/unrefinement.

	* gal/e-text/e-completion.c (e_completion_refine_search): Added.
	Handle automatic search refinements.
	(e_completion_unrefine_search): Added.  Handle automatic search
	"unrefinements", or reversions.
	(e_completion_begin_search): Check if the refinement or
	unrefinement operations can be used to handle the search.  Emit
	"request_search" at the end of the call.
	(e_completion_class_init): Added a new signal "request_search".
	"begin_search" is now purely informational, telling views that a
	series of matches and an "end_search" are forthcoming.

	* configure.in: Increment version of 0.10.99.3.

svn path=/trunk/; revision=12116
2001-08-16 19:47:57 +00:00
0c1a805875 bumped up to 0.10.99.3
2001-08-09  jacob berkman  <jacob@ximian.com>

	* configure.in: bumped up to 0.10.99.3

	* gal/e-text/e-completion-view.c (e_completion_view_init): init
	matches array
	(e_completion_view_destroy): free matches array
	(e_completion_view_disconnect): disconnect from the clear and
	lost_match signals
	(e_completion_view_clear_choices): fixup for ptr array
	(e_completion_view_set_cursor_row): ditto
	(e_completion_view_select): ditto
	(e_completion_view_key_press_handler): ditto
	(clear_completion_cb): handle the clear signal
	(lost_completion_cb): remove a row from the model
	(table_row_count): fixup for ptr array
	(table_value_at): ditto
	(e_completion_view_construct): connect to clear and lost
	completion signals
	(e_completion_view_set_width): ptr array fixup again

	* gal/e-text/e-completion.c (e_completion_class_init): add new
	clean / lost completion signals
	(e_completion_init): initialize the matches array
	(e_completion_destroy): free the matches array
	(e_completion_add_match): fixup for matches being a GPtrArray
	(e_completion_clear_matches): ditto
	(e_completion_clear): new function to clear the list of matches
	(e_completion_foreach_match): fixup for ptrarray
	(e_completion_restart): ditto
	(e_completion_found_match): if we are at the limit return first,
	rather than adding and then unreffing.  there very well could be
	some weird crashes this caused but it is kind of unlikely.
	(e_completion_lost_match): new function to forget about a match
	(e_completion_end_search): add a comment on why this is broken

	* gal/e-text/e-entry.c (e_entry_text_keypress): only start a
	delayed completion if our completion timeout is >= 0.  this
	provides a way for the completion starting / stopping to be
	controlled by something other than the EEntry (ie, file-sel)

svn path=/trunk/; revision=11843
2001-08-09 21:16:13 +00:00
04aed95972 Turned off alternating row colors in our ETable specification.
2001-06-08  Jon Trowbridge  <trow@ximian.com>

        * gal/e-text/e-completion-view.c: Turned off alternating row
        colors in our ETable specification.

        * gal/e-text/e-completion-match.c (e_completion_match_compare_alpha):
        Fix the sort routine to properly use the major & minor keys for
        sorting grouped elements with the same match text.  I had this all
        wrong.

svn path=/trunk/; revision=10159
2001-06-08 18:31:27 +00:00
f90d524db3 Oops. Forgot to remove some debugging code before committing.
svn path=/trunk/; revision=10119
2001-06-05 17:48:07 +00:00
dc04c9c3fa Small changes throughout to use ECompletionMatch.
2001-06-05  Jon Trowbridge  <trow@gnu.org>

	* gal/e-text/e-entry.c: Small changes throughout to use
	ECompletionMatch.

	* gal/e-text/e-completion-view.c: Small changes throughout
	to use ECompletionMatch.

	* gal/e-text/e-completion.c: Small changes throughout to use
	ECompletionMatch.

	* gal/e-text/e-completion-match.h:
	* gal/e-text/e-completion-match.c: Added.  A struct to contain
	completion matches.  This lets us more easily pass around
	information between the various bits of completion machinery.

svn path=/trunk/; revision=10118
2001-06-05 17:46:56 +00:00
7b003b963e Comment out text after #endif. Add #include <string.h> for strcmp().
2001-03-16  Kjartan Maraas  <kmaraas@gnome.org>

	* gal/widgets/widget-pixmap-combo.h: Comment out text after #endif.
	* gal/e-text/e-completion.c: Add #include <string.h> for strcmp().

svn path=/trunk/; revision=8758
2001-03-16 13:30:13 +00:00
fae87e8d3d Boost version number to 0.5.99.3.
2001-03-01  Jon Trowbridge  <trow@ximian.com>

        * configure.in: Boost version number to 0.5.99.3.

        * gal/e-text/e-entry.c (e_entry_show_popup): Grab pointer when the
        popup is visible, and then hide the popup if any button press
        events occur outside of the popup.  This lets up avoid most of the
        worst "floating popup" cases that would occur if windows are
        moved, desktops changed, etc. with the mouse.  (Doing things like
        changing desktop w/ keybindings can still cause a "floating
        popup", but that is also true of Gtk's own combo box.)  Change
        popup positioning to slightly offset it from the entry, rather
        than just plopping it down directly below.
        (button_press_cb): Determine if a button press occured outside of
        the popup when the pointer was grabbed, and unbrowse accordingly.

        * gal/e-text/e-completion-view.c
        (e_completion_view_key_press_handler): Improve keystroke handling.
        Allow Tabs to pass through (after hiding the pop-up) in order to
        allow focus change requests to work properly.
        (e_completion_view_construct): Disable horizontal scrollbars.

        * gal/e-text/e-completion-test.c (main): Reworked to use signals
        instead of explicit callbacks.

        * gal/e-text/e-completion.h:
        * gal/e-text/e-completion.c: Fix the awkward mix of signals and
        explicitly-specified callbacks by taking out the explicit
        callbacks.  This approach is more gtk-ish, after all.

svn path=/trunk/; revision=8458
2001-03-01 20:59:42 +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