[med-svn] [aghermann] 01/13: anon namespace for some functions in main.cc

andrei zavada hmmr-guest at alioth.debian.org
Wed Aug 28 22:10:21 UTC 2013


This is an automated email from the git hooks/post-receive script.

hmmr-guest pushed a commit to branch master
in repository aghermann.

commit 9acd46537ab7c39e2d43d59a77c257f6a9eb3dbd
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Fri Aug 16 18:02:35 2013 +0300

    anon namespace for some functions in main.cc
---
 src/aghermann/main.cc |   72 ++++++++++++++++++++++++++-----------------------
 1 file changed, 38 insertions(+), 34 deletions(-)

diff --git a/src/aghermann/main.cc b/src/aghermann/main.cc
index 2d410f6..3f04e4c 100644
--- a/src/aghermann/main.cc
+++ b/src/aghermann/main.cc
@@ -26,44 +26,14 @@
 
 using namespace agh;
 
-static UniqueResponse
-message_received_cb(
-	UniqueApp*,
-	const UniqueCommand      command,
-	UniqueMessageData       *message,
-	const guint              time_,
-	gpointer)
-{
-	if ( ui::global::main_window == NULL )
-		return UNIQUE_RESPONSE_OK;
-
-	UniqueResponse res;
-
-	switch ( command ) {
-	case UNIQUE_ACTIVATE:
-		// move the main window to the screen that sent us the command
-		gtk_window_set_screen(
-			ui::global::main_window,
-			unique_message_data_get_screen( message));
-		gtk_window_present_with_time(
-			ui::global::main_window,
-			time_);
-		res = UNIQUE_RESPONSE_OK;
-	    break;
-	default:
-		res = UNIQUE_RESPONSE_OK;
-	    break;
-	}
+void print_version();
 
-	return res;
+namespace {
+UniqueResponse message_received_cb( UniqueApp*, UniqueCommand,	UniqueMessageData*, const guint, gpointer);
+void print_usage( const char*);
 }
 
 
-
-void print_version();
-
-static void print_usage( const char*);
-
 int
 main( int argc, char **argv)
 {
@@ -133,11 +103,45 @@ main( int argc, char **argv)
 	return 0;
 }
 
+namespace {
+UniqueResponse
+message_received_cb(
+	UniqueApp*,
+	const UniqueCommand      command,
+	UniqueMessageData       *message,
+	const guint              time_,
+	gpointer)
+{
+	if ( ui::global::main_window == NULL )
+		return UNIQUE_RESPONSE_OK;
+
+	UniqueResponse res;
+
+	switch ( command ) {
+	case UNIQUE_ACTIVATE:
+		// move the main window to the screen that sent us the command
+		gtk_window_set_screen(
+			ui::global::main_window,
+			unique_message_data_get_screen( message));
+		gtk_window_present_with_time(
+			ui::global::main_window,
+			time_);
+		res = UNIQUE_RESPONSE_OK;
+	    break;
+	default:
+		res = UNIQUE_RESPONSE_OK;
+	    break;
+	}
+
+	return res;
+}
+
 void
 print_usage( const char* argv0)
 {
 	printf( "Usage: %s [-n] [exp_root_dir]\n", argv0);
 }
+} // namespace
 
 // Local Variables:
 // Mode: c++

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git



More information about the debian-med-commit mailing list