1. 13 Oct, 2011 2 commits
    • Murray Cumming's avatar
      Use Glib::ustring::compose() instead of concatenation for translatable strings. · b0a17083
      Murray Cumming authored
      * glom/bakery/dialog_offersave.cc:
      * glom/import_csv/dialog_import_csv.cc:
      * glom/mode_design/fields/dialog_fieldcalculation.cc:
      * glom/mode_design/layout/combobox_relationship.cc:
      * glom/mode_design/layout/dialog_layout_details.cc:
      * glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc:
      * glom/navigation/box_tables.cc:
      * glom/utils_ui.cc: Let translators arrange built strings.
    • Murray Cumming's avatar
      Print/Standard: Do print, not preview. · 9f69dfcd
      Murray Cumming authored
      * glom/mode_data/box_data_details.cc: This is now the same as when
      printing a non-standard print layout.
  2. 12 Oct, 2011 3 commits
    • Murray Cumming's avatar
      Replace Gtk::Table with Gtk::Grid in the source code. · ba84b0a5
      Murray Cumming authored
      * glom/mode_design/fields/dialog_fielddefinition.h: Use the table
      (from the .glade file) via Gtk::Widget*.
      * ui/developer/window_print_layout_edit.glade: Replace the GtkTable
      with a GtkGrid.
      * glom/mode_design/print_layouts/window_print_layout_edit.cc:
      There are still GtkTables in the other .glade files, but this at least
      lets us build with gtkmm 3.3/3.4 even with --enable-warnings=fatal.
    • Murray Cumming's avatar
      Print Layout: Avoid some code duplication. · 2773962f
      Murray Cumming authored
      * glom/print_layout/print_layout_utils.[h|cc]: moved get_page_height()
      from CanvasPrintLayout to here. And actually get the margins.
      * glom/print_layout/canvas_print_layout.cc: get_page_y_start_and_end():
      Use it here.
      get_page_height(): Forward to the PrintLayoutUtils versions, passing
      the extra parameters.
    • Murray Cumming's avatar
      Print Layout: Move items to next page when expanding portals. · 8ee56b20
      Murray Cumming authored
      * glom/print_layout/canvas_print_layout.[h|cc]: move_items_below_item():
      Use a new move_fully_to_page() method to make sure that items are never
      in the margins if that is possible, when expanding related records
      portals for real data.
      Also add extra pages when necessary.
  3. 11 Oct, 2011 11 commits
    • Murray Cumming's avatar
      Print Layout: Related Records: Move others down when expanding. · 7b269362
      Murray Cumming authored
      * glom/print_layout/canvas_layout_item.[h|cc]: Added
      * glom/print_layout/canvas_print_layout.[h|cc]: fill_with_data_portal():
      move other items lower when changing the size of the portal's table.
    • Murray Cumming's avatar
      Print Layout: Related Records: Expand according to min/max rows count. · 80944392
      Murray Cumming authored
      * glom/print_layout/canvas_layout_item.[h|cc]:
      Moved get_canvas_table_cell_child() here from CanvasPrintLayout.
      create_canvas_item_for_layout_item(): Move the table-child creation
      code into add_portal_rows_if_necessary().
      * glom/print_layout/canvas_print_layout.[h|cc]: fill_with_data_portal():
      Add rows, up to the maximum, according to the number of database rows.
      * glom/print_layout/print_layout_utils.cc: create_standard():
      Set a simple default height for one row, but set a min of 1 and a max
      of 100 so it will expand later.
    • Murray Cumming's avatar
      Const correction · c994e34f
      Murray Cumming authored
    • Murray Cumming's avatar
      Related Records Portals: Change rows count to min and max counts. · bfa248e9
      Murray Cumming authored
      * glom/glom_document.dtd: Adapted.
      * glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]:
      set_rows_count(): Return a min and max, and change it from double to
      * glom/libglom/document/document.cc: load_after(), save_before():
      Store it in the document. The old XML attribute was new in Glom 1.19
      anyway, so we can change it.
      * ui/developer/window_data_layout.glade: Add an extra SpinButton,
      adjust the labels, and add explanatory tooltips.
      * glom/mode_design/layout/dialog_layout_details.[h|cc]: Adapted.
      * glom/mode_data/db_adddel/db_adddel.[h|cc]: set_height_rows():
      Take the min and max.
      construct_specified_column(): Increase the size if appropriate when
      there are more database rows to show.
      * glom/mode_design/layout/dialog_layout_list_related.cc:
      * glom/print_layout/print_layout_utils.cc:
      * glom/libglom/db_utils.cc:
      * glom/mode_data/box_data_list_related.cc: Adapted.
    • Murray Cumming's avatar
      Print Layout: Create Standard: Use the full page width. · f523f4d5
      Murray Cumming authored
      * glom/print_layout/print_layout_utils.cc: Instead of hard-coding the
      width. However, the field title widths are still hard-coded.
    • Murray Cumming's avatar
      Tiny improvement · 1a202dbd
      Murray Cumming authored
    • Murray Cumming's avatar
      CanvasPrintLayout: Wipe empty rows when filling with data. · 8b64ad8a
      Murray Cumming authored
      * glom/print_layout/canvas_print_layout.cc: fill_with_data_portal():
      Otherwise, the field names appear on the printout, left over from
      the default non-data preview.
    • Murray Cumming's avatar
      TranslatableItem: Make get_title() virtual. · dafddac8
      Murray Cumming authored
      * glom/libglom/data_structure/translatable_item.h: Make get_title()
      virtual, like get_title_or_name() already is, so we can make get_title()
      useful generically via the base class.
      * glom/libglom/data_structure/layout/layoutitem_field.[h|cc]:
      * glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]:
      * glom/libglom/data_structure/layout/report_parts/layoutitem_fields
      ummary.[h|cc]: Add get_title() overrides.
      * glom/mode_data/box_data_calendar_related.cc:
      * glom/mode_data/box_data_list_related.cc:
      * glom/print_layout/print_layout_utils.cc: Use get_title() instead of
      get_title_or_name(), to avoid showing names of intentionally title-less
      groups and notebooks.
    • Murray Cumming's avatar
      LayoutItem_Portal: Make get_title_or_name() useful. · 55f7572e
      Murray Cumming authored
      * glom/libglom/data_structure/layout/layoutitem_portal.[h|cc]:
      Add an override for get_title_or_nam(), so that callers do not need to
      special-case portals compared to other groups.
      * glom/mode_data/box_data_calendar_related.cc:
      * glom/mode_data/box_data_list_related.cc:
      * glom/mode_data/box_data_portal.cc:
      * glom/mode_data/flowtablewithfields.cc:
      * glom/print_layout/print_layout_utils.cc: Use get_title_or_name()
      instead of more complicated code.
    • Murray Cumming's avatar
      Print Layout: Standard: Handle related records portals too. · df217f54
      Murray Cumming authored
      * glom/print_layout/print_layout_utils.cc: create_standard():
      If the group is a portal, just add that portal item, setting appropriate
    • Murray Cumming's avatar
      Simplify OptionEntry code. · 2cad5c2a
      Murray Cumming authored
      * glom/glom_create_from_example.cc:
      * glom/main.cc: Reuse one OptionEntry instance.
  4. 10 Oct, 2011 10 commits
    • Murray Cumming's avatar
      Updated a TODO · 8e3bc77e
      Murray Cumming authored
    • Murray Cumming's avatar
      Cope with Gnome::Gda::DataModelIter::get_value_at() throwing. · be537a50
      Murray Cumming authored
      * glom/libglom/connectionpool_backends/postgres.cc: Add a catch/try
      around get_value_at(), because the latest version of libgdamm can
      throw an exception there.
    • Murray Cumming's avatar
      Added some consts · 320585fe
      Murray Cumming authored
    • Murray Cumming's avatar
      Use gdk_window_get_device_position() instead of gdk_window_get_pointer(). · 2e970052
      Murray Cumming authored
      * glom/mode_data/box_data_calendar_related.cc:
      * glom/mode_data/buttonglom.cc:
      * glom/mode_data/datawidget/checkbutton.cc:
      * glom/mode_data/datawidget/combo.cc:
      * glom/mode_data/datawidget/combo_as_radio_buttons.cc:
      * glom/mode_data/datawidget/datawidget.cc:
      * glom/mode_data/datawidget/entry.cc:
      * glom/mode_data/datawidget/label.cc:
      * glom/mode_data/datawidget/textview.cc:
      * glom/mode_data/db_adddel/db_adddel.cc:
      * glom/mode_data/flowtablewithfields.cc:
      * glom/utility_widgets/adddel/adddel.cc:
      * glom/utility_widgets/imageglom.cc:
      * glom/utility_widgets/notebooklabelglom.cc: A fairly simple search/replace.
    • Murray Cumming's avatar
      Really use the goocanvasmm RGBA properties. · 152c5812
      Murray Cumming authored
      * glom/mode_design/layout/layout_item_dialogs/box_formatting.cc:
      * glom/mode_design/layout/layout_item_dialogs/dialog_line.cc: Use
      Gtk::ColorButton::get_rgba() instead of get_color.
      * glom/mode_design/layout/dialog_layout_list_related.[h|cc]: Do not save
      color details if they are not shown in the UI.
    • Murray Cumming's avatar
      glom_create_from_example: --help: Add a hint about when self-hosting is used. · 49abf55e
      Murray Cumming authored
      * glom/glom_create_from_example.cc: Add some text to the --server-hostname
    • Murray Cumming's avatar
      glom_create_from_example: Support central-hosting too. · 0d2a9436
      Murray Cumming authored
      * glom/glom_create_from_example.cc: Allow a host name, port, and username to
      be specified, and the password to be entered on stdin.
      * glom/libglom/db_utils.[h|cc]: Added get_unused_database_name():
      * glom/frame_glom.cc: Added a TODO that we should use it here too instead of
      the similar code that is mixed up with the dialog code.
      * glom/libglom/connectionpool.h: Remove unused m_host member variable.
    • Murray Cumming's avatar
      Test: Catch an exception. · d98cf950
      Murray Cumming authored
    • Murray Cumming's avatar
      Added the glom_create_from_example command-line utility. · d74ca125
      Murray Cumming authored
        * Makefile_libglom.am:
      * glom/glom_create_from_example.cc: This command-line utility takes an
      example .glom file, outputs a new non-example .glom file and puts the
      example data, if any, in the database.
      Right now, it assumes that you want self-hosting, so it creates the
      database files locally.
      This builds when libglom builds. It does not require the glom application.
    • Murray Cumming's avatar
      Added Utils::get_file_*_without_extension(). · 7003fa45
      Murray Cumming authored
      	* glom/application.[h|cc]: Moved get_file_uri_without_extension() to
      	* glom/libglom/utils.[h|cc]: And added get_file_path_without_extension().
  5. 09 Oct, 2011 2 commits
  6. 07 Oct, 2011 1 commit
    • Murray Cumming's avatar
      Fields: Adapt choices fields when changing field names. · 613aacad
      Murray Cumming authored
      * glom/libglom/data_structure/layout/fieldformatting.[h|cc]:
      Added change_field_item_name().
      * glom/libglom/data_structure/layout/layoutgroup.cc: change_field_item_name():
      Change the formatting too, by calling the new method.
      * glom/libglom/document/document.cc: change_field_name(): Change the default
      formatting of fields too.
      Bug #661075
  7. 06 Oct, 2011 9 commits
    • Murray Cumming's avatar
      Print Layout: Really print additional pages. · 65349ab2
      Murray Cumming authored
      * glom/print_layout/printoperation_printlayout.cc: on_draw_page():
        Use Cairo::Context::translate() before calling Goocanvas::Canvas::render().
        Bug #660553 (Thanks to David King and Damon Chaplin)
    • Murray Cumming's avatar
      Document: Avoid writing some unnecessary XML nodes. · 891d3d47
      Murray Cumming authored
      * glom/libglom/document/document.cc: <formatting>: Do not write the
        choices_related_show_all attribute if there are no choices.
      Do not write numeric formatting attributes if the field type is not numeric.
      * examples/example_film_manager.glom: Resaved.
    • Murray Cumming's avatar
      Fix DTD validation. · 68bdd396
      Murray Cumming authored
      * glom/glom_document.dtd: Change the order of some sub-nodes. Apparently
      we must specify a sequence, even though we do not really care.
      * glom/libglom/document/document.cc: load_before(), save_after(): do not
      save some irrelevant details for calendard portals.
      Portals assume that no rows count means the default of 6, to make the files
      less verbose.
      * examples/example_film_manager.glom:
      * examples/example_lesson_planner.glom:
      * examples/sqlite/test_sqlite_music/test_sqlite_music.glom: Resaved/Fixed.
    • Murray Cumming's avatar
      TreeModelDb: fill_values_if_necessary(): Avoid a crash. · c36403a4
      Murray Cumming authored
      * glom/mode_data/datawidget/treemodel_db.cc: Do not try to use a null
      GdaDataModel, which can happen if a SQL query fails.
    • Murray Cumming's avatar
      Document: get_data_layout_groups_default(): Simplify the default structure. · 0f38e86a
      Murray Cumming authored
      * glom/libglom/document/document.cc: Do not create the useless main
      top-level group for details layouts.
    • Ben Konrath 's avatar
      Fix small bugs in commented-out debugging print statements. · 3317cc43
      Ben Konrath authored
      * glom/libglom/db_utils.cc: Change field to layout_item. Move print
      statement to be after the assignment to
    • Murray Cumming's avatar
      Details: Do not enable drag-and-drop by default. · 73aa0815
      Murray Cumming authored
      * glom/utility_widgets/flowtable.cc: Turn of drag-and-drop by default in
      the EggSpreadTableDnd
      * glom/mode_data/flowtablewithfields.[h|cc]: Added set_enable_drag_and_drop().
      * glom/mode_data/box_data_details.[h|cc]: Added set_enable_drag_and_drop(),
      calling the FlowTableWithFields.
      glom/application.[h|cc]: Rename the Show Layout Toolbar menu item to
      Drag and Drop Layout, though that is a bad name and I would like a better one.
      * glom/frame_glom.[h|cc]:  show_layout_toolbar(): Rename to
      * glom/mode_data/notebook_data.[h|cc]: Rename show_layout_toolbar() to
        set_enable_layout_drag_and_drop() and make it enable dnd as well as showing
        the toolpallette. The toolpalette is then a visual indication that
        drag-and-drop is possible.
      * glom/mode_data/test_flowtablewithfields.cc: Add a sub-group and enable
      drag and drop.
    • Murray Cumming's avatar
      Update EggSpreadTable tests. · fdc7379a
      Murray Cumming authored
      	* glom/utility_widgets/eggspreadtablemm/test_spreadtablednd.cc: Fix a crash.
      	* glom/utility_widgets/test_flowtable.cc:
      	* glom/utility_widgets/test_flowtable_dnd.cc: Adapt to the changed API.
    • Murray Cumming's avatar
      Update EggSpreadTable · d1950805
      Murray Cumming authored
      * glom/utility_widgets/eggspreadtable/: Update from libegg with Tristan's
      * glom/utility_widgets/eggspreadtablemm/: Adapt.
  8. 04 Oct, 2011 2 commits