diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 389 | ||||
-rw-r--r-- | widgets/table/ChangeLog | 6 | ||||
-rw-r--r-- | widgets/table/e-table-example-1.c | 308 |
3 files changed, 132 insertions, 571 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index e90f9b7375..0199f9cad3 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,142 +1,35 @@ -2006-05-26 Jeffrey Stedfast <fejj@novell.com> - - Fix for Novell bug #178631 - - * e-attachment-bar.c: Changed the EAttachmentBarPrivate struct, we - no longer use a linked list, instead we use a GPtrArray - faster, - simpler (plus all the code used indexes anyway, so it was really - bizarre). - (free_attachment_list): Removed. - (attachment_destroy): New GWeakNotify callback for when an - EAttachment object gets destroyed. Remove the attachment from the - attachments array. - (add_common): Updated to add to an array rather than a linked - list. Also weak_ref the attachment object. - (remove_attachment): Removed. - (update): Updated to use the array instead of linked list of - attachments. - (e_attachment_bar_remove_selected): Same. - (e_attachment_bar_set_width): Same. - (e_attachment_bar_edit_selected): Same. - (e_attachment_bar_get_selected): Same. - (e_attachment_bar_get_attachment): Same. - (e_attachment_bar_get_all_attachments): Same and also optimised - since we can cheat now without having to g_slist_reverse. - (e_attachment_bar_get_parts): Same. - (destroy): Same. - (eab_drag_data_get): Same. - (init): Init attachments to a g_ptr_array_new - (e_attachment_bar_to_multipart): Updated to use the attachments - array. - (e_attachment_bar_get_num_attachments): Updated to return the - attachments->len. - (e_attachment_bar_get_download_count): Updated to use the array. - - * e-attachment.c (finalise): Close the editor dialog if it is - open. - (async_progress_update_cb): If the phase is COMPLETE but the - file_size is 0, then treat it as an error. In the error case, - unref the attachment object (this will magically remove it from - the EAttachmentBar). - (close_cb): Don't unref the attachment object here anymore. - (e_attachment_edit): Don't ref the EAttachment anymore. - -2006-05-25 Srinivasa Ragavan <sragavan@novell.com> - - * e-attachment-bar.c (update, eab_icon_clicked_cb), - (e_attachment_bar_attach_remote_file): - - * e-attachment-bar.h: - - * e-attachment.c (e_attachment_new_remote_file), - (e_attachment_build_remote_file): Added code to specify the - attachment type for remote files. Also added code to save files - to CamelStreamVfs - -2006-05-04 Rajeev Ramanathan <rajeevramanathan_2004@yahoo.co.in> - - * e-calendar-item.c (e_calendar_item_draw), - (e_calendar_item_draw_month, e_calendar_item_draw_day_numbers), - (layout_set_day_text): enable build without cairo using - ENABLE_CAIRO macro. Also it fixes a bold issue, where entire - evolution appears with bold text. - -2006-04-27 Boby Wang <boby.wang@sun.com> - - ** Fixes bug #339138 - - * e-calendar.c (e_calendar_init): Correct the button's accessible - name. - -2006-04-27 Boby Wang <boby.wang@sun.com> - - ** Fixes bug #332821 - - * e-expander.c (e_expander_class_init): Implement the - accessibility of EExpander. - -2006-04-26 Srinivasa Ragavan <sragavan@novell.com> - - * e-search-bar.c (append_xml_menu_item, setup_bonobo_menus): Added - icons to search menu. - -2006-04-26 Srinivasa Ragavan <sragavan@novell.com> - - * e-search-bar.c (add_button, e_search_bar_construct): Adding - icons for find and clear buttons. (Patch from PR Suman) - -2006-04-26 Srinivasa Ragavan <sragavan@novell.com> - - ** Patch from charu_jayaprakasam@yahoo.com fixes bug #335861 - - * e-search-bar.c (e_search_bar_construct): Change the mnemonics - for Find Now button. - -2006-04-24 Srinivasa Ragavan <sragavan@novell.com> - - * e-calendar-item.c (e_calendar_item_draw), - (e_calendar_item_draw_month, e_calendar_item_draw_day_numbers): - Used Cairo to draw the Tag Calendar. (Rajeev) - -2006-04-22 Srinivasa Ragavan <sragavan@novell.com> - - * e-attachment-bar.c (e_attachment_bar_create_attachment_cache): - Added a new function that creates a attachment with a image cache. - 2006-03-28 Li Yuan <li.yuan@sun.com> **Fixes bug #335618 - - * e-selection-model-array.c (e_selection_model_array_delete_rows): - If the row being deleted is the last one, we should change the + * e-selection-model-array.c: (e_selection_model_array_delete_rows): + If the row being deleted is the last one, we should change the selection_start_row. 2006-03-06 Simon Zheng <simon.zheng@sun.com> Fixes bug #332140 - - * e-attachment-bar.c (temp_save_part): Changed to transfer - filenames from utf-8 to glib encoding before really saving files. + * e-attachment-bar.c: (temp_save_part): + Changed to transfer filenames from utf-8 to glib encoding + before really saving files. 2006-03-06 Jeff Cai <jeff.cai@sun.com> ** Fixes for 333235 - - * e-combo-button.c (paint): If width of a widget is 0, don't draw - it. + * e-combo-button.c: (paint): If width of a widget is 0, + don't draw it. 2006-02-28 Devashish Sharma <sdevashish@novell.com> - * e-reflow.c (do_adjustment): Check and see if reflow->items and - reflow->items[row] are NULL or not. Fixes Bug # 331998. - + * e-reflow.c :(do_adjustment): Check and see if reflow->items + and reflow->items[row] are NULL or not. + Fixes Bug # 331998. Patch submitted by Irene Huang <Irene.Huang@sun.com> 2006-02-24 Srinivasa Ragavan <sragavan@novell.com> ** Fixes bug #322789 - - * e-image-chooser.c (set_image_from_data): Added code to get the + + * e-image-chooser.c: (set_image_from_data): Added code to get the pixbuf after closing the loaded. 2006-02-13 Andre Klapper <a9016009@gmx.de> @@ -155,16 +48,16 @@ 2006-01-16 Nancy Cai <nancy.cai@sun.com> ** Fixes bug #326649 - - * e-multi-config-dialog.c (set_page_timeout_callback): make the - preferences dialog's keyboard navigation more consistent. + + * e-multi-config-dialog.c: (set_page_timeout_callback): + make the preferences dialog's keyboard navigation more consistent. 2006-01-13 Srinivasa Ragavan <sragavan@novell.com> ** Fixes bug #326265 - * e-charset-picker.c (e_charset_picker_bonobo_ui_populate): Added - mnemonics to "Character Encoding" menu. + * e-charset-picker.c: (e_charset_picker_bonobo_ui_populate): + Added mnemonics to "Character Encoding" menu. 2006-01-11 Chenthill Palanisamy <pchenthill@novell.com> @@ -188,29 +81,29 @@ *e-util-marshal.list: removed 2006-01-06 Parthasarathi Susarla <sparthasarathi@novell.com> - - * e-search-bar.c (clear_verb_cb): assign the data first before - accessing it. + + * e-search-bar.c:(clear_verb_cb): assign the data first + before accessing it. 2006-01-02 Harish Krishnaswamy <kharish@novell.com> reviewed by: Srinivasa Ragavan <sragavan@novell.com> - * e-canvas-background.c (ecb_style_set): Set the foreground only - if the widget has already been realized. Fixes #309618. + * e-canvas-background.c: (ecb_style_set): Set the + foreground only if the widget has already been realized. + Fixes #309618. 2005-12-21 Srinivasa Ragavan <sragavan@novell.com> ** Fixes bug #324590 - * e-search-bar.c (search_now_verb_cb, clear_verb_cb): Added code - to clear search entry from menu. + * e-search-bar.c: (search_now_verb_cb), (clear_verb_cb): Added + code to clear search entry from menu. 2005-12-20 Johnny Jacob <johnnyjacob@gmail.com> ** See Bug #246233 - - * e-filter-bar.c (member_activated): Changed "Search Editor" to + * e-filter-bar.c: (member_activated) : Changed "Search Editor" to "Searches" 2005-12-18 Tor Lillqvist <tml@novell.com> @@ -232,46 +125,44 @@ 2005-12-15 Srinivasa Ragavan <sragavan@novell.com> - * e-filter-bar.c (rule_advanced_response, option_changed) - (set_property): Added code to Show color in search widget. * - - * e-search-bar.c (entry_activated_cb), - (activate_button_clicked_cb, clear_button_clicked_cb): Added code - to show color in search widget, when the filter is active. + * e-filter-bar.c: (rule_advanced_response), (option_changed), + (set_property): Added code to Show color in search widget. + * e-search-bar.c: (entry_activated_cb), + (activate_button_clicked_cb), (clear_button_clicked_cb): Added + code to show color in search widget, when the filter is active. 2005-11-24 Tor Lillqvist <tml@novell.com> - * e-dateedit.c: + * e-dateedit.c * e-cell-date-edit.c: Include e-time-utils.h from libedataserver instead of using evolution's copy which is going away. 2005-11-23 Johnny Jacob <johnnyjacob@gmail.com> - * e-dateedit.c (on_date_entry_focus_out, on_time_entry_focus_out): + * e-dateedit.c: (on_date_entry_focus_out) (on_time_entry_focus_out) : Validation for date and time during focus out event. 2005-11-22 Johnny Jacob <johnnyjacob@gmail.com> ** See Bug #303856 - - * e-dateedit.c (create_children): Added a signal handler for - date_entry's "key_release_event". + * e-dateedit.c: (create_children) : Added a signal handler + for date_entry's "key_release_event". 2005-11-17 Harish Krishnaswamy <kharish@novell.com> - * e-attachment-bar.c (update, e_attachment_bar_set_width): Fix a - division-by-zero error crasher. + * e-attachment-bar.c: (update), (e_attachment_bar_set_width): + Fix a division-by-zero error crasher. 2005-11-15 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment-bar.c (e_attachment_bar_get_all_attachments): Added + * e-attachment-bar.[ch] (e_attachment_bar_get_all_attachments): Added a function to get all attachments of the attachment bar for plugin purposes. 2005-11-14 Chenthill Palanisamy <pchenthill@novell.com> - * e-dateedit.c (create_children): Adjusted the size for the - dateedit widgets. + * e-dateedit.c: (create_children): Adjusted the size + for the dateedit widgets. 2005-11-14 Srinivasa Ragavan <sragavan@novell.com> @@ -285,8 +176,8 @@ 2005-09-28 Tor Lillqvist <tml@novell.com> - * e-charset-picker.c (e_charset_picker_new) - (e_charset_picker_bonobo_ui_populate): Use g_ascii_strcasecmp() + * e-charset-picker.c (e_charset_picker_new, + e_charset_picker_bonobo_ui_populate): Use g_ascii_strcasecmp() instead of strcasecmp(). We are comparing to strings known to be plain ASCII, so just casefolding ASCII is enough. Also better for portability. @@ -323,31 +214,29 @@ 2005-08-17 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment-bar.c (eab_drag_data_get): Use camel_url to - construct url - (eab_icon_clicked_cb, e_attachment_bar_new): Fixed part of bug - #312224. It handles double click on a attachment icon and calls - gnome_url_show. + * e-attachment-bar.c + eab_drag_data_get: Use camel_url to construct url + (eab_icon_clicked_cb) (e_attachment_bar_new): + Fixed part of bug #312224. It handles double click on a attachment + icon and calls gnome_url_show. - * e-attachment.c (finalise, init): Add a new member to preserve + * e-attachment.[ch] (finalise) (init): Add a new member to preserve the stored location - (e_attachment_new)(e_attachment_build_remote_file): Camel_url to + (e_attachment_new)(e_attachment_build_remote_file): Camel_url to construct urls 2005-08-16 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment.c (download_to_local_path, e_attachment_edit): - Fixed few warnings + * e-attachment.c (download_to_local_path) (e_attachment_edit): Fixed + few warnings 2005-08-16 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment.c (finalise, e_attachment_new) - (e_attachment_build_remote_file, e_attachment_new_from_mime_part) - (ok_cb): Maintain the filename of the attachment in the structure - and free it in finalize. - - * e-attachment-bar.c (update): For display consider the filename - from the structure before from the part. + * e-attachment.c (finalise) (e_attachment_new) (e_attachment_build_remote_file) + (e_attachment_new_from_mime_part) (ok_cb): Maintain the filename of the + attachment in the structure and free it in finalize. + * e-attachment-bar.c (update): For display consider the filename from the + structure before from the part. 2005-08-03 Not Zed <NotZed@Ximian.com> @@ -356,69 +245,59 @@ 2005-08-11 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment-bar.c (e_attachment_bar_refresh): Added a function + * e-attachment-bar.[ch] (e_attachment_bar_refresh): Added a function to force refresh/resize the icons. 2005-08-02 David Malcolm <dmalcolm@redhat.com> - * e-attachment-bar.c (update_remote_file): escape the "%" - character correctly. + * e-attachment-bar.c: (update_remote_file): escape the "%" character + correctly. 2005-07-29 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment.c (e_attachment_new_from_mime_part): used ref - instead of copying the entire mime part. + * e-attachment.c: (e_attachment_new_from_mime_part) used ref instead of + copying the entire mime part. 2005-07-15 Diego Gonzalez <diego@pemas.net> - * e-image-chooser.c (image_drag_data_received_cb): modificatio to + * e-image-chooser.c(image_drag_data_received_cb): modificatio to avoid getting into an infinite loop. Also remove some debug output. (set_image_from_data): substitute calls to gdk_pixbuf_unref and gdk_pixbuf_ref and use g_object_ref/unref instead. The first ones - are deprecated API. Fixes #310488 + are deprecated API. + Fixes #310488 2005-07-25 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment-bar.c (e_attachment_bar_remove_selected) - (e_attachment_bar_edit_selected) - (e_attachment_bar_get_attachment, e_attachment_bar_get_parts) - (e_attachment_bar_get_download_count) - (e_attachment_bar_attach_remote_file): Added checks for the - parameters. + * e-attachment-bar,c: (e_attachment_bar_remove_selected) (e_attachment_bar_edit_selected) + (e_attachment_bar_get_attachment) (e_attachment_bar_get_parts) + (e_attachment_bar_get_download_count) (e_attachment_bar_attach_remote_file): Added + checks for the parameters. 2005-07-20 Vivek Jain <jvivek@novell.com> - - * e-send-options.h: ESendOptionsDialogClass: has a member new - virtual method for default callback of "sod_response" - - * e-send-options.c: introduced a new signal "sod_response" - captures the response for the child dialog and makes it available - at the object level (useful for the external members invoking the - dialog) + + * e-send-options.h : ESendOptionsDialogClass: has a member new virtual + method for default callback of "sod_response" + * e-send-options.c : introduced a new signal "sod_response" + captures the response for the child dialog and makes it available at the + object level (useful for the external members invoking the dialog) 2005-07-20 Srinivasa Ragavan <sragavan@novell.com> - * e-attachment-bar.c (remove_attachment, update) - (e_attachment_bar_get_selector, e_attachment_bar_get_attachment) - (destroy, init, e_attachment_bar_new) - (e_attachment_bar_add_attachment) - (e_attachment_bar_attach_remote_file): Cleaned up most of - it. Added the DnD. - - * e-attachment.c (real_changed, class_init, init) - (e_attachment_new, e_attachment_new_remote_file) - (e_attachment_build_remote_file): Moved the remote download code - from bar to here and few cleanups. + * e-attachment-bar.[ch]:(remove_attachment) (update) (e_attachment_bar_get_selector) + (e_attachment_bar_get_attachment) (destroy) (init) (e_attachment_bar_new) + (e_attachment_bar_add_attachment) (e_attachment_bar_attach_remote_file) + Cleaned up most of it. Added the DnD. + * e-attachment.[ch]: (real_changed) (class_init) (init) (e_attachment_new) + (e_attachment_new_remote_file) (e_attachment_build_remote_file): Moved the + remote download code from bar to here and few cleanups. 2005-07-11 Srinivasa Ragavan <sragavan@novell.com> - * Makefile.am: Added e-attachment-bar.[ch], e-attachment.[ch], - and e-attachment.glade. - - * e-attachment.[ch]: Merge of em-attachment.[ch] and - cal-attachment.[ch] - + * Makefile.am: Added e-attachment-bar.[ch] e-attachment.[ch] + e-attachment.glade. + * e-attachment.[ch]: Merge of em-attachment.[ch] and cal-attachment.[ch] * e-attachment-bar.[ch]: Merge of em-attachment-bar.[ch] and cal-attachment-bar.[ch]. @@ -430,8 +309,8 @@ 2005-05-31 Li Yuan <li.yuan@sun.com> - * e-dateedit.c (e_date_edit_update_date_entry): add relation to - date_button. + * e-dateedit.c:(e_date_edit_update_date_entry): + add relation to date_button. Fixes #302267 @@ -446,11 +325,11 @@ 2005-05-12 Shreyas Srinivasan <sshreyas@novell.com> - * e-send-options.c: Fixed #272005 - + * e-send-options.c : Fixed #272005 + 2005-05-06 Sarfraaz Ahmed <asarfraaz@novell.com> - * e-send-options.glade: Fixed a typo. #273095 + * e-send-options.glade : Fixed a typo. #273095 2005-05-06 Harish Krishnaswamy <kharish@novell.com> @@ -472,7 +351,8 @@ 2005-02-02 Li Yuan <li.yuan@sun.com> - * e-url-entry.c (init): add a11y name to url link button. + * e-url-entry.c: (init): + add a11y name to url link button. 2005-01-26 Rodney Dawes <dobey@novell.com> @@ -486,7 +366,8 @@ 2005-01-24 Mengjie Yu <meng-jie.yu@sun.com> - * e-search-bar.c (set_option): add a11y name for the option menu. + * e-search-bar.c: (set_option): + add a11y name for the option menu. 2005-01-20 Not Zed <NotZed@Ximian.com> @@ -499,49 +380,47 @@ 2005-01-20 Harry Lu <harry.lu@sun.com> - * e-search-bar.c (activate_by_subitems): add a translater note. + * e-search-bar.c: (activate_by_subitems): add a translater note. 2005-01-19 Harry Lu <harry.lu@sun.com> Fix for 46359, enable "Alt+Down Arrow" to show the popup for e-combo-cell-editable.c. - * e-combo-cell-editable.c (show_popup): rewrite it to a more + * e-combo-cell-editable.c: (show_popup): rewrite it to a more generic function. (button_clicked_cb): call the new show_popup function. (entry_key_press_event_cb): show popup if "Alt+Down Arrow". (ecce_grab_focus): new function. - (ecce_class_init): add grab_focus handler so that the entry can - get focus. + (ecce_class_init): add grab_focus handler so that the entry + can get focus. 2005-01-17 Harry Lu <harry.lu@sun.com> Fix for 62831. - * e-search-bar.c (activate_by_subitems): add an a11y name for the - search entry. + * e-search-bar.c: (activate_by_subitems): add an a11y name for + the search entry. 2005-01-12 Chenthill Palanisamy <pchenthill@novell.com> - * e-send-options.c (e_send_options_get_widgets_data), - (e_send_options_fill_widgets_with_data): Get the value for the - autodelete toggle button - (page_changed_cb): Do not hide the classification label and its - combo box here. + * e-send-options.c: (e_send_options_get_widgets_data), + (e_send_options_fill_widgets_with_data): Get the value + for the autodelete toggle button + (page_changed_cb): Do not hide the classification label + and its combo box here. 2005-01-10 Chenthill Palanisamy <pchenthill@novell.com> - * e-send-options.c (e_send_options_get_widgets_data), - (e_send_options_fill_widgets_with_data, page_changed_cb), - (init_widgets, get_widgets, setup_widgets), - (e_sendoptions_set_global, e_sendoptions_dialog_run), - (e_sendoptions_dialog_finalize, e_sendoptions_dialog_dispose), - (e_sendoptions_dialog_init, e_sendoptions_dialog_class_init), - (e_sendoptions_dialog_get_type): Added code to support global - options. Filled the finalize and dispose functions. - + * e-send-options.c: (e_send_options_get_widgets_data), + (e_send_options_fill_widgets_with_data), (page_changed_cb), + (init_widgets), (get_widgets), (setup_widgets), + (e_sendoptions_set_global), (e_sendoptions_dialog_run), + (e_sendoptions_dialog_finalize), (e_sendoptions_dialog_dispose), + (e_sendoptions_dialog_init), (e_sendoptions_dialog_class_init), + (e_sendoptions_dialog_get_type): Added code to support global options. + Filled the finalize and dispose functions. * e-send-options.glade: Changed a label id. - * e-send-options.h: Added the set_global function. 2005-01-06 JP Rosevear <jpr@novell.com> @@ -556,22 +435,18 @@ 2005-01-06 Chenthill Palanisamy <pchenthill@novell.com> merging send options - * Makefile.am: - * e-send-options.[ch]: Widgets for the send options dialog - * e-send-options.glade: Contains interface for the dialog 2005-01-04 Harry Lu <harry.lu@sun.com> - * misc/e-combo-button.c (e_combo_button_popup): new internal - function to popup the menu. + * misc/e-combo-button.c: (e_combo_button_popup): new internal function + to popup the menu. (impl_button_press_event): call the new function. (e_combo_button_class_init): init a11y. (e_combo_button_get_label): new function to return label. (e_combo_button_popup_menu): new function to popup menu. - * misc/e-combo-button.h: add function declarations. 2004-12-17 Not Zed <NotZed@Ximian.com> @@ -622,24 +497,24 @@ 2004-10-28 Li Yuan <li.yuan@sun.com> - * e-calendar.c (e_calendar_init, e_calendar_new): Make + * e-calendar.c: (e_calendar_init), (e_calendar_new): Make accessibility name and description translatable. Add a atk name for the two buttons so that they can be UI grabbed by GOK. - - * e-dateedit.c (e_date_edit_new, create_children): Add a name for - atk object. Make accessibility name and description translatable. - Add name and description for the date_entry, date_button and - time_combo. + + * e-dateedit.c: (e_date_edit_new), (create_children): Add a name + for atk object. Make accessibility name and description + translatable. Add name and description for the date_entry, + date_button and time_combo. (e_date_edit_show_date_popup), (hide_date_popup): Grab and ungrab keyboard. add_relation(): New function to add labelled_by relation for entry and combobox. - - * e-map.c (e_map_new): Add a name for world map widget. Make + + * e-map.c: (e_map_new): Add a name for world map widget. Make accessibility name and description translatable. Set the atk role to image. - - * e-multi-config-dialog.c (e_multi_config_dialog_add_page): Add an - atk name for the page. + + * e-multi-config-dialog.c: (e_multi_config_dialog_add_page): Add + an atk name for the page. 2004-10-27 JP Rosevear <jpr@novell.com> @@ -656,16 +531,16 @@ 2004-10-08 Harry Lu <harry.lu@sun.com> - * e-source-selector.c (e_source_selector_popup_menu), - (class_init): implement popup_menu so that popup menu can be shown - with Shift+F10. + * e-source-selector.c: (e_source_selector_popup_menu), + (class_init): implement popup_menu so that popup menu can + be shown with Shift+F10. 2004-10-06 JP Rosevear <jpr@novell.com> Fixes #66164 - * e-cell-date-edit.c (e_cell_date_edit_get_popup_pos): replicate - fix to e-cell-combo.c by NotZed + * e-cell-date-edit.c (e_cell_date_edit_get_popup_pos): replicate + fix to e-cell-combo.c by NotZed 2004-10-01 Not Zed <NotZed@Ximian.com> @@ -704,8 +579,8 @@ 2004-07-26 JP Rosevear <jpr@novell.com> - * e-search-bar.c (setup_bonobo_menus): use ctrl-shift-q to clear - search bar + * e-search-bar.c (setup_bonobo_menus): use ctrl-shift-q to clear + search bar 2004-07-20 Not Zed <NotZed@Ximian.com> diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index 8de153918c..01d6618e07 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,9 +1,3 @@ -2006-05-12 Hiroyuki Ikezoe <poincare@ikezoe.net> - - ** Fixes bug #341530. - * e-table.h: - Removed duplicate delcaration of e_table_commi_click_to_add. - 2006-04-10 Jeff Cai <jeff.cai@sun.com> ** Fixes bug #327035 diff --git a/widgets/table/e-table-example-1.c b/widgets/table/e-table-example-1.c deleted file mode 100644 index 37ac85770f..0000000000 --- a/widgets/table/e-table-example-1.c +++ /dev/null @@ -1,308 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-table-example-1.c - * Copyright 2000, 2001, Ximian, Inc. - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License, version 2, as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -/* This code is GPL. */ -#include <stdio.h> -#include <string.h> -#include <gdk-pixbuf/gdk-pixbuf.h> - -#include "gal/e-util/e-cursors.h" -#include "e-table-simple.h" -#include "e-table-header.h" -#include "e-table-header-item.h" -#include "e-table-item.h" -#include "e-cell-text.h" -#include "e-cell-checkbox.h" -#include "e-table.h" - -#include "table-test.h" - -/* - * One way in which we make it simpler to build an ETableModel is through - * the ETableSimple class. Instead of creating your own ETableModel - * class, you simply create a new object of the ETableSimple class. You - * give it a bunch of functions that act as callbacks. - * - * You also get to pass a void * to ETableSimple and it gets passed to - * your callbacks. This would be for having multiple models of the same - * type. This is just an example though, so we statically define all the - * data and ignore the void *data parameter. - * - * In our example we will be creating a table model with 6 columns and 10 - * rows. This corresponds to having 6 different types of information and - * 10 different sets of data in our database. - * - * The headers will be hard coded, as will be the example data. - * - */ - -/* - * There are two different meanings to the word "column". The first is - * the model column. A model column corresponds to a specific type of - * data. This is very much like the usage in a database table where a - * column is a field in the database. - * - * The second type of column is a view column. A view column - * corresponds to a visually displayed column. Each view column - * corresponds to a specific model column, though a model column may - * have any number of view columns associated with it, from zero to - * greater than one. - * - * Also, a view column doesn't necessarily depend on only one model - * column. In some cases, the view column renderer can be given a - * reference to another column to get extra information about its - * display. -*/ - -#define ROWS 10 -#define COLS 4 - -#define IMPORTANCE_COLUMN 4 -#define COLOR_COLUMN 5 - -/* - * Here we define the initial layout of the table. This is an xml - * format that allows you to change the initial ordering of the - * columns or to do sorting or grouping initially. This specification - * shows all 5 columns, but moves the importance column nearer to the - * front. It also sorts by the "Full Name" column (ascending.) - * Sorting and grouping take the model column as their arguments - * (sorting is specified by the "column" argument to the leaf elemnt. - */ - -#define INITIAL_SPEC "<ETableSpecification> \ - <columns-shown> \ - <column> 0 </column> \ - <column> 4 </column> \ - <column> 1 </column> \ - <column> 2 </column> \ - <column> 3 </column> \ - </columns-shown> \ - <grouping> <leaf column=\"1\" ascending=\"true\"/> </grouping> \ -</ETableSpecification>" - -char *headers [COLS] = { - "Email", - "Full Name", - "Address", - "Phone" -}; - -/* - * Virtual Column list: - * 0 Email - * 1 Full Name - * 2 Address - * 3 Phone - */ - -char *table_data [ROWS] [COLS]; - -/* - * ETableSimple callbacks - * These are the callbacks that define the behavior of our custom model. - */ - -/* - * Since our model is a constant size, we can just return its size in - * the column and row count fields. - */ - -/* This function returns the number of columns in our ETableModel. */ -static int -my_col_count (ETableModel *etc, void *data) -{ - return COLS; -} - -/* This function returns the number of rows in our ETableModel. */ -static int -my_row_count (ETableModel *etc, void *data) -{ - return ROWS; -} - -/* This function returns the value at a particular point in our ETableModel. */ -static void * -my_value_at (ETableModel *etc, int col, int row, void *data) -{ - return (void *) table_data [row] [col]; -} - -/* This function sets the value at a particular point in our ETableModel. */ -static void -my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data) -{ - g_free (table_data [row] [col]); - table_data [row] [col] = g_strdup (val); -} - -/* This function returns whether a particular cell is editable. */ -static gboolean -my_is_cell_editable (ETableModel *etc, int col, int row, void *data) -{ - return TRUE; -} - -/* This function duplicates the value passed to it. */ -static void * -my_duplicate_value (ETableModel *etc, int col, const void *value, void *data) -{ - return g_strdup (value); -} - -/* This function frees the value passed to it. */ -static void -my_free_value (ETableModel *etc, int col, void *value, void *data) -{ - g_free (value); -} - -/* This function creates an empty value. */ -static void * -my_initialize_value (ETableModel *etc, int col, void *data) -{ - return g_strdup (""); -} - -/* This function reports if a value is empty. */ -static gboolean -my_value_is_empty (ETableModel *etc, int col, const void *value, void *data) -{ - return !(value && *(char *)value); -} - -/* This function reports if a value is empty. */ -static char * -my_value_to_string (ETableModel *etc, int col, const void *value, void *data) -{ - return g_strdup(value); -} - -/* We create a window containing our new table. */ -static void -create_table (void) -{ - GtkWidget *e_table, *window, *frame; - ECell *cell_left_just; - ETableHeader *e_table_header; - int i, j; - ETableModel *e_table_model = NULL; - - /* First we fill in the simple data. */ - for (i = 0; i < ROWS; i++){ - for (j = 0; j < COLS; j++) - table_data [i] [j] = g_strdup (""); - } - /* Next we create our model. This uses the functions we defined - earlier. */ - e_table_model = e_table_simple_new ( - my_col_count, my_row_count, my_value_at, - my_set_value_at, my_is_cell_editable, - my_duplicate_value, my_free_value, - my_initialize_value, my_value_is_empty, - my_value_to_string, - NULL); - /* - * Next we create a header. The ETableHeader is used in two - * different way. The first is the full_header. This is the - * list of possible columns in the view. The second use is - * completely internal. Many of the ETableHeader functions are - * for that purpose. The only functions we really need are - * e_table_header_new and e_table_header_add_col. - * - * First we create the header. - */ - e_table_header = e_table_header_new (); - - /* - * Next we have to build renderers for all of the columns. - * Since all our columns are text columns, we can simply use - * the same renderer over and over again. If we had different - * types of columns, we could use a different renderer for - * each column. - */ - cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT); - - /* - * Next we create a column object for each view column and add - * them to the header. We don't create a column object for - * the importance column since it will not be shown. - */ - for (i = 0; i < COLS; i++) { - /* Create the column. */ - ETableCol *ecol = e_table_col_new ( - i, headers [i], - 1.0, 20, cell_left_just, - g_str_compare, TRUE); - /* Add it to the header. */ - e_table_header_add_column (e_table_header, ecol, i); - } - - /* - * Here we create a window for our new table. This window - * will get shown and the person will be able to test their - * item. - */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - - /* This frame is simply to get a bevel around our table. */ - frame = gtk_frame_new (NULL); - - /* - * Here we create the table. We give it the three pieces of - * the table we've created, the header, the model, and the - * initial layout. It does the rest. - */ - e_table = e_table_new (e_table_header, e_table_model, INITIAL_SPEC); - - /* Build the gtk widget hierarchy. */ - gtk_container_add (GTK_CONTAINER (frame), e_table); - gtk_container_add (GTK_CONTAINER (window), frame); - - /* Size the initial window. */ - gtk_widget_set_usize (window, 200, 200); - - /* Show it all. */ - gtk_widget_show_all (window); -} - -/* This is the main function which just initializes gnome and call our create_table function */ - -int -main (int argc, char *argv []) -{ - gnome_init ("TableExample", "TableExample", argc, argv); - e_cursors_init (); - - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - - create_table (); - - gtk_main (); - - e_cursors_shutdown (); - return 0; -} - |