summaryrefslogtreecommitdiffstats
path: root/src/gui-gtk
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-05-24 19:48:13 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2011-05-24 19:48:13 +0200
commit128381fc93e56cefb2b02b973a2ef3380594c91f (patch)
treed8a15bc542594c1e040c58f37b4504c02d819909 /src/gui-gtk
parent2e1d04e7dd85551e9d33c51bbd6008ac9b1b84c1 (diff)
downloadabrt-128381fc93e56cefb2b02b973a2ef3380594c91f.tar.gz
abrt-128381fc93e56cefb2b02b973a2ef3380594c91f.tar.xz
abrt-128381fc93e56cefb2b02b973a2ef3380594c91f.zip
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 <dvlasenk@redhat.com>
Diffstat (limited to 'src/gui-gtk')
-rw-r--r--src/gui-gtk/abrt-gtk.c11
1 files changed, 7 insertions, 4 deletions
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);
}