Commit 63075346 authored by Murray Cumming's avatar Murray Cumming
Browse files

Many files: Rename App_Glom to Application (in namespace Glom).

parent 8a1511eb
2010-02-28 Murray Cumming <murrayc@murrayc-x61>
reviewed by: <delete if not using a buddy>
* glom/application.cc:
* glom/application.h:
* glom/base_db.cc:
* glom/base_db_table_data.cc:
* glom/box_withbuttons.cc:
* glom/frame_glom.cc:
* glom/glom_privs.cc:
* glom/libglom/connectionpool.h:
* glom/libglom/document/bakery/document.cc:
* glom/libglom/python_embed/py_glom_relatedrecord.cc:
* glom/main.cc:
* glom/mode_data/box_data.cc:
* glom/mode_data/box_data_calendar_related.cc:
* glom/mode_data/box_data_portal.cc:
* glom/mode_data/flowtablewithfields.cc:
* glom/mode_design/relationships_overview/dialog_relationships_over
view.cc:
* glom/navigation/box_tables.cc:
* glom/notebook_glom.cc:
* glom/utility_widgets/buttonglom.cc:
* glom/utility_widgets/buttonglom.h:
* glom/utility_widgets/canvas/canvas_image_movable.cc:
* glom/utility_widgets/checkglom.cc:
* glom/utility_widgets/checkglom.h:
* glom/utility_widgets/comboentryglom.cc:
* glom/utility_widgets/comboentryglom.h:
* glom/utility_widgets/comboglom.cc:
* glom/utility_widgets/comboglom.h:
* glom/utility_widgets/datawidget.cc:
* glom/utility_widgets/datawidget.h:
* glom/utility_widgets/db_adddel/db_adddel.cc:
* glom/utility_widgets/db_adddel/db_adddel.h:
* glom/utility_widgets/db_adddel/glom_db_treemodel.cc:
* glom/utility_widgets/entryglom.cc:
* glom/utility_widgets/entryglom.h:
* glom/utility_widgets/imageglom.cc:
* glom/utility_widgets/imageglom.h:
* glom/utility_widgets/labelglom.cc:
* glom/utility_widgets/labelglom.h:
* glom/utility_widgets/layoutwidgetbase.cc:
* glom/utility_widgets/layoutwidgetbase.h:
* glom/utility_widgets/layoutwidgetmenu.cc:
* glom/utility_widgets/notebookglom.cc:
* glom/utility_widgets/notebookglom.h:
* glom/utility_widgets/notebooklabelglom.cc:
* glom/utility_widgets/notebooklabelglom.h:
* glom/utility_widgets/placeholder-glom.cc:
* glom/utility_widgets/placeholder-glom.h:
* glom/utility_widgets/textviewglom.cc:
* glom/utility_widgets/textviewglom.h:
2010-02-28 Murray Cumming <murrayc@murrayc.com>
 
