diff options
author | Jason Leach <jleach@ximian.com> | 2001-07-11 13:32:14 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-07-11 13:32:14 +0800 |
commit | e415f609d213e8fe175251e71d51ec39acdd3862 (patch) | |
tree | 5c6138a5a335131e8d25dfe7d50cdf3ebeba167d /calendar | |
parent | 4763f25379dd0a254b2dba9d9a2ed328c90f1f99 (diff) | |
download | gsoc2013-evolution-e415f609d213e8fe175251e71d51ec39acdd3862.tar gsoc2013-evolution-e415f609d213e8fe175251e71d51ec39acdd3862.tar.gz gsoc2013-evolution-e415f609d213e8fe175251e71d51ec39acdd3862.tar.bz2 gsoc2013-evolution-e415f609d213e8fe175251e71d51ec39acdd3862.tar.lz gsoc2013-evolution-e415f609d213e8fe175251e71d51ec39acdd3862.tar.xz gsoc2013-evolution-e415f609d213e8fe175251e71d51ec39acdd3862.tar.zst gsoc2013-evolution-e415f609d213e8fe175251e71d51ec39acdd3862.zip |
[Fix bug #4389: ETableSpecification still in .c file]
2001-07-11 Jason Leach <jleach@ximian.com>
[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
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 18 | ||||
-rw-r--r-- | calendar/gui/Makefile.am | 5 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 93 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.etspec | 26 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.h | 2 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 3 |
6 files changed, 54 insertions, 93 deletions
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 <jleach@ximian.com> + + [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 <jleach@ximian.com> [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 \ - "<ETableSpecification click-to-add=\"true\" " \ - " _click-to-add-message=\"Click here to add a task\" " \ - " draw-grid=\"true\">" \ - " <ETableColumn model_col= \"0\" _title=\"Categories\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"1\" _title=\"Classification\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"classification\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"2\" _title=\"Completion Date\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"dateedit\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"3\" _title=\"End Date\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"dateedit\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"4\" _title=\"Start Date\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"dateedit\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"5\" _title=\"Due Date\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"dateedit\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"6\" _title=\"Geographical Position\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"7\" _title=\"% Complete\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"percent\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"8\" _title=\"Priority\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"priority\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"9\" _title=\"Summary\" " \ - " expansion=\"3.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ - " <ETableColumn model_col=\"10\" _title=\"Transparency\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"transparency\" compare=\"string\"/>" \ - " <ETableColumn model_col=\"11\" _title=\"URL\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ - " <ETableColumn model_col=\"12\" _title=\"Alarms\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ - " <ETableColumn model_col=\"13\" pixbuf=\"icon\" _title=\"Type\" "\ - " expansion=\"1.0\" minimum_width=\"16\" resizable=\"false\" "\ - " cell=\"icon\" compare=\"integer\"/>" \ - " <ETableColumn model_col=\"14\" pixbuf=\"complete\" _title=\"Complete\" " \ - " expansion=\"1.0\" minimum_width=\"16\" resizable=\"false\" "\ - " cell=\"checkbox\" compare=\"integer\"/>" \ - " <ETableColumn model_col=\"18\" _title=\"Status\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstatus\" compare=\"string\"/>" \ - " <ETableColumn model_col=\"19\" _title=\"Task sort\" " \ - " cell=\"task-sort\" compare=\"task-sort\"/>" \ - " <ETableState>" \ - " <column source=\"13\"/>" \ - " <column source=\"14\"/>" \ - " <column source= \"9\"/>" \ - " <grouping></grouping>" \ - " </ETableState>" \ - "</ETableSpecification>" - 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 @@ +<ETableSpecification click-to-add="true" _click-to-add-message="Click here to add a task" draw-grid="true"> + <ETableColumn model_col= "0" _title="Categories" expansion="1.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/> + <ETableColumn model_col= "1" _title="Classification" expansion="1.0" minimum_width="10" resizable="true" cell="classification" compare="string"/> + <ETableColumn model_col= "2" _title="Completion Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="string"/> + <ETableColumn model_col= "3" _title="End Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="string"/> + <ETableColumn model_col= "4" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="string"/> + <ETableColumn model_col= "5" _title="Due Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="string"/> + <ETableColumn model_col= "6" _title="Geographical Position" expansion="1.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/> + <ETableColumn model_col= "7" _title="% Complete" expansion="1.0" minimum_width="10" resizable="true" cell="percent" compare="string"/> + <ETableColumn model_col= "8" _title="Priority" expansion="1.0" minimum_width="10" resizable="true" cell="priority" compare="string"/> + <ETableColumn model_col= "9" _title="Summary" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/> + <ETableColumn model_col="10" _title="Transparency" expansion="1.0" minimum_width="10" resizable="true" cell="transparency" compare="string"/> + <ETableColumn model_col="11" _title="URL" expansion="2.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/> + <ETableColumn model_col="12" _title="Alarms" expansion="1.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/> + <ETableColumn model_col="13" pixbuf="icon" _title="Type" expansion="1.0" minimum_width="16" resizable="false" cell="icon" compare="integer"/> + <ETableColumn model_col="14" pixbuf="complete" _title="Complete" expansion="1.0" minimum_width="16" resizable="false" cell="checkbox" compare="integer"/> + <ETableColumn model_col="18" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="calstatus" compare="string"/> + <ETableColumn model_col="19" _title="Task sort" cell="task-sort" compare="task-sort"/> + + <ETableState> + <column source="13"/> + <column source="14"/> + <column source= "9"/> + <grouping></grouping> + </ETableState> +</ETableSpecification> 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); |