Commit 42173a52 authored by Murray Cumming's avatar Murray Cumming
Browse files

Change semi-camel-case m_* members variables to something saner.

parent 80c6b537
This diff is collapsed.
......@@ -210,14 +210,14 @@ protected:
//Menu Builder and Actions
Glib::RefPtr<Gtk::Builder> m_builder;
std::unique_ptr<Gtk::MenuBar> m_menubar;
Glib::RefPtr<Gio::SimpleActionGroup> m_refActionGroup_File,
m_refActionGroup_Edit, m_refActionGroup_Tables,
m_refActionGroup_Developer, m_refActionGroup_Reports;
Glib::RefPtr<Gio::SimpleActionGroup> m_action_group_file,
m_action_group_edit, m_action_group_tables,
m_action_group_developer, m_action_group_reports;
//Member widgets:
Gtk::Box* m_pVBox;
Gtk::Box m_VBox_PlaceHolder;
Gtk::Box* m_vbox;
Gtk::Box m_vbox_placeHolder;
//Menu stuff:
Glib::RefPtr<Gio::SimpleAction> m_action_save, m_action_saveas;
......@@ -306,11 +306,11 @@ private:
Glib::RefPtr<Gio::SimpleAction> m_toggleaction_network_shared;
sigc::connection m_connection_toggleaction_network_shared;
Gtk::Box* m_pBoxTop;
Frame_Glom* m_pFrame;
Gtk::Box* m_box_top;
Frame_Glom* m_frame;
bool m_about_shown;
Gtk::AboutDialog* m_pAbout; //About box.
Gtk::AboutDialog* m_about; //About box.
Infobar_ProgressCreating* m_infobar_progress;
std::string m_progress_collate_key;
......@@ -320,9 +320,9 @@ private:
#endif // !GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gio::SimpleActionGroup> m_refHelpActionGroup;
Glib::RefPtr<Gio::SimpleActionGroup> m_refNavTablesActionGroup, m_refNavReportsActionGroup, m_refNavPrintLayoutsActionGroup;
type_listActions m_listNavTableActions, m_listNavReportActions, m_listNavPrintLayoutActions;
Glib::RefPtr<Gio::SimpleActionGroup> m_help_action_group;
Glib::RefPtr<Gio::SimpleActionGroup> m_nav_tables_action_group, m_nav_reports_action_group, m_nav_print_layouts_action_group;
type_listActions m_nav_table_actions, m_nav_report_actions, m_nav_print_layout_actions;
#ifndef GLOM_ENABLE_CLIENT_ONLY
//Set these before calling offer_saveas() (which uses ui_file_select_save()), and clear it afterwards.
......
......@@ -33,7 +33,7 @@ FileChooser_Export::FileChooser_Export()
m_extra_widget(Gtk::ORIENTATION_HORIZONTAL, Utils::to_utype(UiUtils::DefaultSpacings::SMALL)),
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_button_format(_("Define Data _Format"), true /* use mnenomic */),
m_pDialogLayout(nullptr),
m_dialog_layout(nullptr),
#endif //GLOM_ENABLE_CLIENT_ONLY
m_document(nullptr)
{
......@@ -58,17 +58,17 @@ FileChooser_Export::FileChooser_Export()
if(!dialog)
return;
m_pDialogLayout = dialog;
//add_view(m_pDialogLayout); //Give it access to the document.
m_pDialogLayout->signal_hide().connect( sigc::mem_fun(*this, &FileChooser_Export::on_dialog_layout_hide) );
m_dialog_layout = dialog;
//add_view(m_dialog_layout); //Give it access to the document.
m_dialog_layout->signal_hide().connect( sigc::mem_fun(*this, &FileChooser_Export::on_dialog_layout_hide) );
#endif //GLOM_ENABLE_CLIENT_ONLY
}
FileChooser_Export::~FileChooser_Export()
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
delete m_pDialogLayout;
m_pDialogLayout = nullptr;
delete m_dialog_layout;
m_dialog_layout = nullptr;
#endif //GLOM_ENABLE_CLIENT_ONLY
}
......@@ -86,20 +86,20 @@ void FileChooser_Export::set_export_layout(const Document::type_list_const_layou
#ifndef GLOM_ENABLE_CLIENT_ONLY
void FileChooser_Export::on_button_define_layout()
{
if(!m_pDialogLayout)
if(!m_dialog_layout)
return;
m_pDialogLayout->set_layout_groups(m_layout_groups, m_document, m_table_name); //TODO: Use m_TableFields?
m_pDialogLayout->set_transient_for(*this);
m_dialog_layout->set_layout_groups(m_layout_groups, m_document, m_table_name); //TODO: Use m_TableFields?
m_dialog_layout->set_transient_for(*this);
set_modal(false);
m_pDialogLayout->set_modal();
m_pDialogLayout->show();
m_dialog_layout->set_modal();
m_dialog_layout->show();
}
void FileChooser_Export::on_dialog_layout_hide()
{
if(m_pDialogLayout)
m_pDialogLayout->get_layout_groups(m_layout_groups);
if(m_dialog_layout)
m_dialog_layout->get_layout_groups(m_layout_groups);
}
#endif //GLOM_ENABLE_CLIENT_ONLY
......
......@@ -52,7 +52,7 @@ private:
#ifndef GLOM_ENABLE_CLIENT_ONLY
Gtk::Button m_button_format;
Dialog_Layout_Export* m_pDialogLayout;
Dialog_Layout_Export* m_dialog_layout;
#endif //GLOM_ENABLE_CLIENT_ONLY
Glib::ustring m_table_name;
......
This diff is collapsed.
......@@ -255,45 +255,45 @@ private:
Glib::ustring m_table_name;
//Child widgets:
Gtk::Label* m_pLabel_Table_DataMode;
Gtk::Label* m_pLabel_Table_FindMode;
Gtk::Label* m_label_table_data_mode;
Gtk::Label* m_label_table_find_mode;
Gtk::Box m_Box_RecordsCount; //Only show this when in Data mode.
Gtk::Label m_Label_RecordsCount;
Gtk::Label m_Label_FoundCount;
Gtk::Button m_Button_FindAll;
Gtk::Box m_box_records_count; //Only show this when in Data mode.
Gtk::Label m_label_records_count;
Gtk::Label m_label_found_count;
Gtk::Button m_button_find_all;
Gtk::Stack* m_stack_mode; //Contains e.g. data or find mode notebook.
//Navigation:
Box_Tables* m_pBox_Tables;
Window_BoxHolder* m_pDialog_Tables;
Box_Tables* m_box_tables;
Window_BoxHolder* m_dialog_tables;
Notebook_Data m_Notebook_Data;
Notebook_Data m_notebook_data;
Gtk::Box* m_pBox_QuickFind; //Only show this when in Find mode.
Gtk::Entry* m_pEntry_QuickFind;
Gtk::Button* m_pButton_QuickFind;
Notebook_Find m_Notebook_Find;
Gtk::Box* m_box_quick_find; //Only show this when in Find mode.
Gtk::Entry* m_entry_quick_find;
Gtk::Button* m_button_quick_find;
Notebook_Find m_notebook_find;
#ifndef GLOM_ENABLE_CLIENT_ONLY
//Developer:
std::unique_ptr<Window_BoxHolder> m_pDialog_Reports;
Dialog_Layout_Report* m_pDialogLayoutReport;
Box_Reports* m_pBox_Reports;
std::unique_ptr<Window_BoxHolder> m_dialog_reports;
Dialog_Layout_Report* m_dialog_layout_report;
Box_Reports* m_box_reports;
std::unique_ptr<Window_BoxHolder> m_pDialog_PrintLayouts;
Window_PrintLayout_Edit* m_pDialogLayoutPrint;
Box_Print_Layouts* m_pBox_PrintLayouts;
std::unique_ptr<Window_BoxHolder> m_dialog_print_layouts;
Window_PrintLayout_Edit* m_dialog_layout_print;
Box_Print_Layouts* m_box_print_layouts;
Dialog_Fields* m_pDialog_Fields;
Dialog_Relationships* m_pDialog_Relationships;
Dialog_Fields* m_dialog_fields;
Dialog_Relationships* m_dialog_relationships;
Dialog_AddRelatedTable* m_dialog_addrelatedtable;
Window_RelationshipsOverview* m_window_relationships_overview;
#endif //GLOM_ENABLE_CLIENT_ONLY
Dialog_Connection* m_pDialogConnection;
Dialog_Connection* m_dialog_connection;
};
} //namespace Glom
......
......@@ -289,9 +289,9 @@ std::shared_ptr<SharedConnection> ConnectionPool::connect()
return connection_cached;
}
//If the connection is already open (because it is being used by somebody):
else if(m_refGdaConnection)
else if(m_gda_connection)
{
std::shared_ptr<SharedConnection> sharedConnection( new SharedConnection(m_refGdaConnection) );
std::shared_ptr<SharedConnection> sharedConnection( new SharedConnection(m_gda_connection) );
//Ask for notification when the SharedConnection has been finished with:
//TODO: Note that we are overwriting the connection to a signal of a
......@@ -315,7 +315,7 @@ std::shared_ptr<SharedConnection> ConnectionPool::connect()
}
else
{
m_refGdaConnection = m_backend->connect(m_database, get_user(), get_password(), m_fake_connection);
m_gda_connection = m_backend->connect(m_database, get_user(), get_password(), m_fake_connection);
{
//Allow get_meta_store_data() to succeed:
......@@ -323,7 +323,7 @@ std::shared_ptr<SharedConnection> ConnectionPool::connect()
//std::cout << "DEBUG: Calling update_meta_store_data_types() ...\n";
try
{
m_refGdaConnection->update_meta_store_data_types();
m_gda_connection->update_meta_store_data_types();
}
catch(const Glib::Error& ex)
{
......@@ -347,7 +347,7 @@ std::shared_ptr<SharedConnection> ConnectionPool::connect()
// Connection succeeded
// Create the fieldtypes member if it has not already been done:
if(!m_field_types)
m_field_types = std::make_shared<FieldTypes>(m_refGdaConnection);
m_field_types = std::make_shared<FieldTypes>(m_gda_connection);
#ifndef G_OS_WIN32
//Let other clients discover this server via avahi:
......@@ -360,7 +360,7 @@ std::shared_ptr<SharedConnection> ConnectionPool::connect()
avahi_start_publishing(); //Stopped in the signal_finished handler.
#endif // !G_OS_WIN32
return connect(); //Call this method recursively. This time m_refGdaConnection exists.
return connect(); //Call this method recursively. This time m_gda_connection exists.
}
}
}
......@@ -431,7 +431,7 @@ bool ConnectionPool::convert_backup(const SlotProgress& slot_progress, const std
{
//update_meta_store_table_names() has been known to throw an exception.
//Glom is mostly unusable when it fails, but that's still better than a crash.
m_refGdaConnection->update_meta_store_table_names(m_backend->get_public_schema_name());
m_gda_connection->update_meta_store_table_names(m_backend->get_public_schema_name());
}
catch(const Glib::Error& ex)
{
......@@ -500,10 +500,10 @@ void ConnectionPool::invalidate_connection()
connection_cached_timeout_connection.disconnect();
connection_cached_finished_connection.disconnect();
if(m_refGdaConnection)
m_refGdaConnection->close();
if(m_gda_connection)
m_gda_connection->close();
m_refGdaConnection.reset();
m_gda_connection.reset();
m_sharedconnection_refcount = 0;
m_field_types.reset();
......@@ -522,9 +522,9 @@ void ConnectionPool::on_sharedconnection_finished()
//There should be no copies of the m_refConnection, so the Gnome::Gda::Connection destructor should
//run when we clear this last RefPtr of it, but we will explicitly close it just in case.
//std::cerr << G_STRFUNC << ": closing GdaConnection\n";
m_refGdaConnection->close();
m_gda_connection->close();
m_refGdaConnection.reset();
m_gda_connection.reset();
#ifndef G_OS_WIN32
//TODO: this should only even be started if we are the first to open the .glom file:
......@@ -667,7 +667,7 @@ bool ConnectionPool::set_network_shared(const SlotProgress& slot_progress, bool
bool ConnectionPool::connect_nothrow()
{
if(!m_refGdaConnection)
if(!m_gda_connection)
{
try
{
......@@ -680,7 +680,7 @@ bool ConnectionPool::connect_nothrow()
}
}
return (m_refGdaConnection != 0);
return (m_gda_connection != 0);
}
//TODO: Why do we use noexcept here and on change_columns()?
......@@ -691,8 +691,8 @@ bool ConnectionPool::add_column(const Glib::ustring& table_name, const std::shar
try
{
const auto result = m_backend->add_column(m_refGdaConnection, table_name, field);
m_refGdaConnection->update_meta_store_table(table_name, m_backend->get_public_schema_name());
const auto result = m_backend->add_column(m_gda_connection, table_name, field);
m_gda_connection->update_meta_store_table(table_name, m_backend->get_public_schema_name());
return result;
}
catch(const Glib::Error& ex)
......@@ -710,8 +710,8 @@ bool ConnectionPool::drop_column(const Glib::ustring& table_name, const Glib::us
try
{
const auto result = m_backend->drop_column(m_refGdaConnection, table_name, field_name);
m_refGdaConnection->update_meta_store_table(table_name, m_backend->get_public_schema_name());
const auto result = m_backend->drop_column(m_gda_connection, table_name, field_name);
m_gda_connection->update_meta_store_table(table_name, m_backend->get_public_schema_name());
return result;
}
catch(const Glib::Error& ex)
......@@ -735,11 +735,11 @@ bool ConnectionPool::change_columns(const Glib::ustring& table_name, const type_
if(!connect_nothrow())
return false;
const auto result = m_backend->change_columns(m_refGdaConnection, table_name, old_fields, new_fields);
const auto result = m_backend->change_columns(m_gda_connection, table_name, old_fields, new_fields);
try
{
m_refGdaConnection->update_meta_store_table(table_name, m_backend->get_public_schema_name());
m_gda_connection->update_meta_store_table(table_name, m_backend->get_public_schema_name());
}
catch(const Glib::Error& ex)
{
......@@ -996,7 +996,7 @@ bool ConnectionPool::update_meta_store_for_table_names()
//update_meta_store_table_names() has been known to throw an exception.
//Glom is mostly unusable when it fails, but that's still better than a crash.
//std::cout << G_STRFUNC << ": Before update_meta_store_table_name()\n";
const auto test = m_refGdaConnection->update_meta_store_table_names(m_backend->get_public_schema_name());
const auto test = m_gda_connection->update_meta_store_table_names(m_backend->get_public_schema_name());
if(!test && !m_fake_connection)
{
std::cerr << G_STRFUNC << ": update_meta_store_table_names() failed without an exception.\n";
......
......@@ -339,7 +339,7 @@ private:
Gtk::Dialog* m_dialog_epc_progress; //For progress while generating certificates.
std::shared_ptr<Backend> m_backend;
Glib::RefPtr<Gnome::Gda::Connection> m_refGdaConnection;
Glib::RefPtr<Gnome::Gda::Connection> m_gda_connection;
guint m_sharedconnection_refcount;
bool m_ready_to_connect;
Glib::ustring m_user, m_password, m_database;
......
......@@ -33,7 +33,7 @@ Document::Document()
m_is_new = true;
m_modified = false;
m_read_only = false;
m_pView = nullptr;
m_view = nullptr;
}
Document::~Document()
......@@ -123,8 +123,8 @@ bool Document::load(int& failure_code)
if(bTest)
{
//Tell the View to show the new data:
if(m_pView)
m_pView->load_from_document();
if(m_view)
m_view->load_from_document();
}
}
......@@ -157,8 +157,8 @@ bool Document::load_from_data(const guchar* data, std::size_t length, int& failu
if(bTest)
{
//Tell the View to show the new data:
if(m_pView)
m_pView->load_from_document();
if(m_view)
m_view->load_from_document();
}
set_is_new(false);
......@@ -181,8 +181,8 @@ bool Document::load_after(int& failure_code)
bool Document::save()
{
//Tell the view to update the data in this document.
if(m_pView)
m_pView->save_to_document();
if(m_view)
m_view->save_to_document();
const auto bTest = save_before(); //This could be overridden.
if(bTest)
......@@ -427,12 +427,12 @@ Glib::ustring Document::util_file_uri_get_name(const Glib::ustring& file_uri, co
void Document::set_view(ViewBase* pView)
{
m_pView = pView;
m_view = pView;
}
ViewBase* Document::get_view()
{
return m_pView;
return m_view;
}
bool Document::get_read_only() const
......
......@@ -129,7 +129,7 @@ protected:
Glib::ustring m_file_uri;
Glib::ustring m_file_extension;
ViewBase* m_pView;
ViewBase* m_view;
type_signal_modified signal_modified_;
......
......@@ -25,14 +25,14 @@ namespace GlomBakery
Document_XML::Document_XML()
: m_pDOM_Document(nullptr),
: m_dom_document(nullptr),
m_write_formatted(false)
{
}
Document_XML::~Document_XML()
{
//m_pDOM_Document is owned by m_DOM_Document;
//m_dom_document is owned by m_DOM_Document;
}
bool Document_XML::load_after(int& failure_code)
......@@ -47,14 +47,14 @@ bool Document_XML::load_after(int& failure_code)
try
{
//Link the parser to the XML text that was loaded:
//m_DOM_Parser.setDoValidation(true);
//m_dom_parser.setDoValidation(true);
if(m_strContents.empty())
std::cerr << G_STRFUNC << ": parsing empty document.\n";
m_DOM_Parser.parse_memory(m_strContents);
m_pDOM_Document = m_DOM_Parser.get_document();
if(!m_pDOM_Document) return false;
m_dom_parser.parse_memory(m_strContents);
m_dom_document = m_dom_parser.get_document();
if(!m_dom_document) return false;
return true; //Success.
}
......@@ -98,9 +98,9 @@ void Document_XML::Util_DOM_Write(Glib::ustring& refstrXML) const
try
{
if(m_write_formatted)
refstrXML = m_pDOM_Document->write_to_string_formatted();
refstrXML = m_dom_document->write_to_string_formatted();
else
refstrXML = m_pDOM_Document->write_to_string();
refstrXML = m_dom_document->write_to_string();
}
catch(xmlpp::exception& ex)
{
......@@ -110,23 +110,23 @@ void Document_XML::Util_DOM_Write(Glib::ustring& refstrXML) const
void Document_XML::set_dtd_name(const std::string& strVal)
{
m_strDTD_Name = strVal;
m_dtd_name = strVal;
}
std::string Document_XML::get_dtd_name() const
{
return m_strDTD_Name;
return m_dtd_name;
}
void Document_XML::set_dtd_root_node_name(const Glib::ustring& strVal, const Glib::ustring& xmlns)
{
m_strRootNodeName = strVal;
m_root_node_name = strVal;
m_root_xmlns = xmlns;
}
Glib::ustring Document_XML::get_dtd_root_node_name() const
{
return m_strRootNodeName;
return m_root_node_name;
}
......@@ -138,21 +138,21 @@ const xmlpp::Element* Document_XML::get_node_document() const
xmlpp::Element* Document_XML::get_node_document()
{
if(!m_pDOM_Document)
m_pDOM_Document = m_DOM_Parser.get_document();
if(!m_dom_document)
m_dom_document = m_dom_parser.get_document();
//Make sure that it has the DTD declaration:
//TODO: Put this in a better place, where it's more guaranteed to always be set?
//TODO: Add API to specify the PUBLIC URI, if the document should write this:
//SYSTEM (local) DTDs do not seem very useful.
//- means non-registered, which is commonly used.
//m_pDOM_Document->set_internal_subset(m_strRootNodeName, "-//glom/" + m_strDTD_Name, m_strDTD_Name);
//m_dom_document->set_internal_subset(m_root_node_name, "-//glom/" + m_dtd_name, m_dtd_name);
auto nodeRoot = m_pDOM_Document->get_root_node();
auto nodeRoot = m_dom_document->get_root_node();
if(!nodeRoot)
{
//Add it if it isn't there already:
nodeRoot = m_pDOM_Document->create_root_node(m_strRootNodeName, m_root_xmlns);
nodeRoot = m_dom_document->create_root_node(m_root_node_name, m_root_xmlns);
}
//Make sure that it has the root name name and xmlns:
......
......@@ -70,11 +70,11 @@ protected:
typedef GlomBakery::Document type_base;
//XML Parsing bits:
xmlpp::DomParser m_DOM_Parser; //Could be mutable to allow us to guarantee a root node.
xmlpp::Document* m_pDOM_Document; //1-to-1 with the m_DOM_Parser.
xmlpp::DomParser m_dom_parser; //Could be mutable to allow us to guarantee a root node.
xmlpp::Document* m_dom_document; //1-to-1 with the m_dom_parser.
std::string m_strDTD_Name;
Glib::ustring m_strRootNodeName, m_root_xmlns;
std::string m_dtd_name;
Glib::ustring m_root_node_name, m_root_xmlns;
bool m_write_formatted;
};
......
......@@ -41,7 +41,7 @@ namespace Glom
Box_Data::Box_Data()
: m_Button_Find(_("_Find"), true)
#ifndef GLOM_ENABLE_CLIENT_ONLY
,m_pDialogLayout(nullptr)
,m_dialog_layout(nullptr)
#endif // !GLOM_ENABLE_CLIENT_ONLY
{
m_bUnstoredData = false;
......@@ -53,10 +53,10 @@ Box_Data::Box_Data()
Box_Data::~Box_Data()
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
if(m_pDialogLayout)
if(m_dialog_layout)
{
remove_view(m_pDialogLayout);
delete m_pDialogLayout;
remove_view(m_dialog_layout);
delete m_dialog_layout;
}
#endif // !GLOM_ENABLE_CLIENT_ONLY
}
......@@ -204,15 +204,15 @@ bool Box_Data::confirm_discard_unstored_data() const
#ifndef GLOM_ENABLE_CLIENT_ONLY
void Box_Data::show_layout_dialog()
{
if(!m_pDialogLayout)
if(!m_dialog_layout)
{
m_pDialogLayout = create_layout_dialog();
add_view(m_pDialogLayout); //Give it access to the document.
m_pDialogLayout->signal_hide().connect( sigc::mem_fun(*this, &Box_Data::on_dialog_layout_hide) );
m_dialog_layout = create_layout_dialog();
add_view(m_dialog_layout); //Give it access to the document.
m_dialog_layout->signal_hide().connect( sigc::mem_fun(*this, &Box_Data::on_dialog_layout_hide) );
}
prepare_layout_dialog(m_pDialogLayout);
m_pDialogLayout->show();
prepare_layout_dialog(m_dialog_layout);
m_dialog_layout->show();
}
#endif // !GLOM_ENABLE_CLIENT_ONLY
......
......@@ -129,7 +129,7 @@ protected:
bool m_bUnstoredData;
#ifndef GLOM_ENABLE_CLIENT_ONLY
Dialog_Layout* m_pDialogLayout;
Dialog_Layout* m_dialog_layout;
#endif // !GLOM_ENABLE_CLIENT_ONLY
/// "details" or "list", as specified in the Document's XML.
......
......@@ -316,7 +316,7 @@ Box_Data_Calendar_Related::type_vecConstLayoutFields Box_Data_Calendar_Related::
#ifndef GLOM_ENABLE_CLIENT_ONLY
void Box_Data_Calendar_Related::on_dialog_layout_hide()
{
auto dialog_related = dynamic_cast<Dialog_Layout_Calendar_Related*>(m_pDialogLayout);
auto dialog_related = dynamic_cast<Dialog_Layout_Calendar_Related*>(m_dialog_layout);
g_assert(dialog_related);
const auto portal = dialog_related->get_portal_layout();
set_layout_item(portal, "" /* TODO */);
......@@ -466,27 +466,27 @@ Glib::ustring Box_Data_Calendar_Related::on_calendar_details(guint year, guint m
void Box_Data_Calendar_Related::setup_menu(Gtk::Widget* /* this */)
{
m_refActionGroup = Gio::SimpleActionGroup::create();
m_action_group = Gio::SimpleActionGroup::create();
m_refContextEdit = m_refActionGroup->add_action("edit",
m_context_edit = m_action_group->add_action("edit",
sigc::mem_fun(*this, &Box_Data_Calendar_Related::on_MenuPopup_activate_Edit) );
#ifndef GLOM_ENABLE_CLIENT_ONLY
// Don't add ContextLayout in client only mode because it would never