1.19.10: 2011-09-12 Murray Cumming UsesRelationship: Added get_relationship_display_name(). * glom/mode_design/layout/dialog_layout_calendar_related.cc: update_ui(): * glom/mode_design/layout/dialog_layout_list_related.cc: update_ui(): Move some code into * glom/libglom/data_structure/layout/usesrelationship.[h|cc]: get_relationship_display_name() to avoid repetition. 2011-09-12 Murray Cumming Related Records: Correct automatic navigation to related relationships. * glom/base_db.[h|cc]: get_portal_navigation_relationship_automatic(): Remove the unused (well, should have been unused) navigation_main output parameter. Document the method so we know what the parameters and result really mean. In particular, a empty result means that the portal's regular relationship should just be used. * glom/mode_data/box_data_portal.[h|cc]: get_suitable_table_to_view_details(): Document its parameters so we know what table the relationship belongs to, if any relationship is even needed. Use get_navigation_relationship_specific() if specified and correct the logic so that the correct table is always used. get_suitable_record_to_view_details(): Document this too. * glom/mode_design/layout/dialog_layout_calendar_related.cc: update_ui(): * glom/mode_design/layout/dialog_layout_list_related.cc: update_ui(): Adapted. 2011-09-09 Murray Cumming ComboGlom::set_value(): Do not cause a change to be signalled. * glom/mode_data/datawidget/combo.[h|cc]: Prevent unsuitable signal emissions when setting the value programatically. 2011-09-09 Murray Cumming Do not create XML documents containing form feeds. * glom/libglom/utils.[h|cc]: Added string_clean_for_xml(), though it is currently inefficient and copies the whole string even when not changing it. * glom/libglom/document/document.cc: set_child_text_node(), set_node_text_child_as_value(), save_before(): Always use that utility method before giving the child text string to libxml, because libxml will just write it out to the file, creating an invalid XML file that it can't read back in. 2011-09-09 Murray Cumming Related records portals: Allow navigation via read-only relationships. * glom/mode_data/box_data_list_related.cc: on_adddel_user_requested_edit(): Remove the check for a non-editable relationship, because that is about editing, but this is about opening, and we already have the navigation=None option. 2011-09-09 Murray Cumming Script Library: Prevent a crash when opening the dialog. * ui/developer/dialog_script_library.glade: Change the GtkComboBox to a GtkComboBoxText as intended, to prevent a crash when it has no model. * glom/utility_widgets/combo_textglade.[h|cc]: Add a check that there is a model. 2011-09-08 Murray Cumming DataWidget: Do not expand the Open and Find buttons. * glom/mode_data/datawidget/datawidget.cc: Use Gtk::PACK_SHRINK. 2011-09-08 Murray Cumming Print Layout: Do not show the formatting context menu items when it is useless. * glom/print_layout/canvas_print_layout.cc: on_item_show_context_menu(): Disable the formatting context menu item when appropriate. 2011-09-08 Murray Cumming Use pygobject-3.0 * configure.ac: Instead of pygobject-2.0. Because everything else (such as the gi.repository.Gda seems to use it, and initializing pygobject-2.0 breaks that. 2011-09-08 Murray Cumming Remove the Mameo UI. * Makefile.am: * Makefile_glom.am: * configure.ac: * glom/*.[h|cc]: Remove the --enable-maemo option and the ifdefs in the code. Unforunately, the platform is dead so that Hildon API will never be available to us in the real world. 2011-09-08 Murray Cumming startup: Check that the gi.repository python module is available. * glom/main.cc: Actually call check_gir_is_available_with_warning() and do that before checking for Gda inside it. 2011-09-05 Murray Cumming Glade files: Alignment corrections. * ui/developer/box_formatting.glade: * ui/developer/dialog_choose_field.glade: * ui/developer/window_groups.glade: * ui/operator/dialog_import_csv.glade: Use fill=true for the packing of labels in GtkTable, so their alignment is actually used. For instance, this makes labels line up to the left or right. * ui/developer/dialog_user.glade: Also use a : at the end of labels, as in other dialogs. 2011-09-02 Murray Cumming Fix expansions in glade files. * ui/developer/*.glade: * ui/operator/*.glade: expand/fill corrections and some alignment corrections. 2011-09-01 Murray Cumming Field Definition window: Fix vertical packing. * ui/developer/window_field_definition_edit.glade: Some GtkTable children had vertical expand=true. 2011-09-01 Murray Cumming Replace deprecated Gtk::HBox and Gtk:VBox with Gtk::Box. * glom/*.[h|cc]: HBox and VBox are deprecated. However, these are still used in the .glade files. 2011-09-01 Murray Cumming Update EggSpreadTableDnd from libegg. * glom/utility_widgets/eggspreadtable/eggspreadtablednd.[h|c]: Updated from libegg. * glom/utility_widgets/eggspreadtablemm/eggspreadtabledndmm.[h|cc]: Wrap the new API to add and remove widgets. Note the extra reference() in remove_child(), like Gtk::Container::remove(). * glom/utility_widgets/eggspreadtablemm/test_spreadtablednd.cc: Adapt. * glom/utility_widgets/flowtable.[h|cc]: Adapt and make several corrections, for instance to really find our intermediate hbox parents. However, there is still a warning (from our code) about trying to remove a hbox that has no parent. * glom/mode_data/flowtablewithfields.[h|cc]: Remove the add_before parameters, always adding at the end, because we do not need the ability to insert anywhere else, and doing so required examining the children, but EggSpreadTableDnd adds internal children that we don't want to care about. 2011-08-31 Murray Cumming Print Layout: Allow the user to choose row and column line widths and color. * glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]: Added get/set_print_layout_row_line_width(), get/set_print_layout_column_line_width(), and get/set_print_layout_line_color(). * glom/libglom/document/document.cc: load_after(), save_before(): Store the new details in the document. * ui/developer/window_data_layout.glade: Added an optional extra section with line details for print layouts. * glom/mode_design/layout/dialog_layout_list_related.[h|cc]: Use the new widgets, hiding them for non-print-layout uses. * glom/mode_design/layout/dialog_layout_details.[h|cc]: Hide the new widgets by default. * glom/utility_widgets/canvas/canvas_table_movable.[h|cc]: Added set_line_details(). * glom/print_layout/canvas_layout_item.cc: create_canvas_item_for_layout_item(): Call set_line_details(). 2011-08-30 Murray Cumming Disable the canvas test. * Makefile_tests.am: Because it doubles the build time. 2011-08-30 Murray Cumming Print Layout: Line editing: Allow decimal places. * ui/developer/dialog_line.glade: Add an outer border, to match the other dialogs. Let the SpinButton show (and allow) 3 decimal places. 2011-08-30 Murray Cumming Print Layout: Slight improvement to image scaling. * glom/utility_widgets/canvas/canvas_image_movable.cc: scale_to_size(): Use the correct size in pixels to scale the image. However, it is still overscaled and cropped due to goocanvas bug #657592 . 2011-08-29 Murray Cumming Print Layout: Allow editing of line width and color. * Makefile.am: * Makefile_glom.am: * ui/developer/dialog_line.glade: * glom/mode_design/layout/layout_item_dialogs/dialog_line.[h|cc]: Added a new dialog for editing line details, such as width and color. * tests/test_glade_derived_instantiation.cc: Test new new dialog. * glom/libglom/data_structure/layout/layoutitem_line.[h|cc]: Added get/set_line_width() and get/set_line_color(). * glom/libglom/document/document.cc: load_after(), save_before(): Store these new details in the document. * glom/print_layout/canvas_layout_item.cc: * glom/print_layout/canvas_print_layout.[h|cc]: Allow editing by showing this new dialog. 2011-08-29 Murray Cumming Load whole glade files, to get secondary objects without listing them. * glom/glade_utils.h: helper_get_glade_widget_derived_with_warning(): Add a bool so we can choose to load the whole .glade file. get_glade_widget_derived_with_warning(): Load the whole file. Add get_child_glade_child_widget_derived_with_warning(), which does not load the whole file. * glom/frame_glom.cc: * glom/mode_design/fields/dialog_fielddefinition.cc: * glom/mode_design/layout/layout_item_dialogs/dialog_field_layout.cc: * glom/mode_design/layout/layout_item_dialogs/dialog_formatting.cc: * glom/mode_design/print_layouts/dialog_text_formatting.cc: Use this to load boxes when we do not want the whole window that they are in. This was the main reason for splitting the .glade files up - to work around GtkBuilder's inability to automatically load secondary objects. 2011-08-28 Murray Cumming Remove unused .glade file. * ui/developer/dialog_layoutitem_properties.glade: * Makefile.am: This glade file is not used by any code. 2011-08-27 Murray Cumming Print Layout: Related records portals: Use the normal outline stroke. * glom/utility_widgets/canvas/canvas_group_resizable.[h|cc]: Add a static get_outline_stroke() method. * glom/print_layout/canvas_layout_item.cc: create_canvas_item_for_layout_item(): Use it here. 2011-08-27 Murray Cumming Print Layouts: Default to 12-point text instead of 9. * glom/mode_design/print_layouts/window_print_layout_edit.cc: Use a grid size, and item sizes, suitable for 12 point text. create_empty_item(): Make sure we stop LayoutItem_Field items from using default formatting, which is not for print layouts. Set a default font size for anything that has text formatting. * glom/mode_design/relationships_overview/canvas_group_dbtable.cc: Constructor: Use 12 points instead of 10 points, though this should be configurable anyway. 2011-08-27 Murray Cumming Print Layout: Make item sizes match the grid size by default. * glom/mode_design/print_layouts/window_print_layout_edit.cc: create_empty_item(): Base the default item sizes on the grid gap, so they are more useful. 2011-08-26 Murray Cumming Allow deletion of multiple selected items via the context menu. * glom/print_layout/canvas_print_layout.[h|cc]: on_context_menu_delete(): If the deleted item was selected, delete all selected items. 2011-08-23 Murray Cumming Print Layout: Related records: Corrections for column sizes. * glom/print_layout/canvas_layout_item.cc: create_canvas_item_for_layout_item(): Related records table: Use an extra GooCanvasRect to make sure that the cell size is really what we want, avoiding GooCanvasText's and GooCanvasTable's attempts to be cleverer than we want. Also, make sure that the last column is expanded, regardless of any size specified, if all the other columnd had specified sizes. 2011-08-22 Murray Cumming Print Layout: Related Records: Set the row height. * glom/print_layout/canvas_layout_item.cc: We can do this now that the goocanvas bug has been fixed, though configure should check for it when the tarball version exists. 2011-08-22 Murray Cumming Print Layout / Relationships Overview: Avoid errors with & in the text. * glom/utility_widgets/canvas/canvas_text_movable.cc: reconstruct_markup: Escape the text before using it to build markup. Otherwise pango will complain (correctly) about & in the text. 2011-08-15 Murray Cumming Print Layout: Do not show navigation options for related records portals. * glom/mode_design/layout/dialog_layout_list_related.[h|cc]: set_document(): Add a new bool parametrer that can hide the navigation widgets because they are useless in a print layout. * glom/print_layout/canvas_print_layout.cc: offer_related_records(): Use the new bool parameter. * ui/developer/window_data_layout.glade: Correct some packing options so the right parts expand, without empty space. 2011-08-13 Murray Cumming Print Layout: Snap to rules even when the grid is not shown. * glom/utility_widgets/canvas/canvas_group_grid.cc: Don't make snapping to rules dependent on whether the grid is showing. 2011-08-12 Murray Cumming Print Layout: Work around some weirdness in portal tables. * glom/print_layout/canvas_layout_item.cc: create_canvas_item_for_layout_item() Do not set the height of items in tables, because that leads to them disappearing when the table is moved in certain ways. I am still investigating why. We probably really do want to set the height. 2011-08-11 Murray Cumming Print Layout: Only show grid lines on mouseover. * glom/utility_widgets/canvas/canvas_table_movable.[h|cc]: Add set_lines_visibility(). * glom/utility_widgets/canvas/canvas_group_resizable.cc: position_line_manipulators(): If the child is a table then also show the grid lines. 2011-08-11 Murray Cumming Print Layout: Make the manipulators the same width as the outlines. * glom/utility_widgets/canvas/canvas_group_resizable.cc: Change MANIPULATOR_STROKE_WIDTH to be the same as OUTLINE_STROKE_WIDTH, which is thinner. create_outline_line(): Prevent dragging of the outline, in case it ever gets high enough in the z order to be dragged. create_rect_manipulators(), position_line_manipulators(), create_outline_line(): Always raise the manipulators to the very top, so they are always visible and draggable. Trying to be more precise with raise() can apparently move them lower than other items that we do not mention. 2011-08-11 Murray Cumming Print Layout: Do not show the rules when they should not be visible. * glom/print_layout/canvas_print_layout.cc: set_print_layout(): Show the grid and rules as per the PrintLayout. 2011-08-11 Murray Cumming Print Layout: Prevent rule line dragging if rules are not shown. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: on_menu_view_show_rules(): If rules are not shown, unset the GimpRulers as drag sources. on_canvas_drag_motion(), on_canvas_drag_data_received(): Prevent showing the temp rule or dropping a real rule too. Also remove the unused (though set) m_dragging_temp_rule variable. 2011-08-11 Murray Cumming Print Layout: Add a Print Preview menu item. * glom/frame_glom.[h|cc]: on_menu_print_layout_selected(): Move this into a do_print_layout() method, with optional preview and transient-for window. * glom/application.[h|cc]: Added do_print_layout() so we can do this from other parts of the code. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Add a Print Preview menu item that calls the method on the application, though transient to this window. It shows data from the currently-selected record, even though that might not be very visible to the user. 2011-08-11 Murray Cumming Print Layout: Make text formatting work for field items. * glom/print_layout/canvas_print_layout.cc: on_context_menu_edit(), on_dialog_format_hide(): Never use default formatting for fields, because that formatting is for regular layouts, and we do not even let the user toggle whether to use it. 2011-08-11 Murray Cumming Print Layout: Don't move fields to 0,0 when choosing the field. * glom/mode_design/layout/dialog_choose_field.cc: get_field(): Preserve the extra details of the start field, such as formatting and print layout position. 2011-08-11 Murray Cumming Print Layout: Actually allow the user to change the text formatting. * glom/mode_design/layout/layout_item_dialogs/box_formatting.cc: When used for a print layout, enable the hidden checkboxes, because other code checks for them. * glom/print_layout/canvas_print_layout.cc: on_context_menu_formatting(): Make the dialog transient for the parent window. Also, do not show numeric formatting for text items. 2011-08-11 Murray Cumming Print Layout: Correct drag positions when scrolled. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Correct the rule position indicators, the rule drag positions, and item drag positions, when the viewport is scrolled. canvas_convert_from_drag_pixels(): Add a bool adjust_for_scrolling option, because the motion-notify-event signal already takes the scroll offset into account, but the drag-motion signal does not. That does not seem to be documented. 2011-08-10 Murray Cumming Print Layout: Make items transparent. * glom/utility_widgets/canvas/canvas_group_resizable.cc: create_rect_manipulators(): Make items transparent instead of white. 2011-08-10 Murray Cumming Print Layout: Allow rules to be moved. * glom/utility_widgets/canvas/canvas_line_movable.[h|cc]: Added set_hover_color() and make sure that color is used when the mouse is over the line. * glom/utility_widgets/canvas/canvas_group_grid.[h|cc]: Use CanvasLineMovable instead of PolyLine for rules, so it can be moved. Make it appear red when hovering over it. Store the lines instead of just the positions, so we can get the latest positions later. This is rather inefficient, but it works. 2011-08-10 Murray Cumming Print Layout: Save the rules and the various show/hides. * glom/glom_document.dtd: Add the new nodes and attributes. * glom/libglom/document/document.cc: load_after(), save_before(): Load and save these in the document. * glom/mode_design/print_layouts/window_print_layout_edit.cc: set_print_layout(): Set the menu actions from the PrintLayout so, for instance, the grid is shown if it was shown last time. * glom/print_layout/canvas_print_layout.cc: set_print_layout(): Load and save the rules too. * glom/utility_widgets/canvas/canvas_group_grid.[h|cc]: Added remove_rules() and get_horizontal/vertical_rules(). * glom/utility_widgets/canvas/canvas_editable.[h|cc]: Added remove_rules() and get_horizontal/vertical_rules(), calling the same methods in the grid. * glom/libglom/data_structure/print_layout.[h|cc]: Added get/set_grid/rules/outlines() and get_horizontal/vertical_rules(). 2011-08-10 Murray Cumming Print Layout: Allow dragging of rules from the rulers. * glom/utility_widgets/canvas/canvas_group_grid.[h|cc]: Added show_temp_rule(). * glom/utility_widgets/canvas/canvas_editable.[h|cc]: Added show_temp_rule(), calling the one in the grid. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Constructor: Add a special target to the canvas (drag destination). Handle button-press on the rulers to identify the orientation. on_canvas_drag_motion(): Handle the new target, showing the temporary rule line. on_canvas_drag_data_received(): Handle the new target, adding a real rule line. on_canvas_drag_leave(): clean up. The rule lines are not saved to the document yet. 2011-08-09 Murray Cumming Print Layout: Actually show rules, if there are some. * glom/utility_widgets/canvas/canvas_group_grid.[h|cc]: create_lines(): Split this into two methods, and make sure that the z order is correct, so that we can really show the grid and rules independently, without needing to recreate both at the same time. Added set_rules_visiblity() to do so. add_horizontal_rule(), add_vertical_rule(): Actually create the rules. * glom/utility_widgets/canvas/canvas_editable.[h|cc]: Added set_rules_visibility() which just calls the same method in the grid. * glom/mode_design/print_layouts/window_print_layout_edit.cc: on_action_menu_view_showrules(): Call it. Of course, there is no way to add a rule yet. 2011-08-09 Murray Cumming Print Layout: Make the window bigger by default. 2011-08-09 Murray Cumming Print Layout: Make ruler markers follow moved items. * glom/mode_design/print_layouts/window_print_layout_edit.cc: on_selected_item_moved(): Show the top-left position of the group of items, though maybe we should show just the moved item instead. Inkscape does not do this at all (it just shows the cursor position), so some other example would be nice. 2011-08-09 Murray Cumming Print Layout: Make ruler markers follow the cursor. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Handle motion-notify-event so the rules track the cursor position. This is not very useful, but it feels nice, and is what other apps do. 2011-08-09 Murray Cumming Application: Remove unused member variable. * glom/application.[h|cc]: Remove m_pBoxSidebar. 2011-08-09 Murray Cumming Update the GimpRuler source copy. * glom/utility_widgets/gimpruler/gimpruler.[h|cc]: Updated from gimp's repository, from the gtk3-port branch. 2011-08-08 Murray Cumming Relationships Overview: Make snap to grid work. * glom/utility_widgets/canvas/canvas_editable.[h|cc]: Add associate_with_grid(). * glom/mode_design/relationships_overview/dialog_relationships_over view.cc: draw_tables(): Use it so that the items' snap_position() methods have a grid to snap to. The whole grid association/add idea is generally hacky, but this makes it work. 2011-08-08 Murray Cumming Print Layout: Deselect all items when clicking on the background. * glom/print_layout/canvas_print_layout.[h|cc]: set_page_setup(): Handle button-press-event signals on the background, deselecting any selected items. create_margin_line(): Do the same if the user manages to click on a line instead. 2011-08-08 Murray Cumming Relationships Overview: Correct the packing in the dialog. * ui/developer/dialog_relationships_overview.glade: Let the scrolledwindow expand. This was really silly and must have happened during some edit with a bad version of Glade. 2011-08-08 Murray Cumming Print Layout: Select All: Added ctrl-A keyboard shortcut. * glom/mode_design/print_layouts/window_print_layout_edit.cc: init_menus(): Because it is not part of the stock item, for some reason. 2011-08-08 Murray Cumming Print Layout: Add Select All and Unselect All menu items. * glom/print_layout/canvas_print_layout.[h|cc]: Added select_all(bool) * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: init_menus(): Edit menu: Add Select All and Unselect All menu items, which call that method. 2011-08-08 Murray Cumming Print Layout: Add a Show Outlines menu item * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc] View menu: Add Show Outlines, with a handler, to show the extents of the items. * glom/utility_widgets/canvas/canvas_group_resizable.[h|cc]: Added a new group with lines, in a thinner fainter gray, to indicate the outline. Added set_outline_visible() to show it. Move it whenever the child item moves, like the manipulator lines. * glom/print_layout/canvas_print_layout.[h|cc]: Added set_outlines_visibility() to call this on all items. Store the value as a bool so we can use it again in add_canvas_layout_item(). 2011-08-08 Murray Cumming Print Layout: Allow moving of multiple items via x and y numbers. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: on_canvas_selection_changed(): Move the calculation of the group dimensions into get_dimensions_of_multiple_selected_items(). on_spinbutton_x(), on_spinbutton_y(): Use the new method to get the old dimensions, so we can calculate the offset and then apply it to all items, moving them together. 2011-08-08 Murray Cumming Print Layout: Snap to grid when dragging items from the toolbar. * glom/utility_widgets/canvas/canvas_group_resizable.h: snap_position(): Make this public. * glom/mode_design/print_layouts/window_print_layout_edit.cc: on_canvas_drag_motion(), on_canvas_drag_data_received(): Snap the position to the grid (or rules), like we do when dragging an existing item. 2011-08-07 Murray Cumming Print Layout: Improve the grid appearance. * glom/mode_design/print_layouts/window_print_layout_edit.cc: on_menu_view_show_grid(): Use a smaller grid gap, which seems more useful. * glom/utility_widgets/canvas/canvas_group_grid.cc: create_rule_line(): Make the lines thinner and light blue instead of gray. 2011-08-07 Murray Cumming CanvasGroupGrid: Simplify rule creation. * glom/utility_widgets/canvas/canvas_group_grid.[h|cc]: create_grid_or_rule_line(): Rename to create_rule_line(), removing the bool, because that is what it is used for. 2011-08-07 Murray Cumming Canvas_PrintLayout: Move all selected items when dragging. * glom/utility_widgets/canvas/canvas_item_movable.[h|cc]: signal_moved(): Send the item (for convenience, to avoid dodgy use of sigc::bind() with RefPtr<>s) and the offset of just the current part of the move. * glom/utility_widgets/canvas/canvas_group_resizable.[h|cc]: * glom/mode_design/relationships_overview/dialog_relationships_over view.[h|cc]: Adapt. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: on_selected_item_moved(): Move all the other selected items by the same amount. 2011-08-07 Murray Cumming Canvas_PrintLayout: Selecting unselects others. Allow shift-clicking. * glom/utility_widgets/canvas/canvas_item_movable.[h|cc]: signal_selected(): Also send the item (this), to avoid the need for awkward (due to keeping a reference) sigc::bind()ing of RefPtr<>s. Send a bool group_select parameter too, so we know if the button press (corresponding to the button release) was with the shift key held down. * glom/utility_widgets/canvas/canvas_editable.[h|cc]: on_item_selected(): Deselect other already-selected items if the select was not with shift held down. 2011-08-06 Murray Cumming CanvasItemMovable: set_selected(): Do not emit the signal here. * glom/utility_widgets/canvas/canvas_item_movable.cc: set_selected(): Do not emit signal_selected here, because it should only be emitted when the user causes it. on_button_release_event(), on_motion_notify_event(): Emit the signal if necessary. 2011-08-06 Murray Cumming Canvas_PrintLayout: Edit menu: Support multiple items. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: on_canvas_selection_changed(): Store all the seleced items in a vector instead of just one. on_menu_edit_copy(): Clone all the selected items in a vector, instead of just one. on_menu_edit_paste(): Paste all the items, instead of just one. on_menu_edit_delete(): Delete all the items, instead of just one. on_spinbutton_*(): Adapt. These still assume that the SpinButtons are only editable when only one item is selected. 2011-08-06 Murray Cumming Canvas_PrintLayout: Update position numbers when moving items. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: on_canvas_selection_changed(): Connect to the item's signal_moved, so we can update the spinbuttons during the move. on_spinbutton_*(): Ignore the spinbutton signals while we are setting them programatically, to avoid an endless loop. * glom/utility_widgets/canvas/canvas_item_movable.cc: set_selected(): Emit the signal here if it has changed, rather than always doing it after the call. on_motion_notify_event(): Mark the item as selected whenever it is moved, therefore emitting the signal. 2011-08-06 Murray Cumming Canvas_PrintLayout: Fix typo to pass the item by reference. * glom/print_layout/canvas_print_layout.[h|cc]: add_canvas_layout_item(): Add a missing & to the parameter. 2011-08-06 Murray Cumming Print Layout: Implement cut/copy/paste/delete. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Implement the edit menu, enabling/disabling the menu items based on whether something has been selected or previously copied. * glom/utility_widgets/canvas/canvas_editable.[h|cc]: Added get_selected_items() here, making it virtual. The override in Canvas_PrintLayout is the only real implementation so far. Added remove_item(). remove_all_items(): Emit signal_selection_changed if something was selected. * glom/print_layout/canvas_print_layout.[h|cc]: Added remove_canvas_layout_item(). Removed update_layout_position_from_canvas(), putting it in Canvas_LayoutItem instead. * glom/print_layout/canvas_layout_item.[h|cc]: Added update_layout_position_from_canvas(). 2011-08-06 Murray Cumming CanvasPrintLayout: Remove unused method overload. * glom/print_layout/canvas_print_layout.[h|cc]: get_selected_items(): The const overload is not used so remove it. 2011-08-06 Murray Cumming Print Layout: Cache the selected item. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Store the selected item, when it changes, instead of repeatedly requesting it, which requires iteration. 2011-08-06 Murray Cumming Print Layout: Allow editing of positions and size numerically, * ui/developer/window_print_layout_edit.glade: Add a row of SpinButtons at the bottom to show the position and dimensins of the selected item, also letting the user change them by changing the numbers. * glom/utility_widgets/canvas/canvas_item_movable.[h|cc]: Added signal_selected(). * glom/utility_widgets/canvas/canvas_editable.[h|cc]: Added signal_selection_changed(). * glom/print_layout/canvas_print_layout.[h|cc]: Added get_selected_items(). * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Constructor: Get the SpinButton widgets from Gtk::Builder, and set their values when an item is selected. Also change the item when the values in the SpinButtons change. 2011-08-05 Murray Cumming Print Layout: Allow the user to select items with a click. * glom/utility_widgets/canvas/canvas_item_movable.[h|cc]: Added get/set_selected() and a virtual show_selected() which it calls. on_button_release_event(): set the item as - selected if it unselected and the clicked without a move. - unselected if it was selected and clicked without a move. - selected if it was moved. This is roughly like Inkscape's behaviour. * glom/utility_widgets/canvas/canvas_group_resizable.[h|cc]: Split the manipulator group into two groups (edges and corners), so we can (re)use the edges to show selection. Implement show_selected() to show/hide the edges. set_manipulator_visibility(): Make sure that we don't hide the edges that are visible to show selection. This doesn't actuall do anything useful yet, but it will let us do things to the selected item(s), such as editing their position via coordinate numbers, moving them together, or copy/paste/cut/deleting them via the menus. 2011-08-05 Murray Cumming Print Layout: Avoid warnings about -1 width. * glom/utility_widgets/canvas/canvas_group_movable.cc: get_width_height(), * glom/utility_widgets/canvas/canvas_group_resizable.cc: get_width_heigh(): Do not return -1, which groups default to, to mean some default size. This was not really used anyway, and was rejected when applied to non-group goocanvas items. 2011-08-05 Murray Cumming Developer menu: Move the Developer item after Operator. * glom/application.cc: When the user changes this, he generally changes from operator to developer, so this feels more natural. 2011-08-05 Murray Cumming Print Layout Window: default to 100% size * glom/mode_design/print_layouts/window_print_layout_edit.cc: init_menu(): Default to 100% instead of fit-to-width, because this seems to give a better idea that it is a page, by being more like applications such as OpenOffice/LibreOffice write. 2011-08-05 Murray Cumming Print Layout Window: Make the top widgets more compact. * ui/developer/window_print_layout_edit.glade: * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Make the table title/name a simple bold label with no Table: label, as now in the main window. Make the other labels non-bold. Make sure that we really show the table title with the name in brackets, by removing an unused (but checked) widget pointer. 2011-08-05 Murray Cumming Print Layout: Correct drag position even when the layout is scrolled. * glom/mode_design/print_layouts/window_print_layout_edit.[h|cc]: Add and use canvas_convert_from_drag_pixels() to avoid the offset when dragging an item from the toolpalette to the canvas when the canvas is scrolled down. 2011-08-04 Murray Cumming Print Layouts: Make corner and edges snap to the grid too. * glom/utility_widgets/canvas/canvas_group_resizable.[h|cc]: Add a set_grid() override(), as in CanvasGroupMovable, so that the manipulator items also know about it, even though the manipulators were created earlier, in the constructor. Previously snapping to the grid only worked while moving whole items.