another bunch of gui localizations
[asterisk/asterisk.git] / pbx / pbx_gtkconsole.c
index 9f9a189..2cf4665 100644 (file)
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <sys/types.h>
-#include <stdlib.h>
 #include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
 #include <signal.h>
 #include <sys/time.h>
 
@@ -48,7 +42,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/config.h"
 #include "asterisk/module.h"
 #include "asterisk/logger.h"
-#include "asterisk/options.h"
 #include "asterisk/cli.h"
 #include "asterisk/utils.h"
 
@@ -237,7 +230,7 @@ static int reload_module(void *mod)
                }
        }
 
-       return 0;
+       return AST_MODULE_LOAD_SUCCESS;
 }
 
 static void file_ok_sel(GtkWidget *w, GtkFileSelection *fs)
@@ -313,8 +306,7 @@ static void exit_now(GtkWidget *widget, gpointer data)
        ast_update_use_count();
        ast_unregister_verbose(verboser);
        ast_unload_resource("pbx_gtkconsole", 0);
-       if (option_verbose > 1)
-               ast_verbose(VERBOSE_PREFIX_2 "GTK Console Monitor Exiting\n");
+       ast_verb(2, "GTK Console Monitor Exiting\n");
        /* XXX Trying to quit after calling this makes asterisk segfault XXX */
 }
 
@@ -481,24 +473,23 @@ static int load_module(void *mod)
 {
        if (pipe(clipipe)) {
                ast_log(LOG_WARNING, "Unable to create CLI pipe\n");
-               return -1;
+               return AST_MODULE_LOAD_FAILURE;
        }
        g_thread_init(NULL);
        if (gtk_init_check(NULL, NULL))  {
                if (!show_console()) {
                        inuse++;
                        ast_update_use_count();
-                       if (option_verbose > 1)
-                               ast_verbose( VERBOSE_PREFIX_2 "Launched GTK Console monitor\n");                
+                       ast_verb(2, "Launched GTK Console monitor\n");
                } else
                        ast_log(LOG_WARNING, "Unable to start GTK console\n");
        } else {
                if (option_debug)
                        ast_log(LOG_DEBUG, "Unable to start GTK console monitor -- ignoring\n");
-               else if (option_verbose > 1)
-                       ast_verbose( VERBOSE_PREFIX_2 "GTK is not available -- skipping monitor\n");
+               else
+                       ast_verb(2, "GTK is not available -- skipping monitor\n");
        }
-       return 0;
+       return AST_MODULE_LOAD_SUCCESS;
 }
 
 static const char *description(void)