about summary refs log tree commit diff
path: root/clients/tui/newt/nmt-newt-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/tui/newt/nmt-newt-utils.c')
-rw-r--r--clients/tui/newt/nmt-newt-utils.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/clients/tui/newt/nmt-newt-utils.c b/clients/tui/newt/nmt-newt-utils.c
index f37a851e..e8866500 100644
--- a/clients/tui/newt/nmt-newt-utils.c
+++ b/clients/tui/newt/nmt-newt-utils.c
@@ -65,9 +65,9 @@ nmt_newt_dialog_g_log_handler (const char     *log_domain,
 	}
 
 	full_message = g_strdup_printf ("%s%s%s%s%s",
-	                                log_domain ? log_domain : "",
+	                                log_domain ?: "",
 	                                log_domain && level_name ? " " : "",
-	                                level_name ? level_name : "",
+	                                level_name ?: "",
 	                                log_domain || level_name ? ": " : "",
 	                                message);
 
@@ -87,7 +87,7 @@ nmt_newt_dialog_g_log_handler (const char     *log_domain,
 	newtGridSetField (grid, 0, 1, NEWT_GRID_COMPONENT, ok, 0, 1, 0, 0,
 	                  NEWT_ANCHOR_RIGHT, 0);
 
-	newtGridWrappedWindow (grid, (char *) (level_name ? level_name : ""));
+	newtGridWrappedWindow (grid, (char *) (level_name ?: ""));
 	newtGridFree (grid, TRUE);
 
 	form = newtForm (NULL, NULL, 0);
@@ -359,21 +359,11 @@ nmt_newt_edit_string (const char *data)
 		goto done;
 	}
 
-#if GLIB_CHECK_VERSION (2, 34, 0)
-	G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 	if (!g_spawn_check_exit_status (status, &error)) {
 		nmt_newt_message_dialog (_("Editor failed: %s"), error->message);
 		g_error_free (error);
 		goto done;
 	}
-	G_GNUC_END_IGNORE_DEPRECATIONS
-#else
-	if (WIFEXITED (status)) {
-		if (WEXITSTATUS (status) != 0)
-			nmt_newt_message_dialog (_("Editor failed with status %d"), WEXITSTATUS (status));
-	} else if (WIFSIGNALED (status))
-		nmt_newt_message_dialog (_("Editor failed with signal %d"), WTERMSIG (status));
-#endif
 
 	if (!g_file_get_contents (filename, &new_data, NULL, &error)) {
 		nmt_newt_message_dialog (_("Could not re-read file: %s"), error->message);
@@ -386,5 +376,5 @@ nmt_newt_edit_string (const char *data)
 	g_free (filename);
 
 	return new_data;
-}	
+}