diff options
author | JP Rosevear <jpr@ximian.com> | 2001-08-10 23:47:18 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-08-10 23:47:18 +0800 |
commit | 2f81032abc0e68f1a2cdbc88c23b0febd2524bb1 (patch) | |
tree | feb1e579c759fdf9e84a46ce8d8f28eb0a0daca5 /widgets/table/e-table.c | |
parent | 8a2a58927497c4e88482d509f99b689dabe33a24 (diff) | |
download | gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar.gz gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar.zst gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.zip |
new proto and virtual method
2001-08-10 JP Rosevear <jpr@ximian.com>
* gal/widgets/e-canvas-vbox.h: new proto and virtual method
* gal/widgets/e-canvas-vbox.c (e_canvas_vbox_real_add_item_start):
adds the the item to the beginning
(e_canvas_vbox_add_item_start): call the virtual method
2001-08-10 JP Rosevear <jpr@ximian.com>
* e-table.c (et_build_groups): add the items to the start or end
based on where the click to add should be
(e_table_setup_table): ditto
(et_real_construct): read additional spec flag
* e-table.h: new flag
* e-table-specification.c (etsp_init): init new flag
(e_table_specification_load_from_node): set click to add end flag
(e_table_specification_save_to_node): write out flag
* e-table-specification.h: new flag
svn path=/trunk/; revision=11880
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r-- | widgets/table/e-table.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 1bbd37f772..bde2f990bc 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -595,7 +595,12 @@ et_build_groups (ETable *et) et->model, et->sort_info, 0); - e_canvas_vbox_add_item(E_CANVAS_VBOX(et->canvas_vbox), GNOME_CANVAS_ITEM(et->group)); + + if (et->use_click_to_add_end) + e_canvas_vbox_add_item_start(E_CANVAS_VBOX(et->canvas_vbox), GNOME_CANVAS_ITEM(et->group)); + else + e_canvas_vbox_add_item(E_CANVAS_VBOX(et->canvas_vbox), GNOME_CANVAS_ITEM(et->group)); + gnome_canvas_item_set(GNOME_CANVAS_ITEM(et->group), "alternating_row_colors", et->alternating_row_colors, "horizontal_draw_grid", et->horizontal_draw_grid, @@ -760,6 +765,8 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h "spacing", 10.0, NULL); + et_build_groups(e_table); + if (e_table->use_click_to_add) { e_table->click_to_add = gnome_canvas_item_new ( GNOME_CANVAS_GROUP(e_table->canvas_vbox), @@ -769,15 +776,19 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h "message", e_table->click_to_add_message, NULL); - e_canvas_vbox_add_item ( - E_CANVAS_VBOX(e_table->canvas_vbox), - e_table->click_to_add); + if (e_table->use_click_to_add_end) + e_canvas_vbox_add_item ( + E_CANVAS_VBOX(e_table->canvas_vbox), + e_table->click_to_add); + else + e_canvas_vbox_add_item_start ( + E_CANVAS_VBOX(e_table->canvas_vbox), + e_table->click_to_add); + gtk_signal_connect ( GTK_OBJECT (e_table->click_to_add), "cursor_change", GTK_SIGNAL_FUNC(click_to_add_cursor_change), e_table); } - - et_build_groups(e_table); } static void @@ -974,6 +985,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, ete = e_table_extras_new(); e_table->use_click_to_add = specification->click_to_add; + e_table->use_click_to_add_end = specification->click_to_add_end; e_table->click_to_add_message = e_utf8_from_locale_string (gettext (specification->click_to_add_message)); e_table->alternating_row_colors = specification->alternating_row_colors; e_table->horizontal_draw_grid = specification->horizontal_draw_grid; |