glom r1779 - in branches/glom-1-8: . glom glom/mode_design/print_layouts glom/utility_widgets po
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1779 - in branches/glom-1-8: . glom glom/mode_design/print_layouts glom/utility_widgets po
- Date: Sat, 6 Dec 2008 19:03:02 +0000 (UTC)
Author: murrayc
Date: Sat Dec 6 19:03:01 2008
New Revision: 1779
URL: http://svn.gnome.org/viewvc/glom?rev=1779&view=rev
Log:
2008-12-06 Murray Cumming <murrayc murrayc com>
* glom/combobox_fields.cc: on_cell_data_title(): Pass a ustring to
set_property() for the (None) item, so it really shows up.
set_property() cannot handle a char* there, it seems.
For instance, this means that the choices fields can be cleared again.
This regression probably happened when we first ported Glom to Maemo.
Bug found by Arq. Maximiliano MeilÃn.
2008-12-06 Murray Cumming <murrayc murrayc com>
* glom/box_reports.cc: on_adddel_Add(): Set a default title based on
the name, when adding a new report, as we do for tables, relationships,
print layouts, etc.
Modified:
branches/glom-1-8/ChangeLog
branches/glom-1-8/glom/box_reports.cc
branches/glom-1-8/glom/combobox_fields.cc
branches/glom-1-8/glom/glom.glade
branches/glom-1-8/glom/mode_design/print_layouts/box_print_layouts.cc
branches/glom-1-8/glom/utility_widgets/flowtable.cc
branches/glom-1-8/glom/utility_widgets/test_flowtable.cc
branches/glom-1-8/po/Makefile.in.in
Modified: branches/glom-1-8/glom/box_reports.cc
==============================================================================
--- branches/glom-1-8/glom/box_reports.cc (original)
+++ branches/glom-1-8/glom/box_reports.cc Sat Dec 6 19:03:01 2008
@@ -133,6 +133,16 @@
report->set_name(report_name);
m_AddDel.set_value_key(row, report_name);
+ //Set a suitable starting title, if there is none already:
+ Glib::ustring title = m_AddDel.get_value(row, m_colTitle);
+ if(title.empty())
+ {
+ title = Utils::title_from_string(report_name);
+ m_AddDel.set_value(row, m_colTitle, title);
+ }
+
+ report->set_title(title);
+
get_document()->set_report(m_table_name, report);
}
}
Modified: branches/glom-1-8/glom/combobox_fields.cc
==============================================================================
--- branches/glom-1-8/glom/combobox_fields.cc (original)
+++ branches/glom-1-8/glom/combobox_fields.cc Sat Dec 6 19:03:01 2008
@@ -179,6 +179,7 @@
tree_iter = m_model->append();
row = *tree_iter;
+ std::cout << "DEBUG: ComboBox_Fields::set_fields(): adding none item." << std::endl;
row[m_model_columns.m_field] = sharedptr<Field>();
row[m_model_columns.m_separator] = true;
}
@@ -201,14 +202,19 @@
if(field)
{
m_renderer_title->set_property("text", field->get_title_or_name());
- //m_renderer_title->property_text() = field->get_title_or_name();
+ //m_renderer_title->property_text() = field->get_title_or_name(); //Not available on Maemo.
}
else
{
// A special "None" item, allowing the user to do the equivalent of clearing the combobox,
// which is not normally possible with the GtkComboBox UI:
- m_renderer_title->set_property("text", _("(None)"));
- //m_renderer_title->property_text() = _("(None)");
+
+ //set_property() does not work with a const gchar*, so we explicitly create a ustring.
+ //otherwise we get this warning:
+ //" unable to set property `text' of type `gchararray' from value of type `glibmm__CustomPointer_Pc' "
+ //TODO: Add a template specialization to Glib::ObjectBase::set_property() to allow this?
+ m_renderer_title->set_property("text", Glib::ustring(_("(None)")));
+ //m_renderer_title->property_text() = _("(None)"); //Not available on Maemo.
}
}
Modified: branches/glom-1-8/glom/glom.glade
==============================================================================
--- branches/glom-1-8/glom/glom.glade (original)
+++ branches/glom-1-8/glom/glom.glade Sat Dec 6 19:03:01 2008
@@ -1499,7 +1499,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width_chars">9</property>
- <property name="adjustment">5 0 100 1 10 10</property>
+ <property name="adjustment">5 0 100 1 10 0</property>
</widget>
</child>
</widget>
Modified: branches/glom-1-8/glom/mode_design/print_layouts/box_print_layouts.cc
==============================================================================
--- branches/glom-1-8/glom/mode_design/print_layouts/box_print_layouts.cc (original)
+++ branches/glom-1-8/glom/mode_design/print_layouts/box_print_layouts.cc Sat Dec 6 19:03:01 2008
@@ -133,7 +133,6 @@
item->set_name(name);
m_AddDel.set_value_key(row, name);
-
//Set a suitable starting title, if there is none already:
Glib::ustring title = m_AddDel.get_value(row, m_colTitle);
if(title.empty())
Modified: branches/glom-1-8/glom/utility_widgets/flowtable.cc
==============================================================================
--- branches/glom-1-8/glom/utility_widgets/flowtable.cc (original)
+++ branches/glom-1-8/glom/utility_widgets/flowtable.cc Sat Dec 6 19:03:01 2008
@@ -467,6 +467,7 @@
value = 1;
m_columns_count = value;
+ std::cout << "FlowTable::set_columns_count(): m_columns_count=:" << m_columns_count << std::endl;
}
void FlowTable::get_item_requested_width(const FlowTableItem& item, int& first, int& second) const
Modified: branches/glom-1-8/glom/utility_widgets/test_flowtable.cc
==============================================================================
--- branches/glom-1-8/glom/utility_widgets/test_flowtable.cc (original)
+++ branches/glom-1-8/glom/utility_widgets/test_flowtable.cc Sat Dec 6 19:03:01 2008
@@ -44,7 +44,7 @@
Gtk::Window window;
//Gtk::VBox flowtable;
Glom::FlowTable flowtable;
- flowtable.set_columns_count(2);
+ flowtable.set_columns_count(4);
flowtable.set_padding(5);
Gtk::Entry button7; button7.set_text("seven");
Modified: branches/glom-1-8/po/Makefile.in.in
==============================================================================
--- branches/glom-1-8/po/Makefile.in.in (original)
+++ branches/glom-1-8/po/Makefile.in.in Sat Dec 6 19:03:01 2008
@@ -56,7 +56,7 @@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep '^$$lang$$' $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep '^$$lang$$'`"; then printf "$$lang "; fi; done; fi)
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]