glom r1709 - in trunk: . docs/user-guide docs/user-guide/C/figures docs/website/screenshots glom



Author: murrayc
Date: Mon Oct 20 11:02:47 2008
New Revision: 1709
URL: http://svn.gnome.org/viewvc/glom?rev=1709&view=rev

Log:
2008-10-20  Murray Cumming  <murrayc murrayc com>

* docs/user-guide/C/figures/glom_import.png:
* docs/user-guide/Makefile.am:
* docs/website/screenshots/glom_import.png:
Added new screenshot.

* glom/dialog_import_csv.cc: Use a more robust way of 
creating TreeModel::Paths, to avoid a crash.

Added:
   trunk/docs/user-guide/C/figures/glom_import.png   (contents, props changed)
   trunk/docs/website/screenshots/glom_import.png   (contents, props changed)
Modified:
   trunk/ChangeLog
   trunk/docs/user-guide/Makefile.am
   trunk/glom/dialog_import_csv.cc
   trunk/glom/filechooser_export.cc

Added: trunk/docs/user-guide/C/figures/glom_import.png
==============================================================================
Binary file. No diff available.

Modified: trunk/docs/user-guide/Makefile.am
==============================================================================
--- trunk/docs/user-guide/Makefile.am	(original)
+++ trunk/docs/user-guide/Makefile.am	Mon Oct 20 11:02:47 2008
@@ -12,6 +12,7 @@
 	figures/glom_data_list.png \
 	figures/glom_design_layout_list.png \
 	figures/glom_design_reports_vertical_group.png \
+	figures/glom_import.png
 	figures/start.png \
 	figures/glom_design_fields_dialog_calculated.png \
 	figures/glom_design_reports_details.png \

Added: trunk/docs/website/screenshots/glom_import.png
==============================================================================
Binary file. No diff available.

Modified: trunk/glom/dialog_import_csv.cc
==============================================================================
--- trunk/glom/dialog_import_csv.cc	(original)
+++ trunk/glom/dialog_import_csv.cc	Mon Oct 20 11:02:47 2008
@@ -503,8 +503,7 @@
   if(m_first_line_as_title->get_active())
   {
     m_sample_view->set_headers_visible(true);
-    guint index = 1;
-    Gtk::TreeModel::Path path(&index, &index + 1);
+    Gtk::TreeModel::Path path("1");
     Gtk::TreeModel::iterator iter = m_sample_model->get_iter(path);
 
     // Remove the first row from the view
@@ -526,8 +525,7 @@
     m_sample_view->set_headers_visible(false);
 
     // Check whether row 0 is displayed
-    guint index = 1;
-    Gtk::TreeModel::Path path(&index, &index + 1);
+    Gtk::TreeModel::Path path("1");
     Gtk::TreeModel::iterator iter = m_sample_model->get_iter(path);
 
     if((!iter || (*iter)[m_sample_columns.m_col_row] != 0) && !m_rows.empty() && m_sample_rows->get_value_as_int() > 0)
@@ -565,8 +563,8 @@
   if(current_sample_rows > new_sample_rows)
   {
     // +1 for the "target field" row
-    guint sample_index = new_sample_rows + 1;
-    Gtk::TreeModel::Path path(&sample_index, &sample_index + 1);
+    Gtk::TreeModel::Path path(1);
+    path[0] = new_sample_rows + 1;
     Gtk::TreeModel::iterator iter = m_sample_model->get_iter(path);
 
     while(iter != m_sample_model->children().end())
@@ -926,8 +924,7 @@
       // Update the rows, so they are redrawn, doing a conversion to the new type.
       const Gtk::TreeNodeChildren& sample_children = m_sample_model->children();
       // Create a TreePath with initial index 0. We need a TreePath for the row_changed() call
-      guint first_index = 0;
-      Gtk::TreeModel::Path path(&first_index, &first_index + 1);
+      Gtk::TreeModel::Path path("0");
 
       for(Gtk::TreeModel::iterator sample_iter = sample_children.begin(); sample_iter != sample_children.end(); ++ sample_iter)
       {

Modified: trunk/glom/filechooser_export.cc
==============================================================================
--- trunk/glom/filechooser_export.cc	(original)
+++ trunk/glom/filechooser_export.cc	Mon Oct 20 11:02:47 2008
@@ -71,6 +71,7 @@
 FileChooser_Export::~FileChooser_Export()
 {
   delete m_pDialogLayout;
+  m_pDialogLayout = 0;
 }
 
 void FileChooser_Export::set_export_layout(const Document_Glom::type_list_layout_groups& layout_groups, const Glib::ustring& table_name, Document_Glom* document)
@@ -96,7 +97,8 @@
 
 void FileChooser_Export::on_dialog_layout_hide()
 {
-  m_pDialogLayout->get_layout_groups(m_layout_groups);
+  if(m_pDialogLayout)
+    m_pDialogLayout->get_layout_groups(m_layout_groups);
 }
 
 void FileChooser_Export::get_layout_groups(Document_Glom::type_list_layout_groups& layout_groups) const



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]