[glom] Import dialog: Set the number of sample rows to 2 by default.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom] Import dialog: Set the number of sample rows to 2 by default.
- Date: Mon, 21 Sep 2009 08:24:34 +0000 (UTC)
commit 931ddfbbf8d41c4e9236b53f363a8ebfda9d8bf6
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 21 10:09:20 2009 +0200
Import dialog: Set the number of sample rows to 2 by default.
* glom/dialog_import_csv.cc: Set the number of sample rows to 2
by default, not 0.
a secondary top-level object (textbuffer).
ChangeLog | 9 +++++++++
glom/dialog_import_csv.cc | 2 ++
glom/frame_glom.cc | 11 ++++++++++-
3 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5c50287..3d8ce81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-09-21 Murray Cumming <murrayc murrayc com>
+ Import dialog: Set the number of sample rows to 2 by default.
+
+ * glom/dialog_import_csv.cc: Set the number of sample rows to 2
+ by default, not 0.
+ * glom/frame_glom.cc: Hack around another (!) GtkBuilder warning about
+ a secondary top-level object (textbuffer).
+
+2009-09-21 Murray Cumming <murrayc murrayc com>
+
* glom/libglom/glom-1.0.pc.in: Rename to glom-1.12.pc.in to match
the .so name and header install location. Noticed by Chris Coulson.
diff --git a/glom/dialog_import_csv.cc b/glom/dialog_import_csv.cc
index 00a552f..c3113c3 100644
--- a/glom/dialog_import_csv.cc
+++ b/glom/dialog_import_csv.cc
@@ -137,6 +137,8 @@ Dialog_Import_CSV::Dialog_Import_CSV(BaseObjectType* cobject, const Glib::RefPtr
}
}
+ m_sample_rows->set_value(2); //A sensible default.
+
Gtk::CellRendererText* renderer = Gtk::manage(new Gtk::CellRendererText);
m_encoding_combo->set_model(m_encoding_model);
m_encoding_combo->pack_start(*renderer);
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 74e0bd3..c7ae069 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -830,7 +830,16 @@ void Frame_Glom::on_menu_file_import()
dialog->hide();
Dialog_Import_CSV_Progress* progress_dialog = 0;
- Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_import_csv_progress");
+
+ //GtkBuilder can't find top-level objects (GtkTextBuffer in this case),
+ //that one top-level object references.
+ //See http://bugzilla.gnome.org/show_bug.cgi?id=575714
+ //so we need to this silliness. murrayc.
+ std::list<Glib::ustring> builder_ids;
+ builder_ids.push_back("dialog_import_csv_progress");
+ builder_ids.push_back("textbuffer1");
+
+ Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), builder_ids);
refXml->get_widget_derived("dialog_import_csv_progress", progress_dialog);
add_view(progress_dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]