Python button scripts: Add show_table_details() and show_table_list().
......
This diff is collapsed.
......@@ -53,11 +53,11 @@ namespace Glom
class Window_Translations;
class App_Glom : public GlomBakery::App_WithDoc_Gtk
class Application : public GlomBakery::App_WithDoc_Gtk
{
public:
App_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
virtual ~App_Glom();
Application(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
virtual ~Application();
virtual bool init(const Glib::ustring& document_uri = Glib::ustring()); //override
......@@ -109,7 +109,7 @@ public:
void show_table_details(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value);
void show_table_list(const Glib::ustring& table_name);
static App_Glom* get_application();
static Application* get_application();
protected:
virtual void ui_warning_load_failed(int failure_code = 0); //Override.
......
......@@ -21,7 +21,7 @@
#include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
#include <glom/base_db.h>
#include "application.h" //App_Glom.
#include "application.h" //Application.
#include <libglom/appstate.h>
#include <libglom/standard_table_prefs_fields.h>
#include <libglom/document/document.h>
......@@ -209,7 +209,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> Base_DB::query_execute_select(const Glib::us
//Debug output:
const App_Glom* app = App_Glom::get_application();
const Application* app = Application::get_application();
if(stmt && app && app->get_show_sql_debug())
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
......@@ -312,7 +312,7 @@ bool Base_DB::query_execute(const Glib::ustring& strQuery,
//Debug output:
const App_Glom* app = App_Glom::get_application();
const Application* app = Application::get_application();
if(stmt && app && app->get_show_sql_debug())
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
......@@ -3410,7 +3410,7 @@ int Base_DB::count_rows_returned_by(const Glib::ustring& sql_query)
//Be careful not to include ORDER BY clauses in this, because that would make it unnecessarily slow:
const Glib::ustring query_count = "SELECT COUNT (*) FROM (" + sql_query + ") AS glomarbitraryalias";
const App_Glom* app = App_Glom::get_application();
const Application* app = Application::get_application();
if(app && app->get_show_sql_debug())
{
try
......@@ -3553,10 +3553,10 @@ void Base_DB::set_found_set_where_clause_for_portal(FoundSet& found_set, const s
void Base_DB::update_gda_metastore_for_table(const Glib::ustring& table_name) const
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
sharedptr<SharedConnection> sharedconnection = connect_to_server(App_Glom::get_application());
sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application());
#else
std::auto_ptr<Glom::ExceptionConnection> ex;
sharedptr<SharedConnection> sharedconnection = connect_to_server(App_Glom::get_application(), ex);
sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application(), ex);
#endif
if(!sharedconnection)
{
......
......@@ -118,10 +118,10 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
//We need the connection when we run the script, so that the script may use it.
#ifdef GLIBMM_EXCEPTIONS_ENABLED
// TODO: Is this function supposed to throw an exception?
sharedptr<SharedConnection> sharedconnection = connect_to_server(App_Glom::get_application());
sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application());
#else
std::auto_ptr<ExceptionConnection> error;
sharedptr<SharedConnection> sharedconnection = connect_to_server(App_Glom::get_application(), error);
sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application(), error);
if(!error.get())
{
// Don't evaluate function on error
......@@ -264,7 +264,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
bool Base_DB_Table_Data::get_related_record_exists(const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& key_field, const Gnome::Gda::Value& key_value)
{
BusyCursor cursor(App_Glom::get_application());
BusyCursor cursor(Application::get_application());
bool result = false;
......@@ -317,11 +317,11 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
const Glib::ustring message = _("Data may not be entered into this related field, because the related record does not yet exist, and the relationship does not allow automatic creation of new related records.");
#undef GLOM_ENABLE_MAEMO
#ifdef GLOM_ENABLE_MAEMO
Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *App_Glom::get_application(), message);
Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *Application::get_application(), message);
#else
Gtk::MessageDialog dialog(Utils::bold_message(_("Related Record Does Not Exist")), true);
dialog.set_secondary_text(message);
dialog.set_transient_for(*App_Glom::get_application());
dialog.set_transient_for(*Application::get_application());
#endif
dialog.run();
......@@ -342,12 +342,12 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
const Glib::ustring message = _("Data may not be entered into this related field, because the related record does not yet exist, and the key in the related record is auto-generated and therefore can not be created with the key value in this record.");
#ifdef GLOM_ENABLE_MAEMO
Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *App_Glom::get_application(), message);
Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *Application::get_application(), message);
#else
Gtk::MessageDialog dialog(Utils::bold_message(_("Related Record Cannot Be Created")), true);
//TODO: This is a very complex error message:
dialog.set_secondary_text(message);
dialog.set_transient_for(*App_Glom::get_application());
dialog.set_transient_for(*Application::get_application());
#endif
dialog.run();
......@@ -452,7 +452,7 @@ bool Base_DB_Table_Data::confirm_delete_record()
#else
Gtk::MessageDialog dialog(Utils::bold_message(_("Delete record")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE);
dialog.set_secondary_text(message);
dialog.set_transient_for(*App_Glom::get_application());
dialog.set_transient_for(*Application::get_application());
#endif
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
dialog.add_button(Gtk::Stock::DELETE, Gtk::RESPONSE_OK);
......
......@@ -19,7 +19,7 @@
*/
#include <glom/box_withbuttons.h>
#include <glom/application.h> //App_Glom.
#include <glom/application.h> //Application.
#include <glom/utils_ui.h>
#include <libglom/appstate.h>
//#include <libgnomeui/gnome-app-helper.h>
......
......@@ -335,7 +335,7 @@ void Frame_Glom::set_mode_widget(Gtk::Widget& widget)
//Trying to remove all of them leads to warnings,
//and I don't see a way to get a list of children.
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
{
//Glib::RefPtr<Gtk::UIManager> ui_manager = pApp->get_ui_manager();
......@@ -410,7 +410,7 @@ void Frame_Glom::show_table_refresh()
void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value_for_details)
{
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
//This can take quite a long time, so we show the busy cursor while it's working:
BusyCursor busy_cursor(pApp);
......@@ -1142,7 +1142,7 @@ void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>
}
//Update the UI:
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
{
pApp->update_network_shared_ui();
......@@ -1499,7 +1499,7 @@ void Frame_Glom::on_notebook_find_criteria(const Glib::ustring& where_clause)
//std::cout << "Frame_Glom::on_notebook_find_criteria(): " << where_clause << std::endl;
//on_menu_Mode_Data();
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
{
bool records_found = false;
......@@ -2774,7 +2774,7 @@ void Frame_Glom::on_menu_print_layout_selected(const Glib::ustring& print_layout
try
{
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
print->run(Gtk::PRINT_OPERATION_ACTION_PRINT_DIALOG, *pApp);
}
......@@ -2805,7 +2805,7 @@ void Frame_Glom::on_dialog_layout_report_hide()
}
//Update the reports menu:
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
pApp->fill_menu_reports(m_table_name);
}
......@@ -2825,7 +2825,7 @@ void Frame_Glom::on_dialog_layout_print_hide()
}
//Update the reports menu:
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
pApp->fill_menu_print_layouts(m_table_name);
}
......@@ -2833,7 +2833,7 @@ void Frame_Glom::on_dialog_layout_print_hide()
void Frame_Glom::on_dialog_reports_hide()
{
//Update the reports menu:
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
pApp->fill_menu_reports(m_table_name);
}
......@@ -2841,7 +2841,7 @@ void Frame_Glom::on_dialog_reports_hide()
void Frame_Glom::on_dialog_print_layouts_hide()
{
//Update the reports menu:
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
pApp->fill_menu_print_layouts(m_table_name);
}
......@@ -2858,7 +2858,7 @@ void Frame_Glom::on_dialog_tables_hide()
#ifndef GLOM_ENABLE_CLIENT_ONLY
if(document->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
{
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
pApp->fill_menu_tables();
......@@ -2880,7 +2880,7 @@ void Frame_Glom::on_dialog_tables_hide()
void Frame_Glom::on_notebook_data_switch_page(GtkNotebookPage* /* page */, guint /* page_num */)
{
//Refill this menu, because it depends on whether list or details are visible:
App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
Application* pApp = dynamic_cast<Application*>(get_app_window());
if(pApp)
pApp->fill_menu_print_layouts(m_table_name);
}
......
......@@ -94,7 +94,7 @@ Glib::ustring Privs::get_default_developer_user_name(Glib::ustring& password)
Privs::type_vec_strings Privs::get_database_users(const Glib::ustring& group_name)
{
BusyCursor cursor(App_Glom::get_application());
BusyCursor cursor(Application::get_application());
type_vec_strings result;
......@@ -406,7 +406,7 @@ Privileges Privs::get_current_privs(const Glib::ustring& table_name)
//TODO_Performance: There's lots of database access here.
//We could maybe replace some with the postgres has_table_* function().
BusyCursor cursor(App_Glom::get_application());
BusyCursor cursor(Application::get_application());
//Return a cached value if possible.
//(If it is in the cache then it's fairly recent)
......
......@@ -235,7 +235,7 @@ public:
#endif
/** Specify a callback that the ConnectionPool can call to get a pointer to the document.
* This callback avoids Connection having to link to App_Glom,
* This callback avoids Connection having to link to Application,
* and avoids us worrying about whether a previously-set document (via a set_document() method) is still valid.
*/
typedef sigc::slot<Document*> SlotGetDocument;
......
......@@ -360,7 +360,7 @@ static Glib::ustring get_file_display_name(const Glib::ustring& uri)
}
catch(const Glib::Error& ex)
{
std::cerr << "App_Glom::get_file_display_name(): error: " << ex.what() << std::endl;
std::cerr << "Application::get_file_display_name(): error: " << ex.what() << std::endl;
return result;
}
#else
......
......@@ -96,7 +96,7 @@ boost::python::object PyGlomRelatedRecord::getitem(const boost::python::object&
+ " WHERE \"" + related_table + "\".\"" + related_key_name + "\" = " + m_from_key_value_sqlized;
/* TODO: Fix linking problems
const App_Glom* app = App_Glom::get_application();
const Application* app = Application::get_application();
if(app && app->get_show_sql_debug())
{
try
......
......@@ -630,26 +630,26 @@ main(int argc, char* argv[])
Glom::App_Glom* pApp_Glom = 0;
refXml->get_widget_derived("window_main", pApp_Glom);
g_assert(pApp_Glom);
Glom::Application* pApplication = 0;
refXml->get_widget_derived("window_main", pApplication);
g_assert(pApplication);
pApp_Glom->set_command_line_args(argc, argv);
pApp_Glom->set_show_sql_debug(group.m_arg_debug_sql);
pApplication->set_command_line_args(argc, argv);
pApplication->set_show_sql_debug(group.m_arg_debug_sql);
const bool test = pApp_Glom->init(input_uri); //Sets it up and shows it.
const bool test = pApplication->init(input_uri); //Sets it up and shows it.
#ifdef GLOM_ENABLE_MAEMO
//TODO: What is this really for?
Hildon::Program::get_instance()->add_window(*pApp_Glom);
Hildon::Program::get_instance()->add_window(*pApplication);
#endif
if(test) //The user could cancel the offer of a new or existing database.
Gtk::Main::run(*pApp_Glom); //Quit when the window is closed.
Gtk::Main::run(*pApplication); //Quit when the window is closed.
//Cleanup:
delete pApp_Glom;
pApp_Glom = 0;
delete pApplication;
pApplication = 0;
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch(const Glib::Exception& ex)
......
......@@ -355,7 +355,7 @@ void Box_Data::on_python_requested_show_table_details(const Glib::ustring& table
{
std::cout << "debug: on_python_requested_show_table_details(): " << table_name << ", pk value: " << primary_key_value.to_string() << std::endl;
App_Glom* app = App_Glom::get_application();
Application* app = Application::get_application();
if(app)
app->show_table_details(table_name, primary_key_value);
}
......@@ -364,7 +364,7 @@ void Box_Data::on_python_requested_show_table_list(const Glib::ustring& table_na
{
//std::cout << "debug: on_python_requested_show_table_list(): " << table_name << std::endl;
App_Glom* app = App_Glom::get_application();
Application* app = Application::get_application();
if(app)
app->show_table_list(table_name);
}
......
......@@ -503,7 +503,7 @@ void Box_Data_Calendar_Related::setup_menu()
sigc::mem_fun(*this, &Box_Data_Calendar_Related::on_MenuPopup_activate_layout) );
//TODO: This does not work until this widget is in a container in the window:
App_Glom* pApp = get_application();
Application* pApp = get_application();
if(pApp)
{
pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
......@@ -564,7 +564,7 @@ void Box_Data_Calendar_Related::on_calendar_button_press_event(GdkEventButton *e
#ifndef GLOM_ENABLE_CLIENT_ONLY
//Enable/Disable items.
//We did this earlier, but get_application is more likely to work now:
App_Glom* pApp = get_application();
Application* pApp = get_application();
if(pApp)
{
pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
......
......@@ -202,7 +202,7 @@ void Box_Data_Portal::on_realize()
Glib::ustring::compose(_("Add Related %1"), get_title_singular());
m_maemo_appmenubutton_add.set_title(title);
m_maemo_appmenubutton_add.set_value(_("Add related record"));
App_Glom* app = App_Glom::get_application();
Application* app = Application::get_application();
g_assert(app);
if(app)
{
......@@ -221,7 +221,7 @@ void Box_Data_Portal::on_realize()
void Box_Data_Portal::on_unrealize()
{
// Remove the AppMenu button when the portal is no longer shown:
App_Glom* app = App_Glom::get_application();
Application* app = Application::get_application();
g_assert(app);
if(app)
{
......
......@@ -1284,7 +1284,7 @@ void FlowTableWithFields::on_dnd_add_layout_item_field(LayoutWidgetBase* above)
//Ask the user to choose the layout item
sharedptr<LayoutItem_Field> layout_item_field =
DataWidget::offer_field_list(m_table_name, sharedptr<LayoutItem_Field>(),
get_document(), App_Glom::get_application());
get_document(), Application::get_application());
if(!layout_item_field)
{
realize();
......@@ -1527,7 +1527,7 @@ void FlowTableWithFields::on_menu_delete_activate()
bool FlowTableWithFields::on_button_press_event(GdkEventButton *event)
{
App_Glom* pApp = App_Glom::get_application();
Application* pApp = Application::get_application();
if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
{
GdkModifierType mods;
......
......@@ -529,7 +529,7 @@ void Dialog_RelationshipsOverview::setup_context_menu()
void Dialog_RelationshipsOverview::on_context_menu_edit_fields(Glib::RefPtr<CanvasGroupDbTable> table)
{
App_Glom* pApp = App_Glom::get_application();
Application* pApp = Application::get_application();
if(pApp && table)
{
pApp->do_menu_developer_fields(*this, table->get_table_name());
......@@ -540,7 +540,7 @@ void Dialog_RelationshipsOverview::on_context_menu_edit_fields(Glib::RefPtr<Canv
void Dialog_RelationshipsOverview::on_context_menu_edit_relationships(Glib::RefPtr<CanvasGroupDbTable> table)
{
App_Glom* pApp = App_Glom::get_application();
Application* pApp = Application::get_application();
if(pApp && table)
{
pApp->do_menu_developer_relationships(*this, table->get_table_name());
......
......@@ -101,7 +101,7 @@ void Box_Tables::fill_table_row(const Gtk::TreeModel::iterator& iter, const shar
bool Box_Tables::fill_from_database()
{
BusyCursor busy_cursor(App_Glom::get_application());
BusyCursor busy_cursor(Application::get_application());
bool result = Base_DB::fill_from_database();
......@@ -155,10 +155,10 @@ bool Box_Tables::fill_from_database()
//Get the list of tables in the database, from the server:
#ifdef GLIBMM_EXCEPTIONS_ENABLED
sharedptr<SharedConnection> sharedconnection = connect_to_server(App_Glom::get_application());
sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application());
#else
std::auto_ptr<ExceptionConnection> error;
sharedptr<SharedConnection> sharedconnection = connect_to_server(App_Glom::get_application(), error);
sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application(), error);
// Ignore error because sharedconnection presence is checked below.
#endif
......@@ -241,7 +241,7 @@ void Box_Tables::on_adddel_Add(const Gtk::TreeModel::iterator& row)
//Ask the user if they want us to try to cope with this:
Gtk::MessageDialog dialog(Utils::bold_message(_("Table Already Exists")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_OK_CANCEL);
dialog.set_secondary_text(_("This table already exists on the database server, though it is not mentioned in the .glom file. This should not happen. Would you like Glom to attempt to use the existing table?"));
dialog.set_transient_for(*App_Glom::get_application());
dialog.set_transient_for(*Application::get_application());
const int response = dialog.run();
dialog.hide();
......@@ -301,7 +301,7 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
{
//TODO: Do not show tables that are not in the document.
Gtk::MessageDialog dialog(_("You cannot delete this table, because there is no information about this table in the document."));
dialog.set_transient_for(*App_Glom::get_application());
dialog.set_transient_for(*Application::get_application());
dialog.run();
}
else
......@@ -310,7 +310,7 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
Glib::ustring strMsg = _("Are you sure that you want to delete this table?\nTable name: ") + table_name;
Gtk::MessageDialog dialog(Utils::bold_message(_("Delete Table")), true);
dialog.set_secondary_text(strMsg);
dialog.set_transient_for(*App_Glom::get_application());
dialog.set_transient_for(*Application::get_application());
int iButtonClicked = dialog.run();
//Delete the table:
......@@ -424,7 +424,7 @@ void Box_Tables::on_adddel_Edit(const Gtk::TreeModel::iterator& row)
{
Gtk::MessageDialog dialog(Utils::bold_message(_("Unknown Table")), true);
dialog.set_secondary_text(_("You cannot open this table, because there is no information about this table in the document."));
dialog.set_transient_for(*App_Glom::get_application());
dialog.set_transient_for(*Application::get_application());
dialog.run();
}
else
......
......@@ -88,7 +88,7 @@ void Notebook_Glom::on_switch_page_handler(GtkNotebookPage* /* pPage */, guint u
//pBox->load_from_document();
//Set the default button, if there is one:
App_Glom* pAppGlom = dynamic_cast<App_Glom*>(pApp);
Application* pAppGlom = dynamic_cast<Application*>(pApp);
if(pAppGlom)
{
Gtk::Widget* default_button = pBox->get_default_button();
......
......@@ -52,12 +52,12 @@ void ButtonGlom::init()
}
App_Glom* ButtonGlom::get_application()
Application* ButtonGlom::get_application()
{
Gtk::Container* pWindow = get_toplevel();
//TODO: This only works when the child widget is already in its parent.
return dynamic_cast<App_Glom*>(pWindow);
return dynamic_cast<Application*>(pWindow);
}
#ifndef GLOM_ENABLE_CLIENT_ONLY
......@@ -94,7 +94,7 @@ void ButtonGlom::on_menu_properties_activate()
bool ButtonGlom::on_button_press_event(GdkEventButton *event)
{
App_Glom* pApp = get_application();
Application* pApp = get_application();
if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
{
GdkModifierType mods;
......
Markdown is supported
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