glom r1640 - in trunk: . glom glom/layout_item_dialogs glom/mode_data glom/utility_widgets
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1640 - in trunk: . glom glom/layout_item_dialogs glom/mode_data glom/utility_widgets
- Date: Thu, 17 Jul 2008 17:21:35 +0000 (UTC)
Author: jhs
Date: Thu Jul 17 17:21:35 2008
New Revision: 1640
URL: http://svn.gnome.org/viewvc/glom?rev=1640&view=rev
Log:
2008-07-17 Johannes Schmid <johannes schmid openismus com>
* glom/application.cc:
* glom/application.h:
* glom/frame_glom.cc:
* glom/frame_glom.h:
* glom/layout_item_dialogs/dialog_buttonscript.h:
* glom/mode_data/box_data_calendar_related.cc:
* glom/mode_data/box_data_details.cc:
* glom/mode_data/flowtablewithfields.cc:
* glom/mode_data/flowtablewithfields.h:
* glom/utility_widgets/buttonglom.cc:
* glom/utility_widgets/buttonglom.h:
* glom/utility_widgets/labelglom.cc:
* glom/utility_widgets/labelglom.h:
* glom/utility_widgets/layoutwidgetbase.cc:
* glom/utility_widgets/layoutwidgetutils.cc:
* glom/utility_widgets/layoutwidgetutils.h:
* glom/utility_widgets/notebookglom.cc:
Fixed build with GLOM_ENABLE_CLIENT_ONLY
* glom/main.cc:
Allow to pass arguments to Gtk+ like --g-fatal-warnings. Glom did filter those
as invalid arguments before
Modified:
trunk/ChangeLog
trunk/glom/application.cc
trunk/glom/application.h
trunk/glom/frame_glom.cc
trunk/glom/frame_glom.h
trunk/glom/layout_item_dialogs/dialog_buttonscript.h
trunk/glom/main.cc
trunk/glom/mode_data/box_data_calendar_related.cc
trunk/glom/mode_data/box_data_details.cc
trunk/glom/mode_data/flowtablewithfields.cc
trunk/glom/mode_data/flowtablewithfields.h
trunk/glom/utility_widgets/buttonglom.cc
trunk/glom/utility_widgets/buttonglom.h
trunk/glom/utility_widgets/labelglom.cc
trunk/glom/utility_widgets/labelglom.h
trunk/glom/utility_widgets/layoutwidgetbase.cc
trunk/glom/utility_widgets/layoutwidgetutils.cc
trunk/glom/utility_widgets/layoutwidgetutils.h
trunk/glom/utility_widgets/notebookglom.cc
Modified: trunk/glom/application.cc
==============================================================================
--- trunk/glom/application.cc (original)
+++ trunk/glom/application.cc Thu Jul 17 17:21:35 2008
@@ -299,11 +299,11 @@
m_refFileActionGroup->add(Gtk::Action::create("BakeryAction_Menu_File_Export", _("_Export")),
sigc::mem_fun(*m_pFrame, &Frame_Glom::on_menu_file_export));
-#endif // !GLOM_ENABLE_CLIENT_ONLY
action = Gtk::Action::create("BakeryAction_Menu_File_Import", _("Import"));
m_refFileActionGroup->add(action, sigc::mem_fun(*m_pFrame, &Frame_Glom::on_menu_file_import));
-
+#endif // !GLOM_ENABLE_CLIENT_ONLY
+
m_refFileActionGroup->add(Gtk::Action::create("GlomAction_Menu_File_Print", Gtk::Stock::PRINT));
m_refFileActionGroup->add(Gtk::Action::create("GlomAction_File_Print", _("_Standard")),
sigc::mem_fun(*m_pFrame, &Frame_Glom::on_menu_file_print) );
@@ -338,8 +338,8 @@
#ifndef GLOM_ENABLE_CLIENT_ONLY
" <menuitem action='BakeryAction_File_SaveAsExample' />"
" <menuitem action='BakeryAction_Menu_File_Export' />"
-#endif // !GLOM_ENABLE_CLIENT_ONLY
" <menuitem action='BakeryAction_Menu_File_Import' />"
+#endif // !GLOM_ENABLE_CLIENT_ONLY
" <separator/>"
" <menu action='GlomAction_Menu_File_Print'>"
" <menuitem action='GlomAction_File_Print' />"
@@ -750,6 +750,7 @@
Bakery::App_WithDoc_Gtk::on_menu_file_close();
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
//Copied from bakery:
static bool uri_is_writable(const Glib::RefPtr<const Gio::File>& uri)
{
@@ -781,7 +782,7 @@
else
return true; //Not every URI protocol supports access rights, so assume that it's writable and complain later.
}
-
+#endif // !GLOM_ENABLE_CLIENT_ONLY
Glib::ustring App_Glom::get_file_uri_without_extension(const Glib::ustring& uri)
{
@@ -1190,6 +1191,7 @@
case Dialog_ExistingOrNew::NONE:
// This should not happen
break;
+#ifndef GLOM_ENABLE_CLIENT_ONLY
case Dialog_ExistingOrNew::NEW_EMPTY:
existing_or_new_new();
break;
@@ -1197,11 +1199,15 @@
case Dialog_ExistingOrNew::OPEN_URI:
open_document(dialog->get_uri());
break;
+#endif // !GLOM_ENABLE_CLIENT_ONLY
#ifndef G_OS_WIN32
case Dialog_ExistingOrNew::OPEN_REMOTE:
open_browsed_document(dialog->get_service_info(), dialog->get_service_name());
break;
#endif
+#ifndef GLOM_ENABLE_CLIENT_ONLY
+ default:
+#endif // !GLOM_ENABLE_CLIENT_ONLY
}
//Check that a document was opened:
@@ -1222,6 +1228,7 @@
return true;
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void App_Glom::existing_or_new_new()
{
// New empty document
@@ -1267,12 +1274,10 @@
document->set_connection_database(db_name);
document->set_connection_is_self_hosted(self_hosted);
-#ifndef GLOM_ENABLE_CLIENT_ONLY
//Tell the connection pool about the document:
ConnectionPool* connection_pool = ConnectionPool::get_instance();
if(connection_pool)
connection_pool->set_get_document_func( sigc::mem_fun(*this, &App_Glom::on_connection_pool_get_document) );
-#endif
const bool connected = m_pFrame->connection_request_password_and_choose_new_database_name();
if(!connected)
@@ -1302,6 +1307,7 @@
}
}
}
+#endif // !GLOM_ENABLE_CLIENT_ONLY
void App_Glom::set_mode_data()
{
Modified: trunk/glom/application.h
==============================================================================
--- trunk/glom/application.h (original)
+++ trunk/glom/application.h Thu Jul 17 17:21:35 2008
@@ -96,10 +96,10 @@
bool offer_new_or_existing();
- void existing_or_new_new();
-
void on_menu_help_contents();
#ifndef GLOM_ENABLE_CLIENT_ONLY
+ void existing_or_new_new();
+
void on_menu_userlevel_developer();
void on_menu_userlevel_operator();
void on_menu_file_save_as_example();
Modified: trunk/glom/frame_glom.cc
==============================================================================
--- trunk/glom/frame_glom.cc (original)
+++ trunk/glom/frame_glom.cc Thu Jul 17 17:21:35 2008
@@ -357,9 +357,10 @@
//Show the table:
m_table_name = table_name;
Glib::ustring strMode;
-
+#ifndef GLOM_ENABLE_CLIENT_ONLY
//Update the document with any new information in the database if necessary (though the database _should never have changed information)
update_table_in_document_from_database();
+#endif // !GLOM_ENABLE_CLIENT_ONLY
//Update user-level dependent UI:
if(pApp)
@@ -660,7 +661,6 @@
}
}
}
-#endif // !GLOM_ENABLE_CLIENT_ONLY
void Frame_Glom::on_menu_file_import()
{
@@ -714,6 +714,7 @@
}
}
}
+#endif // !GLOM_ENABLE_CLIENT_ONLY
void Frame_Glom::on_menu_file_print()
{
@@ -1111,6 +1112,7 @@
}
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void Frame_Glom::update_table_in_document_from_database()
{
//Add any new/changed information from the database to the document
@@ -1191,6 +1193,7 @@
pDoc->set_table_fields(m_table_name, fieldsActual);
}
}
+#endif // !GLOM_ENABLE_CLIENT_ONLY
void Frame_Glom::set_document(Document_Glom* pDocument)
{
Modified: trunk/glom/frame_glom.h
==============================================================================
--- trunk/glom/frame_glom.h (original)
+++ trunk/glom/frame_glom.h Thu Jul 17 17:21:35 2008
@@ -181,8 +181,9 @@
void show_table(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value_for_details = Gnome::Gda::Value());
void show_table_title();
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void update_table_in_document_from_database();
-
+#endif // !GLOM_ENABLE_CLIENT_ONLY
virtual void set_mode_widget(Gtk::Widget& widget); //e.g. show the design mode notebook.
virtual bool set_mode(enumModes mode); //bool indicates that there was a change.
Modified: trunk/glom/layout_item_dialogs/dialog_buttonscript.h
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_buttonscript.h (original)
+++ trunk/glom/layout_item_dialogs/dialog_buttonscript.h Thu Jul 17 17:21:35 2008
@@ -21,10 +21,13 @@
#ifndef DIALOG_BUTTONSCRIPT_H
#define DIALOG_BUTTONSCRIPT_H
+#ifndef GLOM_ENABLE_CLIENT_ONLY
+
#include <gtkmm.h>
#include <libglademm.h>
#include <glom/libglom/data_structure/layout/layoutitem_button.h>
#include "../base_db.h"
+
#include <gtksourceviewmm/sourceview.h>
namespace Glom
@@ -56,4 +59,5 @@
} //namespace Glom
+#endif // !GLOM_ENABLE_CLIENT_ONLY
#endif //DIALOG_BUTTONSCRIPT_H
Modified: trunk/glom/main.cc
==============================================================================
--- trunk/glom/main.cc (original)
+++ trunk/glom/main.cc Thu Jul 17 17:21:35 2008
@@ -144,6 +144,10 @@
Glom::OptionGroup group;
context.set_main_group(group);
+ //We use python for calculated-fields:
+ Py_Initialize();
+ PySys_SetArgv(argc, argv);
+ Gtk::Main mainInstance(argc, argv, context);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
@@ -191,15 +195,10 @@
return 0;
}
- //We use python for calculated-fields:
- Py_Initialize();
- PySys_SetArgv(argc, argv);
-
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
#endif
{
- Gtk::Main mainInstance(argc, argv, context);
Bakery::init();
#ifndef GLOM_ENABLE_CLIENT_ONLY
Modified: trunk/glom/mode_data/box_data_calendar_related.cc
==============================================================================
--- trunk/glom/mode_data/box_data_calendar_related.cc (original)
+++ trunk/glom/mode_data/box_data_calendar_related.cc Thu Jul 17 17:21:35 2008
@@ -314,9 +314,9 @@
}
#endif // !GLOM_ENABLE_CLIENT_ONLY
+#ifndef GLOM_ENABLE_CLIENT_ONLY
Dialog_Layout* Box_Data_Calendar_Related::create_layout_dialog() const
{
-#ifndef GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_data_layout");
if(refXml)
{
@@ -324,7 +324,6 @@
refXml->get_widget_derived("window_data_layout", dialog);
return dialog;
}
-#endif // !GLOM_ENABLE_CLIENT_ONLY
return NULL;
}
@@ -337,6 +336,7 @@
sharedptr<LayoutItem_CalendarPortal> derived_portal = sharedptr<LayoutItem_CalendarPortal>::cast_dynamic(m_portal);
related_dialog->set_document(m_layout_name, get_document(), derived_portal);
}
+#endif // !GLOM_ENABLE_CLIENT_ONLY
void Box_Data_Calendar_Related::on_calendar_month_changed()
{
Modified: trunk/glom/mode_data/box_data_details.cc
==============================================================================
--- trunk/glom/mode_data/box_data_details.cc (original)
+++ trunk/glom/mode_data/box_data_details.cc Thu Jul 17 17:21:35 2008
@@ -46,8 +46,10 @@
m_Button_Nav_Next(Gtk::Stock::GO_FORWARD),
m_Button_Nav_Last(Gtk::Stock::GOTO_LAST),
m_bDoNotRefreshRelated(false),
- m_ignore_signals(true),
- m_design_mode(false)
+ m_ignore_signals(true)
+#ifndef GLOM_ENABLE_CLIENT_ONLY
+ ,m_design_mode(false)
+#endif
{
m_layout_name = "details";
Modified: trunk/glom/mode_data/flowtablewithfields.cc
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.cc (original)
+++ trunk/glom/mode_data/flowtablewithfields.cc Thu Jul 17 17:21:35 2008
@@ -1410,6 +1410,7 @@
return layout_item;
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void FlowTableWithFields::on_menu_properties_activate()
{
try
@@ -1479,5 +1480,6 @@
}
return Gtk::Widget::on_button_press_event(event);
}
+#endif // !GLOM_ENABLE_CLIENT_ONLY
} //namespace Glom
Modified: trunk/glom/mode_data/flowtablewithfields.h
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.h (original)
+++ trunk/glom/mode_data/flowtablewithfields.h Thu Jul 17 17:21:35 2008
@@ -246,9 +246,11 @@
type_signal_script_button_clicked m_signal_script_button_clicked;
//menu
+#ifndef GLOM_ENABLE_CLIENT_ONLY
virtual void on_menu_properties_activate();
virtual void on_menu_delete_activate(); // override this to add a dialog box
virtual bool on_button_press_event(GdkEventButton *event);
+#endif // !GLOM_ENABLE_CLIENT_ONLY
};
} //namespace Glom
Modified: trunk/glom/utility_widgets/buttonglom.cc
==============================================================================
--- trunk/glom/utility_widgets/buttonglom.cc (original)
+++ trunk/glom/utility_widgets/buttonglom.cc Thu Jul 17 17:21:35 2008
@@ -23,7 +23,9 @@
#include "../application.h"
#include "../libglom/glade_utils.h"
#include "dialog_layoutitem_properties.h"
+#ifndef GLOM_ENABLE_CLIENT_ONLY
#include "../layout_item_dialogs/dialog_buttonscript.h"
+#endif
#include <glibmm/i18n.h>
//#include <sstream> //For stringstream
@@ -58,6 +60,7 @@
return dynamic_cast<App_Glom*>(pWindow);
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void ButtonGlom::on_menu_properties_activate()
{
try
@@ -105,5 +108,6 @@
}
return Gtk::Button::on_button_press_event(event);
}
+#endif
} //namespace Glom
Modified: trunk/glom/utility_widgets/buttonglom.h
==============================================================================
--- trunk/glom/utility_widgets/buttonglom.h (original)
+++ trunk/glom/utility_widgets/buttonglom.h Thu Jul 17 17:21:35 2008
@@ -44,9 +44,10 @@
void init();
virtual App_Glom* get_application();
-
+#ifndef GLOM_ENABLE_CLIENT_ONLY
virtual void on_menu_properties_activate();
virtual bool on_button_press_event(GdkEventButton *event);
+#endif // !GLOM_ENABLE_CLIENT_ONLY
};
} //namespace Glom
Modified: trunk/glom/utility_widgets/labelglom.cc
==============================================================================
--- trunk/glom/utility_widgets/labelglom.cc (original)
+++ trunk/glom/utility_widgets/labelglom.cc Thu Jul 17 17:21:35 2008
@@ -61,6 +61,7 @@
return dynamic_cast<App_Glom*>(pWindow);
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void LabelGlom::on_menu_properties_activate()
{
sharedptr<LayoutItem_Text> textobject = sharedptr<LayoutItem_Text>::cast_dynamic(m_pLayoutItem);
@@ -110,5 +111,6 @@
}
return Gtk::EventBox::on_button_press_event(event);
}
+#endif // !GLOM_ENABLE_CLIENT_ONLY
} //namespace Glom
Modified: trunk/glom/utility_widgets/labelglom.h
==============================================================================
--- trunk/glom/utility_widgets/labelglom.h (original)
+++ trunk/glom/utility_widgets/labelglom.h Thu Jul 17 17:21:35 2008
@@ -47,9 +47,10 @@
virtual App_Glom* get_application();
Gtk::Label m_label;
-
+#ifndef GLOM_ENABLE_CLIENT_ONLY
virtual bool on_button_press_event(GdkEventButton *event);
virtual void on_menu_properties_activate();
+#endif // !GLOM_ENABLE_CLIENT_ONLY
};
Modified: trunk/glom/utility_widgets/layoutwidgetbase.cc
==============================================================================
--- trunk/glom/utility_widgets/layoutwidgetbase.cc (original)
+++ trunk/glom/utility_widgets/layoutwidgetbase.cc Thu Jul 17 17:21:35 2008
@@ -103,6 +103,7 @@
widget.modify_base(Gtk::STATE_NORMAL, Gdk::Color(bg));
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void LayoutWidgetBase::set_dnd_in_progress(bool drag)
{
m_drag_in_progress = drag;
@@ -112,6 +113,6 @@
{
return m_drag_in_progress;
}
-
+#endif // !GLOM_ENABLE_CLIENT_ONLY
} //namespace Glom
Modified: trunk/glom/utility_widgets/layoutwidgetutils.cc
==============================================================================
--- trunk/glom/utility_widgets/layoutwidgetutils.cc (original)
+++ trunk/glom/utility_widgets/layoutwidgetutils.cc Thu Jul 17 17:21:35 2008
@@ -36,7 +36,9 @@
m_refActionGroup->add(Gtk::Action::create("UtilMenu", "Utility Menu") );
m_refUtilProperties = Gtk::Action::create("UtilProperties", _("Properties"));
m_refUtilDelete = Gtk::Action::create("UtilDelete", _("Delete"));
+#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_util_menu();
+#endif
}
LayoutWidgetUtils::~LayoutWidgetUtils()
@@ -44,6 +46,7 @@
}
+#ifndef GLOM_ENABLE_CLIENT_ONLY
void LayoutWidgetUtils::setup_util_menu()
{
m_refUIManager = Gtk::UIManager::create();
@@ -108,6 +111,7 @@
signal_layout_changed().emit();
}
}
+#endif // !GLOM_ENABLE_CLIENT_ONLY
} // namespace Glom
Modified: trunk/glom/utility_widgets/layoutwidgetutils.h
==============================================================================
--- trunk/glom/utility_widgets/layoutwidgetutils.h (original)
+++ trunk/glom/utility_widgets/layoutwidgetutils.h Thu Jul 17 17:21:35 2008
@@ -38,11 +38,11 @@
protected:
void setup_util_menu();
Gtk::Menu* m_pPopupMenuUtils;
-
+#ifndef GLOM_ENABLE_CLIENT_ONLY
virtual void on_menu_properties_activate() = 0;
-
// This one is implemented here
virtual void on_menu_delete_activate();
+#endif // !GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gtk::Action> m_refUtilProperties;
Glib::RefPtr<Gtk::Action> m_refUtilDelete;
Modified: trunk/glom/utility_widgets/notebookglom.cc
==============================================================================
--- trunk/glom/utility_widgets/notebookglom.cc (original)
+++ trunk/glom/utility_widgets/notebookglom.cc Thu Jul 17 17:21:35 2008
@@ -69,7 +69,9 @@
void NotebookGlom::delete_from_layout()
{
+#ifndef GLOM_ENABLE_CLIENT_ONLY
on_menupopup_activate_delete();
+#endif // !GLOM_ENABLE_CLIENT_ONLY
}
} //namespace Glom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]