From e415f609d213e8fe175251e71d51ec39acdd3862 Mon Sep 17 00:00:00 2001 From: Jason Leach Date: Wed, 11 Jul 2001 05:32:14 +0000 Subject: [Fix bug #4389: ETableSpecification still in .c file] 2001-07-11 Jason Leach [Fix bug #4389: ETableSpecification still in .c file] * gui/e-calendar-table.etspec: New file containing the spec that was in e-calendar-table.c as a big string. * gui/e-calendar-table.c (e_calendar_table_init): Use the spec file instead of a string. (e_calendar_table_get_spec): Removed this function, we don't need it anymore. * gui/e-tasks.c (e_tasks_setup_menus): Don't load from string, from file instead. * gui/Makefile.am: Necessary changes to get the new .etspec file installed. svn path=/trunk/; revision=10986 --- calendar/ChangeLog | 18 +++++++ calendar/gui/Makefile.am | 5 +- calendar/gui/e-calendar-table.c | 93 ++---------------------------------- calendar/gui/e-calendar-table.etspec | 26 ++++++++++ calendar/gui/e-calendar-table.h | 2 - calendar/gui/e-tasks.c | 3 +- 6 files changed, 54 insertions(+), 93 deletions(-) create mode 100644 calendar/gui/e-calendar-table.etspec (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 456986e800..b32615baa7 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,21 @@ +2001-07-11 Jason Leach + + [Fix bug #4389: ETableSpecification still in .c file] + + * gui/e-calendar-table.etspec: New file containing the spec that + was in e-calendar-table.c as a big string. + + * gui/e-calendar-table.c (e_calendar_table_init): Use the spec + file instead of a string. + (e_calendar_table_get_spec): Removed this function, we don't need + it anymore. + + * gui/e-tasks.c (e_tasks_setup_menus): Don't load from string, + from file instead. + + * gui/Makefile.am: Necessary changes to get the new .etspec file + installed. + 2001-07-10 Jason Leach [Fix bug #4388: ETableSpecification still in .c file] diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index 3922033791..f41df82c27 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -51,14 +51,17 @@ INCLUDES = \ $(BONOBO_CONF_CFLAGS) \ -DEVOLUTION_DATADIR=\""$(datadir)"\" \ -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" gladedir = $(datadir)/evolution/glade - glade_DATA = \ e-itip-control.glade \ goto-dialog.glade +etspecdir = $(datadir)/evolution/etspec/ +etspec_DATA = e-calendar-table.etspec + evolution_calendar_SOURCES = \ $(IDL_GENERATED) \ calendar-config.c \ diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index c5a66fccde..de320786c7 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -243,87 +243,6 @@ task_compare_cb (gconstpointer a, gconstpointer b) return retval; } -#ifdef JUST_FOR_TRANSLATORS -static char *list [] = { - N_("Categories"), - N_("Classification"), - N_("Completion Date"), - N_("End Date"), - N_("Start Date"), - N_("Due Date"), - N_("Geographical Position"), - N_("Percent complete"), - N_("Priority"), - N_("Summary"), - N_("Transparency"), - N_("URL"), - N_("Alarms"), - N_("Click here to add a task") -}; -#endif - -#define E_CALENDAR_TABLE_SPEC \ - "" \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - " " \ - "" - static void e_calendar_table_init (ECalendarTable *cal_table) { @@ -553,8 +472,10 @@ e_calendar_table_init (ECalendarTable *cal_table) /* Create the table */ - table = e_table_scrolled_new (cal_table->subset_model, extras, - E_CALENDAR_TABLE_SPEC, NULL); + table = e_table_scrolled_new_from_spec_file (cal_table->subset_model, + extras, + EVOLUTION_ETSPECDIR "/e-calendar-table.etspec", + NULL); gtk_object_unref (GTK_OBJECT (extras)); cal_table->etable = table; @@ -1218,12 +1139,6 @@ e_calendar_table_on_rows_deleted (ETableModel *model, e_calendar_table_apply_filter (cal_table); } -const gchar * -e_calendar_table_get_spec (void) -{ - return E_CALENDAR_TABLE_SPEC; -} - static void invisible_destroyed (GtkWidget *invisible, ECalendarTable *cal_table) { diff --git a/calendar/gui/e-calendar-table.etspec b/calendar/gui/e-calendar-table.etspec new file mode 100644 index 0000000000..0b759a1580 --- /dev/null +++ b/calendar/gui/e-calendar-table.etspec @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/calendar/gui/e-calendar-table.h b/calendar/gui/e-calendar-table.h index 3ad45e541b..86f2aa20a3 100644 --- a/calendar/gui/e-calendar-table.h +++ b/calendar/gui/e-calendar-table.h @@ -127,8 +127,6 @@ gboolean e_calendar_table_filter_by_category (ECalendarTable *cal_table, CalComponent *comp, gpointer filter_data); -const gchar *e_calendar_table_get_spec (void); - #ifdef __cplusplus } diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 6a14469213..dbf7a7d779 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -614,7 +614,8 @@ e_tasks_setup_menus (ETasks *tasks, g_free (dir); spec = e_table_specification_new (); - e_table_specification_load_from_string (spec, e_calendar_table_get_spec()); + e_table_specification_load_from_file (spec, + EVOLUTION_ETSPECDIR "/e-calendar-table.etspec"); factory = gal_view_factory_etable_new (spec); gal_view_collection_add_factory (collection, factory); -- cgit