2002-04-04 Bernhard Herzog * setup.py (thuban_bdist_rpm.initialize_options): Use initialize_options to create the scripts for the rpm. * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use / 2002-04-03 Bernhard Herzog * setup.py: Increment version to 0.1.1 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add Layer" and "Remove Layer" commands from the layer menu to the map menu 2002-02-15 Bernhard Herzog * Thuban/Model/layer.py (Layer.Shape): list append only takes one argument (python <= 1.5.2 erroneously accepted multiuple arguments) 2002-02-04 Bernhard Herzog * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a RecordGrid in the identifyview. (IdentifyView.__init__): Use IdentifyGridCtrl instead of IdentifyListCtrl. The grid allows editing of the values. * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes implementing a grid for a single row of a thuban table. * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all layers by default. Easier to use than the previous default of only searching through the select layer which meant that if no layer was selected, you couldn't select a shape. * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the stroke_width attribute * Thuban/Model/save.py (save_session): Write the new stroke_width attribute * Thuban/Model/load.py (ProcessSession.startElement): Read the stroke_width attribute * Thuban/Model/layer.py (Layer.__init__): New parameter and instance variable stroke_width (Layer.SetStrokeWidth): Set the stroke_width. 2002-02-01 Bernhard Herzog * extensions/thuban/wxproj.cpp (project_points): Fix two off-by-one errors in the last loop that joins the various parts together. 2002-01-14 Bernhard Herzog * setup.py (data_dist.make_distribution): Fix some typos 2001-09-18 Bernhard Herzog * README: Slight tweaking in preparation for the 0.1 release * setup.cfg: Add section for sdist to create both tgz and zip archives * setup.py: increase version number to 0.1 (data_dist): New command class for data distribution 2001-09-14 Bernhard Herzog * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape): Handle the case of no layer (i.e. layer is None) properly. * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__): Set the initial selection of the combo boxes to reflect the projection we're starting with in a way that works on windows, too. * Thuban/Lib/connector.py (Connector.print_connections): Print the puiblisher's ids in hex to make it easier to compare them to the standard repr of python methods * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer messages 2001-09-13 Bernhard Herzog * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to deselect the layer if no layer is selected * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to idle time when there actually is something to draw. If there's nothing to draw simply clear the window (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments. (MapCanvas.SetMap): force a redraw in all cases because FitMapToWindow doesn't always do it. (MapCanvas.ZoomFactor): Add an optional parameter, center, to specify the point to move into the center of the window (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't dragged, zoon in/out by a factor of 2 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing index, i.e. reversed drawing order) so that objects appearing to be in from of others are selected first. This is probably mostly relevant for point shapes where the symbols used may overlap * Thuban/Model/session.py (create_empty_session): Unset the modified bit before returning it * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use create_empty_session session to create the new, empty session. * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of the tool bitmaps. (MainWindow.OnClose, MainWindow.save_modified_session): Separate the code that asks whether the session should be saved into the new method save_modified_session. (MainWindow.OpenSession, MainWindow.NewSession): Use the new method to save modified session here too. 2001-09-11 Bernhard Herzog * setup.py (InnoIconItem): fix typo (thuban_bdist_inno.run): (bdist_inno.run): Move the decision not to create symlinks on non-nt platforms to thuban_bdist_inno and do it unconditinally since we never want to create the symlinks here 2001-09-10 Bernhard Herzog * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the identify view immediately * Thuban/UI/controls.py: New file with two classes RecordListCtrl and SelectableRecordListCtrl that implement the code shared by the identify view and the label dialog * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the new class RecordListCtrl * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the return value of GetValue is None instead of using it as a boolean directly so that Zero numbers are handled properly. (LabelListCtrl): Derive from the new class SelectableRecordListCtrl * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__): (Proj4Dialog.dialogLayout): Make the window resizable and set the size of the text control explicitly to make the sizers work on both Windows and X. 2001-09-07 Bernhard Herzog * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter that can limit the search to the currently selected layer. (MapCanvas.SelectShapeAt): Make sure that the currently selected layer stays selected even when no shape is found (MapCanvas.FitRectToWindow): If the rect has zero with or zero height do nothing (avoids zero division errors) 2001-09-06 Bernhard Herzog * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__): Correct the spelling of SessionTreeCtrl. dabbrev is too damn convenient :-) (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce a new instvar layer_to_item to map layers to tree items (SessionTreeCtrl.layer_selected): Select the appropriate tree item to match the current selection in the interactor * Thuban/UI/interactor.py (Interactor.SelectedLayer): (Interactor.HasSelectedLayer): New methods to query the current selection * Thuban/UI/mainwindow.py (MainWindow.current_layer): (MainWindow.has_selected_layer): Simply call the appropriate interactor method * Thuban/UI/mainwindow.py (MainWindow.__init__): (MainWindow.LayerShowTable): (MainWindow.identify_view_on_demand): Store the interactor in an instvar and use that reference instead of going through main.app * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): * Thuban/UI/application.py (ThubanApplication.OnInit): * Thuban/UI/main.py (main): Create the session tree view in main with the new mainwindow method ShowSessionTree and not directly the application's OnInit method * Thuban/UI/tree.py (myTreeCtrlPanel): (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a TreeCtrl isntead of a panel. This affects most method since we now refer to self instead of self.tree (SessionTreeView): New class implementing a non-modal dialog showing the session tree. * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the layer to the tableview dialog. * Thuban/UI/tableview.py: Add some doc-strings (TableGrid): (TableGrid.OnRangeSelect): (TableGrid.OnSelectCell): (TableFrame.__init__): (TableFrame.row_selected): Selecting rows in the grid view now updates the selected shapes through the TableFrame. To achieve this we derive TableGrid from Publisher and introduce the message type ROW_SELECTED which the TableFrame subscribes to and which is issued by OnRangeSelect and OnSelectCell (DataTable.SelectRow): Removed because it's no longer needed in the row/shape selection scheme * Thuban/UI/dialogs.py: New file implementing common classes for dialogs * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to the SELECTED_SHAPE message anymore. This is now handled by the parent. (TableGrid.select_shape): Only update the selection if the shape is not None. (TableFrame): Inherit from the new NonModalDialog class. (TableFrame.__init__, TableFrame.select_shape): Handle the SELECT_SHAPE message. (TableFrame.OnClose): Extend the inherited method to unsubscribe SELECT_SHAPE * Thuban/UI/mainwindow.py (MainWindow.init_dialogs): (MainWindow.add_dialog): (MainWindow.dialog_open): (MainWindow.remove_dialog): (MainWindow.get_open_dialog): New methods to maintain a dictionary of opened non-modal dialogs. (MainWindow.__init__): Initialize the new non-modal dictionary management code (MainWindow.LayerShowTable): maintain separate dialogs for each table using the non-modal dialog management code to only open a view once for each table. (MainWindow.IdentifyTool): (MainWindow.__init__): (MainWindow.identify_view_on_demand): Don't open the identify view in IdentifyTool anymore. This will be done automatically by the new method identify_view_on_demand which handles the SELECTED_SHAPE message so that the identify view will be opened on demand * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove the interactor argument. The SELECTED_SHAPE message is now handled by the parent. (IdentifyView.__init__): Add the interactor argument so that we can handle the SELECTED_SHAPE message here (IdentifyView.selected_shape): New method to handle the SELECTED_SHAPE messages * Thuban/UI/identifyview.py (IdentifyView): Derive from the new NonModalDialog class (IdentifyView.OnClose): Extend the inherited version to unsubscribe SELECT_SHAPE * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints 2001-09-05 Bernhard Herzog * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor. * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument interactor to pass through to the MapCanvas * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new argument to the MainWindow constructor to get rid of the ugly hack that made main.app available early just so that the mapcanvas could access the interactor object. 2001-09-04 Bernhard Herzog * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method that runs a modal message box (MainWindow.OnClose): Use the new method (MainWindow.RemoveLayer): Just do nothing in case no layer is selected. The command should be grayed out anyway, so there's no need to pop up a message box. (MainWindow.AddLayer): Pop up a message box with an error message if the shape file can't be opened * Thuban/Model/layer.py (Layer.__init__): Open the shapefile immediately. This will cause an exception in case the file can't be opened and we can display an appropriate message. * MANIFEST.in: Add extensions/pyprojection/LICENSE * setup.py (thuban_bdist_rpm): New class implementing a Thuban specific bdist_rpm command. * Thuban/UI/main.py: Catch ImportError exceptions when importing the locale module because it may not be available on some installations. * extensions/pyprojection/LICENSE: Copy of the license text in Projection.i. Having it in a separate file makes it easier to refer to license text in e.g. RPMs 2001-09-03 Bernhard Herzog * setup.py: use wx-config instead of wxgtk-config because it's more generic * setup.py (ThubanInstall.get_outputs): Add the symlink in /bin to the outputs (ThubanInstall.link_file): New method to link files. We need this because the standard copy_files refuses to link non-existing files. (ThubanInstall.run): Remove the leading install root from the script filename if an install root was specified and use the new link_file method * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to the window when the first layer is added to the map. * setup.py (ThubanInstall.run): Honor the build root (self.root) when linking thuban.py to /bin 2001-08-31 Bernhard Herzog * setup.py: In the setup call, the install parameters shouldn't have trailing slashes because distutils on non-posix platforms doesn't like that. The same applies to other directories like "Resources/Bitmaps" In the configuration section for nt, move the wxWindows directory optins into the part clearly marked as editable. (InstallLocal.initialize_options): (InstallLocal.user_options): remove the currently unused debug flag (thuban_build_py.find_all_modules): Add this method so that it works for our case of having packages and modules in one distribution as well. (ThubanInstall.initialize_options): (ThubanInstall.finalize_options): (ThubanInstall.user_options): (ThubanInstall.boolean_options): Add new options, do-symlink and extra files. Since these are the first ThubanInstall specific options, override user_options and boolean_options (ThubanInstall.run): Honor the new do-symlink and extra-files options. (ThubanInstall.get_outputs): Add to override the base-class's version and add the extra-files to the outputs (bdist_inno): New class for windows distributions with Inno Setup (InnoIconItem): Helper class for bdist_inno (thuban_bdist_inno): Thuban specific version of bdist_inno. Added this together with the appropriate parameters, to the setup call. * setup.cfg (bdist_inno): added new section for the inno setup installer * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var changing_selection to avoid recursive selection events when modifying the selection in response to a selection event. (myTreeCtrlPanel.normalize_selection): Set the new inst var when changing the tree's selection. (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when we're not being called indirectly from normalize_selection. * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call event.Check only if the command is actuall checkable. (MainWindow.__init__): Call the toolbar's Realize method to make sure that the items are actually shown 2001-08-28 Bernhard Herzog * setup.py: Fix some doc strings * ChangeLog: started