From 128381fc93e56cefb2b02b973a2ef3380594c91f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 24 May 2011 19:48:13 +0200 Subject: include/report/report.h: change API from having more functions to having more flags Now we have three functions instead of four: int report_problem_in_dir(const char *dirname, int flags); int report_problem_in_memory(problem_data_t *pd, int flags); int report_problem(problem_data_t *pd); (third one is a trivial wrapper around report_problem_in_memory), and two new flags LIBREPORT_ANALYZE and LIBREPORT_RELOAD_DATA. Signed-off-by: Denys Vlasenko --- src/gui-gtk/abrt-gtk.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gui-gtk') diff --git a/src/gui-gtk/abrt-gtk.c b/src/gui-gtk/abrt-gtk.c index f6e9c5c2..a3bf1cab 100644 --- a/src/gui-gtk/abrt-gtk.c +++ b/src/gui-gtk/abrt-gtk.c @@ -108,8 +108,8 @@ static void on_row_activated_cb(GtkTreeView *treeview, GtkTreePath *path, GtkTre GValue d_dir = { 0 }; gtk_tree_model_get_value(store, &iter, COLUMN_DUMP_DIR, &d_dir); - const char *dirname= g_value_get_string(&d_dir); - analyze_and_report_dir(dirname, LIBREPORT_NOWAIT); + const char *dirname = g_value_get_string(&d_dir); + report_problem_in_dir(dirname, LIBREPORT_ANALYZE | LIBREPORT_NOWAIT); } } } @@ -203,8 +203,11 @@ static void on_button_send_cb(GtkWidget *button, gpointer data) /* why it doesn't want to hide before report ends? */ gtk_widget_destroy(s_report_window); - int status = report(pd); - VERB1 log("Reporting finished with status: %i", status); +//TODO: LIBREPORT_WAIT is used here only because we don't want to leave temp dir. +//Change to LIBREPORT_NOWAIT when libreport is taught to +//properly delete temp dir even with LIBREPORT_NOWAIT. + int status = report_problem_in_memory(pd, LIBREPORT_WAIT); + VERB1 log("Reporting finished with status %i", status); free_problem_data(pd); } -- cgit