[nemiver] Misc style cleanups
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Misc style cleanups
- Date: Thu, 24 Nov 2011 16:31:22 +0000 (UTC)
commit f65c9ac079c07895f6c16b63735001b8a89fcec2
Author: Dodji Seketeli <dodji seketeli org>
Date: Thu Nov 24 16:43:17 2011 +0100
Misc style cleanups
* src/main.cc: Add missing spaces for initialization expressions.
(entries): Properly indent.
* src/persp/dbgperspective/nmv-remote-target-dialog.cc
(RemoteTargetDialog::Priv:*): In function definitions, names
should start at the beginning of the line.
src/main.cc | 101 ++++++++++----------
.../dbgperspective/nmv-remote-target-dialog.cc | 46 ++++++---
2 files changed, 81 insertions(+), 66 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index 303ee65..7f2bdf8 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -50,13 +50,13 @@ using nemiver::common::UString;
using nemiver::common::GCharSafePtr;
using nemiver::ISessMgr;
-static const UString DBGPERSPECTIVE_PLUGIN_NAME="dbgperspective";
-static gchar *gv_env_vars=0;
-static gchar *gv_process_to_attach_to=0;
-static bool gv_list_sessions=false;
-static bool gv_purge_sessions=false;
-static int gv_execute_session=0;
-static bool gv_last_session=false;
+static const UString DBGPERSPECTIVE_PLUGIN_NAME = "dbgperspective";
+static gchar *gv_env_vars = 0;
+static gchar *gv_process_to_attach_to = 0;
+static bool gv_list_sessions = false;
+static bool gv_purge_sessions = false;
+static int gv_execute_session = 0;
+static bool gv_last_session = false;
static gchar *gv_log_domains=0;
static bool gv_log_debugger_output = false;
static bool gv_show_version = false;
@@ -68,22 +68,22 @@ static gchar *gv_gdb_binary_filepath = 0;
static GOptionEntry entries[] =
{
{
- "env",
- 0,
- 0,
- G_OPTION_ARG_STRING,
- &gv_env_vars,
- _("Set the environment of the program to debug"),
- "<\"var0=val0 var1=val1 var2=val2 ...\">"
+ "env",
+ 0,
+ 0,
+ G_OPTION_ARG_STRING,
+ &gv_env_vars,
+ _("Set the environment of the program to debug"),
+ "<\"var0=val0 var1=val1 var2=val2 ...\">"
},
{
- "attach",
- 0,
- 0,
- G_OPTION_ARG_STRING,
- &gv_process_to_attach_to,
- _("Attach to a process"),
- "<pid|process name>"
+ "attach",
+ 0,
+ 0,
+ G_OPTION_ARG_STRING,
+ &gv_process_to_attach_to,
+ _("Attach to a process"),
+ "<pid|process name>"
},
{ "list-sessions",
0,
@@ -142,40 +142,41 @@ static GOptionEntry entries[] =
0
},
{
- "remote",
- 0,
- 0,
- G_OPTION_ARG_STRING,
- &gv_remote,
- _("Connect to remote target specified by HOST:PORT"),
- "<HOST:PORT|serial-line-path>"
+ "remote",
+ 0,
+ 0,
+ G_OPTION_ARG_STRING,
+ &gv_remote,
+ _("Connect to remote target specified by HOST:PORT"),
+ "<HOST:PORT|serial-line-path>"
},
{
- "solib-prefix",
- 0,
- 0,
- G_OPTION_ARG_STRING,
- &gv_solib_prefix,
- _("Where to look for shared libraries loaded by the inferior. "
- "Use in conjunction with --remote"),
- "</path/to/prefix>"
+ "solib-prefix",
+ 0,
+ 0,
+ G_OPTION_ARG_STRING,
+ &gv_solib_prefix,
+ _("Where to look for shared libraries loaded by the inferior. "
+ "Use in conjunction with --remote"),
+ "</path/to/prefix>"
},
{
- "gdb-binary",
- 0,
- 0,
- G_OPTION_ARG_STRING,
- &gv_gdb_binary_filepath,
- _("Set the path of the GDB binary to use to debug the inferior"),
- "</path/to/gdb>"
+ "gdb-binary",
+ 0,
+ 0,
+ G_OPTION_ARG_STRING,
+ &gv_gdb_binary_filepath,
+ _("Set the path of the GDB binary to use to debug the inferior"),
+ "</path/to/gdb>"
},
- { "version",
- 0,
- 0,
- G_OPTION_ARG_NONE,
- &gv_show_version,
- _("Show the version number of nemiver"),
- 0
+ {
+ "version",
+ 0,
+ 0,
+ G_OPTION_ARG_NONE,
+ &gv_show_version,
+ _("Show the version number of nemiver"),
+ 0
},
{0, 0, 0, (GOptionArg) 0, 0, 0, 0}
};
diff --git a/src/persp/dbgperspective/nmv-remote-target-dialog.cc b/src/persp/dbgperspective/nmv-remote-target-dialog.cc
index 30c5b96..22cdc0b 100644
--- a/src/persp/dbgperspective/nmv-remote-target-dialog.cc
+++ b/src/persp/dbgperspective/nmv-remote-target-dialog.cc
@@ -58,7 +58,8 @@ struct RemoteTargetDialog::Priv {
//*******************
//<signal handlers>
//*******************
- void on_radio_button_toggled_signal ()
+ void
+ on_radio_button_toggled_signal ()
{
NEMIVER_TRY
@@ -105,7 +106,8 @@ struct RemoteTargetDialog::Priv {
}
}
- void on_address_selection_changed_signal ()
+ void
+ on_address_selection_changed_signal ()
{
NEMIVER_TRY
@@ -127,12 +129,13 @@ struct RemoteTargetDialog::Priv {
//*****************
//<init functions>
//*****************
- void init_members ()
+ void
+ init_members ()
{
- connection_type = RemoteTargetDialog::TCP_CONNECTION_TYPE;
}
- void init_from_gtkbuilder ()
+ void
+ init_from_gtkbuilder ()
{
Gtk::RadioButton *radio =
get_widget_from_gtkbuilder<Gtk::RadioButton>
@@ -183,7 +186,8 @@ struct RemoteTargetDialog::Priv {
button->set_sensitive (false);
}
- bool can_enable_ok_button () const
+ bool
+ can_enable_ok_button () const
{
Gtk::Entry *entry = 0;
if (executable_path.empty ())
@@ -207,7 +211,8 @@ struct RemoteTargetDialog::Priv {
//</init functions>
//*****************
- const UString& get_executable_path () const
+ const UString&
+ get_executable_path () const
{
Gtk::FileChooserButton *chooser =
get_widget_from_gtkbuilder<Gtk::FileChooserButton>
@@ -218,7 +223,8 @@ struct RemoteTargetDialog::Priv {
return executable_path;
}
- void set_executable_path (const UString &a_path)
+ void
+ set_executable_path (const UString &a_path)
{
Gtk::FileChooserButton *chooser =
get_widget_from_gtkbuilder<Gtk::FileChooserButton>
@@ -234,7 +240,8 @@ struct RemoteTargetDialog::Priv {
executable_path = path;
}
- const UString& get_solib_prefix_path () const
+ const UString&
+ get_solib_prefix_path () const
{
Gtk::FileChooserButton *chooser =
get_widget_from_gtkbuilder<Gtk::FileChooserButton>
@@ -253,7 +260,8 @@ struct RemoteTargetDialog::Priv {
solib_prefix_path = a_path;
}
- void set_connection_type (RemoteTargetDialog::ConnectionType &a_type)
+ void
+ set_connection_type (RemoteTargetDialog::ConnectionType &a_type)
{
Gtk::RadioButton *radio =
get_widget_from_gtkbuilder<Gtk::RadioButton>
@@ -265,7 +273,8 @@ struct RemoteTargetDialog::Priv {
}
}
- const UString& get_server_address () const
+ const UString&
+ get_server_address () const
{
Gtk::Entry *entry = get_widget_from_gtkbuilder<Gtk::Entry>(gtkbuilder,
"addressentry");
@@ -273,28 +282,32 @@ struct RemoteTargetDialog::Priv {
return server_address;
}
- void set_server_address (const UString &a_address)
+ void
+ set_server_address (const UString &a_address)
{
Gtk::Entry *entry = get_widget_from_gtkbuilder<Gtk::Entry>(gtkbuilder,
"addressentry");
entry->set_text (a_address);
}
- int get_server_port () const
+ int
+ get_server_port () const
{
Gtk::Entry *entry = get_widget_from_gtkbuilder<Gtk::Entry> (gtkbuilder,
"portentry");
return atoi (entry->get_text ().c_str ());
}
- void set_server_port (int a_port)
+ void
+ set_server_port (int a_port)
{
Gtk::Entry *entry = get_widget_from_gtkbuilder<Gtk::Entry> (gtkbuilder,
"portentry");
entry->set_text (UString::from_int (a_port));
}
- const UString& get_serial_port_name () const
+ const UString&
+ get_serial_port_name () const
{
Gtk::FileChooserButton *chooser =
get_widget_from_gtkbuilder<Gtk::FileChooserButton>
@@ -303,7 +316,8 @@ struct RemoteTargetDialog::Priv {
return serial_port_name;
}
- void set_serial_port_name (const UString &a_name)
+ void
+ set_serial_port_name (const UString &a_name)
{
Gtk::FileChooserButton *chooser =
get_widget_from_gtkbuilder<Gtk::FileChooserButton>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]