[glom] Avoid GTK+ warnings.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom] Avoid GTK+ warnings.
- Date: Thu, 27 Aug 2009 14:55:49 +0000 (UTC)
commit 5ac3bf586cacdc9bc91158225b8167eac901d1ea
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Aug 27 16:55:41 2009 +0200
Avoid GTK+ warnings.
* glom/glom_developer.glade: Set GtkAdjustment page_size to 0 to
avoid new GTK+ warnings.
* glom/layout_item_dialogs/dialog_field_layout.cc:
* glom/mode_design/fields/dialog_fielddefinition.cc:
* glom/mode_design/print_layouts/dialog_text_formatting.cc:
More nasty workarounds for GtkBuilder bug #575714, which is still not
fixed.
ChangeLog | 12 ++++++++++++
glom/base_db.cc | 14 +++++++++++---
glom/glom_developer.glade | 4 ++--
glom/layout_item_dialogs/dialog_field_layout.cc | 9 ++++++++-
glom/mode_design/fields/dialog_fielddefinition.cc | 10 +++++++++-
.../print_layouts/dialog_text_formatting.cc | 12 ++++++++++--
6 files changed, 52 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 677da9c..80ba3fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2009-08-27 Murray Cumming <murrayc murrayc com>
+ Avoid GTK+ warnings.
+
+ * glom/glom_developer.glade: Set GtkAdjustment page_size to 0 to
+ avoid new GTK+ warnings.
+ * glom/layout_item_dialogs/dialog_field_layout.cc:
+ * glom/mode_design/fields/dialog_fielddefinition.cc:
+ * glom/mode_design/print_layouts/dialog_text_formatting.cc:
+ More nasty workarounds for GtkBuilder bug #575714, which is still not
+ fixed.
+
+2009-08-27 Murray Cumming <murrayc murrayc com>
+
Remove a nasty hack that would become a runtime bug.
* glom/libglom/connectionpool_backends/sqlite.cc: Revert the previous
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 2099898..92d233b 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -2007,7 +2007,15 @@ sharedptr<LayoutItem_Notebook> Base_DB::offer_notebook(const sharedptr<LayoutIte
try
{
- Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_notebook");
+ //GtkBuilder can't find top-level objects (GtkAdjustments 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_notebook");
+ builder_ids.push_back("adjustment2");
+
+ Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), builder_ids);
Dialog_Notebook* dialog = 0;
refXml->get_widget_derived("dialog_notebook", dialog);
@@ -3493,7 +3501,7 @@ void Base_DB::update_gda_metastore_for_table(const Glib::ustring& table_name) co
return;
}
- std::cout << "DEBUG: Base_DB::update_gda_metastore_for_table(): Calling Gda::Connection::update_meta_store_table(" << table_name << ") ..." << std::endl;
+ //std::cout << "DEBUG: Base_DB::update_gda_metastore_for_table(): Calling Gda::Connection::update_meta_store_table(" << table_name << ") ..." << std::endl;
//TODO: This doesn't seem to quite work yet:
#ifdef GLIBMM_EXCEPTIONS_ENABLED
gda_connection->update_meta_store_table(table_name);
@@ -3503,7 +3511,7 @@ void Base_DB::update_gda_metastore_for_table(const Glib::ustring& table_name) co
#endif
//This does work, though it takes ages: gda_connection->update_meta_store();
- std::cout << "DEBUG: Base_DB::update_gda_metastore_for_table(): ... Finished calling Gda::Connection::update_meta_store_table()" << std::endl;
+ //std::cout << "DEBUG: Base_DB::update_gda_metastore_for_table(): ... Finished calling Gda::Connection::update_meta_store_table()" << std::endl;
}
bool Base_DB::add_user(const Glib::ustring& user, const Glib::ustring& password, const Glib::ustring& group)
diff --git a/glom/glom_developer.glade b/glom/glom_developer.glade
index 6f7248a..3042ae9 100644
--- a/glom/glom_developer.glade
+++ b/glom/glom_developer.glade
@@ -10113,14 +10113,14 @@ What name should this module have?</property>
<property name="upper">10</property>
<property name="step_increment">1</property>
<property name="page_increment">2</property>
- <property name="page_size">10</property>
+ <property name="page_size">0</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="value">3</property>
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
- <property name="page_size">10</property>
+ <property name="page_size">0</property>
</object>
</interface>
diff --git a/glom/layout_item_dialogs/dialog_field_layout.cc b/glom/layout_item_dialogs/dialog_field_layout.cc
index 65ee862..353db83 100644
--- a/glom/layout_item_dialogs/dialog_field_layout.cc
+++ b/glom/layout_item_dialogs/dialog_field_layout.cc
@@ -50,11 +50,18 @@ Dialog_FieldLayout::Dialog_FieldLayout(BaseObjectType* cobject, const Glib::RefP
builder->get_widget("radiobutton_use_custom", m_radiobutton_custom_formatting);
builder->get_widget("box_formatting_placeholder", m_box_formatting_placeholder);
+ //GtkBuilder can't find top-level objects (GtkAdjustments 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("box_formatting");
+ builder_ids.push_back("adjustment2");
//Get the formatting stuff:
try
{
- Glib::RefPtr<Gtk::Builder> refXmlFormatting = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "box_formatting");
+ Glib::RefPtr<Gtk::Builder> refXmlFormatting = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), builder_ids);
refXmlFormatting->get_widget_derived("box_formatting", m_box_formatting);
}
catch(const Gtk::BuilderError& ex)
diff --git a/glom/mode_design/fields/dialog_fielddefinition.cc b/glom/mode_design/fields/dialog_fielddefinition.cc
index 392cfe5..a5054eb 100644
--- a/glom/mode_design/fields/dialog_fielddefinition.cc
+++ b/glom/mode_design/fields/dialog_fielddefinition.cc
@@ -83,10 +83,18 @@ Dialog_FieldDefinition::Dialog_FieldDefinition(BaseObjectType* cobject, const Gl
//Get the place to put the Formatting stuff:
builder->get_widget("box_formatting_placeholder", m_box_formatting_placeholder);
+ //GtkBuilder can't find top-level objects (GtkAdjustments 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("box_formatting");
+ builder_ids.push_back("adjustment2");
+
//Get the formatting stuff:
try
{
- Glib::RefPtr<Gtk::Builder> refXmlFormatting = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "box_formatting");
+ Glib::RefPtr<Gtk::Builder> refXmlFormatting = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), builder_ids);
refXmlFormatting->get_widget_derived("box_formatting", m_box_formatting);
}
catch(const Gtk::BuilderError& ex)
diff --git a/glom/mode_design/print_layouts/dialog_text_formatting.cc b/glom/mode_design/print_layouts/dialog_text_formatting.cc
index fe0a574..cfc7c92 100644
--- a/glom/mode_design/print_layouts/dialog_text_formatting.cc
+++ b/glom/mode_design/print_layouts/dialog_text_formatting.cc
@@ -38,11 +38,19 @@ Dialog_TextFormatting::Dialog_TextFormatting(BaseObjectType* cobject, const Glib
//Formatting:
//Get the place to put the Formatting stuff:
builder->get_widget("box_formatting_placeholder", m_box_formatting_placeholder);
-
+
+ //GtkBuilder can't find top-level objects (GtkAdjustments 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("box_formatting");
+ builder_ids.push_back("adjustment2");
+
//Get the formatting stuff:
try
{
- Glib::RefPtr<Gtk::Builder> refXmlFormatting = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "box_formatting");
+ Glib::RefPtr<Gtk::Builder> refXmlFormatting = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), builder_ids);
refXmlFormatting->get_widget_derived("box_formatting", m_box_formatting);
}
catch(const Gtk::BuilderError& ex)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]