[glom] Minor whitespace consistency changes
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Minor whitespace consistency changes
- Date: Mon, 21 Oct 2013 08:46:01 +0000 (UTC)
commit 903e42b7754ecfe24d0a064509baaa08dcf77f80
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Oct 21 09:50:15 2013 +0200
Minor whitespace consistency changes
glom/bakery/appwindow_withdoc.cc | 2 +-
glom/base_db.cc | 2 +-
glom/libglom/data_structure/glomconversions.cc | 4 +-
glom/libglom/db_utils.cc | 2 +-
glom/libglom/init.cc | 2 +-
glom/libglom/privs.cc | 2 +-
.../libglom/python_embed/pygdavalue_conversions.cc | 38 ++++++++++----------
glom/libglom/utils.cc | 2 +-
glom/mode_data/db_adddel/db_adddel.cc | 2 +-
.../layout/dialog_layout_calendar_related.cc | 2 +-
.../layout/dialog_layout_list_related.cc | 2 +-
.../dialog_relationships_overview.cc | 2 +-
glom/print_layout/print_layout_utils.cc | 2 +-
.../filechooserdialog_saveextras.cc | 2 +-
glom/utility_widgets/imageglom.cc | 2 +-
tests/import/utils.cc | 4 +-
tests/python/test_python_module.cc | 4 +-
17 files changed, 38 insertions(+), 38 deletions(-)
---
diff --git a/glom/bakery/appwindow_withdoc.cc b/glom/bakery/appwindow_withdoc.cc
index 21136cd..c19b6b8 100644
--- a/glom/bakery/appwindow_withdoc.cc
+++ b/glom/bakery/appwindow_withdoc.cc
@@ -151,7 +151,7 @@ bool AppWindow_WithDoc::open_document(const Glib::ustring& file_uri)
if(bOpenFailed)
{
- if (bShowError)
+ if(bShowError)
ui_warning_load_failed(failure_code);
//Make sure that non-existant files are removed from the history list:
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 174ded9..d2e0710 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -313,7 +313,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Base_DB::get_connection()
{
sharedconnection = connect_to_server();
}
- catch (const Glib::Error& error)
+ catch(const Glib::Error& error)
{
std::cerr << G_STRFUNC << ": " << error.what() << std::endl;
}
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index 43bd8d4..3a923b6 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -500,7 +500,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
{
return value.get_string();
}
- else if (glom_type == Field::TYPE_BOOLEAN)
+ else if(glom_type == Field::TYPE_BOOLEAN)
{
//This is used only by Field::to_file_format(),
//and should never be shown in the UI.
@@ -509,7 +509,7 @@ Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_ty
else
return "FALSE";
}
- else if (glom_type == Field::TYPE_IMAGE)
+ else if(glom_type == Field::TYPE_IMAGE)
{
//This function is only used for :
//- UI-visible strings, but images should never be shown as text in the UI.
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index f7b0508..f947a9d 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -47,7 +47,7 @@ static Glib::RefPtr<Gnome::Gda::Connection> get_connection()
{
sharedconnection = ConnectionPool::get_and_connect();
}
- catch (const Glib::Error& error)
+ catch(const Glib::Error& error)
{
std::cerr << G_STRFUNC << ": " << error.what() << std::endl;
}
diff --git a/glom/libglom/init.cc b/glom/libglom/init.cc
index d677141..6f8c9ae 100644
--- a/glom/libglom/init.cc
+++ b/glom/libglom/init.cc
@@ -49,7 +49,7 @@ void libglom_init()
//Threading is always enabled starting from GLib 2.31.0:
//TODO: Just remove this when we can increase the glibmm version needed:
#if !GLIB_CHECK_VERSION (2, 31, 0)
- if (!Glib::thread_supported())
+ if(!Glib::thread_supported())
Glib::thread_init(0); //So we can use GMutex.
#endif
diff --git a/glom/libglom/privs.cc b/glom/libglom/privs.cc
index a41a76a..1414c74 100644
--- a/glom/libglom/privs.cc
+++ b/glom/libglom/privs.cc
@@ -279,7 +279,7 @@ static Glib::RefPtr<Gnome::Gda::Connection> get_connection()
{
sharedconnection = ConnectionPool::get_and_connect();
}
- catch (const Glib::Error& error)
+ catch(const Glib::Error& error)
{
std::cerr << G_STRFUNC << ": " << error.what() << std::endl;
}
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.cc
b/glom/libglom/python_embed/pygdavalue_conversions.cc
index ec97eb2..c987f43 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.cc
+++ b/glom/libglom/python_embed/pygdavalue_conversions.cc
@@ -40,7 +40,7 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
we must still have the get_*() functions in the python API.
*/
- if (G_IS_VALUE (boxed))
+ if(G_IS_VALUE (boxed))
g_value_unset(boxed);
PyObject* input_c = input.ptr();
@@ -182,15 +182,15 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
}
#endif
- if (value_type == G_TYPE_INT64) {
+ if(value_type == G_TYPE_INT64) {
ret = boost::python::object(g_value_get_int64(boxed));
- } else if (value_type == G_TYPE_UINT64) {
+ } else if(value_type == G_TYPE_UINT64) {
ret = boost::python::object(g_value_get_uint64(boxed));
- } else if (value_type == GDA_TYPE_BINARY) {
+ } else if(value_type == GDA_TYPE_BINARY) {
const GdaBinary* gdabinary = gda_value_get_binary(boxed);
if(gdabinary)
ret = boost::python::object((const char*)gdabinary->data); /* TODO: Use the size. TODO: Check for
null GdaBinary. */
- } else if (value_type == GDA_TYPE_BLOB) {
+ } else if(value_type == GDA_TYPE_BLOB) {
const GdaBlob* gdablob = gda_value_get_blob (boxed);
if(gdablob && gdablob->op)
{
@@ -199,10 +199,10 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
ret = boost::python::object((const char*)gdablob->data.data); /* TODO: Use the size. TODO: Check
for null GdaBinary. */
}
}
- } else if (value_type == G_TYPE_BOOLEAN) {
+ } else if(value_type == G_TYPE_BOOLEAN) {
ret = boost::python::object((bool)g_value_get_boolean(boxed));
#if PY_VERSION_HEX >= 0x02040000
- } else if (value_type == G_TYPE_DATE) {
+ } else if(value_type == G_TYPE_DATE) {
const GDate* val = (const GDate*)g_value_get_boxed(boxed);
if(val)
@@ -220,28 +220,28 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
ret = boost::python::object( (boost::python::handle<>(cobject)) );
}
#endif
- } else if (value_type == G_TYPE_DOUBLE) {
+ } else if(value_type == G_TYPE_DOUBLE) {
ret = boost::python::object(g_value_get_double(boxed));
- } else if (value_type == GDA_TYPE_GEOMETRIC_POINT) {
+ } else if(value_type == GDA_TYPE_GEOMETRIC_POINT) {
const GdaGeometricPoint* val = gda_value_get_geometric_point(boxed);
if(val)
{
PyObject* cobject = Py_BuildValue ("(ii)", val->x, val->y);
ret = boost::python::object( (boost::python::handle<>(cobject)) );
}
- } else if (value_type == G_TYPE_INT) {
+ } else if(value_type == G_TYPE_INT) {
ret = boost::python::object(g_value_get_int(boxed));
- } else if (value_type == GDA_TYPE_NUMERIC) {
+ } else if(value_type == GDA_TYPE_NUMERIC) {
const GdaNumeric* val = gda_value_get_numeric(boxed);
ret = boost::python::object(gda_numeric_get_double((GdaNumeric*)val));
- } else if (value_type == G_TYPE_FLOAT) {
+ } else if(value_type == G_TYPE_FLOAT) {
ret = boost::python::object(g_value_get_float(boxed));
- } else if (value_type == GDA_TYPE_SHORT) {
+ } else if(value_type == GDA_TYPE_SHORT) {
ret = boost::python::object(gda_value_get_short(boxed));
- } else if (value_type == G_TYPE_STRING) {
+ } else if(value_type == G_TYPE_STRING) {
const gchar* val = g_value_get_string(boxed);
ret = boost::python::object(val);
- } else if (value_type == GDA_TYPE_TIME) {
+ } else if(value_type == GDA_TYPE_TIME) {
#if PY_VERSION_HEX >= 0x02040000
const GdaTime* val = gda_value_get_time(boxed);
if(val)
@@ -249,7 +249,7 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
PyObject* cobject = PyTime_FromTime(val->hour, val->minute, val->second, 0); /* TODO: Should we
ignore GDate::timezone ? */
ret = boost::python::object( (boost::python::handle<>(cobject)) );
}
- } else if (value_type == GDA_TYPE_TIMESTAMP) {
+ } else if(value_type == GDA_TYPE_TIMESTAMP) {
const GdaTimestamp* val = gda_value_get_timestamp(boxed);
if(val)
{
@@ -257,11 +257,11 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
ret = boost::python::object( (boost::python::handle<>(cobject)) );
}
#endif
- } else if (value_type == GDA_TYPE_SHORT) {
+ } else if(value_type == GDA_TYPE_SHORT) {
ret = boost::python::object(gda_value_get_short(boxed));
- } else if (value_type == GDA_TYPE_USHORT) {
+ } else if(value_type == GDA_TYPE_USHORT) {
ret = boost::python::object(gda_value_get_ushort(boxed));
- } else if (value_type == G_TYPE_UINT) {
+ } else if(value_type == G_TYPE_UINT) {
ret = boost::python::object(g_value_get_uint(boxed));
} else {
std::cerr << "Glom: G_VALUE_TYPE() returned unknown type: " << value_type << std::endl;
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index c7b8dd2..9ec5b5e 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -1034,7 +1034,7 @@ static Glib::RefPtr<Gnome::Gda::Connection> get_connection()
{
sharedconnection = ConnectionPool::get_and_connect();
}
- catch (const Glib::Error& error)
+ catch(const Glib::Error& error)
{
std::cerr << G_STRFUNC << ": " << error.what() << std::endl;
}
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 33ac3b1..cd3b816 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -1431,7 +1431,7 @@ void DbAddDel::on_treeview_cell_edited(const Glib::ustring& path_string, const G
set_prevent_user_signals(true); //Stops extra signal_user_changed.
//Don't add a new row if nothing was entered into the placeholder.
- if (new_text.empty())
+ if(new_text.empty())
return;
//Mark this row as no longer a placeholder, because it has data now. The client code must set an
actual key for this in the signal_user_added() or m_signal_user_changed signal handlers.
diff --git a/glom/mode_design/layout/dialog_layout_calendar_related.cc
b/glom/mode_design/layout/dialog_layout_calendar_related.cc
index ec6bb11..6813acd 100644
--- a/glom/mode_design/layout/dialog_layout_calendar_related.cc
+++ b/glom/mode_design/layout/dialog_layout_calendar_related.cc
@@ -302,7 +302,7 @@ void Dialog_Layout_Calendar_Related::save_to_document()
uses_rel->set_relationship(rel);
uses_rel->set_related_relationship(rel_related);
- if (rel || rel_related)
+ if(rel || rel_related)
m_portal->set_navigation_relationship_specific(uses_rel);
//std::cout << "debug99 main=specify_main" << ", relationship=" << (rel ? rel->get_name() : "none") <<
std::endl;
}
diff --git a/glom/mode_design/layout/dialog_layout_list_related.cc
b/glom/mode_design/layout/dialog_layout_list_related.cc
index ce570c9..8c2638b 100644
--- a/glom/mode_design/layout/dialog_layout_list_related.cc
+++ b/glom/mode_design/layout/dialog_layout_list_related.cc
@@ -372,7 +372,7 @@ void Dialog_Layout_List_Related::save_to_document()
m_portal->set_navigation_relationship_specific(none);
}
- if (m_radio_navigation_automatic->get_active())
+ if(m_radio_navigation_automatic->get_active())
m_portal->set_navigation_type(LayoutItem_Portal::NAVIGATION_AUTOMATIC);
if(m_radio_navigation_none->get_active())
diff --git a/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
b/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
index 0d0b6b0..df2dd96 100644
--- a/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
+++ b/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
@@ -388,7 +388,7 @@ void Dialog_RelationshipsOverview::print_or_preview(Gtk::PrintOperationAction pr
{
print->run(print_action /* print or preview */, *this);
}
- catch (const Gtk::PrintError& ex)
+ catch(const Gtk::PrintError& ex)
{
//See documentation for exact Gtk::PrintError error codes.
std::cerr << "An error occurred while trying to run a print operation:"
diff --git a/glom/print_layout/print_layout_utils.cc b/glom/print_layout/print_layout_utils.cc
index a1d1ed3..47c06df 100644
--- a/glom/print_layout/print_layout_utils.cc
+++ b/glom/print_layout/print_layout_utils.cc
@@ -434,7 +434,7 @@ void do_print_layout(const sharedptr<const PrintLayout>& print_layout, const Fou
(preview ? Gtk::PRINT_OPERATION_ACTION_PREVIEW : Gtk::PRINT_OPERATION_ACTION_PRINT_DIALOG),
*transient_for);
}
- catch (const Gtk::PrintError& ex)
+ catch(const Gtk::PrintError& ex)
{
//See documentation for exact Gtk::PrintError error codes.
std::cerr << "An error occurred while trying to run a print operation:"
diff --git a/glom/utility_widgets/filechooserdialog_saveextras.cc
b/glom/utility_widgets/filechooserdialog_saveextras.cc
index 9abef82..4ef3b90 100644
--- a/glom/utility_widgets/filechooserdialog_saveextras.cc
+++ b/glom/utility_widgets/filechooserdialog_saveextras.cc
@@ -65,7 +65,7 @@ void FileChooserDialog_SaveExtras::set_extra_message(const Glib::ustring& messag
{
m_label_extra_message.set_text(message);
- if (!message.empty()) {
+ if(!message.empty()) {
m_label_extra_message.show();
} else {
m_label_extra_message.hide();
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 2cabd45..d2e45c7 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -222,7 +222,7 @@ static void image_glom_ev_job_finished(EvJob* job, void* user_data)
void ImageGlom::on_ev_job_finished(EvJob* job)
{
- if (ev_job_is_failed (job)) {
+ if(ev_job_is_failed (job)) {
g_warning ("%s", job->error->message);
g_object_unref (job);
diff --git a/tests/import/utils.cc b/tests/import/utils.cc
index 7c2cd8e..faf5f75 100644
--- a/tests/import/utils.cc
+++ b/tests/import/utils.cc
@@ -92,7 +92,7 @@ bool run_parser_from_buffer(const FuncConnectParserSignals& connect_parser_signa
const Glib::ustring file_uri = create_file_from_buffer(input, input_size);
parser.set_file_and_start_parsing(file_uri);
- if (Glom::CsvParser::STATE_PARSING != parser.get_state())
+ if(Glom::CsvParser::STATE_PARSING != parser.get_state())
return false;
mainloop->run();
@@ -127,7 +127,7 @@ bool run_parser_on_file(const FuncConnectParserSignals& connect_parser_signals,
connect_parser_signals(parser);
parser.set_file_and_start_parsing(uri);
- if (Glom::CsvParser::STATE_PARSING != parser.get_state())
+ if(Glom::CsvParser::STATE_PARSING != parser.get_state())
return false;
mainloop->run();
diff --git a/tests/python/test_python_module.cc b/tests/python/test_python_module.cc
index 0fd4b7e..6cb6cab 100644
--- a/tests/python/test_python_module.cc
+++ b/tests/python/test_python_module.cc
@@ -48,9 +48,9 @@ int main ()
#endif
Glom::libglom_init(); // Calls PyInitialize()
- if (!Glom::gda_python_module_is_available())
+ if(!Glom::gda_python_module_is_available())
return EXIT_FAILURE;
- if (!Glom::glom_python_module_is_available())
+ if(!Glom::glom_python_module_is_available())
return EXIT_FAILURE;
Glom::libglom_deinit(); // Calls Py_Finalize();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]