glom r1803 - in trunk: . glom glom/layout_item_dialogs glom/libglom glom/libglom/connectionpool_backends glom/libglom/data_structure glom/libglom/document glom/libglom/python_embed glom/mode_data glom/mode_design/print_layouts glom/python_embed glom/translation glom/utility_widgets glom/utility_widgets/adddel glom/utility_widgets/calendar glom/utility_widgets/canvas glom/utility_widgets/db_adddel
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1803 - in trunk: . glom glom/layout_item_dialogs glom/libglom glom/libglom/connectionpool_backends glom/libglom/data_structure glom/libglom/document glom/libglom/python_embed glom/mode_data glom/mode_design/print_layouts glom/python_embed glom/translation glom/utility_widgets glom/utility_widgets/adddel glom/utility_widgets/calendar glom/utility_widgets/canvas glom/utility_widgets/db_adddel
- Date: Fri, 12 Dec 2008 23:06:10 +0000 (UTC)
Author: murrayc
Date: Fri Dec 12 23:06:10 2008
New Revision: 1803
URL: http://svn.gnome.org/viewvc/glom?rev=1803&view=rev
Log:
2008-12-12 Murray Cumming <murrayc murrayc com>
* Many files: Remove tabs, and spaces before ( and generally fix some
old Johannes-esque formatting.
Modified:
trunk/ChangeLog
trunk/glom/application.cc
trunk/glom/application.h
trunk/glom/base_db.cc
trunk/glom/combobox_relationship.cc
trunk/glom/dialog_existing_or_new.cc
trunk/glom/frame_glom.cc
trunk/glom/glom_privs.cc
trunk/glom/layout_item_dialogs/dialog_buttonscript.cc
trunk/glom/libglom/connectionpool.cc
trunk/glom/libglom/connectionpool_backends/postgres_central.cc
trunk/glom/libglom/connectionpool_backends/postgres_self.cc
trunk/glom/libglom/connectionpool_backends/sqlite.cc
trunk/glom/libglom/data_structure/field.cc
trunk/glom/libglom/data_structure/fieldtypes.cc
trunk/glom/libglom/data_structure/translatable_item.cc
trunk/glom/libglom/document/document_glom.cc
trunk/glom/libglom/gst-package.c
trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc
trunk/glom/libglom/sharedptr.h
trunk/glom/libglom/utils.cc
trunk/glom/mode_data/box_data_details.cc
trunk/glom/mode_data/flowtablewithfields.cc
trunk/glom/mode_data/flowtablewithfields.h
trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
trunk/glom/mode_design/print_layouts/print_layout_toolbar.cc
trunk/glom/python_embed/glom_python.cc
trunk/glom/test_pyembed.cc
trunk/glom/translation/window_translations.cc
trunk/glom/utility_widgets/adddel/adddel.cc
trunk/glom/utility_widgets/calendar/glomcalendar.h
trunk/glom/utility_widgets/canvas/canvas_item_movable.cc
trunk/glom/utility_widgets/db_adddel/cellrenderer_buttonimage.cc
trunk/glom/utility_widgets/db_adddel/cellrenderer_buttontext.cc
trunk/glom/utility_widgets/db_adddel/db_adddel.cc
trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
trunk/glom/utility_widgets/dialog_flowtable.cc
trunk/glom/utility_widgets/flowtable.cc
trunk/glom/utility_widgets/flowtable.h
trunk/glom/utility_widgets/flowtable_dnd.cc
trunk/glom/utility_widgets/labelglom.cc
trunk/glom/utility_widgets/layouttoolbar.cc
trunk/glom/utility_widgets/layoutwidgetmenu.cc
trunk/glom/utility_widgets/layoutwidgetutils.cc
trunk/glom/utility_widgets/notebooklabelglom.cc
trunk/glom/utility_widgets/placeholder-glom.cc
trunk/glom/utility_widgets/placeholder-glom.h
trunk/glom/utility_widgets/table_columns.cc
Modified: trunk/glom/application.cc
==============================================================================
--- trunk/glom/application.cc (original)
+++ trunk/glom/application.cc Fri Dec 12 23:06:10 2008
@@ -306,7 +306,7 @@
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) );
@@ -614,9 +614,9 @@
//Quick short cut:
if(hostname == "localhost")
return true;
- else if (hostname == "localhost.localdomain")
+ else if(hostname == "localhost.localdomain")
return true;
- else if (hostname == "127.0.0.1") //Standard IP address for localhost.
+ else if(hostname == "127.0.0.1") //Standard IP address for localhost.
return true;
//TODO: Is there some way to compare hostents?
@@ -1057,8 +1057,8 @@
const bool test = recreate_database(user_cancelled);
if(!test)
{
- // TODO: Do we need to call connection_pool->cleanup() here, for
- // stopping self-hosted databases? armin.
+ // TODO: Do we need to call connection_pool->cleanup() here, for
+ // stopping self-hosted databases? armin.
//If the database was not successfully recreated:
if(!user_cancelled)
{
@@ -1128,7 +1128,7 @@
for(type_listActions::iterator iter = m_listDeveloperActions.begin(); iter != m_listDeveloperActions.end(); ++iter)
{
Glib::RefPtr<Gtk::Action> action = *iter;
- action->set_sensitive ( userlevel == AppState::USERLEVEL_DEVELOPER );
+ action->set_sensitive( userlevel == AppState::USERLEVEL_DEVELOPER );
}
// Hide users entry from developer menu for connections that don't
Modified: trunk/glom/application.h
==============================================================================
--- trunk/glom/application.h (original)
+++ trunk/glom/application.h Fri Dec 12 23:06:10 2008
@@ -82,7 +82,7 @@
void set_show_sql_debug(bool val = true);
static App_Glom* get_application();
-
+
protected:
virtual void init_layout(); //override.
virtual void init_menus_file(); //override.
@@ -99,7 +99,7 @@
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/base_db.cc
==============================================================================
--- trunk/glom/base_db.cc (original)
+++ trunk/glom/base_db.cc Fri Dec 12 23:06:10 2008
@@ -2814,7 +2814,7 @@
#else
std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gnome::Gda::DataModel> datamodel = sharedconnection->get_gda_connection()->statement_execute_select(query_count, error);
- if (error)
+ if(error)
{
std::cerr << "count_rows_returned_by(): exception caught: " << ex.what() << std::endl;
return result;
Modified: trunk/glom/combobox_relationship.cc
==============================================================================
--- trunk/glom/combobox_relationship.cc (original)
+++ trunk/glom/combobox_relationship.cc Fri Dec 12 23:06:10 2008
@@ -232,7 +232,7 @@
//related relationship:
sharedptr<Relationship> parent_relationship = (*iterParent)[m_model_columns.m_relationship];
if(relationship)
- m_renderer_title->set_property("text", parent_relationship->get_title_or_name() + "::" + relationship->get_title_or_name());
+ m_renderer_title->set_property("text", parent_relationship->get_title_or_name() + "::" + relationship->get_title_or_name());
}
else
m_renderer_title->set_property("text", relationship->get_title_or_name());
Modified: trunk/glom/dialog_existing_or_new.cc
==============================================================================
--- trunk/glom/dialog_existing_or_new.cc (original)
+++ trunk/glom/dialog_existing_or_new.cc Fri Dec 12 23:06:10 2008
@@ -239,7 +239,7 @@
new_view_selection->set_select_function( sigc::mem_fun(*this, &Dialog_ExistingOrNew::on_new_select_func) );
#else /* GLOM_ENABLE_CLIENT_ONLY */
m_notebook->remove_page(NEW_PAGE);
- m_notebook->set_show_tabs (false);
+ m_notebook->set_show_tabs(false);
#endif /* !GLOM_ENABLE_CLIENT_ONLY */
update_ui_sensitivity();
@@ -621,7 +621,7 @@
try
{
const Glib::ListHandle<Glib::RefPtr<Gio::FileInfo> >& list = m_examples_enumerator->next_files_finish(res);
- if (list.empty())
+ if(list.empty())
{
// Done
m_examples_dir.reset();
Modified: trunk/glom/frame_glom.cc
==============================================================================
--- trunk/glom/frame_glom.cc (original)
+++ trunk/glom/frame_glom.cc Fri Dec 12 23:06:10 2008
@@ -1895,7 +1895,7 @@
#ifdef GLIBMM_EXCEPTIONS_ENABLED
throw ex; //Pass it on for the caller to handle.
#else
- error = local_error; //Pass it on for the caller to handle.
+ error = local_error; //Pass it on for the caller to handle.
#endif
return false;
}
Modified: trunk/glom/glom_privs.cc
==============================================================================
--- trunk/glom/glom_privs.cc (original)
+++ trunk/glom/glom_privs.cc Fri Dec 12 23:06:10 2008
@@ -257,11 +257,11 @@
//See http://www.postgresql.org/docs/8.0/interactive/sql-grant.html
if(perm == "r")
result.m_view = true;
- else if (perm == "w")
+ else if(perm == "w")
result.m_edit = true;
- else if (perm == "a")
+ else if(perm == "a")
result.m_create = true;
- else if (perm == "d")
+ else if(perm == "d")
result.m_delete = true;
}
}
Modified: trunk/glom/layout_item_dialogs/dialog_buttonscript.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_buttonscript.cc (original)
+++ trunk/glom/layout_item_dialogs/dialog_buttonscript.cc Fri Dec 12 23:06:10 2008
@@ -73,8 +73,8 @@
m_table_name = table_name; //Used for lookup combo boxes.
m_text_view->get_buffer()->set_text( script->get_script() );
-
- m_entry_title->set_text (script->get_title());
+
+ m_entry_title->set_text(script->get_title());
//set_blocked(false);
//Dialog_Properties::set_modified(false);
@@ -89,10 +89,10 @@
return result;
}
-void Dialog_ButtonScript::get_script (const sharedptr<LayoutItem_Button>& script) const
+void Dialog_ButtonScript::get_script(const sharedptr<LayoutItem_Button>& script) const
{
- script->set_script (m_text_view->get_buffer()->get_text() );
- script->set_title (m_entry_title->get_text());
+ script->set_script(m_text_view->get_buffer()->get_text() );
+ script->set_title(m_entry_title->get_text());
}
void Dialog_ButtonScript::on_button_test()
Modified: trunk/glom/libglom/connectionpool.cc
==============================================================================
--- trunk/glom/libglom/connectionpool.cc (original)
+++ trunk/glom/libglom/connectionpool.cc Fri Dec 12 23:06:10 2008
@@ -56,13 +56,13 @@
{
DWORD InfoBufferSize;
- if (GetTokenInformation(token, class_, NULL, 0, &InfoBufferSize))
+ if(GetTokenInformation(token, class_, NULL, 0, &InfoBufferSize))
{
snprintf(errbuf, errsize, "could not get token information: got zero size\n");
return FALSE;
}
- if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
+ if(GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
snprintf(errbuf, errsize, "could not get token information: error code %d\n",
(int) GetLastError());
@@ -70,14 +70,14 @@
}
*InfoBuffer = static_cast<char*>(malloc(InfoBufferSize));
- if (*InfoBuffer == NULL)
+ if(*InfoBuffer == NULL)
{
snprintf(errbuf, errsize, "could not allocate %d bytes for token information\n",
(int) InfoBufferSize);
return FALSE;
}
- if (!GetTokenInformation(token, class_, *InfoBuffer,
+ if(!GetTokenInformation(token, class_, *InfoBuffer,
InfoBufferSize, &InfoBufferSize))
{
snprintf(errbuf, errsize, "could not get token information: error code %d\n",
@@ -101,12 +101,12 @@
UINT x;
BOOL success;
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken))
+ if(!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken))
{
throw std::runtime_error(Glib::ustring::compose("Could not open process token: error code %1", (int)GetLastError()));
}
- if (!pgwin32_get_dynamic_tokeninfo(AccessToken, TokenGroups,
+ if(!pgwin32_get_dynamic_tokeninfo(AccessToken, TokenGroups,
&InfoBuffer, errbuf, sizeof(errbuf)))
{
CloseHandle(AccessToken);
@@ -117,7 +117,7 @@
CloseHandle(AccessToken);
- if (!AllocateAndInitializeSid(&NtAuthority, 2,
+ if(!AllocateAndInitializeSid(&NtAuthority, 2,
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0,
0, &AdministratorsSid))
{
@@ -125,7 +125,7 @@
throw std::runtime_error(Glib::ustring::compose("could not get SID for Administrators group: error code %1", (int)GetLastError()));
}
- if (!AllocateAndInitializeSid(&NtAuthority, 2,
+ if(!AllocateAndInitializeSid(&NtAuthority, 2,
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0,
0, &PowerUsersSid))
{
@@ -138,7 +138,7 @@
for (x = 0; x < Groups->GroupCount; x++)
{
- if ((EqualSid(AdministratorsSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)) ||
+ if((EqualSid(AdministratorsSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)) ||
(EqualSid(PowerUsersSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)))
{
success = TRUE;
@@ -505,7 +505,7 @@
for(type_list_errors::iterator iter = list_errors.begin(); iter != list_errors.end(); ++iter)
{
Glib::RefPtr<Gnome::Gda::ConnectionEvent> event = *iter;
- if (event && (event->get_event_type() == Gnome::Gda::CONNECTION_EVENT_ERROR))
+ if(event && (event->get_event_type() == Gnome::Gda::CONNECTION_EVENT_ERROR))
{
if(!error_details.empty())
error_details += "\n"; //Add newline after each error.
Modified: trunk/glom/libglom/connectionpool_backends/postgres_central.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/postgres_central.cc (original)
+++ trunk/glom/libglom/connectionpool_backends/postgres_central.cc Fri Dec 12 23:06:10 2008
@@ -144,9 +144,10 @@
connection = Gnome::Gda::Connection::open_from_string("PostgreSQL", cnc_string, auth_string, Gnome::Gda::CONNECTION_OPTIONS_NONE, error);
Glib::RefPtr<Gnome::Gda::SqlParser> parser = connection->create_parser();
- if (!error)
+ if(!error)
connection->statement_execute_non_select("SET DATESTYLE = 'ISO'", error);
- if (!error)
+
+ if(!error)
data_model = connection->statement_execute_select("SELECT version()", error);
if(glib_error.get())
@@ -287,10 +288,11 @@
#else
cnc = Gnome::Gda::Connection::open_from_string("PostgreSQL", cnc_string, auth_string,
Gnome::Gda::CONNECTION_OPTIONS_NONE, error);
- if (error)
+ if(error)
return false;
+
op = cnc->create_operation(Gnome::Gda::SERVER_OPERATION_CREATE_DB, set, error);
- if (error)
+ if(error)
return false;
#endif
g_assert(op);
@@ -341,7 +343,7 @@
for(type_list_of_provider_info::const_iterator iter = providers.begin(); iter != providers.end(); ++iter)
{
const Gnome::Gda::ProviderInfo& info = *iter;
- if (info.get_id() == "PostgreSQL")
+ if(info.get_id() == "PostgreSQL")
return true;
}
}
Modified: trunk/glom/libglom/connectionpool_backends/postgres_self.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/postgres_self.cc (original)
+++ trunk/glom/libglom/connectionpool_backends/postgres_self.cc Fri Dec 12 23:06:10 2008
@@ -501,10 +501,11 @@
#else
cnc = Gnome::Gda::Connection::open_from_string("PostgreSQL", cnc_string, auth_string,
Gnome::Gda::CONNECTION_OPTIONS_NONE, error);
- if (error)
+ if(error)
return false;
+
op = cnc->create_operation(Gnome::Gda::SERVER_OPERATION_CREATE_DB, set, error);
- if (error)
+ if(error)
return false;
#endif
g_assert(op);
@@ -569,7 +570,7 @@
bool available = false;
if(result == 0)
available = true;
- else if (result < 0)
+ else if(result < 0)
{
#ifdef G_OS_WIN32
available = (WSAGetLastError() != WSAEADDRINUSE);
Modified: trunk/glom/libglom/connectionpool_backends/sqlite.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/sqlite.cc (original)
+++ trunk/glom/libglom/connectionpool_backends/sqlite.cc Fri Dec 12 23:06:10 2008
@@ -112,7 +112,7 @@
#else
Glib::RefPtr<Gnome::Gda::Connection> cnc =
Gnome::Gda::Connection::open_from_string("SQLite", cnc_string, "", Gnome::Gda::CONNECTION_OPTIONS_NONE, error);
- if (error.get() != 0)
+ if(error.get() != 0)
return false
#endif
Modified: trunk/glom/libglom/data_structure/field.cc
==============================================================================
--- trunk/glom/libglom/data_structure/field.cc (original)
+++ trunk/glom/libglom/data_structure/field.cc Fri Dec 12 23:06:10 2008
@@ -198,7 +198,7 @@
//and to use until we can use the latest libgda, which has an equivalent.
//TODO: Now that we use libgda-3.0, actually use that equivalent.
-#define SQL_STR_DOUBLE(ch) ((ch) == '\'' || (ch) == '\\')
+#define SQL_STR_DOUBLE(ch) ((ch) == '\'' || (ch) == '\\')
/*
* Escaping arbitrary strings to get valid SQL literal strings.
@@ -224,8 +224,9 @@
while (remaining > 0 && *source != '\0')
{
- if (SQL_STR_DOUBLE(*source))
+ if(SQL_STR_DOUBLE(*source))
*target++ = *source;
+
*target++ = *source++;
remaining--;
}
Modified: trunk/glom/libglom/data_structure/fieldtypes.cc
==============================================================================
--- trunk/glom/libglom/data_structure/fieldtypes.cc (original)
+++ trunk/glom/libglom/data_structure/fieldtypes.cc Fri Dec 12 23:06:10 2008
@@ -49,13 +49,14 @@
data_model_tables = gda_connection->get_meta_store_data(Gnome::Gda::CONNECTION_META_TYPES);
#else
std::auto_ptr<Glib::Error> error;
- if (gda_connection->update_meta_store(error))
+ if(gda_connection->update_meta_store(error))
data_model_tables = gda_connection->get_meta_store_data(Gnome::Gda::CONNECTION_META_TYPES, error);
+
// Ignore error here, we do not process data_model_tables if it is NULL
// anyway
#endif // GLIBMM_EXCEPTIONS_ENABLED
- if (!data_model_tables)
+ if(!data_model_tables)
std::cerr << "FieldTypes::FieldTypes(): Couldn't get datamodel" << std::endl;
if(data_model_tables && (data_model_tables->get_n_columns() == 0))
@@ -65,8 +66,9 @@
else if(data_model_tables)
{
int rows = data_model_tables->get_n_rows();
- if (!rows)
- g_message ("FieldTypes::FieldTypes(): no rows from CONNECTION_META_TYPES");
+ if(!rows)
+ std::cerr << "FieldTypes::FieldTypes(): no rows from CONNECTION_META_TYPES" << std::endl;
+
for(int i = 0; i < rows; ++i)
{
const Gnome::Gda::Value value_name = data_model_tables->get_value_at(DATAMODEL_FIELDS_COL_NAME, i);
Modified: trunk/glom/libglom/data_structure/translatable_item.cc
==============================================================================
--- trunk/glom/libglom/data_structure/translatable_item.cc (original)
+++ trunk/glom/libglom/data_structure/translatable_item.cc Fri Dec 12 23:06:10 2008
@@ -264,7 +264,7 @@
return "Table";
else if(item_type == TRANSLATABLE_TYPE_LAYOUT_ITEM)
return "Layout Group";
- else if (item_type == TRANSLATABLE_TYPE_CUSTOM_TITLE)
+ else if(item_type == TRANSLATABLE_TYPE_CUSTOM_TITLE)
return "Field Title";
else if(item_type == TRANSLATABLE_TYPE_BUTTON)
return "Button";
@@ -294,7 +294,7 @@
return _("Table");
else if(item_type == TRANSLATABLE_TYPE_LAYOUT_ITEM)
return _("Layout Group");
- else if (item_type == TRANSLATABLE_TYPE_CUSTOM_TITLE)
+ else if(item_type == TRANSLATABLE_TYPE_CUSTOM_TITLE)
return _("Field Title");
else if(item_type == TRANSLATABLE_TYPE_BUTTON)
return _("Button");
Modified: trunk/glom/libglom/document/document_glom.cc
==============================================================================
--- trunk/glom/libglom/document/document_glom.cc (original)
+++ trunk/glom/libglom/document/document_glom.cc Fri Dec 12 23:06:10 2008
@@ -1261,7 +1261,7 @@
type_tables::const_iterator it = m_tables.find(table_name);
if(it != m_tables.end())
{
- if ( it->second.m_overviewx == std::numeric_limits<float>::infinity() ||
+ if( it->second.m_overviewx == std::numeric_limits<float>::infinity() ||
it->second.m_overviewy == std::numeric_limits<float>::infinity() )
{
return false;
@@ -1772,7 +1772,7 @@
return;
}
- if (get_userlevel() != AppState::USERLEVEL_DEVELOPER)
+ if(get_userlevel() != AppState::USERLEVEL_DEVELOPER)
{
//Some things can be legitimately changed by the user,
//such as field information from the server,
@@ -2449,7 +2449,7 @@
} //Fields
// Load Example Rows after fields have been loaded, because they
- // need the fields to be able to associate a value to a named field.
+ // need the fields to be able to associate a value to a named field.
const xmlpp::Element* nodeExampleRows = get_node_child_named(nodeTable, GLOM_NODE_EXAMPLE_ROWS);
if(nodeExampleRows)
{
@@ -2472,14 +2472,15 @@
const xmlpp::Attribute* column_name = nodeChild->get_attribute(GLOM_ATTRIBUTE_COLUMN);
if(column_name)
{
- // TODO_Performance: If it's too much rows we could
+ // TODO_Performance: If it's too many rows we could
// consider a map to find the column more quickly.
for(unsigned int i = 0; i < doctableinfo.m_fields.size(); ++ i)
{
if(doctableinfo.m_fields[i]->get_name() == column_name->get_value())
{
- if(nodeChild->has_child_text())
+ if(nodeChild->has_child_text())
field_values[i] = nodeChild->get_child_text()->get_content();
+
break;
}
}
@@ -3208,27 +3209,28 @@
set_node_attribute_value_as_float(nodeTable, GLOM_ATTRIBUTE_OVERVIEW_Y, doctableinfo.m_overviewy);
if(m_is_example) //The example data is useless to non-example files (and is big):
- {
- xmlpp::Element* nodeExampleRows = nodeTable->add_child(GLOM_NODE_EXAMPLE_ROWS);
+ {
+ xmlpp::Element* nodeExampleRows = nodeTable->add_child(GLOM_NODE_EXAMPLE_ROWS);
//set_child_text_node(nodeTable, GLOM_NODE_EXAMPLE_ROWS, doctableinfo.m_example_rows);
- //TODO: This is merely copied from Base_DB::insert_example_data(). Instead, we should probably save the example rows in a more intelligent manner, like a list of vector of strings instead of just one big string.
+
+ //TODO: This is merely copied from Base_DB::insert_example_data(). Instead, we should probably save the example rows in a more intelligent manner, like a list of vector of strings instead of just one big string.
typedef std::vector<Glib::ustring> type_vecStrings; // TODO: Put this into class declaration?
- const type_vecStrings vec_rows = Utils::string_separate(doctableinfo.m_example_rows, "\n", false);
- for(type_vecStrings::const_iterator iter = vec_rows.begin(); iter != vec_rows.end(); ++iter)
- {
- xmlpp::Element* nodeExampleRow = nodeExampleRows->add_child(GLOM_NODE_EXAMPLE_ROW);
- const Glib::ustring& row_data = *iter;
- if(!row_data.empty())
- {
- const type_vecStrings vec_values = Utils::string_separate(row_data, ",", true /* ignore , inside quotes */);
- for(unsigned int i = 0; i < vec_values.size(); ++i)
- {
- xmlpp::Element* nodeField = nodeExampleRow->add_child(GLOM_NODE_VALUE);
- set_node_attribute_value(nodeField, GLOM_ATTRIBUTE_COLUMN, doctableinfo.m_fields[i]->get_name());
- nodeField->add_child_text(vec_values[i]);
- } // for each value
- } // !row_data.empty
- } // for each row
+ const type_vecStrings vec_rows = Utils::string_separate(doctableinfo.m_example_rows, "\n", false);
+ for(type_vecStrings::const_iterator iter = vec_rows.begin(); iter != vec_rows.end(); ++iter)
+ {
+ xmlpp::Element* nodeExampleRow = nodeExampleRows->add_child(GLOM_NODE_EXAMPLE_ROW);
+ const Glib::ustring& row_data = *iter;
+ if(!row_data.empty())
+ {
+ const type_vecStrings vec_values = Utils::string_separate(row_data, ",", true /* ignore , inside quotes */);
+ for(unsigned int i = 0; i < vec_values.size(); ++i)
+ {
+ xmlpp::Element* nodeField = nodeExampleRow->add_child(GLOM_NODE_VALUE);
+ set_node_attribute_value(nodeField, GLOM_ATTRIBUTE_COLUMN, doctableinfo.m_fields[i]->get_name());
+ nodeField->add_child_text(vec_values[i]);
+ } // for each value
+ } // !row_data.empty
+ } // for each row
} // m_is_example
//else
//TODO: doctableinfo.m_example_rows.clear(); //Make sure we are not keeping this in memory unnecessarily.
Modified: trunk/glom/libglom/gst-package.c
==============================================================================
--- trunk/glom/libglom/gst-package.c (original)
+++ trunk/glom/libglom/gst-package.c Fri Dec 12 23:06:10 2008
@@ -68,7 +68,7 @@
path = g_find_program_in_path (app);
- if (!path)
+ if(!path)
{
show_error_dialog (window,
_("The necessary applications to install"
Modified: trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc
==============================================================================
--- trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc (original)
+++ trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc Fri Dec 12 23:06:10 2008
@@ -288,7 +288,7 @@
static type_pch kwlist[] = { "field_name", 0 };
PyObject* py_field_name = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char*)"O:RelatedRecord.sum", (char**)kwlist, &py_field_name))
+ if(!PyArg_ParseTupleAndKeywords(args, kwargs, (char*)"O:RelatedRecord.sum", (char**)kwlist, &py_field_name))
return NULL;
if(!(PyString_Check(py_field_name)))
@@ -334,10 +334,11 @@
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gnome::Gda::DataModel> datamodel = gda_connection->statement_execute_select(sql_query);
#else
- std::auto_ptr<Glib::Error> error;
+ std::auto_ptr<Glib::Error> error;
Glib::RefPtr<Gnome::Gda::DataModel> datamodel = gda_connection->execute_select_command(sql_query, error);
- // Ignore error, the case that the command execution didn't return
- // a datamodel is handled below.
+
+ // Ignore the error: The case that the command execution didn't return
+ // a datamodel is handled below.
#endif
if(datamodel && datamodel->get_n_rows())
{
Modified: trunk/glom/libglom/sharedptr.h
==============================================================================
--- trunk/glom/libglom/sharedptr.h (original)
+++ trunk/glom/libglom/sharedptr.h Fri Dec 12 23:06:10 2008
@@ -102,7 +102,7 @@
*
* Mimics usage of ordinary pointers:
* @code
- * if (ptr)
+ * if(ptr)
* do_something();
* @endcode
*/
@@ -112,7 +112,7 @@
*
* Mimics usage of ordinary pointers:
* @code
- * if (!ptr)
+ * if(!ptr)
* do_something();
* @endcode
*/
Modified: trunk/glom/libglom/utils.cc
==============================================================================
--- trunk/glom/libglom/utils.cc (original)
+++ trunk/glom/libglom/utils.cc Fri Dec 12 23:06:10 2008
@@ -73,7 +73,7 @@
/* This has to be a valid language AND a language with
* no encoding postfix. The language will come up without
* encoding next. */
- if (lang == NULL || strchr(lang, '.') != NULL)
+ if(lang == NULL || strchr(lang, '.') != NULL)
continue;
const char* exts[] = { "", ".xml", ".docbook", ".sgml", ".html", NULL };
@@ -843,7 +843,7 @@
#ifndef GLOM_ENABLE_MAEMO
GError* err = 0;
const gchar* pId;
- if (id.length())
+ if(id.length())
{
pId = id.c_str();
}
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 Fri Dec 12 23:06:10 2008
@@ -615,7 +615,7 @@
//Store it in the document:
Document_Glom* document = get_document();
if(document)
- document->set_modified (true);
+ document->set_modified();
//And fill it with data:
@@ -871,8 +871,8 @@
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_design_mode = ( user_level == AppState::USERLEVEL_DEVELOPER );
m_FlowTable.set_design_mode(m_design_mode);
- // Recreate layout to correctly set the size of empty flowtables
- create_layout();
+ // Recreate the layout to correctly set the size of empty flowtables:
+ create_layout();
#endif
}
Modified: trunk/glom/mode_data/flowtablewithfields.cc
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.cc (original)
+++ trunk/glom/mode_data/flowtablewithfields.cc Fri Dec 12 23:06:10 2008
@@ -345,7 +345,7 @@
NotebookGlom* notebook_widget = Gtk::manage(new NotebookGlom());
notebook_widget->show();
- notebook_widget->set_layout_item (notebook, m_table_name);
+ notebook_widget->set_layout_item(notebook, m_table_name);
for(LayoutGroup::type_list_items::iterator iter = notebook->m_list_items.begin(); iter != notebook->m_list_items.end(); ++iter)
{
@@ -434,12 +434,12 @@
}
add_layoutwidgetbase(notebook_widget, add_before);
- //add_view(button); //So it can get the document.
- Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
- insert_before (*notebook_widget, *widget, true /* expand */);
- else
- add(*notebook_widget, true /* expand */);
+ //add_view(button); //So it can get the document.
+ Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
+ if(widget)
+ insert_before (*notebook_widget, *widget, true /* expand */);
+ else
+ add(*notebook_widget, true /* expand */);
}
/*
@@ -540,16 +540,16 @@
}
Gtk::EventBox* eventbox = new Gtk::EventBox();
- eventbox->add (*info.m_first);
- eventbox->set_visible_window (false);
- eventbox->set_events (Gdk::ALL_EVENTS_MASK);
+ eventbox->add(*info.m_first);
+ eventbox->set_visible_window(false);
+ eventbox->set_events(Gdk::ALL_EVENTS_MASK);
eventbox->show_all();
- Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
- insert_before (*eventbox, *(info.m_second), *widget, expand_second);
- else
- add(*eventbox, *(info.m_second), expand_second);
+ Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
+ if(widget)
+ insert_before(*eventbox, *(info.m_second), *widget, expand_second);
+ else
+ add(*eventbox, *(info.m_second), expand_second);
info.m_second->signal_edited().connect( sigc::bind(sigc::mem_fun(*this, &FlowTableWithFields::on_entry_edited), layoutitem_field) ); //TODO: Is it a good idea to bind the LayoutItem? sigc::bind() probably stores a copy at this point.
@@ -569,7 +569,7 @@
//Add the widget
ButtonGlom* button = Gtk::manage(new ButtonGlom());
button->set_label(layoutitem_button->get_title_or_name());
- button->set_layout_item (layoutitem_button, table_name);
+ button->set_layout_item(layoutitem_button, table_name);
button->signal_clicked().connect(
sigc::bind(
sigc::mem_fun(*this, &FlowTableWithFields::on_script_button_clicked),
@@ -580,11 +580,11 @@
add_layoutwidgetbase(button, add_before);
//add_view(button); //So it can get the document.
- Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
- insert_before (*button, *widget, false /* expand */);
- else
- add(*button, false /* expand */);
+ Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
+ if(widget)
+ insert_before (*button, *widget, false /* expand */);
+ else
+ add(*button, false /* expand */);
}
void FlowTableWithFields::add_textobject_at_position(const sharedptr<LayoutItem_Text>& layoutitem_text, const Glib::ustring& table_name , const type_list_layoutwidgets::iterator& add_before)
@@ -596,7 +596,7 @@
const Glib::ustring text = layoutitem_text->get_text();
LabelGlom* label = Gtk::manage(new LabelGlom(text, 0.0 /* xalign */, 0.5 /* yalign */)); //The alignment here seems to be necessary as well (or instead of) the parent Gtk::Alignment.
- label->set_layout_item (layoutitem_text, table_name);
+ label->set_layout_item(layoutitem_text, table_name);
label->show();
alignment_label->add(*label);
@@ -606,13 +606,13 @@
const Glib::ustring title = layoutitem_text->get_title();
if(title.empty())
- {
- Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
- insert_before (*alignment_label, *widget, false /* expand */);
- else
- add(*alignment_label, false /* expand */);
- }
+ {
+ Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
+ if(widget)
+ insert_before(*alignment_label, *widget, false /* expand */);
+ else
+ add(*alignment_label, false /* expand */);
+ }
else
{
Gtk::Alignment* alignment_title = Gtk::manage(new Gtk::Alignment());
@@ -620,16 +620,16 @@
alignment_title->show();
LabelGlom* title_label = Gtk::manage(new LabelGlom(title, 0, 0, false));
- title_label->set_layout_item (layoutitem_text, table_name);
+ title_label->set_layout_item(layoutitem_text, table_name);
title_label->show();
alignment_title->add(*title_label);
- add_layoutwidgetbase (title_label, add_before);
+ add_layoutwidgetbase(title_label, add_before);
- Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
- insert_before (*alignment_title, *alignment_label, *widget, false /* expand */);
- else
- add(*alignment_title, *alignment_label, false /* expand */);
+ Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
+ if(widget)
+ insert_before (*alignment_title, *alignment_label, *widget, false /* expand */);
+ else
+ add(*alignment_title, *alignment_label, false /* expand */);
}
}
@@ -646,15 +646,15 @@
m_placeholder = Gtk::manage(new Gtk::Alignment());
m_placeholder->set(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
m_placeholder->show();
-
+
PlaceholderGlom* preview = Gtk::manage (new PlaceholderGlom);
preview->show();
-
+
m_placeholder->add(*preview);
m_list_layoutwidgets.insert(add_before, preview);
Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
+ if(widget)
insert_before(*m_placeholder, *widget, false /* expand */);
else
add(*m_placeholder, false);
@@ -667,7 +667,7 @@
image->set_size_request(200, 200);
image->set_value(layoutitem_image->get_image());
image->set_read_only(); //Only field images can be changed by the user when they are on a layout.
- image->set_layout_item (layoutitem_image, table_name);
+ image->set_layout_item(layoutitem_image, table_name);
image->show();
add_layoutwidgetbase(image, add_before);
@@ -675,36 +675,36 @@
const Glib::ustring title = layoutitem_image->get_title();
if(title.empty())
- {
- Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
- insert_before (*image, *widget, true /* expand */);
- else
- add(*image, true /* expand */);
- }
+ {
+ Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
+ if(widget)
+ insert_before(*image, *widget, true /* expand */);
+ else
+ add(*image, true /* expand */);
+ }
else
{
Gtk::Alignment* alignment_title = Gtk::manage(new Gtk::Alignment());
alignment_title->set(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
alignment_title->show();
- Gtk::Label* title_label = Gtk::manage(new Gtk::Label(title));
- title_label->show();
- alignment_title->add(*title_label);
- Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
- if (widget)
- insert_before (*alignment_title, *image, *widget, true /* expand */);
- else
- add(*alignment_title, *image, true /* expand */);
- }
+ Gtk::Label* title_label = Gtk::manage(new Gtk::Label(title));
+ title_label->show();
+ alignment_title->add(*title_label);
+ Gtk::Widget* widget = dynamic_cast<Gtk::Widget*>(*add_before);
+ if(widget)
+ insert_before(*alignment_title, *image, *widget, true /* expand */);
+ else
+ add(*alignment_title, *image, true /* expand */);
+ }
}
void FlowTableWithFields::get_layout_groups(Document_Glom::type_list_layout_groups& groups)
{
sharedptr<LayoutGroup> group(get_layout_group());
- if (group)
+ if(group)
{
- groups.push_back (group);
+ groups.push_back(group);
}
}
@@ -1209,7 +1209,7 @@
// Add a group to the notebook
sharedptr<LayoutGroup> group(new LayoutGroup ());
group->set_title(_("New Group"));
- group->set_name (_("Group"));
+ group->set_name(_("Group"));
notebook->m_list_items.push_back(group);
dnd_add_to_layout_group (item, above);
@@ -1222,10 +1222,10 @@
{
sharedptr<LayoutItem_Portal> portal = get_portal_relationship();
- if (portal)
+ if(portal)
{
sharedptr<LayoutItem> item = sharedptr<LayoutItem>::cast_dynamic(portal);
- dnd_add_to_layout_group (item, above);
+ dnd_add_to_layout_group(item, above);
//Tell the parent to tell the document to save the layout
signal_layout_changed().emit();
@@ -1236,7 +1236,7 @@
{
sharedptr<LayoutGroup> group(new LayoutGroup());
group->set_title(_("New Group"));
- group->set_name (_("Group"));
+ group->set_name(_("Group"));
sharedptr<LayoutItem> item = sharedptr<LayoutItem>::cast_dynamic(group);
dnd_add_to_layout_group (item, above);
@@ -1250,10 +1250,10 @@
// create the button
sharedptr<LayoutItem_Button> layout_item_button = sharedptr<LayoutItem_Button>::create();
layout_item_button->set_title(_("New Button")); //Give the button a default title, so it is big enough, and so people see that they should change it.
- layout_item_button->set_name ("new_button");
+ layout_item_button->set_name("new_button");
sharedptr<LayoutItem> layout_item = sharedptr<LayoutItem>::cast_dynamic(layout_item_button);
- dnd_add_to_layout_group (layout_item, above);
+ dnd_add_to_layout_group(layout_item, above);
//Tell the parent to tell the document to save the layout:
signal_layout_changed().emit();
}
@@ -1325,12 +1325,14 @@
{
sharedptr<LayoutItem_Placeholder> placeholder =
sharedptr<LayoutItem_Placeholder>::cast_dynamic(*item);
- if (placeholder)
+
+ if(placeholder)
{
- layout_group->remove_item (*item);
+ layout_group->remove_item(*item);
}
}
}
+
remove(*m_placeholder);
}
@@ -1353,15 +1355,17 @@
sharedptr<LayoutGroup> layout_group = get_layout_group();
if(!layout_group)
{
- if (!ignore_error)
+ if(!ignore_error)
dnd_notify_failed_drop();
+
return false;
}
- if (layoutwidget && layoutwidget->get_layout_item())
+ if(layoutwidget && layoutwidget->get_layout_item())
layout_group->add_item(item, layoutwidget->get_layout_item());
else
layout_group->add_item(item);
+
return true;
}
@@ -1418,13 +1422,14 @@
{
dialog->set_flowtable(this);
const int response = dialog->run();
- if (response == Gtk::RESPONSE_OK)
+ if(response == Gtk::RESPONSE_OK)
{
sharedptr<LayoutGroup> group = get_layout_group();
group->m_columns_count = dialog->get_columns_count();
group->set_title(dialog->get_title());
signal_layout_changed().emit();
}
+
delete dialog;
}
}
@@ -1437,18 +1442,21 @@
void FlowTableWithFields::on_menu_delete_activate()
{
Glib::ustring message;
- if (!get_layout_item()->get_title().empty())
+ if(!get_layout_item()->get_title().empty())
{
- message = Glib::ustring::compose (_("Delete whole group \"%1\"?"),
+ //TODO: Use a real English sentence here?
+ message = Glib::ustring::compose(_("Delete whole group \"%1\"?"),
get_layout_item()->get_title());
}
else
{
+ //TODO: Use a real English sentence here:
message = _("Delete whole group?");
}
- Gtk::MessageDialog dlg (message, false, Gtk::MESSAGE_QUESTION,
- Gtk::BUTTONS_YES_NO, true);
- switch (dlg.run())
+
+ Gtk::MessageDialog dlg(message, false, Gtk::MESSAGE_QUESTION,
+ Gtk::BUTTONS_YES_NO, true);
+ switch(dlg.run())
{
case Gtk::RESPONSE_YES:
LayoutWidgetUtils::on_menu_delete_activate();
Modified: trunk/glom/mode_data/flowtablewithfields.h
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.h (original)
+++ trunk/glom/mode_data/flowtablewithfields.h Fri Dec 12 23:06:10 2008
@@ -80,7 +80,7 @@
virtual void add_layout_item(const sharedptr<LayoutItem>& item);
virtual void add_layout_group(const sharedptr<LayoutGroup>& group);
-
+
virtual void set_field_editable(const sharedptr<const LayoutItem_Field>& field, bool editable = true);
virtual Gnome::Gda::Value get_field_value(const sharedptr<const LayoutItem_Field>& field) const;
Modified: trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/canvas_print_layout.cc (original)
+++ trunk/glom/mode_design/print_layouts/canvas_print_layout.cc Fri Dec 12 23:06:10 2008
@@ -751,7 +751,7 @@
}
else //text, numbers, date, time, boolean:
{
- Glib::RefPtr<CanvasTextMovable> canvas_text = Glib::RefPtr<CanvasTextMovable>::cast_dynamic(canvas_item);
+ Glib::RefPtr<CanvasTextMovable> canvas_text = Glib::RefPtr<CanvasTextMovable>::cast_dynamic(canvas_item);
if(!canvas_text)
{
std::cerr << "Canvas_PrintLayout::set_canvas_item_field_value(): The canvas item is not of the expected type. Instead it is of type." << std::endl;
Modified: trunk/glom/mode_design/print_layouts/print_layout_toolbar.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/print_layout_toolbar.cc (original)
+++ trunk/glom/mode_design/print_layouts/print_layout_toolbar.cc Fri Dec 12 23:06:10 2008
@@ -74,7 +74,7 @@
add_group(EGG_TOOL_ITEM_GROUP(items_group));
add_group(EGG_TOOL_ITEM_GROUP(lines_group));
add_group(EGG_TOOL_ITEM_GROUP(related_group));
-
+
set_drag_source();
show_all_children();
Modified: trunk/glom/python_embed/glom_python.cc
==============================================================================
--- trunk/glom/python_embed/glom_python.cc (original)
+++ trunk/glom/python_embed/glom_python.cc Fri Dec 12 23:06:10 2008
@@ -45,7 +45,7 @@
std::list<Glib::ustring> result;
Glib::ustring str = msg;
bool nocount = false;
- if (maxParts == -1)
+ if(maxParts == -1)
nocount = true;
int count = 0;
@@ -82,14 +82,14 @@
PyErr_Fetch(&type, &value, &traceback);
- if (!traceback)
+ if(!traceback)
{
std::cerr << "traceback = 0" << std::endl;
}
PyObject *tracebackModule = PyImport_ImportModule((char*)"traceback");
gchar* chrRetval = 0;
- if (tracebackModule != NULL)
+ if(tracebackModule != NULL)
{
PyObject* tbList = PyObject_CallMethod(
tracebackModule,
@@ -99,7 +99,7 @@
value == NULL ? Py_None : value,
traceback == NULL ? Py_None : traceback);
- if (!tbList)
+ if(!tbList)
{
std::cerr << "format_exception failed" << std::endl;
return;
@@ -108,7 +108,7 @@
PyObject* emptyString = PyString_FromString("");
PyObject* strRetval = PyObject_CallMethod(emptyString, (char*)"join",
(char*)"O", tbList);
- if (strRetval)
+ if(strRetval)
chrRetval = g_strdup(PyString_AsString(strRetval));
Py_DECREF(tbList);
@@ -126,7 +126,7 @@
Py_XDECREF(value);
Py_XDECREF(traceback);
- if (chrRetval)
+ if(chrRetval)
{
Glib::ustring message = _("Python Error: \n");
message += chrRetval;
@@ -177,7 +177,7 @@
//Allow the function to import from our script library:
- if (pDocument)
+ if(pDocument)
{
const std::vector<Glib::ustring> module_names = pDocument->get_library_module_names();
for(std::vector<Glib::ustring>::const_iterator iter = module_names.begin(); iter != module_names.end(); ++iter)
@@ -300,16 +300,16 @@
const int test = pygda_value_from_pyobject(&value, pyResult);
if(test == 0) //-1 means error.
- object_is_gda_value = true;
+ object_is_gda_value = true;
if(object_is_gda_value && G_IS_VALUE(&value))
{
- valueResult = Gnome::Gda::Value(&value);
+ valueResult = Gnome::Gda::Value(&value);
//Make sure that the value is of the expected Gda type:
//TODO_Performance:
valueResult = Glom::Conversions::convert_value(valueResult, result_type);
//std::cout << "DEBUG: glom_evaluate_python_function_implementation(): valueResult Gda type=" << g_type_name(valueResult.get_value_type()) << std::endl;
- g_value_unset(&value);
+ g_value_unset(&value);
}
else
{
Modified: trunk/glom/test_pyembed.cc
==============================================================================
--- trunk/glom/test_pyembed.cc (original)
+++ trunk/glom/test_pyembed.cc Fri Dec 12 23:06:10 2008
@@ -7,9 +7,9 @@
std::list<Glib::ustring> ustring_tokenize(const Glib::ustring& msg, const Glib::ustring& separators, int maxParts)
{
std::list<Glib::ustring> result;
- Glib::ustring str=msg;
+ Glib::ustring str = msg;
bool nocount = false;
- if (maxParts == -1)
+ if(maxParts == -1)
nocount = true;
int count = 0;
Modified: trunk/glom/translation/window_translations.cc
==============================================================================
--- trunk/glom/translation/window_translations.cc (original)
+++ trunk/glom/translation/window_translations.cc Fri Dec 12 23:06:10 2008
@@ -416,11 +416,11 @@
static void show_gettext_error(int severity, const char* filename, const gchar* message)
{
std::ostringstream msg_stream;
- if (filename != NULL);
+ if(filename != NULL);
msg_stream << filename << ": ";
- if (message != NULL)
+ if(message != NULL)
msg_stream << message;
- switch (severity)
+ switch(severity)
{
#ifdef PO_SEVERITY_WARNING //This was introduced in libgettext-po some time after gettext version 0.14.5
case PO_SEVERITY_WARNING:
@@ -457,25 +457,25 @@
*/
#ifdef HAVE_GETTEXTPO_XERROR
static void on_gettextpo_xerror (int severity, po_message_t message, const char *filename, size_t lineno, size_t column,
- int multiline_p, const char *message_text)
+ int multiline_p, const char *message_text)
{
show_gettext_error(severity, filename, message_text);
#ifdef PO_SEVERITY_FATAL_ERROR //This was introduced in libgettext-po some time after gettext version 0.14.5
- if (severity == PO_SEVERITY_FATAL_ERROR)
+ if(severity == PO_SEVERITY_FATAL_ERROR)
longjmp(jump, 1);
#endif //PO_SEVERITY_FATAL_ERROR
}
static void on_gettextpo_xerror2 (int severity, po_message_t message1, const char *filename1, size_t lineno1, size_t column1,
- int multiline_p1, const char *message_text1,
- po_message_t message2, const char *filename2, size_t lineno2, size_t column2,
- int multiline_p2, const char *message_text2)
+ int multiline_p1, const char *message_text1,
+ po_message_t message2, const char *filename2, size_t lineno2, size_t column2,
+ int multiline_p2, const char *message_text2)
{
show_gettext_error(severity, filename1, message_text1);
#ifdef PO_SEVERITY_FATAL_ERROR //This was introduced in libgettext-po some time after gettext version 0.14.5
- if (severity == PO_SEVERITY_FATAL_ERROR)
+ if(severity == PO_SEVERITY_FATAL_ERROR)
longjmp(jump, 1);
#endif //PO_SEVERITY_FATAL_ERROR
}
@@ -495,7 +495,7 @@
void Window_Translations::on_button_export()
{
- if (setjmp(jump) != 0)
+ if(setjmp(jump) != 0)
return;
//Show the file-chooser dialog, to select an output .po file:
@@ -573,7 +573,7 @@
void Window_Translations::on_button_import()
{
- if (setjmp(jump) != 0)
+ if(setjmp(jump) != 0)
return;
Gtk::FileChooserDialog file_dlg(_("Choose .po File Name"), Gtk::FILE_CHOOSER_ACTION_OPEN);
@@ -590,7 +590,7 @@
file_dlg.add_button(_("Import"), Gtk::RESPONSE_OK);
int result = file_dlg.run();
- if (result == Gtk::RESPONSE_OK)
+ if(result == Gtk::RESPONSE_OK)
{
// We cannot use an uri here:
const std::string filename = file_dlg.get_filename();
@@ -609,7 +609,7 @@
#endif //HAVE_GETTEXTPO_XERROR
po_file_t po_file = po_file_read(filename.c_str(), &error_handler);
- if (!po_file)
+ if(!po_file)
{
// error message is already given by error_handle.
return;
Modified: trunk/glom/utility_widgets/adddel/adddel.cc
==============================================================================
--- trunk/glom/utility_widgets/adddel/adddel.cc (original)
+++ trunk/glom/utility_widgets/adddel/adddel.cc Fri Dec 12 23:06:10 2008
@@ -753,7 +753,7 @@
delete pModelColumnDerived;
break;
}
- case(AddDelColumnInfo::STYLE_Numerical):
+ case(AddDelColumnInfo::STYLE_Numerical):
{
Gtk::TreeModelColumn<int>* pModelColumnDerived = static_cast< Gtk::TreeModelColumn<int>* >(pModelColumn);
delete pModelColumnDerived;
Modified: trunk/glom/utility_widgets/calendar/glomcalendar.h
==============================================================================
--- trunk/glom/utility_widgets/calendar/glomcalendar.h (original)
+++ trunk/glom/utility_widgets/calendar/glomcalendar.h Fri Dec 12 23:06:10 2008
@@ -311,12 +311,12 @@
*/
void set_detail_func(const SlotDetails& slot);
;
-
+
void set_detail_width_chars(int chars);
void set_detail_height_rows(int rows);
-
+
int get_detail_width_chars() const;
Modified: trunk/glom/utility_widgets/canvas/canvas_item_movable.cc
==============================================================================
--- trunk/glom/utility_widgets/canvas/canvas_item_movable.cc (original)
+++ trunk/glom/utility_widgets/canvas/canvas_item_movable.cc Fri Dec 12 23:06:10 2008
@@ -129,7 +129,7 @@
m_dragging_horizontal_only = false;
}
}
- else if ( !(event->state & Gdk::CONTROL_MASK) && (m_dragging_vertical_only || m_dragging_horizontal_only))
+ else if( !(event->state & Gdk::CONTROL_MASK) && (m_dragging_vertical_only || m_dragging_horizontal_only))
{
//Ctrl was released, so allow full movement again:
m_dragging_vertical_only = false;
Modified: trunk/glom/utility_widgets/db_adddel/cellrenderer_buttonimage.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/cellrenderer_buttonimage.cc (original)
+++ trunk/glom/utility_widgets/db_adddel/cellrenderer_buttonimage.cc Fri Dec 12 23:06:10 2008
@@ -42,7 +42,7 @@
GlomCellRenderer_ButtonImage* const obj = dynamic_cast<GlomCellRenderer_ButtonImage*>(obj_base);
if(obj)
{
- return obj->activate_vfunc(event, *Glib::wrap(widget), path, Glib::wrap(background_area), Glib::wrap(cell_area), static_cast<Gtk::CellRendererState>(flags));
+ return obj->activate_vfunc(event, *Glib::wrap(widget), path, Glib::wrap(background_area), Glib::wrap(cell_area), static_cast<Gtk::CellRendererState>(flags));
}
}
else if(GTK_CELL_RENDERER_CLASS(parent_class)->activate)
Modified: trunk/glom/utility_widgets/db_adddel/cellrenderer_buttontext.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/cellrenderer_buttontext.cc (original)
+++ trunk/glom/utility_widgets/db_adddel/cellrenderer_buttontext.cc Fri Dec 12 23:06:10 2008
@@ -40,7 +40,7 @@
GlomCellRenderer_ButtonText* const obj = dynamic_cast<GlomCellRenderer_ButtonText*>(obj_base);
if(obj)
{
- return obj->activate_vfunc(event, *Glib::wrap(widget), path, Glib::wrap(background_area), Glib::wrap(cell_area), static_cast<Gtk::CellRendererState>(flags));
+ return obj->activate_vfunc(event, *Glib::wrap(widget), path, Glib::wrap(background_area), Glib::wrap(cell_area), static_cast<Gtk::CellRendererState>(flags));
}
}
else if(GTK_CELL_RENDERER_CLASS(parent_class)->activate)
Modified: trunk/glom/utility_widgets/db_adddel/db_adddel.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/db_adddel.cc (original)
+++ trunk/glom/utility_widgets/db_adddel/db_adddel.cc Fri Dec 12 23:06:10 2008
@@ -662,7 +662,7 @@
if(item_text)
{
Gtk::CellRendererText* pCellText = Gtk::manage( new Gtk::CellRendererText() );
- pCellText->set_property("text", item_text->get_text());
+ pCellText->set_property("text", item_text->get_text());
pCellRenderer = pCellText;
}
@@ -672,7 +672,7 @@
if(item_button)
{
GlomCellRenderer_ButtonText* pCellButton = Gtk::manage( new GlomCellRenderer_ButtonText() );
- pCellButton->set_property("text", item_button->get_title_or_name());
+ pCellButton->set_property("text", item_button->get_title_or_name());
//pCellButton->set_fixed_width(50); //Otherwise it doesn't show up. TODO: Discover the width of the contents.
pCellButton->signal_clicked().connect(
Modified: trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc (original)
+++ trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc Fri Dec 12 23:06:10 2008
@@ -472,8 +472,9 @@
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
+
Glib::RefPtr<Gnome::Gda::SqlParser> parser = m_connection->get_gda_connection()->create_parser();
- Glib::RefPtr<Gnome::Gda::Statement> stmt = parser->parse_string (sql_query);
+ Glib::RefPtr<Gnome::Gda::Statement> stmt = parser->parse_string(sql_query);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
@@ -483,7 +484,7 @@
Glib::RefPtr<Gnome::Gda::Holder> holder = Gnome::Gda::Holder::create(G_TYPE_BOOLEAN, "iter_model_only");
holder->set_attribute("ITER_MODEL_ONLY", value);
Glib::RefPtr<Gnome::Gda::Set> set = Gnome::Gda::Set::create();
- set->add_holder (holder);
+ set->add_holder(holder);
m_gda_datamodel = m_connection->get_gda_connection()->statement_execute_select(stmt, set);
@@ -1137,7 +1138,7 @@
//TODO: Apparently, this is very slow:
const Glib::ustring sql_query = "SELECT count(*) FROM \"" + m_found_set.m_table_name + "\"";
Glib::RefPtr<Gnome::Gda::SqlParser> parser = m_connection->get_gda_connection()->create_parser();
- Glib::RefPtr<Gnome::Gda::Statement> stmt = parser->parse_string (sql_query);
+ Glib::RefPtr<Gnome::Gda::Statement> stmt = parser->parse_string(sql_query);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gnome::Gda::DataModel> datamodel = m_connection->get_gda_connection()->statement_execute_select(stmt);
#else
@@ -1151,7 +1152,7 @@
if(datamodel->get_n_rows())
{
Gnome::Gda::Value value = datamodel->get_value_at(0, 0);
- total = (gulong)value.get_int64(); //I discovered that it's a int64 by trying it.
+ total = (gulong)value.get_int64(); //I discovered that it's a int64 by trying it.
}
}
}
Modified: trunk/glom/utility_widgets/dialog_flowtable.cc
==============================================================================
--- trunk/glom/utility_widgets/dialog_flowtable.cc (original)
+++ trunk/glom/utility_widgets/dialog_flowtable.cc Fri Dec 12 23:06:10 2008
@@ -45,8 +45,8 @@
{
m_flowtable = flowtable;
m_layoutgroup = sharedptr<LayoutGroup>::cast_dynamic(flowtable->get_layout_item());
- m_entry_title->set_text (m_layoutgroup->get_title());
- m_spin_columns->set_value (m_layoutgroup->m_columns_count);
+ m_entry_title->set_text(m_layoutgroup->get_title());
+ m_spin_columns->set_value(m_layoutgroup->m_columns_count);
}
Glib::ustring Dialog_FlowTable::get_title()
Modified: trunk/glom/utility_widgets/flowtable.cc
==============================================================================
--- trunk/glom/utility_widgets/flowtable.cc (original)
+++ trunk/glom/utility_widgets/flowtable.cc Fri Dec 12 23:06:10 2008
@@ -417,29 +417,31 @@
for (pos = m_children.begin(); pos != m_children.end(); pos++)
{
FlowTableItem* item = &(*pos);
- if (item->m_first)
+ if(item->m_first)
{
- if (item->m_first->gobj() == before.gobj())
+ if(item->m_first->gobj() == before.gobj())
{
found = true;
break;
}
+
Gtk::Alignment* alignment = dynamic_cast<Gtk::Alignment*>(item->m_first);
- if (alignment && alignment->get_child()->gobj() == before.gobj())
+ if(alignment && alignment->get_child()->gobj() == before.gobj())
{
found = true;
break;
}
}
- if (item->m_second)
+
+ if(item->m_second)
{
- if (item->m_second->gobj() == before.gobj())
+ if(item->m_second->gobj() == before.gobj())
{
found = true;
break;
}
Gtk::Alignment* alignment = dynamic_cast<Gtk::Alignment*>(item->m_second);
- if (alignment && alignment->get_child()->gobj() == before.gobj())
+ if(alignment && alignment->get_child()->gobj() == before.gobj())
{
found = true;
break;
@@ -448,16 +450,15 @@
}
gtk_widget_set_parent(GTK_WIDGET (item.m_first->gobj()), GTK_WIDGET(gobj()));
- if (item.m_second)
+ if(item.m_second)
{
gtk_widget_set_parent(GTK_WIDGET (item.m_second->gobj()), GTK_WIDGET(gobj()));
}
+
if (pos == m_children.end())
- {
m_children.push_back(item);
- } else {
+ else
m_children.insert(pos, item);
- }
}
void FlowTable::set_columns_count(guint value)
Modified: trunk/glom/utility_widgets/flowtable.h
==============================================================================
--- trunk/glom/utility_widgets/flowtable.h (original)
+++ trunk/glom/utility_widgets/flowtable.h Fri Dec 12 23:06:10 2008
@@ -54,7 +54,7 @@
void remove_all();
- // Implement forall which is not implemented in gtkmm
+ // Implement forall which is not implemented in gtkmm:
typedef sigc::slot<void, Widget&> ForallSlot;
void forall(const ForallSlot& slot);
@@ -119,10 +119,10 @@
Gtk::Allocation m_first_allocation;
Gtk::Allocation m_second_allocation;
};
-
+
typedef std::vector<FlowTableItem> type_vecChildren;
void insert_before(FlowTableItem& item, Gtk::Widget& before);
-
+
int get_item_requested_height(const FlowTableItem& item) const;
void get_item_requested_width(const FlowTableItem& item, int& first, int& second) const;
void get_item_max_width_requested(guint start, guint height, guint& first_max_width, guint& second_max_width, guint& singles_max_width, bool& is_last_column) const; //TODO: maybe combine this with code in get_minimum_column_height().
Modified: trunk/glom/utility_widgets/flowtable_dnd.cc
==============================================================================
--- trunk/glom/utility_widgets/flowtable_dnd.cc (original)
+++ trunk/glom/utility_widgets/flowtable_dnd.cc Fri Dec 12 23:06:10 2008
@@ -99,7 +99,7 @@
// The widget has already a default drag destination - add more targets:
if(targets)
{
- targets->add (drag_targets);
+ targets->add(drag_targets);
child.drag_dest_set_target_list (targets);
}
else
@@ -107,7 +107,7 @@
child.drag_dest_set(drag_targets, Gtk::DEST_DEFAULT_ALL,
Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
}
-
+
// It's important to connect this one BEFORE
child.signal_drag_motion().connect(sigc::bind<Gtk::Widget*>(sigc::mem_fun (*this, &FlowTableDnd::on_child_drag_motion), &child),
false);
@@ -147,7 +147,7 @@
m_current_dnd_item = dnd_item_at_position(x, y);
LayoutWidgetBase* above = dnd_datawidget_from_item(0);
-
+
// above might be 0 here...
on_dnd_add_placeholder(above);
return false;
@@ -198,7 +198,7 @@
{
gpointer* data = (gpointer*)selection_data.get_data();
LayoutWidgetBase* base = (LayoutWidgetBase*)*data;
- if (base)
+ if(base)
{
sharedptr<LayoutItem> item = base->get_layout_item();
if(item)
@@ -232,7 +232,7 @@
int column_width = 0;
get_column_height(0, m_children.size(), column_width);
int column = 0;
-
+
if(column_width != 0)
column = drag_x / column_width;
@@ -257,7 +257,7 @@
// Allow dragging at the end
if(cur_item == --m_children.end())
{
- if (drag_y > (rect.get_y() + rect.get_height() / 2) &&
+ if(drag_y > (rect.get_y() + rect.get_height() / 2) &&
drag_y < (rect.get_y() + rect.get_height()))
{
return 0;
@@ -276,7 +276,7 @@
// Test if we have a datawidget below which we want to add
LayoutWidgetBase* above = 0;
FlowTableItem* used_item;
- if (item)
+ if(item)
used_item = item;
else
used_item = m_current_dnd_item;
@@ -301,7 +301,7 @@
if(!above)
{
Gtk::Alignment* alignment = dynamic_cast <Gtk::Alignment*>(used_item->m_second);
- if (alignment)
+ if(alignment)
above = dynamic_cast<LayoutWidgetBase*>(alignment->get_child());
}
}
@@ -335,7 +335,7 @@
// The widget was added inside a Gtk::EventBox
if(bin)
{
- if (bin->get_child() == child ||
+ if(bin->get_child() == child ||
bin->get_child() == child->get_parent())
break;
}
@@ -431,11 +431,11 @@
Gtk::Widget* child)
{
FlowTableItem* item = find_current_dnd_item (child);
- if (!item)
+ if(!item)
return;
LayoutWidgetBase* base = dnd_datawidget_from_item (item);
- if (base->get_dnd_in_progress())
+ if(base->get_dnd_in_progress())
{
if(!item)
return;
@@ -480,8 +480,9 @@
void FlowTableDnd::dnd_remove_placeholder_idle()
{
static sigc::connection connection;
- if (connection)
+ if(connection)
connection.disconnect();
+
Glib::signal_idle().connect( sigc::mem_fun(*this, &FlowTableDnd::dnd_remove_placeholder_real) );
}
Modified: trunk/glom/utility_widgets/labelglom.cc
==============================================================================
--- trunk/glom/utility_widgets/labelglom.cc (original)
+++ trunk/glom/utility_widgets/labelglom.cc Fri Dec 12 23:06:10 2008
@@ -65,8 +65,9 @@
void LabelGlom::on_menu_properties_activate()
{
sharedptr<LayoutItem_Text> textobject = sharedptr<LayoutItem_Text>::cast_dynamic(m_pLayoutItem);
- if (!textobject)
+ if(!textobject)
return;
+
try
{
Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_textobject");
Modified: trunk/glom/utility_widgets/layouttoolbar.cc
==============================================================================
--- trunk/glom/utility_widgets/layouttoolbar.cc (original)
+++ trunk/glom/utility_widgets/layouttoolbar.cc Fri Dec 12 23:06:10 2008
@@ -51,7 +51,7 @@
{
// Looks ugly otherwise:
set_size_request(100, 200);
-
+
LayoutToolbarButton* drag_group =
Gtk::manage(new LayoutToolbarButton("glom-group.png", LayoutWidgetBase::TYPE_GROUP,
_("Group"), _("Drag this to the layout to add a new group.")));
@@ -65,7 +65,7 @@
LayoutToolbarButton* drag_portal =
Gtk::manage(new LayoutToolbarButton("glom-related-records.png", LayoutWidgetBase::TYPE_PORTAL,
_("Related Records"), _("Drag this to the layout to add a new Related Record.")));
- LayoutToolbarButton* drag_button =
+ LayoutToolbarButton* drag_button =
Gtk::manage(new LayoutToolbarButton("glom-button.png", LayoutWidgetBase::TYPE_BUTTON,
_("Button"), _("Drag this to the layout to add a new button.")));
LayoutToolbarButton* drag_text =
@@ -86,13 +86,13 @@
GtkContainer* fields_group = GTK_CONTAINER(egg_tool_item_group_new(_("Items")));
gtk_container_add(fields_group, GTK_WIDGET(drag_portal->gobj()));
gtk_container_add(fields_group, GTK_WIDGET(drag_item->gobj()));
- gtk_container_add(fields_group, GTK_WIDGET(drag_button->gobj()));
+ gtk_container_add(fields_group, GTK_WIDGET(drag_button->gobj()));
gtk_container_add(fields_group, GTK_WIDGET(drag_text->gobj()));
gtk_container_add(fields_group, GTK_WIDGET(drag_image->gobj()));
add_group(EGG_TOOL_ITEM_GROUP(container_group));
add_group(EGG_TOOL_ITEM_GROUP(fields_group));
-
+
set_drag_source();
show_all_children();
Modified: trunk/glom/utility_widgets/layoutwidgetmenu.cc
==============================================================================
--- trunk/glom/utility_widgets/layoutwidgetmenu.cc (original)
+++ trunk/glom/utility_widgets/layoutwidgetmenu.cc Fri Dec 12 23:06:10 2008
@@ -162,29 +162,30 @@
void LayoutWidgetMenu::on_menupopup_activate_delete()
{
Gtk::Widget* parent = dynamic_cast<Gtk::Widget*>(this);
- if (!parent)
+ if(!parent)
{
// Should never happen!
std::cerr << "LayoutWidgetUtils is no Gtk::Widget" << std::endl;
return;
}
+
LayoutWidgetBase* base = 0;
do
{
parent = parent->get_parent();
base = dynamic_cast<LayoutWidgetBase*>(parent);
- if (base && dynamic_cast<FlowTableWithFields*>(base))
- {
+ if(base && dynamic_cast<FlowTableWithFields*>(base))
break;
- }
} while (parent);
- if (base)
+
+ if(base)
{
sharedptr<LayoutGroup> group =
sharedptr<LayoutGroup>::cast_dynamic(base->get_layout_item());
- if (!group)
- return;
- group->remove_item (get_layout_item());
+ if(!group)
+ return;
+
+ group->remove_item(get_layout_item());
base->signal_layout_changed().emit();
}
}
Modified: trunk/glom/utility_widgets/layoutwidgetutils.cc
==============================================================================
--- trunk/glom/utility_widgets/layoutwidgetutils.cc (original)
+++ trunk/glom/utility_widgets/layoutwidgetutils.cc Fri Dec 12 23:06:10 2008
@@ -85,29 +85,32 @@
void LayoutWidgetUtils::on_menu_delete_activate()
{
Gtk::Widget* parent = dynamic_cast<Gtk::Widget*>(this);
- if (!parent)
+ if(!parent)
{
// Should never happen!
std::cerr << "LayoutWidgetUtils is no Gtk::Widget" << std::endl;
return;
}
+
LayoutWidgetBase* base = 0;
do
{
parent = parent->get_parent();
base = dynamic_cast<LayoutWidgetBase*>(parent);
- if (base)
+ if(base)
{
break;
}
} while (parent);
- if (base)
+
+ if(base)
{
sharedptr<LayoutGroup> group =
sharedptr<LayoutGroup>::cast_dynamic(base->get_layout_item());
- if (!group)
+ if(!group)
return;
- group->remove_item (get_layout_item());
+
+ group->remove_item(get_layout_item());
signal_layout_changed().emit();
}
}
Modified: trunk/glom/utility_widgets/notebooklabelglom.cc
==============================================================================
--- trunk/glom/utility_widgets/notebooklabelglom.cc (original)
+++ trunk/glom/utility_widgets/notebooklabelglom.cc Fri Dec 12 23:06:10 2008
@@ -71,10 +71,10 @@
{
sharedptr<LayoutGroup> group(new LayoutGroup());
group->set_title(_("New Group"));
- group->set_name (_("Group"));
+ group->set_name(_("Group"));
sharedptr<LayoutGroup> notebook_group = sharedptr<LayoutGroup>::cast_dynamic (m_notebook->get_layout_item());
- notebook_group->add_item (group);
+ notebook_group->add_item(group);
m_notebook->signal_layout_changed().emit();
}
@@ -82,7 +82,7 @@
void NotebookLabelGlom::on_menu_delete_activate()
{
Glib::ustring message;
- if (!m_notebook->get_layout_item()->get_title().empty())
+ if(!m_notebook->get_layout_item()->get_title().empty())
{
message = Glib::ustring::compose (_("Delete whole notebook \"%1\"?"),
m_notebook->get_layout_item()->get_title());
@@ -91,9 +91,10 @@
{
message = _("Delete whole notebook?");
}
+
Gtk::MessageDialog dlg (message, false, Gtk::MESSAGE_QUESTION,
Gtk::BUTTONS_YES_NO, true);
- switch (dlg.run())
+ switch(dlg.run())
{
case Gtk::RESPONSE_YES:
m_notebook->delete_from_layout();
Modified: trunk/glom/utility_widgets/placeholder-glom.cc
==============================================================================
--- trunk/glom/utility_widgets/placeholder-glom.cc (original)
+++ trunk/glom/utility_widgets/placeholder-glom.cc Fri Dec 12 23:06:10 2008
@@ -75,7 +75,7 @@
void PlaceholderGlom::on_map()
{
- Gtk::Widget::on_map();
+ Gtk::Widget::on_map();
}
void PlaceholderGlom::on_unmap()
@@ -136,7 +136,7 @@
{
Cairo::RefPtr<Cairo::Context> cr = m_refGdkWindow->create_cairo_context();
- if (event)
+ if(event)
{
// clip to the area that needs to be re-exposed so we don't draw any
// more than we need to.
@@ -145,16 +145,17 @@
cr->clip();
}
- // paint the background
+ // Paint the background:
Gdk::Cairo::set_source_color(cr, get_style()->get_bg(Gtk::STATE_NORMAL));
cr->paint();
- // draw the foreground
+ // Draw the foreground:
Gdk::Cairo::set_source_color(cr, get_style()->get_fg(Gtk::STATE_NORMAL));
- cr->set_line_width (4);
- cr->rectangle (0, 0, get_allocation().get_width(), get_allocation().get_height());
+ cr->set_line_width(4);
+ cr->rectangle(0, 0, get_allocation().get_width(), get_allocation().get_height());
cr->stroke();
}
+
return true;
}
Modified: trunk/glom/utility_widgets/placeholder-glom.h
==============================================================================
--- trunk/glom/utility_widgets/placeholder-glom.h (original)
+++ trunk/glom/utility_widgets/placeholder-glom.h Fri Dec 12 23:06:10 2008
@@ -34,8 +34,8 @@
{
class PlaceholderGlom:
- public Gtk::Widget,
- public LayoutWidgetBase
+ public Gtk::Widget,
+ public LayoutWidgetBase
{
public:
//explicit PlaceholderGlom(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
Modified: trunk/glom/utility_widgets/table_columns.cc
==============================================================================
--- trunk/glom/utility_widgets/table_columns.cc (original)
+++ trunk/glom/utility_widgets/table_columns.cc Fri Dec 12 23:06:10 2008
@@ -54,7 +54,7 @@
widgetA.show();
widgetB.show();
}
-
+
void Table_Columns::add_row(const Glib::ustring& strText, Gtk::Widget& widgetB)
{
Gtk::Label* pLabel = Gtk::manage( new Gtk::Label(strText) );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]