1. 11 Sep, 2001 1 commit
    • Jody Goldberg's avatar
      store the width in pixels as well as pts. · c332d9dd
      Jody Goldberg authored
      2001-09-11  Jody Goldberg <jgoldberg@home.com>
      
      	* src/style.c (style_font_new_simple) : store the width in pixels as
      	  well as pts.
      
      	* src/print-cell.c (print_cell) : sync with the drawing code.
      c332d9dd
  2. 30 May, 2001 1 commit
    • Jon K Hellan's avatar
      Previous attempt to commit failed. Trying again. · 37876eb7
      Jon K Hellan authored
      2001-05-30  Jon K Hellan  <hellan@acm.org>
      
      	Previous attempt to commit failed. Trying again.
      
      	* src/sheet-control-gui-priv.h: New file. Implementation details
      	for SheetControlGUI and methods directly accessible from the GUI
      	layer.
      
      	* src/Makefile.am: Add sheet-control-gui-priv.h
      
      	* src/sheet-control-gui.h: Move struct _SheetControlGUI to
      	sheet-control-gui-priv.h. Remove declarations of methods which
      	have been made virtual.
      
      	* src/sheet-control-gui.c: Include sheet-control-gui-priv.h instead
      	of sheet-control-gui.h.
      	Casts and temp variables because:
      	- virtual scg methods now take a SheetControl parameter.
              - sheet member now lives in SheetControl.
      	Make following methods static - externally available only as
      	virtual SheetControl method: scg_redraw_all,
      	scg_redraw_cell_region, scg_redraw_headers, scg_update_cursor_pos,
      	scg_resize, scg_unant, scg_ant, scg_cursor_bound,
      	scg_compute_visible_region, scg_make_cell_visible. Initialize
      	class object with these as virtual methods together with
      	scg_set_zoom_factor, scg_adjust_preferences, scg_scrollbar_config
      	and scg_mode_edit.  Rename context_menu_hander (sic!) to
      	context_menu_handler.
      
      	*src/sheet-control.c (SC_VIRTUAL_FULL): Fix typo.
      	(sc_destroy): Comment out unused variable.
      	(sheet_control_init_state): Rename to sc_init_state.
      	(sc_sheet): New accessor - returns sheet attribute.
      	(sc_invalidate_sheet): New function - sets sheet attribute to
      	NULL.
      	(resize, set_zoom_factor, redraw_all, redraw_cell_region,
      	redraw_headers, ant, unant, adjust_preferences, update_cursor_pos,
      	scrollbar_config, mode_edit, compute_visible_region,
      	make_cell_visible, cursor_bound): New virtual methods.
      
      	* src/sheet-control.h: Declare new methods in sheet-control.c
      
      	* src/selection.c: Use sc_redraw_cell_region, sc_redraw_headers
      	instead of scg methods.
      
      	* src/sheet.c (sheet_unant): Use sc_unant instead o scg_unant.
      	(sheet_ant): Use sc_ant instead of scg_ant.
      	(sheet_redraw_all): Use sc_redraw_all instead of scg_redraw_all.
      	(sheet_redraw_all): Use sc_redraw_headers instead of
      	scg_redraw_headers.
      	(sheet_new_scg): Use sc_cursor_bound instead of scg_cursor_bound.
      	(sheet_detach_scg): Rename to sheet_detach_control. Change
      	parameter from SheetControlGUI to SheetControl. Use sc_sheet and
      	sc_invalidate_sheet instead of direct attribute access.
      	(sheet_set_zoom_factor): Use sc_set_zoom_factor instead of
      	scg_set_zoom_factor.
      	(sheet_update_only_grid): Use sc_compute_visible_region instead of
      	scg_compute_visible_region.
      	(sheet_col_row_gutter): Use sc_resize instead of scg_resize.
      	(sheet_redraw_cell_region, sheet_redraw_partial_row,
      	sheet_redraw_cell): Use sc_redraw_cell_region instead of
      	scg_redraw_cell_region.
      	(sheet_make_cell_visible): Use sc_make_cell_visible instead of
      	scg_make_cell_visible.
      	(sheet_cursor_set): Use sc_cursor_bound instead of
      	scg_cursor_bound.
      	(sheet_update_cursor_pos): Use sc_update_cursor_pos instead of
      	scg_update_cursor_pos.
      	(sheet_scrollbar_config): Use sc_scrollbar_config instead of
      	scg_scrollbar_config.
      	(sheet_adjust_preferences): Use sc_adjust_preferences, sc_resize
      	and sc_redraw_all instead of scg_adjust_preferences, scg_resize
      	and scg_redraw_all.
      
      	* src/sheet.h (SHEET_FOREACH_CONTROL): Take list of SheetControls
      	instead of SheetControlGUIs.
      
      	* src/workbook.c (workbook_sheet_detach): Use sc_mode_edit instead
      	of scg_mode_edit.
      
      	* src/embeddable-grid.h: Include sheet-control-gui-priv.h instead
      	of sheet-control-gui.h.
      
      	* src/sheet-object-graphic.c: Ditto.
      
      	* src/gnumeric-sheet.c: Include sheet-control-gui-priv.h instead
      	of sheet-control-gui.h.
      	Casts and temp variables because:
      	- virtual scg methods now take a SheetControl parameter.
              - sheet now lives in SheetControl.
      
      	* src/item-bar.c: Ditto.
      
      	* src/item-cursor.c: Ditto.
      
      	* src/item-edit.c: Ditto.
      
      	* src/item-grid.c: Ditto.
      
      	* src/sheet-object-cell-comment.c: Ditto.
      
      	* src/sheet-object-cell-container.c: Ditto.
      
      	* src/sheet-object-item.c: Ditto.
      
      	* src/sheet-object-widget.c: Ditto.
      
      	* src/workbook-control-gui.c: Ditto.
      
      	* src/workbook-object-toolbar.c: Ditto, but don't include
      	sheet-control-gui-priv.h
      
      	* src/sheet-object.c (sheet_object_realize): Cast control to
      	SheetControlGUI.
      37876eb7
  3. 18 Feb, 2001 1 commit
    • Jody Goldberg's avatar
      s/display_zero/hide_zero/ + necessary logic inversions · a8dc5b30
      Jody Goldberg authored
      
      2001-02-18  Jody Goldberg <jgoldberg@home.com>
      
      	s/display_zero/hide_zero/		+ necessary logic inversions
      	s/show_grid/hide_grid/			+ necessary logic inversions
      	s/show_col_header/hide_col_header/	+ necessary logic inversions
      	s/show_row_header/hide_row_header/	+ necessary logic inversions
      	s/wb_control_paste_special_enable/wb_control_menu_state_paste_special/
      	s/wbcg_paste_special_enable/wbcg_menu_state_paste_special/
      
      	* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
      	  Simplfy and use wbcg::updating_ui.
      	(workbook_format_halign_feedback_set) : use simplified interface.
      	(workbook_feedback_set) : Ditto.
      	(set_selection_halign) : If the current alignment is already set to
      	  the target type revert to general.
      
      	* src/preview-grid.c (preview_grid_draw) : cell_draw::h_center
      	  will default to width / 2.
      	* src/item-grid.c (item_grid_draw_merged_range) : Ditto.
      	(item_grid_draw) : Ditto.
      
      	* src/print-cell.c (print_cell) : print_cell::h_center
      	  will default to width / 2.
      	(print_merged_range) : Ditto.
      	(print_cell_range) : Ditto.
      
      	* src/sheet.c (sheet_adjust_preferences) : Update the menus to reflect
      	  changes in prefs.  Take a flag to control redraw requests.
      	(sheet_menu_state_enable_insert) : new function.
      
      	* src/workbook-control-gui.c (wbcg_menu_state_enable_insert) : Merge
      	  all the insert col/row/cell menu updates into here.
      	(wbcg_menu_state_sheet_prefs) : new function.
      	(cb_sheet_pref_display_formulas) : reentrancy protection and use
      	  sheet_adjust_preferences.
      	(cb_sheet_pref_hide_zeros) : ditto.
      	(cb_sheet_pref_hide_grid_lines) : ditto.
      	(cb_sheet_pref_hide_col_header) : ditto.
      	(cb_sheet_pref_hide_row_header) : ditto.
      	(workbook_control_gui_init) : add the new menu items.
      	(workbook_control_gui_ctor_class) : reorg a bit.
      
      	src/workbook-control.c : reorg a bit.
      
      2001-02-18  Jody Goldberg <jgoldberg@home.com>
      
      	* configure.in : Make python plugin optional.
      
      2001-02-18  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook-control.c (wb_control_sheet_add) : update menus here.
      
      	* src/print-cell.c (print_cell) : fix the display zero logic.
      	* src/cell-draw.c (cell_draw) : ditto.  And fix the comment.
      
      2001-02-18  Jody Goldberg <jgoldberg@home.com>
      
      	* src/cell.c (cell_default_halign) : Handle alignment of numbers
      	  correctly when displaying formulas.
      
      	* src/embeddable-grid.c (set_header_visibility) : start using our
      	  native MVC.
      	(Grid_set_header_visibility) : ditto.
      	(embeddable_grid_set_header_visibility) : delete.
      
      	* src/sheet-control-gui.c (scg_set_header_visibility) : delete.
      	(scg_adjust_preferences) : Make this contingent on having a wbcg.
      
      	* src/selection.c (sheet_selection_set_internal) : Use
      	  sheet_menu_state_enable_insert.
      	(sheet_selection_reset) : ditto.
      a8dc5b30
  4. 15 Feb, 2001 1 commit
  5. 08 Feb, 2001 1 commit
    • Jon Kåre Hellan's avatar
      Adapt to more Bonobo changes. · 769ffe6d
      Jon Kåre Hellan authored
      	* src/embeddable-grid.[ch]: Adapt to more Bonobo changes.
      
      	* src/embeddable-grid.h (struct EmbeddableGridClass): Add
      	POA_GNOME_Gnumeric_Grid__epv.
      
      	* src/embeddable-grid.c:  Remove
      	embeddable_grid_(v)?epv.
      	(embeddable_grid_class_init): New version.
      	(init_embeddable_grid_corba_class, create_embeddable_grid):
      	Remove.
      	(embeddable_grid_new(_anon)?): Remove CORBA stuff.
      	(embeddable_grid_get_type, grid_view_get_type): Use
      	bonobo_x_type_unique.
      	(grid_view_get_type):
      769ffe6d
  6. 15 Nov, 2000 1 commit
    • Jody Goldberg's avatar
      Follow convention that the manager is set when attached, and not before. · ad531019
      Jody Goldberg authored
      
      2000-11-15  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook-control.c (workbook_control_set_view) : Follow
      	  convention that the manager is set when attached, and not before.
      	* src/workbook-view.c (wb_view_attach_control) : Ditto.  Set the
      	  tile on the new control.
      	* src/workbook.c (workbook_attach_view) : Ditto.
      
      2000-11-15  Jody Goldberg <jgoldberg@home.com>
      
      	* src/command-context-corba.[ch] : This is incorrectly named and used
      	  the wrong way :-( But at least it is compilable.  I'll fix this
      	  later.
      
      2000-11-15  Jody Goldberg <jgoldberg@home.com>
      
      	* src/colrow.c (col_row_foreach) : Use ColRowSegments
      	(col_row_restore_sizes) : Ditto.
      	* src/sheet.c (sheet_{col,row}_add) : Ditto.
      	(sheet_{col,row}_get_info) : Ditto.
      	(sheet_{col,row}_get) : Ditto.
      	(sheet_cell_foreach_range) : Ditto.
      	(sheet_{col,row}_destroy) : Ditto.
      	(sheet_regen_adjacent_spans) : Ditto.
      	(colrow_move) : Ditto.
      	(sheet_{col,row}_get_distance_pixels) : Ditto.
      	(sheet_{col,row}_get_distance_pts) : Ditto.
      	(sheet_{col,row}_set_size_pts) : Ditto.
      
      2000-11-15  Jody Goldberg <jgoldberg@home.com>
      
      	s/sheet-view/sheet-control-gui/
      
      	* src/Makefile.am : Add command-context-corba.[ch] temporarily
      
      	* configure.in : Default to non-bonobo build
      ad531019
  7. 12 Oct, 2000 1 commit
    • Jody Goldberg's avatar
      manually init the corba factories after the support subsystems are · 455efa33
      Jody Goldberg authored
      
      2000-10-12  Jody Goldberg <jgoldberg@home.com>
      
      	* src/main.c (gnumeric_main) : manually init the corba factories after
      	  the support subsystems are initialized, but before the workbooks are
      	  created.  This needs some serious cleaning.
      
      	* src/embeddable-grid.c (EmbeddableGridFactory_init) : return a flag
      	  for later use.
      	(grid_view_activate) : focus on the widget not the containing object.
      
      	* src/corba-args.c (gnumeric_arg_parse) : Do not init the corba
      	  factories yet.  they were getting called before the application was
      	  ready.
      455efa33
  8. 13 May, 2000 1 commit
    • Michael Meeks's avatar
      Fix a load of evil embeddable-grid bugs, fix oaf activation. · 67608b01
      Michael Meeks authored
      
      Fix a load of evil embeddable-grid bugs, fix oaf activation.
      
      2000-05-11  Michael Meeks  <michael@helixcode.com>
      
      	* src/embeddable-grid.c (grid_view_activate): grab widget focus.
      
      	* src/workbook-format-toolbar.c (workbook_feedback_set): make it
      	cope with no format toolbar.
      
      	* src/workbook.c (workbook_init): g_new0 for safety and to blank
      	edit_line.
      
      	* src/embeddable-grid.c (grid_view_new): set a sensible default
      	size so we actually see something. (grid_view_activate): Fix with
      	state boolean. (set_header_visibility): implement.
      	(embeddable_grid_set_header_visibility): update.
      	(grid_view_destroy): kill. (grid_view_new): kill evil private list
      	of views.
      
      	* gnumeric.oafinfo: another fix, evil bug from oaf conversion script.
      67608b01
  9. 07 Apr, 2000 1 commit
    • Jody Goldberg's avatar
      Fix typo, did this ever work ? · cf3f1e00
      Jody Goldberg authored
      
      2000-04-07  Jody Goldberg <jgoldberg@home.com>
      
      	* src/embeddable-grid.h (GridViewClass) : Fix typo, did this ever work ?
      
      	* src/workbook.c (workbook_move_sheet) : Mark the book as dirty when a
      	  sheet moved.
      	(insert_sheet_cmd) : Mark book as dirty when sheet is added.
      	(workbook_attach_sheet) : Add a precondition to avoid failing in the
      	  bonobo case.
      cf3f1e00
  10. 10 Feb, 2000 1 commit
  11. 28 Jan, 2000 1 commit
  12. 11 Aug, 1999 1 commit
    • Miguel de Icaza's avatar
      Handle locale switching here. (xml_workbook_read): Handle locale switching · b4129181
      Miguel de Icaza authored
      1999-08-09  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c (xml_workbook_write): Handle locale switching here.
      	(xml_workbook_read): Handle locale switching here.
      
      	* src/file.c: Removed all references to saving and re-setting the
      	locale.  This should be handled in the xml-io code.
      
      1999-08-10  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/workbook.c (workbook_do_destroy): remove g_free from the
      	workbook.  We are now a GtkObject.
      
      1999-08-09  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c (xml_workbook_write): Move the locale
      	setting/resetting here, instead of putting it all over the place.
      
      1999-08-09    <miguel@gnu.org>
      
      	* src/xml-io.c (xml_workbook_read): Adjusted to use the new file
      	open convention.
      
      	* src/file.h: File open methods now take a workbook as an argument
      	instead of creating it themselves.  Required for the
      	GNOME::Persist bonobo interfaces.
      
      	* src/file.c (workbook_read): Fix the workbook creation order to
      	keep the locale correct if the file did not exist.
      b4129181
  13. 07 Aug, 1999 1 commit
  14. 09 Jul, 1999 1 commit
    • Miguel de Icaza's avatar
      Reverted last plan. We do need a sheet_view_construct, as we require · d59eb822
      Miguel de Icaza authored
      
      1999-07-09  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/sheet-view.c (sheet_view_construct): Reverted last plan.  We
      	do need a sheet_view_construct, as we require sheet_view->sheet to
      	be set.
      
      1999-07-08  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/cell.c (calc_text_dimensions): Use gdk_fonts for measuring
      	the strings on the screen.  Basically, back out using GnomeFont here.
      
      	* src/print-info.c (render_date, render_time): Finished
      	implementing.
      	(render_opcode): Enable argument mechanism to extend the number of
      	possible formats.  Excel accepts stuff like &[DATE], we extend
      	this to accept &[DATE:mmmm-yyyy].  The argument for &[DATE] and
      	&[TIME] is a regular Gnumeric formatting code (ie, compattible
      	with the cell formating in Excel).
      
      	* src/sheet-view.h: Change style to suit forward declaration
      	structure.
      
      	* src/sheet.h: Use forward declaration for SheetView.
      
      	* src/sheet.c (sheet_new_sheet_view, sheet_destroy_sheet_view):
      	New routines for managing the sheet views.
      
      	* src/sheet-view.c: Killed sheet_view_construct, there was nothing
      	really required there.  Moved all the code to sheet_view_init.
      	(sheet_view_scrollbar_display, sheet_view_set_header_visibility):
      	New routines that control the visibility of the various gadgets of
      	a SheetView.
      
      	* embeddable-grid.c, embeddable-grid.h: New files.  They implement
      	the Bonobo GnomeEmbeddable interfaces for embedding Gnumeric in
      	applications.
      
      	* src/workbook.c (workbook_new, workbook_core_new): Split this
      	routine in two:  GUI independant and GUI dependant.  The next step
      	is to provide multiple views of a workbook (although, I am not
      	sure I want this).
      	(workbook_new_with_sheets): Kill dead code.
      
      	* src/corba-sheet.c (Sheet_row_height, Sheet_col_width,
      	Sheet_max_cols_used, Sheet_max_rows_used): New methods.
      
      	* src/Gnumeric.idl (Sheet): new methods max_cols_used,
      	max_rows_used, col_width, row_height.
      
      	(Grid): New interface for embeddable grids.
      
      	* src/print-info.c (hf_format_render): Rendering routine for the
      	header and footers formats.
      
      1999-07-09  Miguel de Icaza  <miguel@gnu.org>
      
      	* ms-excel-write.c (biff_put_text): Intiialize variable.
      d59eb822