aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text/e-completion-view.c
Commit message (Collapse)AuthorAgeFilesLines
* add E_OBJECT_CLASS_ADD_SIGNALS and E_OBJECT_CLASS_TYPE to ease migrationMichael Meeks2001-10-051-7/+7
| | | | | | | | | | | | | | | 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
* Allow ctrl-p and ctrl-n to be used to move up and down in the completionJon Trowbridge2001-09-271-3/+28
| | | | | | | | | | | | | 2001-09-26 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-completion-view.c (e_completion_view_key_press_handler): Allow ctrl-p and ctrl-n to be used to move up and down in the completion list. (Bug #10500) * gal/e-text/e-completion-match.c (e_completion_match_set_text): Properly validate the utf8. svn path=/trunk/; revision=13159
* Bumped version number to 0.11.99.4.Christopher James Lahey2001-09-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-16 Christopher James Lahey <clahey@ximian.com> * configure.in: Bumped version number to 0.11.99.4. * gal/e-text/e-completion-view.c (e_completion_view_construct), tests/test-table-1.c (create_table): Changed the parameters to e_table_simple_new here to adjust to changes in the interface. * gal/widgets/e-categories-master-list-array.c (ecmla_default): Fixed a memory leak here. * gal/widgets/e-categories.c (e_categories_get_save_id): Added get_save_id here so that selection would be maintained across changes. From gal/e-table/ChangeLog: 2001-09-16 Christopher James Lahey <clahey@ximian.com> * e-table-model.c, e-table-model.h (e_table_model_class_init): Rearranged order of has_save_id and get_save_id to be more consistent with ETree. * e-table-selection-model.c, e-table-selection-model.h: Turned on the code to maintain selection and cursor across changes if the model supports get_save_id. * e-table-simple.c, e-table-simple.h: Changed this interface to take all of the ETableModel functions in the _new function. * e-table-subset.c (etss_has_save_id, etss_get_save_id): Added these to properly proxy the save_id functionality. * e-tree-memory-callbacks.c, e-tree-memory-callbacks.h, e-tree-model.c, e-tree-model.h, e-tree-sorted.c: Made the save_id parameter to get_node_by_id be const char * instead of char *. * e-tree-table-adapter.c (etta_class_init): Rearranged some assignments here to be more consistent. svn path=/trunk/; revision=12869
* Unref the model after creating the ETable, since the table will hold a refDan Winship2001-09-131-0/+1
| | | | | | | | | | | * gal/e-text/e-completion-view.c (e_completion_view_construct): Unref the model after creating the ETable, since the table will hold a ref on it until we destroy it when we're destroyed. * gal/e-text/e-entry.c (e_entry_destroy): Unref the popup window rather than destroying it. svn path=/trunk/; revision=12798
* bumped up to 0.10.99.3jacob berkman2001-08-101-24/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Removed some debugging spew I committed by mistake.Jon Trowbridge2001-07-211-4/+1
| | | | | | | | | 2001-07-20 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-completion-view.c (e_completion_view_set_width): Removed some debugging spew I committed by mistake. svn path=/trunk/; revision=11293
* Change window policy to allow the completion window to shrink when theJon Trowbridge2001-07-211-10/+8
| | | | | | | | | | | | | 2001-07-20 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-entry.c (e_entry_enable_completion_full): Change window policy to allow the completion window to shrink when the number of options decreases. * gal/e-text/e-completion-view.c (e_completion_view_construct): Removed some obsolete code. svn path=/trunk/; revision=11292
* Removed unused frame variable.Christopher James Lahey2001-06-091-2/+0
| | | | | | | | | 2001-06-09 Christopher James Lahey <clahey@ximian.com> * gal/e-text/e-completion-view.c (e_completion_view_construct): Removed unused frame variable. svn path=/trunk/; revision=10174
* Turned off alternating row colors in our ETable specification.Jon Trowbridge2001-06-091-1/+1
| | | | | | | | | | | | | | 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
* we can ignore the border, as e-text takes care of that for usjacob berkman2001-06-071-2/+2
| | | | | | | | | | | | | | 2001-06-07 jacob berkman <jacob@ximian.com> * gal/e-text/e-entry.c (canvas_size_allocate): we can ignore the border, as e-text takes care of that for us (canvas_size_request): correctly handle when borders should be drawn * gal/e-text/e-completion-view.c (e_completion_view_paint): fix a small bug in the drawing-2-pixel-border change to my patch svn path=/trunk/; revision=10149
* Applied patch from Jacob Berkman to un-offset the completion popup and addJon Trowbridge2001-06-071-2/+138
| | | | | | | | | | | | 2001-06-06 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-entry.c: * gal/e-text/e-completion-view.c: Applied patch from Jacob Berkman to un-offset the completion popup and add a border around it. I tweaked it slightly to make the border two pixels thick instead of one. (Which I like, but might annoy everyone else. We'll see.) svn path=/trunk/; revision=10133
* Small changes throughout to use ECompletionMatch.Jon Trowbridge2001-06-061-13/+14
| | | | | | | | | | | | | | | | | | | | 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
* Limit total matches, for better performance on slow machines. It isJon Trowbridge2001-04-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-20 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-completion-test.c: Limit total matches, for better performance on slow machines. It is supposed to be a test, so correctness of the completion operations isn't really a priority... * gal/e-text/e-completion-view.c (e_completion_view_construct): Set GTK_CAN_FOCUS flag. * gal/e-text/e-entry.c (e_entry_show_popup): Evil! Evil! Unclean! Unclean! Manually check if the pointer is in the area where the popup is going to appear, and if it is, warp the pointer out of the way. After days of fucking around, this horrible hack is the only way that I've been able to figure out to keep the focus from being taken away from the entry and ending up somewhere strange when the popup pops up. (The main problem is with the case of focus-follows-cursor --- click-to-focus works fine. Sawfish idiocincracies may also be causing problems, but I don't want to unjustly accuse the WM of anything, as tempting and appealing as that can be.) (key_press_cb): Proxy for forwarding the popup's key press events to the entry. (key_release_cb): Proxy for forwarding the popup's key release events to the entry. These proxies should be enough to take care of my focus problems. Unfortunately, they aren't, and the pointer-warping-focus-horror is required for reasons that I don't fully understand. * gal/e-text/e-text.c (_get_xy_from_position): Made _get_xy_from_position return a boolean. It returns TRUE if the computation was successful (and if valid data is now in *xp and *yp), FALSE otherwise. Make sure that text->lines is not NULL, and return FALSE if it is. (_get_position): Test that _get_xy_from_position returns TRUE before using the values in x and y. (_get_position): Test that _get_xy_from_position returns TRUE before using the values in x and y. Garbage values being returned in passed-in pointers created a race condition where you could hang an EText if you deleted the entire contents of the buffer really quickly. svn path=/trunk/; revision=9468
* Boost version number to 0.5.99.3.Jon Trowbridge2001-03-021-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Changed e_table_selection_model_clear to e_selection_model_clear.Christopher James Lahey2001-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-27 Christopher James Lahey <clahey@ximian.com> * gal/e-text/e-completion-view.c: Changed e_table_selection_model_clear to e_selection_model_clear. * tests/test-tree-3.c: Changed E_TABLE_CURSOR_LINE to E_CURSOR_LINE. From gal/e-table/ChangeLog: 2001-02-27 Christopher James Lahey <clahey@ximian.com> * e-table-click-to-add.c, e-table-group-container.c, e-table-group-container.h, e-table-group-leaf.c, e-table-group-leaf.h, e-table-item.c, e-table-item.h, e-table-specification.c, e-table-specification.h, e-table.c, e-table.h: Changed a lot of the ETableSelectionModels to ESelectionModels, a lot of the ETableSorters to ESorters, all the ETableCursorModes to ECursorModes, and all of the ETableForeachFuncs into EForeachFuncs. * e-table-defines.h: Moved ETableForeachFunc and ETableCursorMode to e-selection-model.h. * e-table-selection-model.c, e-table-selection-model.h: Made this a subclass of ESelectionModel which simple connects to an ETableModel. * e-table-sorter.c, e-table-sorter.h: Made this a subclass of ESorter so that implements the same semantics it used to. svn path=/trunk/; revision=8422
* Fixed. (e_entry_select_region): Fixed. (e_entry_show_popup): Grab/ungrabJon Trowbridge2001-02-241-2/+7
| | | | | | | | | | | | | | | | | | | 2001-02-23 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-entry.c (e_entry_set_position): Fixed. (e_entry_select_region): Fixed. (e_entry_show_popup): Grab/ungrab the pointer and keyboard when the popup appears/disappears. This (mostly) solves the "floating popup" problem. (button_press_cb): Added. We catch button presses outside of the popup, and hide the popup when they occur. * gal/e-text/e-completion-view.c (e_completion_view_get_type, e_completion_view_class_init): Changed base class to GtkEventBox. (e_completion_view_key_press_handler): Make Escape always cause an unbrowse, even wehen we are editting. svn path=/trunk/; revision=8369
* Forgot to add. Doh!Jon Trowbridge2001-02-201-0/+687
svn path=/trunk/; revision=8281