diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-12-08 06:20:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-12-08 14:55:28 +0800 |
commit | dd65b18ddf2f4e7fdc108b0ed147658c36103eea (patch) | |
tree | 063b83f2bd337c34bcb573cbae4b6d60ec34eab6 | |
parent | eb60a4e448fff45d0db5a5856cb19e3abb90a9e0 (diff) | |
download | gsoc2013-evolution-dd65b18ddf2f4e7fdc108b0ed147658c36103eea.tar.gz gsoc2013-evolution-dd65b18ddf2f4e7fdc108b0ed147658c36103eea.tar.zst gsoc2013-evolution-dd65b18ddf2f4e7fdc108b0ed147658c36103eea.zip |
Kill ETableScrolled.
ETableScrolled is nothing but a GtkScrolledWindow containing an ETable.
It adds nothing of value and actually makes customizing ETable harder.
29 files changed, 1251 insertions, 2326 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index a7956a9f8f..afa8bc0c1e 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -24,7 +24,7 @@ #include <config.h> #include <glib/gi18n.h> -#include <table/e-table-scrolled.h> +#include <table/e-table.h> #include <table/e-table-model.h> #include <table/e-cell-date.h> #include <misc/e-gui-utils.h> @@ -82,7 +82,6 @@ struct _EAddressbookViewPrivate { ESource *source; GObject *object; - GtkWidget *widget; GalViewInstance *view_instance; }; @@ -165,7 +164,7 @@ addressbook_view_create_contact_list (EAddressbookView *view) } static void -table_double_click (ETableScrolled *table, +table_double_click (ETable *table, gint row, gint col, GdkEvent *event, @@ -184,7 +183,7 @@ table_double_click (ETableScrolled *table, } static gint -table_right_click (ETableScrolled *table, +table_right_click (ETable *table, gint row, gint col, GdkEvent *event, @@ -196,7 +195,7 @@ table_right_click (ETableScrolled *table, } static gint -table_white_space_event (ETableScrolled *table, +table_white_space_event (ETable *table, GdkEvent *event, EAddressbookView *view) { @@ -262,12 +261,12 @@ table_drag_data_get (ETable *table, } static void -addressbook_view_create_table_view (EAddressbookView *view) +addressbook_view_create_table_view (EAddressbookView *view, + GalViewEtable *gal_view) { ETableModel *adapter; ETableExtras *extras; ECell *cell; - ETable *table; GtkWidget *widget; gchar *etspecfile; @@ -284,45 +283,44 @@ addressbook_view_create_table_view (EAddressbookView *view) initial layout. It does the rest. */ etspecfile = g_build_filename ( EVOLUTION_ETSPECDIR, "e-addressbook-view.etspec", NULL); - widget = e_table_scrolled_new_from_spec_file ( + widget = e_table_new_from_spec_file ( adapter, extras, etspecfile, NULL); - table = E_TABLE (E_TABLE_SCROLLED (widget)->table); + gtk_container_add (GTK_CONTAINER (view), widget); g_free (etspecfile); view->priv->object = G_OBJECT (adapter); - view->priv->widget = widget; g_signal_connect ( - table, "double_click", + widget, "double_click", G_CALLBACK(table_double_click), view); g_signal_connect ( - table, "right_click", + widget, "right_click", G_CALLBACK(table_right_click), view); g_signal_connect ( - table, "white_space_event", + widget, "white_space_event", G_CALLBACK(table_white_space_event), view); g_signal_connect_swapped ( - table, "selection_change", + widget, "selection_change", G_CALLBACK (addressbook_view_emit_selection_change), view); e_table_drag_source_set ( - table, GDK_BUTTON1_MASK, + E_TABLE (widget), GDK_BUTTON1_MASK, drag_types, G_N_ELEMENTS (drag_types), GDK_ACTION_MOVE | GDK_ACTION_COPY); g_signal_connect ( - table, "table_drag_data_get", + E_TABLE (widget), "table_drag_data_get", G_CALLBACK (table_drag_data_get), view); - gtk_box_pack_start (GTK_BOX (view), widget, TRUE, TRUE, 0); - gtk_widget_show (widget); + + gal_view_etable_attach_table (gal_view, E_TABLE (widget)); } static void -addressbook_view_create_minicard_view (EAddressbookView *view) +addressbook_view_create_minicard_view (EAddressbookView *view, + GalViewMinicard *gal_view) { - GtkWidget *scrolled_window; GtkWidget *minicard_view; EAddressbookReflowAdapter *adapter; @@ -350,50 +348,33 @@ addressbook_view_create_minicard_view (EAddressbookView *view) minicard_view, "right_click", G_CALLBACK (addressbook_view_emit_popup_event), view); - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_shadow_type ( - GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN); - gtk_scrolled_window_set_policy ( - GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - view->priv->object = G_OBJECT (minicard_view); - view->priv->widget = scrolled_window; - gtk_container_add (GTK_CONTAINER (scrolled_window), minicard_view); + gtk_container_add (GTK_CONTAINER (view), minicard_view); gtk_widget_show (minicard_view); - gtk_widget_show_all (scrolled_window); - - gtk_box_pack_start (GTK_BOX (view), scrolled_window, TRUE, TRUE, 0); - e_reflow_model_changed (E_REFLOW_MODEL (adapter)); + + gal_view_minicard_attach (gal_view, view); } static void addressbook_view_display_view_cb (EAddressbookView *view, GalView *gal_view) { - if (view->priv->widget != NULL) { - gtk_container_remove ( - GTK_CONTAINER (view), - view->priv->widget); - view->priv->widget = NULL; - } + GtkWidget *child; + + child = gtk_bin_get_child (GTK_BIN (view)); + if (child != NULL) + gtk_container_remove (GTK_CONTAINER (view), child); view->priv->object = NULL; - if (GAL_IS_VIEW_ETABLE (gal_view)) { - addressbook_view_create_table_view (view); - gal_view_etable_attach_table ( - GAL_VIEW_ETABLE (gal_view), - e_table_scrolled_get_table ( - E_TABLE_SCROLLED (view->priv->widget))); - } - else if (GAL_IS_VIEW_MINICARD (gal_view)) { - addressbook_view_create_minicard_view (view); - gal_view_minicard_attach ( - GAL_VIEW_MINICARD (gal_view), view); - } + if (GAL_IS_VIEW_ETABLE (gal_view)) + addressbook_view_create_table_view ( + view, GAL_VIEW_ETABLE (gal_view)); + else if (GAL_IS_VIEW_MINICARD (gal_view)) + addressbook_view_create_minicard_view ( + view, GAL_VIEW_MINICARD (gal_view)); command_state_change (view); } @@ -633,6 +614,12 @@ addressbook_view_init (EAddressbookView *view) view->priv = E_ADDRESSBOOK_VIEW_GET_PRIVATE (view); view->priv->model = e_addressbook_model_new (); + + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (view), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (view), GTK_SHADOW_IN); } GType @@ -655,7 +642,8 @@ e_addressbook_view_get_type (void) }; type = g_type_register_static ( - GTK_TYPE_VBOX, "EAddressbookView", &type_info, 0); + GTK_TYPE_SCROLLED_WINDOW, "EAddressbookView", + &type_info, 0); } return type; @@ -723,16 +711,6 @@ e_addressbook_view_get_view_object (EAddressbookView *view) return view->priv->object; } -GtkWidget * -e_addressbook_view_get_view_widget (EAddressbookView *view) -{ - /* XXX Find a more descriptive name for this. */ - - g_return_val_if_fail (E_IS_ADDRESSBOOK_VIEW (view), NULL); - - return view->priv->widget; -} - /* Helper for e_addressbook_view_get_selected() */ static void add_to_list (gint model_row, gpointer closure) @@ -774,19 +752,15 @@ e_addressbook_view_get_selection_model (EAddressbookView *view) gal_view = gal_view_instance_get_current_view (view_instance); if (GAL_IS_VIEW_ETABLE (gal_view)) { - ETableScrolled *scrolled_table; - ETable *table; - - scrolled_table = E_TABLE_SCROLLED (view->priv->widget); - table = e_table_scrolled_get_table (scrolled_table); + GtkWidget *child; - model = e_table_get_selection_model (table); + child = gtk_bin_get_child (GTK_BIN (view)); + model = e_table_get_selection_model (E_TABLE (child)); } else if (GAL_IS_VIEW_MINICARD (gal_view)) { EMinicardViewWidget *widget; widget = E_MINICARD_VIEW_WIDGET (view->priv->object); - model = e_minicard_view_widget_get_selection_model (widget); } @@ -989,12 +963,12 @@ e_addressbook_view_print (EAddressbookView *view, /* XXX Does this print the entire table or just selected? */ } else if (GAL_IS_VIEW_ETABLE (gal_view)) { EPrintable *printable; - ETable *table; + GtkWidget *widget; - g_object_get (view->priv->widget, "table", &table, NULL); - printable = e_table_get_printable (table); + widget = gtk_bin_get_child (GTK_BIN (view)); + printable = e_table_get_printable (E_TABLE (widget)); g_object_ref_sink (printable); - g_object_unref (table); + g_object_unref (widget); e_contact_print_button (printable, action); @@ -1093,6 +1067,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) ESelectionModel *selection_model = NULL; GalViewInstance *view_instance; GalView *gal_view; + GtkWidget *widget; gchar *name = NULL; gint row = 0, select; @@ -1113,6 +1088,8 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) if (e_contact_get (contact, E_CONTACT_IS_LIST)) is_list = TRUE; + widget = gtk_bin_get_child (GTK_BIN (view)); + if (GAL_IS_VIEW_MINICARD (gal_view)) { card_view = e_minicard_view_widget_get_view (E_MINICARD_VIEW_WIDGET(view->priv->object)); selection_model = e_addressbook_view_get_selection_model (view); @@ -1120,15 +1097,14 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) } else if (GAL_IS_VIEW_ETABLE (gal_view)) { - etable = e_table_scrolled_get_table ( - E_TABLE_SCROLLED(view->priv->widget)); + etable = E_TABLE (widget); row = e_table_get_cursor_row (E_TABLE (etable)); } /* confirm delete */ if (is_delete && !addressbook_view_confirm_delete ( - GTK_WINDOW (gtk_widget_get_toplevel ( - view->priv->widget)), plural, is_list, name)) { + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET(view))), + plural, is_list, name)) { g_free (name); g_list_foreach (list, (GFunc) g_object_unref, NULL); g_list_free (list); diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h index 28307ada64..6abab6bf7a 100644 --- a/addressbook/gui/widgets/e-addressbook-view.h +++ b/addressbook/gui/widgets/e-addressbook-view.h @@ -59,12 +59,12 @@ typedef struct _EAddressbookViewClass EAddressbookViewClass; typedef struct _EAddressbookViewPrivate EAddressbookViewPrivate; struct _EAddressbookView { - GtkVBox parent; + GtkScrolledWindow parent; EAddressbookViewPrivate *priv; }; struct _EAddressbookViewClass { - GtkVBoxClass parent_class; + GtkScrolledWindowClass parent_class; /* Signals */ void (*open_contact) (EAddressbookView *view, @@ -88,8 +88,6 @@ GalViewInstance * (EAddressbookView *view); GObject * e_addressbook_view_get_view_object (EAddressbookView *view); -GtkWidget * e_addressbook_view_get_view_widget - (EAddressbookView *view); GList * e_addressbook_view_get_selected (EAddressbookView *view); ESelectionModel * e_addressbook_view_get_selection_model diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index c7b2a4a38f..a7d5502506 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -42,7 +42,6 @@ view_minicard_column_width_changed (EAddressbookView *address_view, GalViewMinicard *view_minicard; GtkScrolledWindow *scrolled_window; GtkAdjustment *adjustment; - GtkWidget *widget; gdouble value, lower, upper; gdouble page_increment, page_size; @@ -54,20 +53,6 @@ view_minicard_column_width_changed (EAddressbookView *address_view, view_minicard->column_width = width; gal_view_changed (view); } - - widget = e_addressbook_view_get_view_widget (address_view); - scrolled_window = GTK_SCROLLED_WINDOW (widget); - adjustment = gtk_scrolled_window_get_hadjustment (scrolled_window); - - value = gtk_adjustment_get_value (adjustment); - lower = gtk_adjustment_get_lower (adjustment); - upper = gtk_adjustment_get_upper (adjustment); - page_increment = gtk_adjustment_get_page_increment (adjustment); - page_size = gtk_adjustment_get_page_size (adjustment); - - adjustment = GTK_ADJUSTMENT (gtk_adjustment_new ( - value, lower, upper, page_size, page_increment, page_size)); - gtk_scrolled_window_set_hadjustment (scrolled_window, adjustment); } static void diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c index 7d95e41aa8..64a3ca2ac4 100644 --- a/calendar/gui/e-cal-list-view.c +++ b/calendar/gui/e-cal-list-view.c @@ -134,7 +134,7 @@ static void e_cal_list_view_init (ECalListView *cal_list_view) { cal_list_view->query = NULL; - cal_list_view->table_scrolled = NULL; + cal_list_view->table = NULL; cal_list_view->cursor_event = NULL; cal_list_view->set_table_id = 0; } @@ -173,7 +173,7 @@ e_cal_list_view_load_state (ECalListView *cal_list_view, gchar *filename) g_return_if_fail (filename != NULL); if (g_stat (filename, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) - e_table_load_state (e_table_scrolled_get_table (cal_list_view->table_scrolled), filename); + e_table_load_state (cal_list_view->table, filename); } void @@ -183,7 +183,7 @@ e_cal_list_view_save_state (ECalListView *cal_list_view, gchar *filename) g_return_if_fail (E_IS_CAL_LIST_VIEW (cal_list_view)); g_return_if_fail (filename != NULL); - e_table_save_state (e_table_scrolled_get_table (cal_list_view->table_scrolled), filename); + e_table_save_state (cal_list_view->table, filename); } static void @@ -195,6 +195,8 @@ setup_e_table (ECalListView *cal_list_view) ECell *cell, *popup_cell; GnomeCanvas *canvas; GtkStyle *style; + GtkWidget *container; + GtkWidget *widget; gchar *etspecfile; model = e_calendar_view_get_model (E_CALENDAR_VIEW (cal_list_view)); @@ -276,19 +278,33 @@ setup_e_table (ECalListView *cal_list_view) /* Create table view */ - etspecfile = g_build_filename (EVOLUTION_ETSPECDIR, - "e-cal-list-view.etspec", - NULL); - cal_list_view->table_scrolled = E_TABLE_SCROLLED ( - e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (model), - extras, - etspecfile, - NULL)); + container = GTK_WIDGET (cal_list_view); + + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); + gtk_table_attach ( + GTK_TABLE (container), widget, 0, 2, 0, 2, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 1, 1); + gtk_widget_show (widget); + + container = widget; + + etspecfile = g_build_filename ( + EVOLUTION_ETSPECDIR, "e-cal-list-view.etspec", NULL); + widget = e_table_new_from_spec_file ( + E_TABLE_MODEL (model), extras, etspecfile, NULL); + gtk_container_add (GTK_CONTAINER (container), widget); + cal_list_view->table = E_TABLE (widget); + gtk_widget_show (widget); g_free (etspecfile); /* Make sure text is readable on top of our color coding */ - canvas = GNOME_CANVAS (e_table_scrolled_get_table (cal_list_view->table_scrolled)->table_canvas); + canvas = GNOME_CANVAS (cal_list_view->table->table_canvas); style = gtk_widget_get_style (GTK_WIDGET (canvas)); style->fg [GTK_STATE_SELECTED] = style->text [GTK_STATE_NORMAL]; @@ -296,18 +312,18 @@ setup_e_table (ECalListView *cal_list_view) gtk_widget_set_style (GTK_WIDGET (canvas), style); /* Connect signals */ - g_signal_connect (e_table_scrolled_get_table (cal_list_view->table_scrolled), - "double_click", G_CALLBACK (e_cal_list_view_on_table_double_click), cal_list_view); - g_signal_connect (e_table_scrolled_get_table (cal_list_view->table_scrolled), - "right-click", G_CALLBACK (e_cal_list_view_on_table_right_click), cal_list_view); - g_signal_connect_after (e_table_scrolled_get_table (cal_list_view->table_scrolled), - "cursor_change", G_CALLBACK (e_cal_list_view_cursor_change_cb), cal_list_view); - - /* Attach and show widget */ - - gtk_table_attach (GTK_TABLE (cal_list_view), GTK_WIDGET (cal_list_view->table_scrolled), - 0, 2, 0, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 1, 1); - gtk_widget_show (GTK_WIDGET (cal_list_view->table_scrolled)); + g_signal_connect ( + cal_list_view->table, "double_click", + G_CALLBACK (e_cal_list_view_on_table_double_click), + cal_list_view); + g_signal_connect ( + cal_list_view->table, "right-click", + G_CALLBACK (e_cal_list_view_on_table_right_click), + cal_list_view); + g_signal_connect_after ( + cal_list_view->table, "cursor_change", + G_CALLBACK (e_cal_list_view_cursor_change_cb), + cal_list_view); } /** @@ -354,9 +370,9 @@ e_cal_list_view_destroy (GtkObject *object) cal_list_view->cursor_event = NULL; } - if (cal_list_view->table_scrolled) { - gtk_widget_destroy (GTK_WIDGET (cal_list_view->table_scrolled)); - cal_list_view->table_scrolled = NULL; + if (cal_list_view->table) { + gtk_widget_destroy (GTK_WIDGET (cal_list_view->table)); + cal_list_view->table = NULL; } GTK_OBJECT_CLASS (e_cal_list_view_parent_class)->destroy (object); @@ -476,7 +492,8 @@ e_cal_list_view_get_selected_events (ECalendarView *cal_view) E_CAL_LIST_VIEW (cal_view)->cursor_event = NULL; } - cursor_row = e_table_get_cursor_row (e_table_scrolled_get_table (E_CAL_LIST_VIEW (cal_view)->table_scrolled)); + cursor_row = e_table_get_cursor_row ( + E_CAL_LIST_VIEW (cal_view)->table); if (cursor_row >= 0) { ECalendarViewEvent *event; diff --git a/calendar/gui/e-cal-list-view.h b/calendar/gui/e-cal-list-view.h index f4f71a6269..0874b73c5b 100644 --- a/calendar/gui/e-cal-list-view.h +++ b/calendar/gui/e-cal-list-view.h @@ -62,7 +62,7 @@ struct _ECalListView { ECalendarView parent; /* The main display table */ - ETableScrolled *table_scrolled; + ETable *table; /* S-expression for query and the query object */ ECalView *query; diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 3dd4d7435b..a1495fb005 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -230,20 +230,6 @@ calendar_table_status_compare_cb (gconstpointer a, } static void -calendar_table_double_click_cb (ECalendarTable *cal_table, - gint row, - gint col, - GdkEvent *event) -{ - ECalModel *model; - ECalModelComponent *comp_data; - - model = e_calendar_table_get_model (cal_table); - comp_data = e_cal_model_get_component_at (model, row); - calendar_table_emit_open_component (cal_table, comp_data); -} - -static void calendar_table_model_cal_view_progress_cb (ECalendarTable *cal_table, const gchar *message, gint progress, @@ -262,245 +248,6 @@ calendar_table_model_cal_view_done_cb (ECalendarTable *cal_table, calendar_table_emit_status_message (cal_table, NULL, -1.0); } -static gboolean -calendar_table_query_tooltip_cb (ECalendarTable *cal_table, - gint x, - gint y, - gboolean keyboard_mode, - GtkTooltip *tooltip) -{ - ECalModel *model; - ECalModelComponent *comp_data; - gint row = -1, col = -1; - GtkWidget *box, *l, *w; - GtkStyle *style = gtk_widget_get_default_style (); - gchar *tmp; - const gchar *str; - GString *tmp2; - gchar buff[1001]; - gboolean free_text = FALSE; - gboolean use_24_hour_format; - ECalComponent *new_comp; - ECalComponentOrganizer organizer; - ECalComponentDateTime dtstart, dtdue; - icalcomponent *clone; - icaltimezone *zone, *default_zone; - GSList *desc, *p; - gint len; - ETable *etable; - ESelectionModel *esm; - struct tm tmp_tm; - - if (keyboard_mode) - return FALSE; - - etable = e_calendar_table_get_table (cal_table); - e_table_get_mouse_over_cell (etable, &row, &col); - if (row == -1 || !etable) - return FALSE; - - /* Respect sorting option; the 'e_table_get_mouse_over_cell' - * returns sorted row, not the model one. */ - esm = e_table_get_selection_model (etable); - if (esm && esm->sorter && e_sorter_needs_sorting (esm->sorter)) - row = e_sorter_sorted_to_model (esm->sorter, row); - - model = e_calendar_table_get_model (cal_table); - comp_data = e_cal_model_get_component_at (model, row); - if (!comp_data || !comp_data->icalcomp) - return FALSE; - - new_comp = e_cal_component_new (); - clone = icalcomponent_new_clone (comp_data->icalcomp); - if (!e_cal_component_set_icalcomponent (new_comp, clone)) { - g_object_unref (new_comp); - return FALSE; - } - - box = gtk_vbox_new (FALSE, 0); - - str = e_calendar_view_get_icalcomponent_summary ( - comp_data->client, comp_data->icalcomp, &free_text); - if (!(str && *str)) { - if (free_text) - g_free ((gchar *)str); - free_text = FALSE; - str = _("* No Summary *"); - } - - l = gtk_label_new (NULL); - tmp = g_markup_printf_escaped ("<b>%s</b>", str); - gtk_label_set_line_wrap (GTK_LABEL (l), TRUE); - gtk_label_set_markup (GTK_LABEL (l), tmp); - gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - w = gtk_event_box_new (); - - gtk_widget_modify_bg (w, GTK_STATE_NORMAL, &(style->bg[GTK_STATE_SELECTED])); - gtk_widget_modify_fg (l, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED])); - gtk_container_add (GTK_CONTAINER (w), l); - gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0); - g_free (tmp); - - if (free_text) - g_free ((gchar *)str); - free_text = FALSE; - - w = gtk_event_box_new (); - gtk_widget_modify_bg (w, GTK_STATE_NORMAL, &(style->bg[GTK_STATE_NORMAL])); - - l = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (w), l); - gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0); - w = l; - - e_cal_component_get_organizer (new_comp, &organizer); - if (organizer.cn) { - gchar *ptr; - ptr = strchr( organizer.value, ':'); - - if (ptr) { - ptr++; - /* To Translators: It will display "Organizer: NameOfTheUser <email@ofuser.com>" */ - tmp = g_strdup_printf (_("Organizer: %s <%s>"), organizer.cn, ptr); - } else { - /* With SunOne accounts, there may be no ':' in organiser.value */ - tmp = g_strdup_printf (_("Organizer: %s"), organizer.cn); - } - - l = gtk_label_new (tmp); - gtk_label_set_line_wrap (GTK_LABEL (l), FALSE); - gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (w), l, FALSE, FALSE, 0); - g_free (tmp); - } - - e_cal_component_get_dtstart (new_comp, &dtstart); - e_cal_component_get_due (new_comp, &dtdue); - - default_zone = e_cal_model_get_timezone (model); - use_24_hour_format = e_cal_model_get_use_24_hour_format (model); - - if (dtstart.tzid) { - zone = icalcomponent_get_timezone (e_cal_component_get_icalcomponent (new_comp), dtstart.tzid); - if (!zone) - e_cal_get_timezone ( - comp_data->client, dtstart.tzid, &zone, NULL); - if (!zone) - zone = default_zone; - } else { - zone = NULL; - } - - tmp2 = g_string_new (""); - - if (dtstart.value) { - buff[0] = 0; - - tmp_tm = icaltimetype_to_tm_with_zone ( - dtstart.value, zone, default_zone); - e_time_format_date_and_time ( - &tmp_tm, use_24_hour_format, - FALSE, FALSE, buff, 1000); - - if (buff [0]) { - g_string_append (tmp2, _("Start: ")); - g_string_append (tmp2, buff); - } - } - - if (dtdue.value) { - buff[0] = 0; - - tmp_tm = icaltimetype_to_tm_with_zone ( - dtdue.value, zone, default_zone); - e_time_format_date_and_time ( - &tmp_tm, use_24_hour_format, - FALSE, FALSE, buff, 1000); - - if (buff [0]) { - if (tmp2->len) - g_string_append (tmp2, "; "); - - g_string_append (tmp2, _("Due: ")); - g_string_append (tmp2, buff); - } - } - - if (tmp2->len) { - l = gtk_label_new (tmp2->str); - gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (w), l, FALSE, FALSE, 0); - } - - g_string_free (tmp2, TRUE); - - e_cal_component_free_datetime (&dtstart); - e_cal_component_free_datetime (&dtdue); - - tmp = e_calendar_view_get_attendees_status_info ( - new_comp, comp_data->client); - if (tmp) { - l = gtk_label_new (tmp); - gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (w), l, FALSE, FALSE, 0); - - g_free (tmp); - tmp = NULL; - } - - tmp2 = g_string_new (""); - e_cal_component_get_description_list (new_comp, &desc); - for (len = 0, p = desc; p != NULL; p = p->next) { - ECalComponentText *text = p->data; - - if (text->value != NULL) { - len += strlen (text->value); - g_string_append (tmp2, text->value); - if (len > 1024) { - g_string_set_size (tmp2, 1020); - g_string_append (tmp2, "..."); - break; - } - } - } - e_cal_component_free_text_list (desc); - - if (tmp2->len) { - l = gtk_label_new (tmp2->str); - gtk_label_set_line_wrap (GTK_LABEL (l), TRUE); - gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (box), l, FALSE, FALSE, 0); - } - - g_string_free (tmp2, TRUE); - - gtk_widget_show_all (box); - gtk_tooltip_set_custom (tooltip, box); - - g_object_unref (new_comp); - - return TRUE; -} - -static gboolean -calendar_table_popup_menu_cb (ECalendarTable *cal_table) -{ - calendar_table_emit_popup_event (cal_table, NULL); - - return TRUE; -} - -static gint -calendar_table_right_click_cb (ECalendarTable *cal_table, - gint row, - gint col, - GdkEvent *event) -{ - calendar_table_emit_popup_event (cal_table, event); - - return TRUE; -} - static void calendar_table_set_model (ECalendarTable *cal_table, ECalModel *model) @@ -609,9 +356,7 @@ static void calendar_table_constructed (GObject *object) { ECalendarTable *cal_table; - GtkWidget *widget; ECalModel *model; - ETable *table; ECell *cell, *popup_cell; ETableExtras *extras; gint i; @@ -826,39 +571,286 @@ calendar_table_constructed (GObject *object) etspecfile = g_build_filename ( EVOLUTION_ETSPECDIR, "e-calendar-table.etspec", NULL); - widget = e_table_scrolled_new_from_spec_file ( - E_TABLE_MODEL (model), extras, etspecfile, NULL); - gtk_table_attach ( - GTK_TABLE (cal_table), widget, 0, 1, 0, 1, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - cal_table->etable = widget; - gtk_widget_show (widget); + e_table_construct_from_spec_file ( + E_TABLE (cal_table), E_TABLE_MODEL (model), + extras, etspecfile, NULL); g_free (etspecfile); - table = e_table_scrolled_get_table (E_TABLE_SCROLLED (widget)); - g_signal_connect_swapped ( - table, "double-click", - G_CALLBACK (calendar_table_double_click_cb), cal_table); - g_signal_connect_swapped ( - table, "query-tooltip", - G_CALLBACK (calendar_table_query_tooltip_cb), cal_table); - g_signal_connect_swapped ( - table, "popup-menu", - G_CALLBACK (calendar_table_popup_menu_cb), cal_table); - g_signal_connect_swapped ( - table, "right-click", - G_CALLBACK (calendar_table_right_click_cb), cal_table); - gtk_widget_set_has_tooltip (GTK_WIDGET (table), TRUE); + gtk_widget_set_has_tooltip (GTK_WIDGET (cal_table), TRUE); - a11y = gtk_widget_get_accessible (GTK_WIDGET (table)); + a11y = gtk_widget_get_accessible (GTK_WIDGET (cal_table)); if (a11y) atk_object_set_name (a11y, _("Tasks")); } +static gboolean +calendar_table_popup_menu (GtkWidget *widget) +{ + ECalendarTable *cal_table; + + cal_table = E_CALENDAR_TABLE (widget); + calendar_table_emit_popup_event (cal_table, NULL); + + return TRUE; +} + +static gboolean +calendar_table_query_tooltip (GtkWidget *widget, + gint x, + gint y, + gboolean keyboard_mode, + GtkTooltip *tooltip) +{ + ECalendarTable *cal_table; + ECalModel *model; + ECalModelComponent *comp_data; + gint row = -1, col = -1; + GtkWidget *box, *l, *w; + GtkStyle *style = gtk_widget_get_default_style (); + gchar *tmp; + const gchar *str; + GString *tmp2; + gchar buff[1001]; + gboolean free_text = FALSE; + gboolean use_24_hour_format; + ECalComponent *new_comp; + ECalComponentOrganizer organizer; + ECalComponentDateTime dtstart, dtdue; + icalcomponent *clone; + icaltimezone *zone, *default_zone; + GSList *desc, *p; + gint len; + ESelectionModel *esm; + struct tm tmp_tm; + + if (keyboard_mode) + return FALSE; + + cal_table = E_CALENDAR_TABLE (widget); + + e_table_get_mouse_over_cell (E_TABLE (cal_table), &row, &col); + if (row == -1) + return FALSE; + + /* Respect sorting option; the 'e_table_get_mouse_over_cell' + * returns sorted row, not the model one. */ + esm = e_table_get_selection_model (E_TABLE (cal_table)); + if (esm && esm->sorter && e_sorter_needs_sorting (esm->sorter)) + row = e_sorter_sorted_to_model (esm->sorter, row); + + model = e_calendar_table_get_model (cal_table); + comp_data = e_cal_model_get_component_at (model, row); + if (!comp_data || !comp_data->icalcomp) + return FALSE; + + new_comp = e_cal_component_new (); + clone = icalcomponent_new_clone (comp_data->icalcomp); + if (!e_cal_component_set_icalcomponent (new_comp, clone)) { + g_object_unref (new_comp); + return FALSE; + } + + box = gtk_vbox_new (FALSE, 0); + + str = e_calendar_view_get_icalcomponent_summary ( + comp_data->client, comp_data->icalcomp, &free_text); + if (!(str && *str)) { + if (free_text) + g_free ((gchar *)str); + free_text = FALSE; + str = _("* No Summary *"); + } + + l = gtk_label_new (NULL); + tmp = g_markup_printf_escaped ("<b>%s</b>", str); + gtk_label_set_line_wrap (GTK_LABEL (l), TRUE); + gtk_label_set_markup (GTK_LABEL (l), tmp); + gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); + w = gtk_event_box_new (); + + gtk_widget_modify_bg (w, GTK_STATE_NORMAL, &(style->bg[GTK_STATE_SELECTED])); + gtk_widget_modify_fg (l, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED])); + gtk_container_add (GTK_CONTAINER (w), l); + gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0); + g_free (tmp); + + if (free_text) + g_free ((gchar *)str); + free_text = FALSE; + + w = gtk_event_box_new (); + gtk_widget_modify_bg (w, GTK_STATE_NORMAL, &(style->bg[GTK_STATE_NORMAL])); + + l = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (w), l); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0); + w = l; + + e_cal_component_get_organizer (new_comp, &organizer); + if (organizer.cn) { + gchar *ptr; + ptr = strchr( organizer.value, ':'); + + if (ptr) { + ptr++; + /* To Translators: It will display "Organizer: NameOfTheUser <email@ofuser.com>" */ + tmp = g_strdup_printf (_("Organizer: %s <%s>"), organizer.cn, ptr); + } else { + /* With SunOne accounts, there may be no ':' in organiser.value */ + tmp = g_strdup_printf (_("Organizer: %s"), organizer.cn); + } + + l = gtk_label_new (tmp); + gtk_label_set_line_wrap (GTK_LABEL (l), FALSE); + gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (w), l, FALSE, FALSE, 0); + g_free (tmp); + } + + e_cal_component_get_dtstart (new_comp, &dtstart); + e_cal_component_get_due (new_comp, &dtdue); + + default_zone = e_cal_model_get_timezone (model); + use_24_hour_format = e_cal_model_get_use_24_hour_format (model); + + if (dtstart.tzid) { + zone = icalcomponent_get_timezone (e_cal_component_get_icalcomponent (new_comp), dtstart.tzid); + if (!zone) + e_cal_get_timezone ( + comp_data->client, dtstart.tzid, &zone, NULL); + if (!zone) + zone = default_zone; + } else { + zone = NULL; + } + + tmp2 = g_string_new (""); + + if (dtstart.value) { + buff[0] = 0; + + tmp_tm = icaltimetype_to_tm_with_zone ( + dtstart.value, zone, default_zone); + e_time_format_date_and_time ( + &tmp_tm, use_24_hour_format, + FALSE, FALSE, buff, 1000); + + if (buff [0]) { + g_string_append (tmp2, _("Start: ")); + g_string_append (tmp2, buff); + } + } + + if (dtdue.value) { + buff[0] = 0; + + tmp_tm = icaltimetype_to_tm_with_zone ( + dtdue.value, zone, default_zone); + e_time_format_date_and_time ( + &tmp_tm, use_24_hour_format, + FALSE, FALSE, buff, 1000); + + if (buff [0]) { + if (tmp2->len) + g_string_append (tmp2, "; "); + + g_string_append (tmp2, _("Due: ")); + g_string_append (tmp2, buff); + } + } + + if (tmp2->len) { + l = gtk_label_new (tmp2->str); + gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (w), l, FALSE, FALSE, 0); + } + + g_string_free (tmp2, TRUE); + + e_cal_component_free_datetime (&dtstart); + e_cal_component_free_datetime (&dtdue); + + tmp = e_calendar_view_get_attendees_status_info ( + new_comp, comp_data->client); + if (tmp) { + l = gtk_label_new (tmp); + gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (w), l, FALSE, FALSE, 0); + + g_free (tmp); + tmp = NULL; + } + + tmp2 = g_string_new (""); + e_cal_component_get_description_list (new_comp, &desc); + for (len = 0, p = desc; p != NULL; p = p->next) { + ECalComponentText *text = p->data; + + if (text->value != NULL) { + len += strlen (text->value); + g_string_append (tmp2, text->value); + if (len > 1024) { + g_string_set_size (tmp2, 1020); + g_string_append (tmp2, "..."); + break; + } + } + } + e_cal_component_free_text_list (desc); + + if (tmp2->len) { + l = gtk_label_new (tmp2->str); + gtk_label_set_line_wrap (GTK_LABEL (l), TRUE); + gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (box), l, FALSE, FALSE, 0); + } + + g_string_free (tmp2, TRUE); + + gtk_widget_show_all (box); + gtk_tooltip_set_custom (tooltip, box); + + g_object_unref (new_comp); + + return TRUE; +} + +static void +calendar_table_double_click (ETable *table, + gint row, + gint col, + GdkEvent *event) +{ + ECalendarTable *cal_table; + ECalModel *model; + ECalModelComponent *comp_data; + + cal_table = E_CALENDAR_TABLE (table); + model = e_calendar_table_get_model (cal_table); + comp_data = e_cal_model_get_component_at (model, row); + calendar_table_emit_open_component (cal_table, comp_data); +} + +static gint +calendar_table_right_click (ETable *table, + gint row, + gint col, + GdkEvent *event) +{ + ECalendarTable *cal_table; + + cal_table = E_CALENDAR_TABLE (table); + calendar_table_emit_popup_event (cal_table, event); + + return TRUE; +} + static void calendar_table_class_init (ECalendarTableClass *class) { GObjectClass *object_class; + GtkWidgetClass *widget_class; + ETableClass *table_class; parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (ECalendarTablePrivate)); @@ -869,6 +861,14 @@ calendar_table_class_init (ECalendarTableClass *class) object_class->dispose = calendar_table_dispose; object_class->constructed = calendar_table_constructed; + widget_class = GTK_WIDGET_CLASS (class); + widget_class->popup_menu = calendar_table_popup_menu; + widget_class->query_tooltip = calendar_table_query_tooltip; + + table_class = E_TABLE_CLASS (class); + table_class->double_click = calendar_table_double_click; + table_class->right_click = calendar_table_right_click; + g_object_class_install_property ( object_class, PROP_MODEL, @@ -957,7 +957,7 @@ e_calendar_table_get_type (void) }; type = g_type_register_static ( - GTK_TYPE_TABLE, "ECalendarTable", &type_info, 0); + E_TABLE_TYPE, "ECalendarTable", &type_info, 0); } return type; @@ -1000,27 +1000,6 @@ e_calendar_table_get_model (ECalendarTable *cal_table) return cal_table->priv->model; } -/** - * e_calendar_table_get_table: - * @cal_table: A calendar table. - * - * Queries the #ETable widget that the calendar table is using. - * - * Return value: The #ETable widget that the calendar table uses to display its - * data. - **/ -ETable * -e_calendar_table_get_table (ECalendarTable *cal_table) -{ - ETableScrolled *table_scrolled; - - g_return_val_if_fail (E_IS_CALENDAR_TABLE (cal_table), NULL); - - table_scrolled = E_TABLE_SCROLLED (cal_table->etable); - - return e_table_scrolled_get_table (table_scrolled); -} - EShellView * e_calendar_table_get_shell_view (ECalendarTable *cal_table) { @@ -1049,18 +1028,15 @@ static ECalModelComponent * get_selected_comp (ECalendarTable *cal_table) { ECalModel *model; - ETable *etable; gint row; model = e_calendar_table_get_model (cal_table); - etable = e_calendar_table_get_table (cal_table); - if (e_table_selected_count (etable) != 1) + if (e_table_selected_count (E_TABLE (cal_table)) != 1) return NULL; row = -1; - e_table_selected_row_foreach (etable, - get_selected_row_cb, - &row); + e_table_selected_row_foreach ( + E_TABLE (cal_table), get_selected_row_cb, &row); g_return_val_if_fail (row != -1, NULL); return e_cal_model_get_component_at (model, row); @@ -1158,19 +1134,16 @@ check_for_retract (ECalComponent *comp, ECal *client) void e_calendar_table_delete_selected (ECalendarTable *cal_table) { - ETable *etable; gint n_selected; ECalModelComponent *comp_data; ECalComponent *comp = NULL; - gboolean delete = FALSE; + gboolean delete = FALSE; GError *error = NULL; g_return_if_fail (cal_table != NULL); g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table)); - etable = e_calendar_table_get_table (cal_table); - - n_selected = e_table_selected_count (etable); + n_selected = e_table_selected_count (E_TABLE (cal_table)); if (n_selected <= 0) return; @@ -1240,13 +1213,12 @@ GSList * e_calendar_table_get_selected (ECalendarTable *cal_table) { struct get_selected_uids_closure closure; - ETable *etable; closure.cal_table = cal_table; closure.objects = NULL; - etable = e_calendar_table_get_table (cal_table); - e_table_selected_row_foreach (etable, add_uid_cb, &closure); + e_table_selected_row_foreach ( + E_TABLE (cal_table), add_uid_cb, &closure); return closure.objects; } @@ -1308,7 +1280,6 @@ copy_row_cb (gint model_row, gpointer data) void e_calendar_table_copy_clipboard (ECalendarTable *cal_table) { - ETable *etable; GtkClipboard *clipboard; gchar *comp_str; @@ -1317,8 +1288,8 @@ e_calendar_table_copy_clipboard (ECalendarTable *cal_table) /* create temporary VCALENDAR object */ cal_table->tmp_vcal = e_cal_util_new_top_level (); - etable = e_calendar_table_get_table (cal_table); - e_table_selected_row_foreach (etable, copy_row_cb, cal_table); + e_table_selected_row_foreach ( + E_TABLE (cal_table), copy_row_cb, cal_table); comp_str = icalcomponent_as_ical_string_r (cal_table->tmp_vcal); clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); @@ -1423,18 +1394,18 @@ e_calendar_table_paste_clipboard (ECalendarTable *cal_table) { GtkClipboard *clipboard; GnomeCanvasItem *item; - ETable *etable; + GnomeCanvas *table_canvas; g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table)); clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - etable = e_calendar_table_get_table (cal_table); - item = GNOME_CANVAS (etable->table_canvas)->focused_item; + table_canvas = E_TABLE (cal_table)->table_canvas; + item = table_canvas->focused_item; /* Paste text into a cell being edited. */ if (gtk_clipboard_wait_is_text_available (clipboard) && - GTK_WIDGET_HAS_FOCUS (etable->table_canvas) && + GTK_WIDGET_HAS_FOCUS (table_canvas) && E_IS_TABLE_ITEM (item) && E_TABLE_ITEM (item)->editing_col >= 0 && E_TABLE_ITEM (item)->editing_row >= 0) { @@ -1546,34 +1517,6 @@ show_completed_rows (ECalModel *model, GList *clients_list, gchar *show_sexp, GP } } -/* Loads the state of the table (headers shown etc.) from the given file. */ -void -e_calendar_table_load_state (ECalendarTable *cal_table, - const gchar *filename) -{ - ETable *table; - - g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table)); - g_return_if_fail (filename != NULL); - - table = e_calendar_table_get_table (cal_table); - e_table_load_state (table, filename); -} - -/* Saves the state of the table (headers shown etc.) to the given file. */ -void -e_calendar_table_save_state (ECalendarTable *cal_table, - const gchar *filename) -{ - ETable *table; - - g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table)); - g_return_if_fail (filename != NULL); - - table = e_calendar_table_get_table (cal_table); - e_table_save_state (table, filename); -} - /* Returns the current time, for the ECellDateEdit items. FIXME: Should probably use the timezone of the item rather than the current timezone, though that may be difficult to get from here. */ diff --git a/calendar/gui/e-calendar-table.h b/calendar/gui/e-calendar-table.h index d2b376ba9d..aa98aee7fa 100644 --- a/calendar/gui/e-calendar-table.h +++ b/calendar/gui/e-calendar-table.h @@ -23,9 +23,9 @@ #ifndef _E_CALENDAR_TABLE_H_ #define _E_CALENDAR_TABLE_H_ -#include <shell/e-shell-view.h> -#include <table/e-table-scrolled.h> +#include <table/e-table.h> #include <table/e-cell-date-edit.h> +#include <shell/e-shell-view.h> #include "e-cal-model.h" /* @@ -59,9 +59,7 @@ typedef struct _ECalendarTableClass ECalendarTableClass; typedef struct _ECalendarTablePrivate ECalendarTablePrivate; struct _ECalendarTable { - GtkTable parent; - - GtkWidget *etable; + ETable parent; /* The ECell used to view & edit dates. */ ECellDateEdit *dates_cell; @@ -73,7 +71,7 @@ struct _ECalendarTable { }; struct _ECalendarTableClass { - GtkTableClass parent_class; + ETableClass parent_class; /* Signals */ void (*open_component) (ECalendarTable *cal_table, @@ -90,7 +88,6 @@ GType e_calendar_table_get_type (void); GtkWidget * e_calendar_table_new (EShellView *shell_view, ECalModel *model); ECalModel * e_calendar_table_get_model (ECalendarTable *cal_table); -ETable * e_calendar_table_get_table (ECalendarTable *cal_table); EShellView * e_calendar_table_get_shell_view (ECalendarTable *cal_table); void e_calendar_table_delete_selected(ECalendarTable *cal_table); GSList * e_calendar_table_get_selected (ECalendarTable *cal_table); @@ -100,13 +97,6 @@ void e_calendar_table_cut_clipboard (ECalendarTable *cal_table); void e_calendar_table_copy_clipboard (ECalendarTable *cal_table); void e_calendar_table_paste_clipboard(ECalendarTable *cal_table); -/* These load and save the state of the table (headers shown etc.) to/from - the given file. */ -void e_calendar_table_load_state (ECalendarTable *cal_table, - const gchar *filename); -void e_calendar_table_save_state (ECalendarTable *cal_table, - const gchar *filename); - ECalModelComponent * e_calendar_table_get_selected_comp (ECalendarTable *cal_table); diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index c60784912f..977715898e 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -163,20 +163,6 @@ memo_table_date_compare_cb (gconstpointer a, } static void -memo_table_double_click_cb (EMemoTable *memo_table, - gint row, - gint col, - GdkEvent *event) -{ - ECalModel *model; - ECalModelComponent *comp_data; - - model = e_memo_table_get_model (memo_table); - comp_data = e_cal_model_get_component_at (model, row); - memo_table_emit_open_component (memo_table, comp_data); -} - -static void memo_table_model_cal_view_progress_cb (EMemoTable *memo_table, const gchar *message, gint progress, @@ -195,13 +181,222 @@ memo_table_model_cal_view_done_cb (EMemoTable *memo_table, memo_table_emit_status_message (memo_table, NULL, -1.0); } +static void +memo_table_set_model (EMemoTable *memo_table, + ECalModel *model) +{ + g_return_if_fail (memo_table->priv->model == NULL); + + memo_table->priv->model = g_object_ref (model); + + g_signal_connect_swapped ( + model, "row-appended", + G_CALLBACK (memo_table_emit_user_created), memo_table); + + g_signal_connect_swapped ( + model, "cal-view-progress", + G_CALLBACK (memo_table_model_cal_view_progress_cb), + memo_table); + + g_signal_connect_swapped ( + model, "cal-view-done", + G_CALLBACK (memo_table_model_cal_view_done_cb), + memo_table); +} + +static void +memo_table_set_shell_view (EMemoTable *memo_table, + EShellView *shell_view) +{ + g_return_if_fail (memo_table->priv->shell_view == NULL); + + memo_table->priv->shell_view = shell_view; + + g_object_add_weak_pointer ( + G_OBJECT (shell_view), + &memo_table->priv->shell_view); +} + +static void +memo_table_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) +{ + switch (property_id) { + case PROP_MODEL: + memo_table_set_model ( + E_MEMO_TABLE (object), + g_value_get_object (value)); + return; + + case PROP_SHELL_VIEW: + memo_table_set_shell_view ( + E_MEMO_TABLE (object), + g_value_get_object (value)); + return; + } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +} + +static void +memo_table_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + switch (property_id) { + case PROP_MODEL: + g_value_set_object ( + value, e_memo_table_get_model ( + E_MEMO_TABLE (object))); + return; + + case PROP_SHELL_VIEW: + g_value_set_object ( + value, e_memo_table_get_shell_view ( + E_MEMO_TABLE (object))); + return; + } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +} + +static void +memo_table_dispose (GObject *object) +{ + EMemoTablePrivate *priv; + + priv = E_MEMO_TABLE_GET_PRIVATE (object); + + if (priv->shell_view != NULL) { + g_object_remove_weak_pointer ( + G_OBJECT (priv->shell_view), &priv->shell_view); + priv->shell_view = NULL; + } + + if (priv->model != NULL) { + g_object_unref (priv->model); + priv->model = NULL; + } + + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void +memo_table_constructed (GObject *object) +{ + EMemoTable *memo_table; + ECalModel *model; + ECell *cell, *popup_cell; + ETableExtras *extras; + gint i; + AtkObject *a11y; + gchar *etspecfile; + + memo_table = E_MEMO_TABLE (object); + model = e_memo_table_get_model (memo_table); + + /* Create the header columns */ + + extras = e_table_extras_new (); + + /* + * Normal string fields. + */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + g_object_set (cell, "bg_color_column", E_CAL_MODEL_FIELD_COLOR, NULL); + e_table_extras_add_cell (extras, "calstring", cell); + + /* + * Date fields. + */ + cell = e_cell_date_edit_text_new (NULL, GTK_JUSTIFY_LEFT); + g_object_set (cell, "bg_color_column", E_CAL_MODEL_FIELD_COLOR, NULL); + + e_mutual_binding_new ( + model, "timezone", + cell, "timezone"); + + e_mutual_binding_new ( + model, "use-24-hour-format", + cell, "use-24-hour-format"); + + popup_cell = e_cell_date_edit_new (); + e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); + g_object_unref (cell); + + e_mutual_binding_new ( + model, "use-24-hour-format", + popup_cell, "use-24-hour-format"); + + e_table_extras_add_cell (extras, "dateedit", popup_cell); + memo_table->dates_cell = E_CELL_DATE_EDIT (popup_cell); + + e_cell_date_edit_set_get_time_callback ( + E_CELL_DATE_EDIT (popup_cell), + e_memo_table_get_current_time, memo_table, NULL); + + /* Sorting */ + e_table_extras_add_compare ( + extras, "date-compare", memo_table_date_compare_cb); + + /* Create pixmaps */ + + if (!icon_pixbufs[0]) + for (i = 0; i < NUM_ICONS; i++) { + icon_pixbufs[i] = e_icon_factory_get_icon (icon_names[i], GTK_ICON_SIZE_MENU); + } + + cell = e_cell_toggle_new (0, NUM_ICONS, icon_pixbufs); + e_table_extras_add_cell (extras, "icon", cell); + e_table_extras_add_pixbuf (extras, "icon", icon_pixbufs[0]); + + /* set proper format component for a default 'date' cell renderer */ + cell = e_table_extras_get_cell (extras, "date"); + e_cell_date_set_format_component (E_CELL_DATE (cell), "calendar"); + + /* set proper format component for a default 'date' cell renderer */ + cell = e_table_extras_get_cell (extras, "date"); + e_cell_date_set_format_component (E_CELL_DATE (cell), "calendar"); + + /* Construct the table */ + + etspecfile = g_build_filename ( + EVOLUTION_ETSPECDIR, "e-memo-table.etspec", NULL); + e_table_construct_from_spec_file ( + E_TABLE (memo_table), E_TABLE_MODEL (model), + extras, etspecfile, NULL); + g_free (etspecfile); + + gtk_widget_set_has_tooltip (GTK_WIDGET (memo_table), TRUE); + + a11y = gtk_widget_get_accessible (GTK_WIDGET (memo_table)); + if (a11y) + atk_object_set_name (a11y, _("Memos")); +} + +static gboolean +memo_table_popup_menu (GtkWidget *widget) +{ + EMemoTable *memo_table; + + memo_table = E_MEMO_TABLE (widget); + memo_table_emit_popup_event (memo_table, NULL); + + return TRUE; +} + static gboolean -memo_table_query_tooltip_cb (EMemoTable *memo_table, - gint x, - gint y, - gboolean keyboard_mode, - GtkTooltip *tooltip) +memo_table_query_tooltip (GtkWidget *widget, + gint x, + gint y, + gboolean keyboard_mode, + GtkTooltip *tooltip) { + EMemoTable *memo_table; ECalModel *model; ECalModelComponent *comp_data; gint row = -1, col = -1; @@ -220,21 +415,21 @@ memo_table_query_tooltip_cb (EMemoTable *memo_table, icaltimezone *zone, *default_zone; GSList *desc, *p; gint len; - ETable *etable; ESelectionModel *esm; struct tm tmp_tm; if (keyboard_mode) return FALSE; - etable = e_memo_table_get_table (memo_table); - e_table_get_mouse_over_cell (etable, &row, &col); - if (row == -1 || !etable) + memo_table = E_MEMO_TABLE (widget); + + e_table_get_mouse_over_cell (E_TABLE (memo_table), &row, &col); + if (row == -1) return FALSE; /* Respect sorting option; the 'e_table_get_mouse_over_cell' * returns sorted row, not the model one. */ - esm = e_table_get_selection_model (etable); + esm = e_table_get_selection_model (E_TABLE (memo_table)); if (esm && esm->sorter && e_sorter_needs_sorting (esm->sorter)) row = e_sorter_sorted_to_model (esm->sorter, row); @@ -403,245 +598,42 @@ memo_table_query_tooltip_cb (EMemoTable *memo_table, return TRUE; } -static gboolean -memo_table_popup_menu_cb (EMemoTable *memo_table) -{ - memo_table_emit_popup_event (memo_table, NULL); - - return TRUE; -} - -static gint -memo_table_right_click_cb (EMemoTable *memo_table, - gint row, - gint col, - GdkEvent *event) -{ - memo_table_emit_popup_event (memo_table, event); - - return TRUE; -} - -static void -memo_table_set_model (EMemoTable *memo_table, - ECalModel *model) -{ - g_return_if_fail (memo_table->priv->model == NULL); - - memo_table->priv->model = g_object_ref (model); - - g_signal_connect_swapped ( - model, "row-appended", - G_CALLBACK (memo_table_emit_user_created), memo_table); - - g_signal_connect_swapped ( - model, "cal-view-progress", - G_CALLBACK (memo_table_model_cal_view_progress_cb), - memo_table); - - g_signal_connect_swapped ( - model, "cal-view-done", - G_CALLBACK (memo_table_model_cal_view_done_cb), - memo_table); -} - -static void -memo_table_set_shell_view (EMemoTable *memo_table, - EShellView *shell_view) -{ - g_return_if_fail (memo_table->priv->shell_view == NULL); - - memo_table->priv->shell_view = shell_view; - - g_object_add_weak_pointer ( - G_OBJECT (shell_view), - &memo_table->priv->shell_view); -} - -static void -memo_table_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - switch (property_id) { - case PROP_MODEL: - memo_table_set_model ( - E_MEMO_TABLE (object), - g_value_get_object (value)); - return; - - case PROP_SHELL_VIEW: - memo_table_set_shell_view ( - E_MEMO_TABLE (object), - g_value_get_object (value)); - return; - } - - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -} - -static void -memo_table_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) -{ - switch (property_id) { - case PROP_MODEL: - g_value_set_object ( - value, e_memo_table_get_model ( - E_MEMO_TABLE (object))); - return; - - case PROP_SHELL_VIEW: - g_value_set_object ( - value, e_memo_table_get_shell_view ( - E_MEMO_TABLE (object))); - return; - } - - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -} - static void -memo_table_dispose (GObject *object) -{ - EMemoTablePrivate *priv; - - priv = E_MEMO_TABLE_GET_PRIVATE (object); - - if (priv->shell_view != NULL) { - g_object_remove_weak_pointer ( - G_OBJECT (priv->shell_view), &priv->shell_view); - priv->shell_view = NULL; - } - - if (priv->model != NULL) { - g_object_unref (priv->model); - priv->model = NULL; - } - - /* Chain up to parent's dispose() method. */ - G_OBJECT_CLASS (parent_class)->dispose (object); -} - -static void -memo_table_constructed (GObject *object) +memo_table_double_click (ETable *table, + gint row, + gint col, + GdkEvent *event) { EMemoTable *memo_table; - GtkWidget *widget; ECalModel *model; - ETable *table; - ECell *cell, *popup_cell; - ETableExtras *extras; - gint i; - AtkObject *a11y; - gchar *etspecfile; + ECalModelComponent *comp_data; - memo_table = E_MEMO_TABLE (object); + memo_table = E_MEMO_TABLE (table); model = e_memo_table_get_model (memo_table); + comp_data = e_cal_model_get_component_at (model, row); + memo_table_emit_open_component (memo_table, comp_data); +} - /* Create the header columns */ - - extras = e_table_extras_new (); - - /* - * Normal string fields. - */ - cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); - g_object_set (cell, "bg_color_column", E_CAL_MODEL_FIELD_COLOR, NULL); - e_table_extras_add_cell (extras, "calstring", cell); - - /* - * Date fields. - */ - cell = e_cell_date_edit_text_new (NULL, GTK_JUSTIFY_LEFT); - g_object_set (cell, "bg_color_column", E_CAL_MODEL_FIELD_COLOR, NULL); - - e_mutual_binding_new ( - model, "timezone", - cell, "timezone"); - - e_mutual_binding_new ( - model, "use-24-hour-format", - cell, "use-24-hour-format"); - - popup_cell = e_cell_date_edit_new (); - e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); - g_object_unref (cell); - - e_mutual_binding_new ( - model, "use-24-hour-format", - popup_cell, "use-24-hour-format"); - - e_table_extras_add_cell (extras, "dateedit", popup_cell); - memo_table->dates_cell = E_CELL_DATE_EDIT (popup_cell); - - e_cell_date_edit_set_get_time_callback ( - E_CELL_DATE_EDIT (popup_cell), - e_memo_table_get_current_time, memo_table, NULL); - - /* Sorting */ - e_table_extras_add_compare ( - extras, "date-compare", memo_table_date_compare_cb); - - /* Create pixmaps */ - - if (!icon_pixbufs[0]) - for (i = 0; i < NUM_ICONS; i++) { - icon_pixbufs[i] = e_icon_factory_get_icon (icon_names[i], GTK_ICON_SIZE_MENU); - } - - cell = e_cell_toggle_new (0, NUM_ICONS, icon_pixbufs); - e_table_extras_add_cell (extras, "icon", cell); - e_table_extras_add_pixbuf (extras, "icon", icon_pixbufs[0]); - - /* set proper format component for a default 'date' cell renderer */ - cell = e_table_extras_get_cell (extras, "date"); - e_cell_date_set_format_component (E_CELL_DATE (cell), "calendar"); - - /* set proper format component for a default 'date' cell renderer */ - cell = e_table_extras_get_cell (extras, "date"); - e_cell_date_set_format_component (E_CELL_DATE (cell), "calendar"); - - /* Create the table */ - - etspecfile = g_build_filename ( - EVOLUTION_ETSPECDIR, "e-memo-table.etspec", NULL); - widget = e_table_scrolled_new_from_spec_file ( - E_TABLE_MODEL (model), extras, etspecfile, NULL); - gtk_table_attach ( - GTK_TABLE (memo_table), widget, 0, 1, 0, 1, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - memo_table->etable = widget; - gtk_widget_show (widget); - g_free (etspecfile); +static gint +memo_table_right_click (ETable *table, + gint row, + gint col, + GdkEvent *event) +{ + EMemoTable *memo_table; - table = e_table_scrolled_get_table (E_TABLE_SCROLLED (widget)); - g_signal_connect_swapped ( - table, "double-click", - G_CALLBACK (memo_table_double_click_cb), memo_table); - g_signal_connect_swapped ( - table, "query-tooltip", - G_CALLBACK (memo_table_query_tooltip_cb), memo_table); - g_signal_connect_swapped ( - table, "popup-menu", - G_CALLBACK (memo_table_popup_menu_cb), memo_table); - g_signal_connect_swapped ( - table, "right-click", - G_CALLBACK (memo_table_right_click_cb), memo_table); - gtk_widget_set_has_tooltip (GTK_WIDGET (table), TRUE); + memo_table = E_MEMO_TABLE (table); + memo_table_emit_popup_event (memo_table, event); - a11y = gtk_widget_get_accessible (GTK_WIDGET (table)); - if (a11y) - atk_object_set_name (a11y, _("Memos")); + return TRUE; } static void memo_table_class_init (EMemoTableClass *class) { GObjectClass *object_class; + GtkWidgetClass *widget_class; + ETableClass *table_class; parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (EMemoTablePrivate)); @@ -652,6 +644,14 @@ memo_table_class_init (EMemoTableClass *class) object_class->dispose = memo_table_dispose; object_class->constructed = memo_table_constructed; + widget_class = GTK_WIDGET_CLASS (class); + widget_class->popup_menu = memo_table_popup_menu; + widget_class->query_tooltip = memo_table_query_tooltip; + + table_class = E_TABLE_CLASS (class); + table_class->double_click = memo_table_double_click; + table_class->right_click = memo_table_right_click; + g_object_class_install_property ( object_class, PROP_MODEL, @@ -740,7 +740,7 @@ e_memo_table_get_type (void) }; type = g_type_register_static ( - GTK_TYPE_TABLE, "EMemoTable", &type_info, 0); + E_TABLE_TYPE, "EMemoTable", &type_info, 0); } return type; @@ -784,27 +784,6 @@ e_memo_table_get_model (EMemoTable *memo_table) return memo_table->priv->model; } -/** - * e_memo_table_get_table: - * @memo_table: A calendar table. - * - * Queries the #ETable widget that the calendar table is using. - * - * Return value: The #ETable widget that the calendar table uses to display its - * data. - **/ -ETable * -e_memo_table_get_table (EMemoTable *memo_table) -{ - ETableScrolled *table_scrolled; - - g_return_val_if_fail (E_IS_MEMO_TABLE (memo_table), NULL); - - table_scrolled = E_TABLE_SCROLLED (memo_table->etable); - - return e_table_scrolled_get_table (table_scrolled); -} - EShellView * e_memo_table_get_shell_view (EMemoTable *memo_table) { @@ -833,18 +812,15 @@ static ECalModelComponent * get_selected_comp (EMemoTable *memo_table) { ECalModel *model; - ETable *etable; gint row; model = e_memo_table_get_model (memo_table); - etable = e_memo_table_get_table (memo_table); - if (e_table_selected_count (etable) != 1) + if (e_table_selected_count (E_TABLE (memo_table)) != 1) return NULL; row = -1; - e_table_selected_row_foreach (etable, - get_selected_row_cb, - &row); + e_table_selected_row_foreach ( + E_TABLE (memo_table), get_selected_row_cb, &row); g_return_val_if_fail (row != -1, NULL); return e_cal_model_get_component_at (model, row); @@ -907,7 +883,6 @@ delete_selected_components (EMemoTable *memo_table) void e_memo_table_delete_selected (EMemoTable *memo_table) { - ETable *etable; gint n_selected; ECalModelComponent *comp_data; ECalComponent *comp = NULL; @@ -915,9 +890,7 @@ e_memo_table_delete_selected (EMemoTable *memo_table) g_return_if_fail (memo_table != NULL); g_return_if_fail (E_IS_MEMO_TABLE (memo_table)); - etable = e_memo_table_get_table (memo_table); - - n_selected = e_table_selected_count (etable); + n_selected = e_table_selected_count (E_TABLE (memo_table)); if (n_selected <= 0) return; @@ -955,13 +928,12 @@ GSList * e_memo_table_get_selected (EMemoTable *memo_table) { struct get_selected_uids_closure closure; - ETable *etable; closure.memo_table = memo_table; closure.objects = NULL; - etable = e_memo_table_get_table (memo_table); - e_table_selected_row_foreach (etable, add_uid_cb, &closure); + e_table_selected_row_foreach ( + E_TABLE (memo_table), add_uid_cb, &closure); return closure.objects; } @@ -1023,7 +995,6 @@ copy_row_cb (gint model_row, gpointer data) void e_memo_table_copy_clipboard (EMemoTable *memo_table) { - ETable *etable; GtkClipboard *clipboard; gchar *comp_str; @@ -1032,8 +1003,8 @@ e_memo_table_copy_clipboard (EMemoTable *memo_table) /* create temporary VCALENDAR object */ memo_table->tmp_vcal = e_cal_util_new_top_level (); - etable = e_memo_table_get_table (memo_table); - e_table_selected_row_foreach (etable, copy_row_cb, memo_table); + e_table_selected_row_foreach ( + E_TABLE (memo_table), copy_row_cb, memo_table); comp_str = icalcomponent_as_ical_string_r (memo_table->tmp_vcal); clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); @@ -1138,18 +1109,18 @@ e_memo_table_paste_clipboard (EMemoTable *memo_table) { GtkClipboard *clipboard; GnomeCanvasItem *item; - ETable *etable; + GnomeCanvas *table_canvas; g_return_if_fail (E_IS_MEMO_TABLE (memo_table)); clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - etable = e_memo_table_get_table (memo_table); - item = GNOME_CANVAS (etable->table_canvas)->focused_item; + table_canvas = E_TABLE (memo_table)->table_canvas; + item = table_canvas->focused_item; /* Paste text into a cell being edited. */ if (gtk_clipboard_wait_is_text_available (clipboard) && - GTK_WIDGET_HAS_FOCUS (etable->table_canvas) && + GTK_WIDGET_HAS_FOCUS (table_canvas) && E_IS_TABLE_ITEM (item) && E_TABLE_ITEM (item)->editing_col >= 0 && E_TABLE_ITEM (item)->editing_row >= 0) { @@ -1171,34 +1142,6 @@ e_memo_table_paste_clipboard (EMemoTable *memo_table) } } -/* Loads the state of the table (headers shown etc.) from the given file. */ -void -e_memo_table_load_state (EMemoTable *memo_table, - const gchar *filename) -{ - ETable *table; - - g_return_if_fail (E_IS_MEMO_TABLE (memo_table)); - g_return_if_fail (filename != NULL); - - table = e_memo_table_get_table (memo_table); - e_table_load_state (table, filename); -} - -/* Saves the state of the table (headers shown etc.) to the given file. */ -void -e_memo_table_save_state (EMemoTable *memo_table, - const gchar *filename) -{ - ETable *table; - - g_return_if_fail (E_IS_MEMO_TABLE (memo_table)); - g_return_if_fail (filename != NULL); - - table = e_memo_table_get_table (memo_table); - e_table_save_state (table, filename); -} - /* Returns the current time, for the ECellDateEdit items. FIXME: Should probably use the timezone of the item rather than the current timezone, though that may be difficult to get from here. */ diff --git a/calendar/gui/e-memo-table.h b/calendar/gui/e-memo-table.h index d7f1857374..4d4347db4a 100644 --- a/calendar/gui/e-memo-table.h +++ b/calendar/gui/e-memo-table.h @@ -25,9 +25,9 @@ #ifndef _E_MEMO_TABLE_H_ #define _E_MEMO_TABLE_H_ -#include <shell/e-shell-view.h> -#include <table/e-table-scrolled.h> +#include <table/e-table.h> #include <table/e-cell-date-edit.h> +#include <shell/e-shell-view.h> #include "e-cal-model.h" /* @@ -65,9 +65,7 @@ typedef struct _EMemoTableClass EMemoTableClass; typedef struct _EMemoTablePrivate EMemoTablePrivate; struct _EMemoTable { - GtkTable parent; - - GtkWidget *etable; + ETable parent; /* The ECell used to view & edit dates. */ ECellDateEdit *dates_cell; @@ -79,7 +77,7 @@ struct _EMemoTable { }; struct _EMemoTableClass { - GtkTableClass parent_class; + ETableClass parent_class; /* Signals */ void (*open_component) (EMemoTable *memo_table, @@ -96,7 +94,6 @@ GType e_memo_table_get_type (void); GtkWidget * e_memo_table_new (EShellView *shell_view, ECalModel *model); ECalModel * e_memo_table_get_model (EMemoTable *memo_table); -ETable * e_memo_table_get_table (EMemoTable *memo_table); EShellView * e_memo_table_get_shell_view (EMemoTable *memo_table); icaltimezone * e_memo_table_get_timezone (EMemoTable *memo_table); void e_memo_table_set_timezone (EMemoTable *memo_table, @@ -114,13 +111,6 @@ void e_memo_table_cut_clipboard (EMemoTable *memo_table); void e_memo_table_copy_clipboard (EMemoTable *memo_table); void e_memo_table_paste_clipboard (EMemoTable *memo_table); -/* These load and save the state of the table (headers shown etc.) to/from - the given file. */ -void e_memo_table_load_state (EMemoTable *memo_table, - const gchar *filename); -void e_memo_table_save_state (EMemoTable *memo_table, - const gchar *filename); - G_END_DECLS #endif /* _E_MEMO_TABLE_H_ */ diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index 39834d07ab..0627f74dd6 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -92,15 +92,13 @@ cal_shell_content_display_view_cb (ECalShellContent *cal_shell_content, if (GAL_IS_VIEW_ETABLE (gal_view)) { ECalendarView *calendar_view; - ETable *table; view_type = GNOME_CAL_LIST_VIEW; calendar_view = gnome_calendar_get_calendar_view ( calendar, view_type); - table = e_table_scrolled_get_table ( - E_CAL_LIST_VIEW (calendar_view)->table_scrolled); gal_view_etable_attach_table ( - GAL_VIEW_ETABLE (gal_view), table); + GAL_VIEW_ETABLE (gal_view), + E_CAL_LIST_VIEW (calendar_view)->table); } else { view_type = calendar_view_get_view_type ( CALENDAR_VIEW (gal_view)); @@ -163,11 +161,11 @@ cal_shell_content_get_focus_location (ECalShellContent *cal_shell_content) memo_table = E_MEMO_TABLE (cal_shell_content->priv->memo_table); task_table = E_CALENDAR_TABLE (cal_shell_content->priv->task_table); - table = e_memo_table_get_table (memo_table); + table = E_TABLE (memo_table); if (gtk_widget_is_focus (GTK_WIDGET (table->table_canvas))) return FOCUS_MEMO_TABLE; - table = e_calendar_table_get_table (task_table); + table = E_TABLE (task_table); if (gtk_widget_is_focus (GTK_WIDGET (table->table_canvas))) return FOCUS_TASK_TABLE; @@ -204,12 +202,10 @@ cal_shell_content_get_focus_location (ECalShellContent *cal_shell_content) } else if (E_IS_CAL_LIST_VIEW (calendar_view)) { ECalListView *list_view = E_CAL_LIST_VIEW (calendar_view); - table = e_table_scrolled_get_table (list_view->table_scrolled); - - if (gtk_widget_is_focus (GTK_WIDGET (table))) + if (gtk_widget_is_focus (GTK_WIDGET (list_view->table))) return FOCUS_CALENDAR; - if (gtk_widget_is_focus (GTK_WIDGET (table->table_canvas))) + if (gtk_widget_is_focus (GTK_WIDGET (list_view->table->table_canvas))) return FOCUS_CALENDAR; if (gtk_widget_is_focus (GTK_WIDGET (list_view))) @@ -435,13 +431,24 @@ cal_shell_content_constructed (GObject *object) gtk_widget_show (widget); g_free (markup); - widget = e_calendar_table_new (shell_view, task_model); + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); + gtk_widget_show (widget); + + container = widget; + + widget = e_calendar_table_new (shell_view, task_model); + gtk_container_add (GTK_CONTAINER (container), widget); priv->task_table = g_object_ref (widget); gtk_widget_show (widget); filename = g_build_filename (config_dir, "TaskPad", NULL); - e_calendar_table_load_state (E_CALENDAR_TABLE (widget), filename); + e_table_load_state (E_TABLE (widget), filename); g_free (filename); g_signal_connect_swapped ( @@ -464,13 +471,24 @@ cal_shell_content_constructed (GObject *object) gtk_widget_show (widget); g_free (markup); - widget = e_memo_table_new (shell_view, memo_model); + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); + gtk_widget_show (widget); + + container = widget; + + widget = e_memo_table_new (shell_view, memo_model); + gtk_container_add (GTK_CONTAINER (container), widget); priv->memo_table = g_object_ref (widget); gtk_widget_show (widget); filename = g_build_filename (config_dir, "MemoPad", NULL); - e_memo_table_load_state (E_MEMO_TABLE (widget), filename); + e_table_load_state (E_TABLE (widget), filename); g_free (filename); g_signal_connect_swapped ( diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 3b25d0b763..b5fd49bb83 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -207,11 +207,9 @@ action_calendar_print_cb (GtkAction *action, print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG; if (E_IS_CAL_LIST_VIEW (view)) { - ECalListView *list_view; ETable *table; - list_view = E_CAL_LIST_VIEW (view); - table = e_table_scrolled_get_table (list_view->table_scrolled); + table = E_CAL_LIST_VIEW (view)->table; print_table (table, _("Print"), _("Calendar"), print_action); } else { time_t start; @@ -238,11 +236,9 @@ action_calendar_print_preview_cb (GtkAction *action, print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW; if (E_IS_CAL_LIST_VIEW (view)) { - ECalListView *list_view; ETable *table; - list_view = E_CAL_LIST_VIEW (view); - table = e_table_scrolled_get_table (list_view->table_scrolled); + table = E_CAL_LIST_VIEW (view)->table; print_table (table, _("Print"), _("Calendar"), print_action); } else { time_t start; diff --git a/modules/calendar/e-cal-shell-view-memopad.c b/modules/calendar/e-cal-shell-view-memopad.c index d786f4701a..5f1ed972dd 100644 --- a/modules/calendar/e-cal-shell-view-memopad.c +++ b/modules/calendar/e-cal-shell-view-memopad.c @@ -393,7 +393,6 @@ e_cal_shell_view_memopad_actions_update (ECalShellView *cal_shell_view) EShellWindow *shell_window; EShellView *shell_view; EMemoTable *memo_table; - ETable *table; GtkAction *action; GSList *list, *iter; const gchar *label; @@ -408,8 +407,7 @@ e_cal_shell_view_memopad_actions_update (ECalShellView *cal_shell_view) cal_shell_content = cal_shell_view->priv->cal_shell_content; memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - table = e_memo_table_get_table (memo_table); - n_selected = e_table_selected_count (table); + n_selected = e_table_selected_count (E_TABLE (memo_table)); list = e_memo_table_get_selected (memo_table); for (iter = list; iter != NULL; iter = iter->next) { diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index ddee1d9544..4aa9d00436 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -557,6 +557,11 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) cal_shell_view); g_signal_connect_swapped ( + memo_table, "selection-change", + G_CALLBACK (e_cal_shell_view_memopad_actions_update), + cal_shell_view); + + g_signal_connect_swapped ( memo_table, "status-message", G_CALLBACK (e_cal_shell_view_memopad_set_status_message), cal_shell_view); @@ -572,12 +577,7 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) cal_shell_view); g_signal_connect_swapped ( - e_memo_table_get_table (memo_table), "selection-change", - G_CALLBACK (e_cal_shell_view_memopad_actions_update), - cal_shell_view); - - g_signal_connect_swapped ( - e_calendar_table_get_table (task_table), "selection-change", + task_table, "selection-change", G_CALLBACK (e_cal_shell_view_taskpad_actions_update), cal_shell_view); diff --git a/modules/calendar/e-cal-shell-view-taskpad.c b/modules/calendar/e-cal-shell-view-taskpad.c index a00474a572..e011568117 100644 --- a/modules/calendar/e-cal-shell-view-taskpad.c +++ b/modules/calendar/e-cal-shell-view-taskpad.c @@ -481,7 +481,6 @@ e_cal_shell_view_taskpad_actions_update (ECalShellView *cal_shell_view) EShellWindow *shell_window; EShellView *shell_view; ECalendarTable *task_table; - ETable *table; GtkAction *action; GSList *list, *iter; const gchar *label; @@ -499,8 +498,7 @@ e_cal_shell_view_taskpad_actions_update (ECalShellView *cal_shell_view) cal_shell_content = cal_shell_view->priv->cal_shell_content; task_table = e_cal_shell_content_get_task_table (cal_shell_content); - table = e_calendar_table_get_table (task_table); - n_selected = e_table_selected_count (table); + n_selected = e_table_selected_count (E_TABLE (task_table)); list = e_calendar_table_get_selected (task_table); for (iter = list; iter != NULL; iter = iter->next) { diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 21ab63e789..d3fe10f20b 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -85,15 +85,14 @@ memo_shell_content_display_view_cb (EMemoShellContent *memo_shell_content, GalView *gal_view) { EMemoTable *memo_table; - ETable *table; if (!GAL_IS_VIEW_ETABLE (gal_view)) return; memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - table = e_memo_table_get_table (memo_table); - gal_view_etable_attach_table (GAL_VIEW_ETABLE (gal_view), table); + gal_view_etable_attach_table ( + GAL_VIEW_ETABLE (gal_view), E_TABLE (memo_table)); } static void @@ -145,7 +144,6 @@ memo_shell_content_table_drag_data_get_cb (EMemoShellContent *memo_shell_content guint time) { EMemoTable *memo_table; - ETable *table; struct { ECalModel *model; @@ -156,13 +154,13 @@ memo_shell_content_table_drag_data_get_cb (EMemoShellContent *memo_shell_content return; memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - table = e_memo_table_get_table (memo_table); foreach_data.model = e_memo_table_get_model (memo_table); foreach_data.list = NULL; e_table_selected_row_foreach ( - table, memo_shell_content_table_foreach_cb, + E_TABLE (memo_table), + memo_shell_content_table_foreach_cb, &foreach_data); if (foreach_data.list != NULL) { @@ -243,7 +241,6 @@ memo_shell_content_model_row_changed_cb (EMemoShellContent *memo_shell_content, { ECalModelComponent *comp_data; EMemoTable *memo_table; - ETable *table; const gchar *current_uid; const gchar *uid; @@ -260,9 +257,9 @@ memo_shell_content_model_row_changed_cb (EMemoShellContent *memo_shell_content, return; memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - table = e_memo_table_get_table (memo_table); - memo_shell_content_cursor_change_cb (memo_shell_content, 0, table); + memo_shell_content_cursor_change_cb ( + memo_shell_content, 0, E_TABLE (memo_table)); } static GtkOrientation @@ -396,7 +393,6 @@ memo_shell_content_constructed (GObject *object) EShellTaskbar *shell_taskbar; GalViewInstance *view_instance; icaltimezone *timezone; - ETable *table; GConfBridge *bridge; GtkWidget *container; GtkWidget *widget; @@ -431,13 +427,26 @@ memo_shell_content_constructed (GObject *object) e_binding_new (object, "orientation", widget, "orientation"); + container = priv->paned; + + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); + gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + gtk_widget_show (widget); + container = widget; widget = e_memo_table_new (shell_view, priv->memo_model); - gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + gtk_container_add (GTK_CONTAINER (container), widget); priv->memo_table = g_object_ref (widget); gtk_widget_show (widget); + container = priv->paned; + widget = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (widget), @@ -466,33 +475,31 @@ memo_shell_content_constructed (GObject *object) /* Configure the memo table. */ - widget = E_MEMO_TABLE (priv->memo_table)->etable; - table = e_table_scrolled_get_table (E_TABLE_SCROLLED (widget)); - - e_table_set_state (table, E_MEMO_TABLE_DEFAULT_STATE); + e_table_set_state ( + E_TABLE (priv->memo_table), E_MEMO_TABLE_DEFAULT_STATE); e_table_drag_source_set ( - table, GDK_BUTTON1_MASK, - drag_types, G_N_ELEMENTS (drag_types), + E_TABLE (priv->memo_table), + GDK_BUTTON1_MASK, drag_types, G_N_ELEMENTS (drag_types), GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_ASK); g_signal_connect_swapped ( - table, "table-drag-data-get", + priv->memo_table, "table-drag-data-get", G_CALLBACK (memo_shell_content_table_drag_data_get_cb), object); g_signal_connect_swapped ( - table, "table-drag-data-delete", + priv->memo_table, "table-drag-data-delete", G_CALLBACK (memo_shell_content_table_drag_data_delete_cb), object); g_signal_connect_swapped ( - table, "cursor-change", + priv->memo_table, "cursor-change", G_CALLBACK (memo_shell_content_cursor_change_cb), object); g_signal_connect_swapped ( - table, "selection-change", + priv->memo_table, "selection-change", G_CALLBACK (memo_shell_content_selection_change_cb), object); @@ -529,7 +536,6 @@ memo_shell_content_check_state (EShellContent *shell_content) { EMemoShellContent *memo_shell_content; EMemoTable *memo_table; - ETable *table; GSList *list, *iter; GtkClipboard *clipboard; gboolean editable = TRUE; @@ -540,8 +546,7 @@ memo_shell_content_check_state (EShellContent *shell_content) memo_shell_content = E_MEMO_SHELL_CONTENT (shell_content); memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - table = e_memo_table_get_table (memo_table); - n_selected = e_table_selected_count (table); + n_selected = e_table_selected_count (E_TABLE (memo_table)); list = e_memo_table_get_selected (memo_table); for (iter = list; iter != NULL; iter = iter->next) { diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index f5fb6284b4..78531fc8ba 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -243,15 +243,13 @@ action_memo_list_print_cb (GtkAction *action, { EMemoShellContent *memo_shell_content; EMemoTable *memo_table; - ETable *table; - GtkPrintOperationAction print_action; memo_shell_content = memo_shell_view->priv->memo_shell_content; memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - table = e_memo_table_get_table (memo_table); - print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG; - print_table (table, _("Print Memos"), _("Memos"), print_action); + print_table ( + E_TABLE (memo_table), _("Print Memos"), _("Memos"), + GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG); } static void @@ -260,15 +258,13 @@ action_memo_list_print_preview_cb (GtkAction *action, { EMemoShellContent *memo_shell_content; EMemoTable *memo_table; - ETable *table; - GtkPrintOperationAction print_action; memo_shell_content = memo_shell_view->priv->memo_shell_content; memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - table = e_memo_table_get_table (memo_table); - print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW; - print_table (table, _("Print Memos"), _("Memos"), print_action); + print_table ( + E_TABLE (memo_table), _("Print Memos"), _("Memos"), + GTK_PRINT_OPERATION_ACTION_PREVIEW); } static void diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c index 9ae26c7767..583af2af17 100644 --- a/modules/calendar/e-memo-shell-view-private.c +++ b/modules/calendar/e-memo-shell-view-private.c @@ -173,7 +173,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) EShellWindow *shell_window; EMemoTable *memo_table; ECalModel *model; - ETable *table; ESourceSelector *selector; shell_view = E_SHELL_VIEW (memo_shell_view); @@ -193,7 +192,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) memo_shell_content = E_MEMO_SHELL_CONTENT (shell_content); memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); model = e_memo_table_get_model (memo_table); - table = e_memo_table_get_table (memo_table); memo_shell_sidebar = E_MEMO_SHELL_SIDEBAR (shell_sidebar); selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); @@ -214,6 +212,16 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) memo_shell_view); g_signal_connect_swapped ( + memo_table, "selection-change", + G_CALLBACK (e_memo_shell_view_update_sidebar), + memo_shell_view); + + g_signal_connect_swapped ( + memo_table, "selection-change", + G_CALLBACK (e_shell_view_update_actions), + memo_shell_view); + + g_signal_connect_swapped ( memo_table, "status-message", G_CALLBACK (e_memo_shell_view_set_status_message), memo_shell_view); @@ -239,16 +247,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) memo_shell_view); g_signal_connect_swapped ( - table, "selection-change", - G_CALLBACK (e_memo_shell_view_update_sidebar), - memo_shell_view); - - g_signal_connect_swapped ( - table, "selection-change", - G_CALLBACK (e_shell_view_update_actions), - memo_shell_view); - - g_signal_connect_swapped ( memo_shell_sidebar, "client-added", G_CALLBACK (memo_shell_view_selector_client_added_cb), memo_shell_view); @@ -394,7 +392,6 @@ e_memo_shell_view_update_sidebar (EMemoShellView *memo_shell_view) EShellSidebar *shell_sidebar; EMemoTable *memo_table; ECalModel *model; - ETable *table; GString *string; const gchar *format; gint n_rows; @@ -407,10 +404,9 @@ e_memo_shell_view_update_sidebar (EMemoShellView *memo_shell_view) memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); model = e_memo_table_get_model (memo_table); - table = e_memo_table_get_table (memo_table); n_rows = e_table_model_row_count (E_TABLE_MODEL (model)); - n_selected = e_table_selected_count (table); + n_selected = e_table_selected_count (E_TABLE (memo_table)); string = g_string_sized_new (64); diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index ca17cdbd5c..c033d6e489 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -86,15 +86,14 @@ task_shell_content_display_view_cb (ETaskShellContent *task_shell_content, GalView *gal_view) { ECalendarTable *task_table; - ETable *table; if (!GAL_IS_VIEW_ETABLE (gal_view)) return; task_table = e_task_shell_content_get_task_table (task_shell_content); - table = e_calendar_table_get_table (task_table); - gal_view_etable_attach_table (GAL_VIEW_ETABLE (gal_view), table); + gal_view_etable_attach_table ( + GAL_VIEW_ETABLE (gal_view), E_TABLE (task_table)); } static void @@ -146,7 +145,6 @@ task_shell_content_table_drag_data_get_cb (ETaskShellContent *task_shell_content guint time) { ECalendarTable *task_table; - ETable *table; struct { ECalModel *model; @@ -157,13 +155,13 @@ task_shell_content_table_drag_data_get_cb (ETaskShellContent *task_shell_content return; task_table = e_task_shell_content_get_task_table (task_shell_content); - table = e_calendar_table_get_table (task_table); foreach_data.model = e_calendar_table_get_model (task_table); foreach_data.list = NULL; e_table_selected_row_foreach ( - table, task_shell_content_table_foreach_cb, + E_TABLE (task_table), + task_shell_content_table_foreach_cb, &foreach_data); if (foreach_data.list != NULL) { @@ -242,7 +240,6 @@ task_shell_content_model_row_changed_cb (ETaskShellContent *task_shell_content, { ECalModelComponent *comp_data; ECalendarTable *task_table; - ETable *table; const gchar *current_uid; const gchar *uid; @@ -259,9 +256,9 @@ task_shell_content_model_row_changed_cb (ETaskShellContent *task_shell_content, return; task_table = e_task_shell_content_get_task_table (task_shell_content); - table = e_calendar_table_get_table (task_table); - task_shell_content_cursor_change_cb (task_shell_content, 0, table); + task_shell_content_cursor_change_cb ( + task_shell_content, 0, E_TABLE (task_table)); } static GtkOrientation @@ -395,7 +392,6 @@ task_shell_content_constructed (GObject *object) EShellView *shell_view; GalViewInstance *view_instance; icaltimezone *timezone; - ETable *table; GConfBridge *bridge; GtkWidget *container; GtkWidget *widget; @@ -429,13 +425,26 @@ task_shell_content_constructed (GObject *object) e_binding_new (object, "orientation", widget, "orientation"); + container = priv->paned; + + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); + gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + gtk_widget_show (widget); + container = widget; widget = e_calendar_table_new (shell_view, priv->task_model); - gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + gtk_container_add (GTK_CONTAINER (container), widget); priv->task_table = g_object_ref (widget); gtk_widget_show (widget); + container = priv->paned; + widget = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (widget), @@ -464,33 +473,31 @@ task_shell_content_constructed (GObject *object) /* Configure the task table. */ - widget = E_CALENDAR_TABLE (priv->task_table)->etable; - table = e_table_scrolled_get_table (E_TABLE_SCROLLED (widget)); - - e_table_set_state (table, E_CALENDAR_TABLE_DEFAULT_STATE); + e_table_set_state ( + E_TABLE (priv->task_table), E_CALENDAR_TABLE_DEFAULT_STATE); e_table_drag_source_set ( - table, GDK_BUTTON1_MASK, - drag_types, G_N_ELEMENTS (drag_types), + E_TABLE (priv->task_table), + GDK_BUTTON1_MASK, drag_types, G_N_ELEMENTS (drag_types), GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_ASK); g_signal_connect_swapped ( - table, "table-drag-data-get", + priv->task_table, "table-drag-data-get", G_CALLBACK (task_shell_content_table_drag_data_get_cb), object); g_signal_connect_swapped ( - table, "table-drag-data-delete", + priv->task_table, "table-drag-data-delete", G_CALLBACK (task_shell_content_table_drag_data_delete_cb), object); g_signal_connect_swapped ( - table, "cursor-change", + priv->task_table, "cursor-change", G_CALLBACK (task_shell_content_cursor_change_cb), object); g_signal_connect_swapped ( - table, "selection-change", + priv->task_table, "selection-change", G_CALLBACK (task_shell_content_selection_change_cb), object); @@ -527,7 +534,6 @@ task_shell_content_check_state (EShellContent *shell_content) { ETaskShellContent *task_shell_content; ECalendarTable *task_table; - ETable *table; GSList *list, *iter; GtkClipboard *clipboard; gboolean assignable = TRUE; @@ -541,8 +547,7 @@ task_shell_content_check_state (EShellContent *shell_content) task_shell_content = E_TASK_SHELL_CONTENT (shell_content); task_table = e_task_shell_content_get_task_table (task_shell_content); - table = e_calendar_table_get_table (task_table); - n_selected = e_table_selected_count (table); + n_selected = e_table_selected_count (E_TABLE (task_table)); list = e_calendar_table_get_selected (task_table); for (iter = list; iter != NULL; iter = iter->next) { diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index f1285a714b..f923a03f2b 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -274,15 +274,13 @@ action_task_list_print_cb (GtkAction *action, { ETaskShellContent *task_shell_content; ECalendarTable *task_table; - ETable *table; - GtkPrintOperationAction print_action; task_shell_content = task_shell_view->priv->task_shell_content; task_table = e_task_shell_content_get_task_table (task_shell_content); - table = e_calendar_table_get_table (task_table); - print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG; - print_table (table, _("Print Tasks"), _("Tasks"), print_action); + print_table ( + E_TABLE (task_table), _("Print Tasks"), _("Tasks"), + GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG); } static void @@ -291,15 +289,13 @@ action_task_list_print_preview_cb (GtkAction *action, { ETaskShellContent *task_shell_content; ECalendarTable *task_table; - ETable *table; - GtkPrintOperationAction print_action; task_shell_content = task_shell_view->priv->task_shell_content; task_table = e_task_shell_content_get_task_table (task_shell_content); - table = e_calendar_table_get_table (task_table); - print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW; - print_table (table, _("Print Tasks"), _("Tasks"), print_action); + print_table ( + E_TABLE (task_table), _("Print Tasks"), _("Tasks"), + GTK_PRINT_OPERATION_ACTION_PREVIEW); } static void diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index bbe0a1035d..4337f19a79 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -223,7 +223,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) EShellWindow *shell_window; ECalendarTable *task_table; ECalModel *model; - ETable *table; ESourceSelector *selector; shell_view = E_SHELL_VIEW (task_shell_view); @@ -247,7 +246,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) task_shell_content = E_TASK_SHELL_CONTENT (shell_content); task_table = e_task_shell_content_get_task_table (task_shell_content); model = e_calendar_table_get_model (task_table); - table = e_calendar_table_get_table (task_table); task_shell_sidebar = E_TASK_SHELL_SIDEBAR (shell_sidebar); selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); @@ -268,6 +266,16 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) task_shell_view); g_signal_connect_swapped ( + task_table, "selection-change", + G_CALLBACK (e_task_shell_view_update_sidebar), + task_shell_view); + + g_signal_connect_swapped ( + task_table, "selection-change", + G_CALLBACK (e_shell_view_update_actions), + task_shell_view); + + g_signal_connect_swapped ( task_table, "status-message", G_CALLBACK (e_task_shell_view_set_status_message), task_shell_view); @@ -293,16 +301,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) task_shell_view); g_signal_connect_swapped ( - table, "selection-change", - G_CALLBACK (e_task_shell_view_update_sidebar), - task_shell_view); - - g_signal_connect_swapped ( - table, "selection-change", - G_CALLBACK (e_shell_view_update_actions), - task_shell_view); - - g_signal_connect_swapped ( task_shell_sidebar, "client-added", G_CALLBACK (task_shell_view_selector_client_added_cb), task_shell_view); @@ -545,7 +543,6 @@ e_task_shell_view_update_sidebar (ETaskShellView *task_shell_view) EShellSidebar *shell_sidebar; ECalendarTable *task_table; ECalModel *model; - ETable *table; GString *string; const gchar *format; gint n_rows; @@ -558,10 +555,9 @@ e_task_shell_view_update_sidebar (ETaskShellView *task_shell_view) task_table = e_task_shell_content_get_task_table (task_shell_content); model = e_calendar_table_get_model (task_table); - table = e_calendar_table_get_table (task_table); n_rows = e_table_model_row_count (E_TABLE_MODEL (model)); - n_selected = e_table_selected_count (table); + n_selected = e_table_selected_count (E_TABLE (task_table)); string = g_string_sized_new (64); diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c index ade534bc02..c63456d620 100644 --- a/widgets/menus/gal-define-views-dialog.c +++ b/widgets/menus/gal-define-views-dialog.c @@ -178,26 +178,6 @@ gdvd_button_delete_callback(GtkWidget *widget, GalDefineViewsDialog *dialog) } } -#if 0 -static void -gdvd_button_copy_callback(GtkWidget *widget, GalDefineViewsDialog *dialog) -{ - gint row; - GtkWidget *scrolled; - ETable *etable; - - scrolled = e_builder_get_widget(dialog->builder, "custom-table"); - etable = e_table_scrolled_get_table(E_TABLE_SCROLLED(scrolled)); - row = e_table_get_cursor_row (E_TABLE(etable)); - - if (row != -1) { - gal_define_views_model_copy_view(GAL_DEFINE_VIEWS_MODEL(dialog->model), - row); - } - -} -#endif - static void gdvd_cursor_changed_callback (GtkWidget *widget, GalDefineViewsDialog *dialog) { @@ -271,9 +251,6 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog) gdvd_connect_signal (dialog, "button-new", "clicked", G_CALLBACK (gdvd_button_new_callback)); gdvd_connect_signal (dialog, "button-modify", "clicked", G_CALLBACK (gdvd_button_modify_callback)); gdvd_connect_signal (dialog, "button-delete", "clicked", G_CALLBACK (gdvd_button_delete_callback)); -#if 0 - gdvd_connect_signal (dialog, "button-copy", "clicked", G_CALLBACK (gdvd_button_copy_callback)); -#endif gdvd_connect_signal (dialog, "treeview1", "cursor-changed", G_CALLBACK (gdvd_cursor_changed_callback)); g_signal_connect (dialog, "response", G_CALLBACK (dialog_response), NULL); diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c index 328cc5e35e..ba0ade0eef 100644 --- a/widgets/menus/gal-view-new-dialog.c +++ b/widgets/menus/gal-view-new-dialog.c @@ -23,7 +23,6 @@ #include <config.h> -#include "table/e-table-scrolled.h" #include <glib/gi18n.h> #include "e-util/e-util.h" #include "e-util/e-util-private.h" diff --git a/widgets/table/Makefile.am b/widgets/table/Makefile.am index ae21e57c1e..b43e1f0124 100644 --- a/widgets/table/Makefile.am +++ b/widgets/table/Makefile.am @@ -49,7 +49,6 @@ libetable_la_SOURCES = \ e-table-memory.c \ e-table-model.c \ e-table-one.c \ - e-table-scrolled.c \ e-table-search.c \ e-table-selection-model.c \ e-table-sort-info.c \ @@ -128,7 +127,6 @@ libetableinclude_HEADERS = \ e-table-memory.h \ e-table-model.h \ e-table-one.h \ - e-table-scrolled.h \ e-table-search.h \ e-table-selection-model.h \ e-table-sort-info.h \ diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 226b04cdb3..1bbfc6a8b3 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -41,7 +41,6 @@ #include "e-table-config.h" #include "e-table-memory-store.h" -#include "e-table-scrolled.h" #include "e-table-without.h" G_DEFINE_TYPE (ETableConfig, e_table_config, G_TYPE_OBJECT) @@ -629,13 +628,14 @@ e_table_proxy_etable_shown_new (ETableModel *store) { ETableModel *model = NULL; GtkWidget *widget; - ETableScrolled *ets; model = e_table_subset_variable_new (store); - widget = e_table_scrolled_new (model, NULL, spec, NULL); - ets = E_TABLE_SCROLLED (widget); - atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Show Fields")); + widget = e_table_new (model, NULL, spec, NULL); + + atk_object_set_name ( + gtk_widget_get_accessible (widget), + _("Show Fields")); return widget; } @@ -645,16 +645,17 @@ e_table_proxy_etable_available_new (ETableModel *store) { ETableModel *model; GtkWidget *widget; - ETableScrolled *ets; - model = e_table_without_new (store, - NULL, NULL, NULL, NULL, NULL, NULL, NULL); + model = e_table_without_new ( + store, NULL, NULL, NULL, NULL, NULL, NULL, NULL); e_table_without_show_all (E_TABLE_WITHOUT (model)); - widget = e_table_scrolled_new (model, NULL, spec, NULL); - ets = E_TABLE_SCROLLED (widget); - atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Available Fields")); + widget = e_table_new (model, NULL, spec, NULL); + + atk_object_set_name ( + gtk_widget_get_accessible (widget), + _("Available Fields")); return widget; } @@ -1153,29 +1154,32 @@ static void configure_fields_dialog (ETableConfig *config, GtkBuilder *builder) { GtkWidget *scrolled; + GtkWidget *etable; ETableModel *store = create_store (config); /* "custom-available" widget */ - scrolled = e_table_proxy_etable_available_new (store); - gtk_widget_show (scrolled); - gtk_box_pack_start (GTK_BOX (e_builder_get_widget (builder, "vbox4")), scrolled, TRUE, TRUE, 0); - config->available = e_table_scrolled_get_table (E_TABLE_SCROLLED (scrolled)); + etable = e_table_proxy_etable_available_new (store); + gtk_widget_show (etable); + scrolled = e_builder_get_widget (builder, "available-scrolled"); + gtk_container_add (GTK_CONTAINER (scrolled), etable); + config->available = E_TABLE (etable); g_object_get (config->available, "model", &config->available_model, NULL); - gtk_widget_show_all (scrolled); - gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-available")), scrolled); + gtk_widget_show_all (etable); + gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-available")), etable); /* "custom-shown" widget */ - scrolled = e_table_proxy_etable_shown_new (store); - gtk_widget_show (scrolled); - gtk_box_pack_start (GTK_BOX (e_builder_get_widget (builder, "vbox5")), scrolled, TRUE, TRUE, 0); - config->shown = e_table_scrolled_get_table (E_TABLE_SCROLLED (scrolled)); + etable = e_table_proxy_etable_shown_new (store); + gtk_widget_show (etable); + scrolled = e_builder_get_widget (builder, "shown-scrolled"); + gtk_container_add (GTK_CONTAINER (scrolled), etable); + config->shown = E_TABLE (etable); g_object_get (config->shown, "model", &config->shown_model, NULL); - gtk_widget_show_all (scrolled); - gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-displayed")), scrolled); + gtk_widget_show_all (etable); + gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (builder, "label-displayed")), etable); connect_button (config, builder, "button-add", G_CALLBACK (config_button_add)); connect_button (config, builder, "button-remove", G_CALLBACK (config_button_remove)); diff --git a/widgets/table/e-table-config.ui b/widgets/table/e-table-config.ui index 5e81172a29..cfc6cb57fc 100644 --- a/widgets/table/e-table-config.ui +++ b/widgets/table/e-table-config.ui @@ -1,191 +1,142 @@ <?xml version="1.0"?> -<!--*- mode: xml -*--> <interface> + <!-- interface-requires gtk+ 2.12 --> + <!-- interface-naming-policy toplevel-contextual --> <object class="GtkDialog" id="dialog-show-fields"> <property name="title" translatable="yes">Show Fields</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">True</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="has_separator">True</property> + <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkVBox" id="dialog-vbox3"> <property name="visible">True</property> - <property name="homogeneous">False</property> + <property name="orientation">vertical</property> <property name="spacing">8</property> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area3"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <child> - <object class="GtkButton" id="button22"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </object> - </child> - <child> - <object class="GtkButton" id="button20"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </object> - </child> - </object> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> <child> <object class="GtkVBox" id="vbox2"> <property name="visible">True</property> - <property name="homogeneous">False</property> + <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkTable" id="table2"> <property name="visible">True</property> - <property name="n_rows">1</property> <property name="n_columns">5</property> - <property name="homogeneous">True</property> - <property name="row_spacing">6</property> <property name="column_spacing">6</property> + <property name="row_spacing">6</property> + <property name="homogeneous">True</property> <child> <object class="GtkLabel" id="label-available"> <property name="visible">True</property> + <property name="xalign">0</property> <property name="label" translatable="yes">A_vailable Fields:</property> <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> <packing> - <property name="left_attach">0</property> <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkLabel" id="label-displayed"> <property name="visible">True</property> + <property name="xalign">0</property> <property name="label" translatable="yes">_Show these fields in order:</property> <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> <packing> <property name="left_attach">3</property> <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> + <child> + <placeholder/> + </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkTable" id="table3"> <property name="visible">True</property> - <property name="n_rows">1</property> <property name="n_columns">5</property> - <property name="homogeneous">True</property> - <property name="row_spacing">6</property> <property name="column_spacing">6</property> + <property name="row_spacing">6</property> + <property name="homogeneous">True</property> <child> <object class="GtkVBox" id="vbox4"> <property name="visible">True</property> - <property name="homogeneous">False</property> + <property name="orientation">vertical</property> <property name="spacing">6</property> - <!-- child id="custom-available" here --> + <child> + <object class="GtkScrolledWindow" id="available-scrolled"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> </object> <packing> - <property name="left_attach">0</property> <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> </packing> </child> <child> <object class="GtkVBox" id="vbox5"> <property name="visible">True</property> - <property name="homogeneous">False</property> + <property name="orientation">vertical</property> <property name="spacing">6</property> - <!-- child id="custom-shown" here --> + <child> + <object class="GtkScrolledWindow" id="shown-scrolled"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkHBox" id="hbox4"> <property name="visible">True</property> - <property name="homogeneous">True</property> <property name="spacing">6</property> + <property name="homogeneous">True</property> <child> <object class="GtkButton" id="button-up"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> + <property name="receives_default">True</property> <child> <object class="GtkAlignment" id="alignment7"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> <child> <object class="GtkHBox" id="hbox19"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="stock">gtk-go-up</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> @@ -193,23 +144,11 @@ <property name="visible">True</property> <property name="label" translatable="yes">Move _Up</property> <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> @@ -218,47 +157,33 @@ </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkButton" id="button-down"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> + <property name="receives_default">True</property> <child> <object class="GtkAlignment" id="alignment8"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> <child> <object class="GtkHBox" id="hbox20"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="stock">gtk-go-down</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> @@ -266,23 +191,11 @@ <property name="visible">True</property> <property name="label" translatable="yes">Move _Down</property> <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> @@ -291,91 +204,63 @@ </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> <packing> <property name="left_attach">3</property> <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> </packing> </child> <child> <object class="GtkVBox" id="vbox6"> <property name="visible">True</property> - <property name="homogeneous">False</property> + <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkButton" id="button-add"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> + <property name="receives_default">False</property> <child> <object class="GtkAlignment" id="alignment5"> <property name="visible">True</property> - <property name="xalign">0.7</property> - <property name="yalign">0.5</property> + <property name="xalign">0.69999998807907104</property> <property name="xscale">0</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> <child> <object class="GtkHBox" id="hbox17"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <object class="GtkLabel" id="label31"> <property name="visible">True</property> <property name="label" translatable="yes">_Add</property> <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="stock">gtk-go-forward</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> @@ -384,47 +269,34 @@ </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkButton" id="button-remove"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> + <property name="receives_default">False</property> <child> <object class="GtkAlignment" id="alignment6"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> <child> <object class="GtkHBox" id="hbox18"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">2</property> <child> <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="stock">gtk-go-back</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> @@ -432,23 +304,11 @@ <property name="visible">True</property> <property name="label" translatable="yes">_Remove</property> <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> @@ -457,9 +317,9 @@ </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> <child> @@ -469,193 +329,154 @@ <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">2</property> </packing> </child> - </object> - </child> - <action-widgets> - <action-widget response="-6">button22</action-widget> - <action-widget response="-5">button20</action-widget> - </action-widgets> - </object> - <object class="GtkDialog" id="dialog-group-by"> - <property name="title" translatable="yes">Group</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">True</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="has_separator">True</property> - <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox4"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">8</property> <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area4"> + <object class="GtkHButtonBox" id="dialog-action_area3"> <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="layout_style">end</property> <child> - <object class="GtkButton" id="button39"> + <object class="GtkButton" id="button22"> + <property name="label">gtk-cancel</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Clear _All</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </object> - </child> - <child> - <object class="GtkButton" id="button42"> - <property name="visible">True</property> <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> + <property name="receives_default">False</property> <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> </child> <child> - <object class="GtkButton" id="button41"> + <object class="GtkButton" id="button20"> + <property name="label">gtk-ok</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-ok</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> + <property name="pack_type">end</property> + <property name="position">0</property> </packing> </child> + </object> + </child> + <action-widgets> + <action-widget response="-6">button22</action-widget> + <action-widget response="-5">button20</action-widget> + </action-widgets> + </object> + <object class="GtkDialog" id="dialog-group-by"> + <property name="title" translatable="yes">Group</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkVBox" id="dialog-vbox4"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">8</property> <child> <object class="GtkVBox" id="vbox24"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkHBox" id="hbox13"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkFrame" id="frame-group-1"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox5"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkVBox" id="vbox7"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - <!-- child id="group-combo-1" here --> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="checkbutton-group-1"> + <property name="label" translatable="yes">_Show field in View</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Show field in View</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox8"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-group-1"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-group-1"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-group-1</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -664,205 +485,137 @@ <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="label" translatable="yes">Group Items By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkLabel" id="label9"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">2</property> </packing> </child> <child> <object class="GtkLabel" id="label10"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">3</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkHBox" id="hbox14"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label11"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkFrame" id="frame-group-2"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox6"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkVBox" id="vbox9"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - <!-- child id="group-combo-2" here --> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="checkbutton-group-2"> + <property name="label" translatable="yes">Show _field in View</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Show _field in View</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox10"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-group-2"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-group-2"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-group-2</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -871,205 +624,137 @@ <object class="GtkLabel" id="label12"> <property name="visible">True</property> <property name="label" translatable="yes">Then By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkLabel" id="label19"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">2</property> </packing> </child> <child> <object class="GtkLabel" id="label18"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">3</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkHBox" id="hbox15"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label13"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkLabel" id="label32"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkFrame" id="frame-group-3"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox7"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkVBox" id="vbox11"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - <!-- child id="group-combo-3" here --> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="checkbutton-group-3"> + <property name="label" translatable="yes">Show field i_n View</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Show field i_n View</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox12"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-group-3"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-group-3"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-group-3</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -1078,205 +763,137 @@ <object class="GtkLabel" id="label20"> <property name="visible">True</property> <property name="label" translatable="yes">Then By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">2</property> </packing> </child> <child> <object class="GtkLabel" id="label17"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">3</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">2</property> </packing> </child> <child> <object class="GtkHBox" id="hbox16"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label14"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkLabel" id="label16"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkLabel" id="label15"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">2</property> </packing> </child> <child> <object class="GtkFrame" id="frame-group-4"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox8"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkVBox" id="vbox13"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - <!-- child id="group-combo-4" here --> + <property name="orientation">vertical</property> <child> <object class="GtkCheckButton" id="checkbutton-group-4"> + <property name="label" translatable="yes">Show field in _View</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Show field in _View</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox14"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-group-4"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-group-4"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-group-4</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -1285,195 +902,158 @@ <object class="GtkLabel" id="label21"> <property name="visible">True</property> <property name="label" translatable="yes">Then By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">3</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">3</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">2</property> </packing> </child> - </object> - </child> - <action-widgets> - <action-widget response="0">button39</action-widget> - <action-widget response="-6">button42</action-widget> - <action-widget response="-5">button41</action-widget> - </action-widgets> - </object> - <object class="GtkDialog" id="dialog-sort"> - <property name="title" translatable="yes">Sort</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">True</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="has_separator">True</property> - <child internal-child="vbox"> - <object class="GtkVBox" id="vbox15"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">8</property> <child internal-child="action_area"> - <object class="GtkHButtonBox" id="hbuttonbox1"> + <object class="GtkHButtonBox" id="dialog-action_area4"> <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="layout_style">end</property> <child> - <object class="GtkButton" id="button43"> + <object class="GtkButton" id="button39"> + <property name="label" translatable="yes">Clear _All</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Clear All</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> </child> <child> - <object class="GtkButton" id="button45"> + <object class="GtkButton" id="button42"> + <property name="label">gtk-cancel</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> <child> - <object class="GtkButton" id="button44"> + <object class="GtkButton" id="button41"> + <property name="label">gtk-ok</property> <property name="visible">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-ok</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> + <property name="pack_type">end</property> + <property name="position">0</property> </packing> </child> + </object> + </child> + <action-widgets> + <action-widget response="0">button39</action-widget> + <action-widget response="-6">button42</action-widget> + <action-widget response="-5">button41</action-widget> + </action-widgets> + </object> + <object class="GtkDialog" id="dialog-sort"> + <property name="title" translatable="yes">Sort</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkVBox" id="vbox15"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">8</property> <child> <object class="GtkTable" id="table5"> <property name="visible">True</property> <property name="n_rows">4</property> - <property name="n_columns">1</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> <property name="column_spacing">6</property> + <property name="row_spacing">6</property> <child> <object class="GtkFrame" id="frame-sort-4"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox9"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - <!-- child id="sort-combo-4" here --> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox17"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-sort-4"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-sort-4"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-sort-4</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -1482,103 +1062,71 @@ <object class="GtkLabel" id="label22"> <property name="visible">True</property> <property name="label" translatable="yes">Then By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkFrame" id="frame-sort-3"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox10"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkAlignment" id="alignment2"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - <!-- child id="sort-combo-3" here --> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox19"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-sort-3"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-sort-3"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-sort-3</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -1587,103 +1135,71 @@ <object class="GtkLabel" id="label23"> <property name="visible">True</property> <property name="label" translatable="yes">Then By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkFrame" id="frame-sort-2"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox11"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkAlignment" id="alignment3"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - <!-- child id="sort-combo-2" here --> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox21"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-sort-2"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-sort-2"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-sort-2</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -1692,103 +1208,71 @@ <object class="GtkLabel" id="label24"> <property name="visible">True</property> <property name="label" translatable="yes">Then By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkFrame" id="frame-sort-1"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkHBox" id="hbox12"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">6</property> <child> <object class="GtkAlignment" id="alignment4"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - <!-- child id="sort-combo-1" here --> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkVBox" id="vbox23"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="orientation">vertical</property> <child> <object class="GtkRadioButton" id="radiobutton-ascending-sort-1"> + <property name="label" translatable="yes">Ascending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Ascending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radiobutton-descending-sort-1"> + <property name="label" translatable="yes">Descending</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Descending</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> <property name="group">radiobutton-ascending-sort-1</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> @@ -1797,314 +1281,237 @@ <object class="GtkLabel" id="label25"> <property name="visible">True</property> <property name="label" translatable="yes">Sort Items By</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">2</property> </packing> </child> - </object> - </child> - <action-widgets> - <action-widget response="0">button43</action-widget> - <action-widget response="-6">button45</action-widget> - <action-widget response="-5">button44</action-widget> - </action-widgets> - </object> - <object class="GtkDialog" id="e-table-config"> - <property name="title" translatable="no">dialog1</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <property name="modal">True</property> - <property name="resizable">False</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="has_separator">True</property> - <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox6"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area6"> + <object class="GtkHButtonBox" id="hbuttonbox1"> <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="layout_style">end</property> <child> - <object class="GtkButton" id="cancelbutton2"> + <object class="GtkButton" id="button43"> + <property name="label" translatable="yes">Clear All</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> </child> <child> - <object class="GtkButton" id="applybutton2"> + <object class="GtkButton" id="button45"> + <property name="label">gtk-cancel</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-apply</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> <child> - <object class="GtkButton" id="okbutton2"> + <object class="GtkButton" id="button44"> + <property name="label">gtk-ok</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-ok</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">False</property> <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> + <property name="pack_type">end</property> + <property name="position">0</property> </packing> </child> + </object> + </child> + <action-widgets> + <action-widget response="0">button43</action-widget> + <action-widget response="-6">button45</action-widget> + <action-widget response="-5">button44</action-widget> + </action-widgets> + </object> + <object class="GtkDialog" id="e-table-config"> + <property name="title">dialog1</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="window_position">center-on-parent</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkVBox" id="dialog-vbox6"> + <property name="visible">True</property> + <property name="orientation">vertical</property> <child> <object class="GtkFrame" id="top-frame"> - <property name="border_width">2</property> <property name="visible">True</property> + <property name="border_width">2</property> <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> <object class="GtkTable" id="table1"> - <property name="border_width">2</property> <property name="visible">True</property> + <property name="border_width">2</property> <property name="n_rows">3</property> <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">2</property> <property name="column_spacing">4</property> + <property name="row_spacing">2</property> <child> <object class="GtkButton" id="button-sort"> + <property name="label" translatable="yes">_Sort...</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Sort...</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal handler="on_sort_clicked" name="clicked"/> + <signal name="clicked" handler="on_sort_clicked"/> </object> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"/> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> <child> <object class="GtkButton" id="button-group"> + <property name="label" translatable="yes">_Group By...</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Group By...</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal handler="on_group_by_clicked" name="clicked"/> + <signal name="clicked" handler="on_group_by_clicked"/> </object> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"/> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> <child> <object class="GtkLabel" id="label-sort"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="wrap">True</property> </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkButton" id="button-fields"> + <property name="label" translatable="yes">_Fields Shown...</property> <property name="visible">True</property> - <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Fields Shown...</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal handler="on_group_by_clicked" name="clicked"/> + <signal name="clicked" handler="on_group_by_clicked"/> </object> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"/> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> <child> <object class="GtkLabel" id="label-fields"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="wrap">True</property> </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options">fill</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkLabel" id="label4"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkLabel" id="label33"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="justify">center</property> </object> <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <object class="GtkLabel" id="label-group"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="wrap">True</property> </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"/> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> </object> @@ -2113,22 +1520,67 @@ <object class="GtkLabel" id="label26"> <property name="visible">True</property> <property name="label" translatable="yes">Description</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> </object> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child internal-child="action_area"> + <object class="GtkHButtonBox" id="dialog-action_area6"> + <property name="visible">True</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="cancelbutton2"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="applybutton2"> + <property name="label">gtk-apply</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="okbutton2"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">0</property> </packing> </child> </object> diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index c8809b6087..a534ef2924 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -930,24 +930,6 @@ eti_show_cursor (ETableItem *eti, gint delay) } static void -eti_check_cursor_on_screen (ETableItem *eti) -{ - if (eti->cursor_x1 == -1 || - eti->cursor_y1 == -1 || - eti->cursor_x2 == -1 || - eti->cursor_y2 == -1) - return; - - eti->cursor_on_screen = e_canvas_item_area_shown (GNOME_CANVAS_ITEM(eti), - eti->cursor_x1, - eti->cursor_y1, - eti->cursor_x2, - eti->cursor_y2); - - d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE")); -} - -static void eti_check_cursor_bounds (ETableItem *eti) { gint x1, y1, x2, y2; @@ -1653,16 +1635,6 @@ eti_init (ETableItem *eti) static const gchar gray50_bits[] = { 0x02, 0x01, }; -static void -adjustment_changed (GtkAdjustment *adjustment, ETableItem *eti) -{ - /* FIXME: It is the ugliest of hack to set the focus to scroll. Fix this up when moving away from e-tree */ - if (g_object_get_data ((GObject *) ((GnomeCanvasItem *) eti)->canvas, "freeze-cursor")) - eti_maybe_show_cursor (eti, 0); - - eti_check_cursor_on_screen (eti); -} - static gboolean eti_tree_unfreeze (GtkWidget *widget, GdkEvent *event, ETableItem *eti) { @@ -1702,19 +1674,6 @@ eti_realize (GnomeCanvasItem *item) gdk_gc_set_stipple (eti->focus_gc, eti->stipple); gdk_gc_set_fill (eti->focus_gc, GDK_OPAQUE_STIPPLED); - eti->hadjustment_change_id = - g_signal_connect (gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)), "changed", - G_CALLBACK (adjustment_changed), eti); - eti->hadjustment_value_change_id = - g_signal_connect (gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)), "value_changed", - G_CALLBACK (adjustment_changed), eti); - eti->vadjustment_change_id = - g_signal_connect (gtk_layout_get_vadjustment(GTK_LAYOUT(item->canvas)), "changed", - G_CALLBACK (adjustment_changed), eti); - eti->vadjustment_value_change_id = - g_signal_connect (gtk_layout_get_vadjustment(GTK_LAYOUT(item->canvas)), "value_changed", - G_CALLBACK (adjustment_changed), eti); - g_signal_connect (GTK_LAYOUT(item->canvas), "scroll_event", G_CALLBACK (eti_tree_unfreeze), eti); if (eti->cell_views == NULL) @@ -1795,15 +1754,6 @@ eti_unrealize (GnomeCanvasItem *item) eti->height = 0; - g_signal_handler_disconnect(gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)), - eti->hadjustment_change_id); - g_signal_handler_disconnect(gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)), - eti->hadjustment_value_change_id); - g_signal_handler_disconnect(gtk_layout_get_vadjustment(GTK_LAYOUT(item->canvas)), - eti->vadjustment_change_id); - g_signal_handler_disconnect(gtk_layout_get_vadjustment(GTK_LAYOUT(item->canvas)), - eti->vadjustment_value_change_id); - if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->unrealize) (*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->unrealize)(item); } diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h index cd3bf1d26b..8cc4b54161 100644 --- a/widgets/table/e-table-item.h +++ b/widgets/table/e-table-item.h @@ -80,11 +80,6 @@ typedef struct { /* View row, -1 means unknown */ gint old_cursor_row; - gint hadjustment_change_id; - gint hadjustment_value_change_id; - gint vadjustment_change_id; - gint vadjustment_value_change_id; - GdkGC *fill_gc; GdkGC *grid_gc; GdkGC *focus_gc; diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c deleted file mode 100644 index 3d937dd9cd..0000000000 --- a/widgets/table/e-table-scrolled.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include <config.h> - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include <libgnomecanvas/gnome-canvas.h> -#include <gtk/gtk.h> -#include <libxml/parser.h> -#include <libxml/xmlmemory.h> - -#include <glib/gi18n.h> - -#include "e-table.h" -#include "e-table-scrolled.h" - -#define COLUMN_HEADER_HEIGHT 16 - -G_DEFINE_TYPE (ETableScrolled, e_table_scrolled, GTK_TYPE_SCROLLED_WINDOW) - -enum { - PROP_0, - PROP_TABLE -}; - -static void -e_table_scrolled_init (ETableScrolled *ets) -{ - GtkScrolledWindow *scrolled_window; - - scrolled_window = GTK_SCROLLED_WINDOW (ets); - - GTK_WIDGET_SET_FLAGS (ets, GTK_CAN_FOCUS); - - ets->table = g_object_new (E_TABLE_TYPE, NULL); - - gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type (scrolled_window, GTK_SHADOW_IN); -} - -static void -e_table_scrolled_real_construct (ETableScrolled *ets) -{ - gtk_container_add(GTK_CONTAINER(ets), GTK_WIDGET(ets->table)); - - gtk_widget_show(GTK_WIDGET(ets->table)); -} - -ETableScrolled *e_table_scrolled_construct (ETableScrolled *ets, - ETableModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state) -{ - g_return_val_if_fail(ets != NULL, NULL); - g_return_val_if_fail(E_IS_TABLE_SCROLLED(ets), NULL); - g_return_val_if_fail(etm != NULL, NULL); - g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL); - g_return_val_if_fail(spec != NULL, NULL); - - e_table_construct(ets->table, etm, ete, spec, state); - - e_table_scrolled_real_construct(ets); - - return ets; -} - -GtkWidget *e_table_scrolled_new (ETableModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state) -{ - ETableScrolled *ets; - - g_return_val_if_fail(etm != NULL, NULL); - g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL); - g_return_val_if_fail(spec != NULL, NULL); - - ets = E_TABLE_SCROLLED (gtk_widget_new (e_table_scrolled_get_type (), - "hadjustment", NULL, - "vadjustment", NULL, - NULL)); - - ets = e_table_scrolled_construct (ets, etm, ete, spec, state); - - return GTK_WIDGET (ets); -} - -ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *ets, - ETableModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn) -{ - g_return_val_if_fail(ets != NULL, NULL); - g_return_val_if_fail(E_IS_TABLE_SCROLLED(ets), NULL); - g_return_val_if_fail(etm != NULL, NULL); - g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL); - g_return_val_if_fail(spec_fn != NULL, NULL); - - e_table_construct_from_spec_file(ets->table, etm, ete, spec_fn, state_fn); - - e_table_scrolled_real_construct(ets); - - return ets; -} - -GtkWidget *e_table_scrolled_new_from_spec_file (ETableModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn) -{ - ETableScrolled *ets; - - g_return_val_if_fail(etm != NULL, NULL); - g_return_val_if_fail(E_IS_TABLE_MODEL(etm), NULL); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL); - g_return_val_if_fail(spec_fn != NULL, NULL); - - ets = E_TABLE_SCROLLED (gtk_widget_new (e_table_scrolled_get_type (), - "hadjustment", NULL, - "vadjustment", NULL, - NULL)); - - ets = e_table_scrolled_construct_from_spec_file (ets, etm, ete, spec_fn, state_fn); - - return GTK_WIDGET (ets); -} - -ETable * -e_table_scrolled_get_table (ETableScrolled *ets) -{ - return ets->table; -} - -static void -ets_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) -{ - ETableScrolled *ets = E_TABLE_SCROLLED (object); - - switch (prop_id) { - case PROP_TABLE: - g_value_set_object (value, ets->table); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -/* Grab_focus handler for the scrolled ETable */ -static void -ets_grab_focus (GtkWidget *widget) -{ - ETableScrolled *ets; - - ets = E_TABLE_SCROLLED (widget); - - gtk_widget_grab_focus (GTK_WIDGET (ets->table)); -} - -/* Focus handler for the scrolled ETable */ -static gint -ets_focus (GtkWidget *container, GtkDirectionType direction) -{ - ETableScrolled *ets; - - ets = E_TABLE_SCROLLED (container); - - return gtk_widget_child_focus (GTK_WIDGET (ets->table), direction); -} - -static void -e_table_scrolled_class_init (ETableScrolledClass *class) -{ - GObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - object_class->get_property = ets_get_property; - - widget_class->grab_focus = ets_grab_focus; - - widget_class->focus = ets_focus; - - g_object_class_install_property (object_class, PROP_TABLE, - g_param_spec_object ("table", - _( "Table" ), - _( "Table" ), - E_TABLE_TYPE, - G_PARAM_READABLE)); -} - diff --git a/widgets/table/e-table-scrolled.h b/widgets/table/e-table-scrolled.h deleted file mode 100644 index 71e50b8cdd..0000000000 --- a/widgets/table/e-table-scrolled.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef _E_TABLE_SCROLLED_H_ -#define _E_TABLE_SCROLLED_H_ - -#include <gtk/gtk.h> -#include <table/e-table-model.h> -#include <table/e-table.h> - -G_BEGIN_DECLS - -#define E_TABLE_SCROLLED_TYPE (e_table_scrolled_get_type ()) -#define E_TABLE_SCROLLED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TABLE_SCROLLED_TYPE, ETableScrolled)) -#define E_TABLE_SCROLLED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TABLE_SCROLLED_TYPE, ETableScrolledClass)) -#define E_IS_TABLE_SCROLLED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TABLE_SCROLLED_TYPE)) -#define E_IS_TABLE_SCROLLED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_SCROLLED_TYPE)) - -typedef struct { - GtkScrolledWindow parent; - - ETable *table; -} ETableScrolled; - -typedef struct { - GtkScrolledWindowClass parent_class; -} ETableScrolledClass; - -GType e_table_scrolled_get_type (void); - -ETableScrolled *e_table_scrolled_construct (ETableScrolled *ets, - ETableModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state); -GtkWidget *e_table_scrolled_new (ETableModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state); - -ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *ets, - ETableModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn); -GtkWidget *e_table_scrolled_new_from_spec_file (ETableModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn); - -ETable *e_table_scrolled_get_table (ETableScrolled *ets); - -G_END_DECLS - -#endif /* _E_TABLE_SCROLLED_H_ */ - |