From 570fb78135d9112a2a63ade331cc477e5c1f72ec Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 10 Jul 2000 11:05:01 +0000 Subject: Switched from ETable to ETableScrolled. 2000-07-09 Christopher James Lahey * gui/component/addressbook.c, gui/component/select-names/e-select-names.c, gui/component/select-names/e-select-names.h: Switched from ETable to ETableScrolled. * addressbook/gui/minicard/e-minicard.c: Don't display mailer or "name or org" fields. svn path=/trunk/; revision=4035 --- addressbook/gui/component/addressbook.c | 15 +++++++-------- addressbook/gui/component/select-names/e-select-names.c | 11 +++++------ addressbook/gui/component/select-names/e-select-names.h | 3 ++- 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index b50f808230..b3283831b2 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -304,7 +304,7 @@ delete_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path) static void e_contact_print_destroy(GnomeDialog *dialog, gpointer data) { - ETable *table = gtk_object_get_data(GTK_OBJECT(dialog), "table"); + ETableScrolled *table = gtk_object_get_data(GTK_OBJECT(dialog), "table"); EPrintable *printable = gtk_object_get_data(GTK_OBJECT(dialog), "printable"); gtk_object_unref(GTK_OBJECT(printable)); gtk_object_unref(GTK_OBJECT(table)); @@ -389,7 +389,7 @@ print_cb (BonoboUIHandler *uih, void *user_data, const char *path) gnome_print_dialog_construct_range_any(GNOME_PRINT_DIALOG(dialog), GNOME_PRINT_RANGE_ALL | GNOME_PRINT_RANGE_SELECTION, NULL, NULL, NULL); - printable = e_table_get_printable(E_TABLE(view->table)); + printable = e_table_scrolled_get_printable(E_TABLE_SCROLLED(view->table)); gtk_object_ref(GTK_OBJECT(view->table)); @@ -893,8 +893,7 @@ create_minicard_view (AddressbookView *view, char *initial_query) 0, 0, 100, 100 ); - scrollframe = e_scroll_frame_new (gtk_layout_get_hadjustment (GTK_LAYOUT (view->canvas)), - gtk_layout_get_vadjustment (GTK_LAYOUT (view->canvas))); + scrollframe = e_scroll_frame_new (NULL, NULL); e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); @@ -947,7 +946,7 @@ teardown_table_view (AddressbookView *view) } static void -table_double_click(ETable *table, gint row, AddressbookView *view) +table_double_click(ETableScrolled *table, gint row, AddressbookView *view) { ECard *card = e_addressbook_model_get_card(E_ADDRESSBOOK_MODEL(view->model), row); EBook *book; @@ -978,7 +977,7 @@ save_as (GtkWidget *widget, ECard *card) } static gint -table_right_click(ETable *table, gint row, gint col, GdkEvent *event, AddressbookView *view) +table_right_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, AddressbookView *view) { ECard *card = e_addressbook_model_get_card(E_ADDRESSBOOK_MODEL(view->model), row); EPopupMenu menu[] = { {"Save as VCard", NULL, GTK_SIGNAL_FUNC(save_as), 0}, {NULL, NULL, NULL, 0} }; @@ -1033,7 +1032,7 @@ create_table_view (AddressbookView *view, char *initial_query) /* 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. */ - view->table = e_table_new (e_table_header, E_TABLE_MODEL(view->model), SPEC); + view->table = e_table_scrolled_new (e_table_header, E_TABLE_MODEL(view->model), SPEC); gtk_signal_connect(GTK_OBJECT(view->table), "double_click", GTK_SIGNAL_FUNC(table_double_click), view); @@ -1046,7 +1045,7 @@ create_table_view (AddressbookView *view, char *initial_query) gtk_box_pack_start(GTK_BOX(view->vbox), view->table, TRUE, TRUE, 0); - gtk_widget_show_all( GTK_WIDGET(view->table) ); + gtk_widget_show( GTK_WIDGET(view->table) ); } static void diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 75fd27d32d..cbe89f6362 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -23,7 +23,6 @@ #include #include "e-select-names.h" #include -#include #include #include #include @@ -156,7 +155,7 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n e_book_load_uri(book, uri, (EBookCallback) set_book, model); g_free(uri); g_free(filename); - table = e_table_new (header, model, SPEC); + table = e_table_scrolled_new (header, model, SPEC); gtk_object_set(GTK_OBJECT(table), "cursor_mode", E_TABLE_CURSOR_LINE, @@ -167,7 +166,7 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n } static void -set_current_selection(ETable *table, int row, ESelectNames *names) +set_current_selection(ETableScrolled *table, int row, ESelectNames *names) { names->currently_selected = row; } @@ -200,7 +199,7 @@ e_select_names_init (ESelectNames *e_select_names) gtk_window_set_policy(GTK_WINDOW(e_select_names), FALSE, TRUE, FALSE); - e_select_names->table = E_TABLE(glade_xml_get_widget(gui, "table-source")); + e_select_names->table = E_TABLE_SCROLLED(glade_xml_get_widget(gui, "table-source")); e_select_names->model = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "model"); e_select_names->currently_selected = -1; @@ -299,7 +298,7 @@ button_clicked(GtkWidget *button, ESelectNamesChild *child) } static void -remove_address(ETable *table, int row, ESelectNamesChild *child) +remove_address(ETableScrolled *table, int row, ESelectNamesChild *child) { EIterator *iterator = e_list_get_iterator(e_select_names_model_get_data(child->source)); e_iterator_reset(iterator); @@ -358,7 +357,7 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E g_str_compare, TRUE), -1); e_table_header_add_column (header, e_table_col_new (1, "Email", 1.0, 20, cell_left_just, g_str_compare, TRUE), -1); - etable = e_table_new (header, model, SPEC2); + etable = e_table_scrolled_new (header, model, SPEC2); gtk_signal_connect(GTK_OBJECT(etable), "double_click", GTK_SIGNAL_FUNC(remove_address), child); diff --git a/addressbook/gui/component/select-names/e-select-names.h b/addressbook/gui/component/select-names/e-select-names.h index 369996eb43..b1c11eb473 100644 --- a/addressbook/gui/component/select-names/e-select-names.h +++ b/addressbook/gui/component/select-names/e-select-names.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "e-select-names-model.h" #ifdef __cplusplus @@ -58,7 +59,7 @@ struct _ESelectNames GHashTable *children; /* Of type char * to ESelectNamesChild */ int child_count; - ETable *table; + ETableScrolled *table; ETableModel *model; int currently_selected; }; -- cgit v1.2.3