summaryrefslogtreecommitdiffstats
path: root/source/dialogs/run.c
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2017-04-15 11:58:49 +0200
committerQuentin Glidic <sardemff7+git@sardemff7.net>2017-04-15 12:07:29 +0200
commitcfbe4027bcbafe4715bbba1b36799002c719a81e (patch)
tree4811b9d0766298ea0093d5266dd7b2248359416e /source/dialogs/run.c
parentba9e1fb92a3d4428252f36e8df0dc77cd3874179 (diff)
Consolidate logging
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/dialogs/run.c')
-rw-r--r--source/dialogs/run.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/dialogs/run.c b/source/dialogs/run.c
index b8534095..62e55150 100644
--- a/source/dialogs/run.c
+++ b/source/dialogs/run.c
@@ -29,6 +29,10 @@
* \ingroup RUNMode
* @{
*/
+
+/** The log domain of this dialog. */
+#define G_LOG_DOMAIN "Dialogs.Run"
+
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
@@ -56,10 +60,6 @@
*/
#define RUN_CACHE_FILE "rofi-3.runcache"
-/** The log domain of this dialog. */
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "Dialogs.Run"
-
/**
* The internal data structure holding the private data of the Run Mode.
*/
@@ -86,7 +86,7 @@ static void exec_cmd ( const char *cmd, int run_in_term )
gsize lf_cmd_size = 0;
gchar *lf_cmd = g_locale_from_utf8 ( cmd, -1, NULL, &lf_cmd_size, &error );
if ( error != NULL ) {
- fprintf ( stderr, "Failed to convert command to locale encoding: %s\n", error->message );
+ g_warning ( "Failed to convert command to locale encoding: %s", error->message );
g_error_free ( error );
return;
}
@@ -188,8 +188,8 @@ static char ** get_apps_external ( char **retv, unsigned int *length, unsigned i
free ( buffer );
}
if ( fclose ( inp ) != 0 ) {
- fprintf ( stderr, "Failed to close stdout off executor script: '%s'\n",
- strerror ( errno ) );
+ g_warning ( "Failed to close stdout off executor script: '%s'",
+ g_strerror ( errno ) );
}
}
}