Commit 3faf5154 authored by Johannes Schmid's avatar Johannes Schmid
Browse files

Fixed remaining maemo build problems

parent c53ec511
2009-08-25 Johannes Schmid <jschmid@openismus.com>
Fixed remaing maemo build problems
* autogen.sh: Don't hardcode automake-1.10
* glom/application.cc:
* glom/base_db.cc:
* glom/dialog_invalid_data.cc:
* glom/filechooser_export.cc:
* glom/glade_utils.cc:
* glom/glade_utils.h:
* glom/main.cc:
* glom/utility_widgets/datawidget.cc:
* glom/utility_widgets/imageglom:
Fixed error handling of Gtk::Builder (change in gtkmm 2.14)
* glom/mode_data/flowtablewithfields.cc:
* glom/mode_data/flowtablewithfields.h:
Fixed vfuncs problem
2009-08-21 Daniel Elstner <danielk@openismus.com>
 
Do not use .pyd extension on non-Windows systems
......
......@@ -5,6 +5,6 @@ test -n "$srcdir" || srcdir=.
cd "$srcdir" &&
gnome-doc-common --copy &&
gnome-doc-prepare --automake --copy --force &&
AUTOPOINT='intltoolize --automake --copy' ACLOCAL=aclocal-1.10 AUTOMAKE=automake-1.10 autoreconf --force --install
AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install
) || exit
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
......@@ -1259,7 +1259,12 @@ Glib::RefPtr<Gtk::UIManager> App_Glom::get_ui_manager()
bool App_Glom::offer_new_or_existing()
{
//Offer to load an existing document, or start a new one.
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_existing_or_new");
#else
std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_existing_or_new", error);
#endif
Dialog_ExistingOrNew* dialog_raw = 0;
refXml->get_widget_derived("dialog_existing_or_new", dialog_raw);
......
......@@ -409,13 +409,16 @@ static Glib::ustring remove_quotes(const Glib::ustring& str)
//Actually remove the quotes:
gchar* quoted = g_strdup(str.c_str());
//std::cout << " quoted=" << quoted << std::endl;
gchar* unquoted = gda_sql_identifier_remove_quotes(quoted); //Changes quoted. unquoted is the same string so should not be freed.
// Hack because we need a newer libgdamm version
#ifndef GLOM_ENABLE_MAEMO
gchar* unquoted = gda_sql_identifier_remove_quotes(quoted); //Changes quoted. unquoted is the same string so should not be freed.
//std::cout << " unquoted= " << unquoted << std::endl;
if(unquoted)
return unquoted;
#endif
g_free(quoted);
return str;
}
......@@ -1823,7 +1826,13 @@ sharedptr<LayoutItem_Field> Base_DB::offer_field_list_select_one_field(const sha
return result;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field");
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field", error);
if (error.get())
{
std::cerr << error->what() << std::endl;
return result;
}
#endif
Dialog_ChooseField* dialog = 0;
......@@ -1867,7 +1876,13 @@ Base_DB::type_list_field_items Base_DB::offer_field_list(const Glib::ustring& ta
return result;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field");
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field", error);
if (error.get())
{
std::cerr << error->what() << std::endl;
return result;
}
#endif
Dialog_ChooseField* dialog = 0;
......
......@@ -32,7 +32,12 @@ namespace Glom
bool glom_show_dialog_invalid_data(Field::glom_field_type glom_type)
{
//TODO: Share a global instance, to make this quicker?
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_data_invalid_format");
#else
std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_data_invalid_format", error);
#endif
Dialog_InvalidData* dialog = 0;
refXml->get_widget_derived("dialog_data_invalid_format", dialog);
......
......@@ -47,7 +47,12 @@ FileChooser_Export::FileChooser_Export()
m_extra_widget.show();
//TODO: Use a generic layout dialog?
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "window_data_layout_export");
#else
std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "window_data_layout_export", error);
#endif
if(refXml)
{
......
......@@ -33,8 +33,12 @@ Dialog_ProgressCreating* get_and_show_pulse_dialog(const Glib::ustring& message,
if(!parent_window)
std::cerr << "debug: Glom: get_and_show_pulse_dialog(): parent_window is NULL" << std::endl;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "window_progress");
#else
std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "window_progress", error);
#endif
if(refXml)
{
......
......@@ -58,7 +58,12 @@ void get_glade_widget_derived_with_warning(const Glib::ustring& id, T_Widget*& w
std::cerr << ex.what() << std::endl;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), id);
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), id, error);
if (error.get())
{
std::cerr << error->what() << std::endl;
}
#endif
if(refXml)
......@@ -82,7 +87,12 @@ void get_glade_developer_widget_derived_with_warning(const Glib::ustring& id, T_
std::cerr << ex.what() << std::endl;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), id);
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), id, error);
if (error.get())
{
std::cerr << error->what() << std::endl;
}
#endif
if(refXml)
......@@ -106,7 +116,12 @@ void get_glade_widget_with_warning(const Glib::ustring& id, T_Widget*& widget)
std::cerr << ex.what() << std::endl;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), id);
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), id, error);
if (error.get())
{
std::cerr << error->what() << std::endl;
}
#endif
if(refXml)
......
......@@ -480,7 +480,12 @@ main(int argc, char* argv[])
return 0; //This command-line option is documented as stopping afterwards.
// Main app
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Glom::Utils::get_glade_file_path("glom.glade"), "window_main");
#else
std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gtk::Builder> refXml = Gtk::Builder::create_from_file(Glom::Utils::get_glade_file_path("glom.glade"), "window_main", error);
#endif
......
......@@ -209,8 +209,10 @@ void FlowTableWithFields::add_layout_group_at_position(const sharedptr<LayoutGro
Gtk::EventBox* event_box = Gtk::manage( new Gtk::EventBox() ); //TODO_Leak: Valgrind says this is possibly leaked.
event_box->add(*flow_table);
event_box->set_visible_window(false);
#ifndef GLOM_ENABLE_CLIENT_ONLY
event_box->signal_button_press_event().connect (sigc::mem_fun (*flow_table,
&FlowTableWithFields::on_button_press_event));
#endif
event_box->show();
alignment->add(*event_box);
......@@ -393,8 +395,10 @@ void FlowTableWithFields::add_layout_notebook_at_position(const sharedptr<Layout
Gtk::EventBox* event_box = Gtk::manage( new Gtk::EventBox() ); //TODO_Leak: Valgrind says this is possibly leaked.
event_box->add(*flow_table);
event_box->set_visible_window(false);
#ifndef GLOM_ENABLE_CLIENT_ONLY
event_box->signal_button_press_event().connect (sigc::mem_fun (*flow_table,
&FlowTableWithFields::on_button_press_event));
#endif
event_box->show();
//This doesn't work (probably because we haven't implmented it in our custom container),
//so we put the flowtable in an alignment and give that a border instead.
......
......@@ -254,8 +254,8 @@ private:
#ifndef GLOM_ENABLE_CLIENT_ONLY
virtual void on_menu_properties_activate();
virtual void on_menu_delete_activate(); // override this to add a dialog box
#endif // !GLOM_ENABLE_CLIENT_ONLY
virtual bool on_button_press_event(GdkEventButton *event);
#endif // !GLOM_ENABLE_CLIENT_ONLY
};
} //namespace Glom
......
......@@ -619,7 +619,13 @@ sharedptr<LayoutItem_Field> DataWidget::offer_field_list(const Glib::ustring& ta
return result;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field");
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field", error);
if (error.get())
{
std::cerr << error->what() << std::endl;
return result;
}
#endif
Dialog_ChooseField* dialog = 0;
......@@ -795,7 +801,13 @@ void DataWidget::on_button_choose_date()
return;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_date");
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_date", error);
if (error.get())
{
std::cerr << error->what() << std::endl;
return;
}
#endif
Dialog_ChooseDate* dialog = 0;
......@@ -846,7 +858,13 @@ bool DataWidget::offer_related_record_id_find(Gnome::Gda::Value& chosen_id)
return result;
}
#else
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_find_id");
std::auto_ptr<Glib::Error> error;
refXml = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_find_id", error);
if (error.get())
{
std::cerr << error->what() << std::endl;
return result;
}
#endif
Dialog_ChooseID* dialog = 0;
......
......@@ -417,7 +417,12 @@ void ImageGlom::on_menupopup_activate_select_file()
if(!uri.empty())
{
Dialog_Image_Progress* dialog;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_image_progress");
#else
std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_file(Utils::get_glade_file_path("glom.glade"), "dialog_image_progress", error);
#endif
builder->get_widget_derived("dialog_image_progress", dialog);
if(dialog)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment