summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/daemon/abrt_event.conf4
-rw-r--r--src/gtk-helpers/event_config_dialog.c37
-rw-r--r--src/gui-wizard-gtk/wizard.glade6
-rw-r--r--src/plugins/abrt-action-print.c21
-rw-r--r--src/plugins/report_Logger.conf1
5 files changed, 32 insertions, 37 deletions
diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
index 1f94533a..d9b87d5a 100644
--- a/src/daemon/abrt_event.conf
+++ b/src/daemon/abrt_event.conf
@@ -75,5 +75,5 @@ EVENT=post-create analyzer=Kerneloops abrt-action-analyze-oops
EVENT=report_kerneloops.org analyzer=Kerneloops abrt-action-kerneloops
-EVENT=report_Bugzilla analyzer=Python abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
-EVENT=report_Logger abrt-action-print -o "${Log_File:-/tmp/abrt.log}"
+EVENT=report_Bugzilla analyzer=Python abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
+EVENT=report_Logger abrt-action-print -o "${Log_File:-/tmp/abrt.log}" -a "${Append:-no}"
diff --git a/src/gtk-helpers/event_config_dialog.c b/src/gtk-helpers/event_config_dialog.c
index d85ebd6c..c9f24894 100644
--- a/src/gtk-helpers/event_config_dialog.c
+++ b/src/gtk-helpers/event_config_dialog.c
@@ -20,7 +20,7 @@
#include <gtk/gtk.h>
#include "libreport-gtk.h"
-static GtkWindow *g_parent_dialog;
+static GtkWindow *g_event_list_window;
static GList *option_widget_list;
enum
@@ -261,25 +261,20 @@ static void show_event_config_dialog(const char *event_name)
}
event_config_t *event = get_event_config(event_name);
- char *title;
- if (event->screen_name != NULL)
- title = event->screen_name;
- else
- title = _("Event Configuration");
GtkWidget *dialog = gtk_dialog_new_with_buttons(
- title,
- g_parent_dialog,
+ /*title:*/ event->screen_name ? event->screen_name : event_name,
+ g_event_list_window,
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK,
GTK_RESPONSE_APPLY,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
NULL);
- if (g_parent_dialog != NULL)
+ if (g_event_list_window != NULL)
{
gtk_window_set_icon_name(GTK_WINDOW(dialog),
- gtk_window_get_icon_name(g_parent_dialog));
+ gtk_window_get_icon_name(g_event_list_window));
}
int length = g_list_length(event->options);
@@ -311,17 +306,17 @@ void show_events_list_dialog(GtkWindow *parent)
load_event_config_data_from_keyring();
}
- GtkWidget *parent_dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- g_parent_dialog = (GtkWindow*)parent_dialog;
- gtk_window_set_title(g_parent_dialog, _("Event Configuration"));
- gtk_window_set_default_size(g_parent_dialog, 450, 400);
- gtk_window_set_position(g_parent_dialog, parent ? GTK_WIN_POS_CENTER_ON_PARENT : GTK_WIN_POS_CENTER);
+ GtkWidget *event_list_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ g_event_list_window = (GtkWindow*)event_list_window;
+ gtk_window_set_title(g_event_list_window, _("Event Configuration"));
+ gtk_window_set_default_size(g_event_list_window, 450, 400);
+ gtk_window_set_position(g_event_list_window, parent ? GTK_WIN_POS_CENTER_ON_PARENT : GTK_WIN_POS_CENTER);
if (parent != NULL)
{
- gtk_window_set_transient_for(g_parent_dialog, parent);
+ gtk_window_set_transient_for(g_event_list_window, parent);
// modal = parent window can't steal focus
- gtk_window_set_modal(g_parent_dialog, true);
- gtk_window_set_icon_name(g_parent_dialog,
+ gtk_window_set_modal(g_event_list_window, true);
+ gtk_window_set_icon_name(g_event_list_window,
gtk_window_get_icon_name(parent));
}
@@ -377,7 +372,7 @@ void show_events_list_dialog(GtkWindow *parent)
g_signal_connect(events_tv, "cursor-changed", G_CALLBACK(on_event_row_changed_cb), configure_event_btn);
GtkWidget *close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
- g_signal_connect(close_btn, "clicked", G_CALLBACK(on_close_event_list_cb), g_parent_dialog);
+ g_signal_connect(close_btn, "clicked", G_CALLBACK(on_close_event_list_cb), g_event_list_window);
GtkWidget *btnbox = gtk_hbutton_box_new();
gtk_box_pack_end(GTK_BOX(btnbox), configure_event_btn, false, false, 0);
@@ -385,7 +380,7 @@ void show_events_list_dialog(GtkWindow *parent)
gtk_box_pack_start(GTK_BOX(main_vbox), events_scroll, true, true, 10);
gtk_box_pack_start(GTK_BOX(main_vbox), btnbox, false, false, 0);
- gtk_container_add(GTK_CONTAINER(parent_dialog), main_vbox);
+ gtk_container_add(GTK_CONTAINER(event_list_window), main_vbox);
- gtk_widget_show_all(parent_dialog);
+ gtk_widget_show_all(event_list_window);
}
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
index 56203104..ecd59b6d 100644
--- a/src/gui-wizard-gtk/wizard.glade
+++ b/src/gui-wizard-gtk/wizard.glade
@@ -197,12 +197,13 @@
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="button_cfg1">
- <property name="label" translatable="yes">Configure Events</property>
+ <property name="label" translatable="yes">Configure _Events</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="image_position">right</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -328,12 +329,13 @@
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="button_cfg2">
- <property name="label" translatable="yes">Configure Events</property>
+ <property name="label" translatable="yes">Configure _Events</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="image_position">right</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/plugins/abrt-action-print.c b/src/plugins/abrt-action-print.c
index a5d7219b..f34fd014 100644
--- a/src/plugins/abrt-action-print.c
+++ b/src/plugins/abrt-action-print.c
@@ -25,6 +25,7 @@
static const char *dump_dir_name = ".";
static const char *output_file = NULL;
+static const char *append = "no";
static const char *open_mode = "w";
int main(int argc, char **argv)
@@ -35,20 +36,22 @@ int main(int argc, char **argv)
/* Can't keep these strings/structs static: _() doesn't support that */
const char *program_usage_string = _(
- PROGNAME" [-v] [-o FILE] -d DIR\n"
+ PROGNAME" [-v] -d DIR [-o FILE] [-a yes/no]\n"
"\n"
- "Print information about the crash to standard output"
+ "Print problem information to standard output or FILE"
);
enum {
OPT_v = 1 << 0,
OPT_d = 1 << 1,
OPT_o = 1 << 2,
+ OPT_a = 1 << 3,
};
/* Keep enum above and order of options below in sync! */
struct options program_options[] = {
OPT__VERBOSE(&g_verbose),
- OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Crash dump directory")),
- OPT_STRING('o', NULL, &output_file , "FILE", _("Output file")),
+ OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")),
+ OPT_STRING('o', NULL, &output_file , "FILE" , _("Output file")),
+ OPT_STRING('a', NULL, &append , "yes/no", _("Append to, or overwrite FILE")),
OPT_END()
};
/*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string);
@@ -56,18 +59,12 @@ int main(int argc, char **argv)
putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose));
//msg_prefix = PROGNAME;
-//TODO: convert to an option:
- char *env = getenv("Logger_AppendLogs");
- VERB3 log("Logger_AppendLogs env:'%s'", env);
- if (env && string_to_bool(env))
- open_mode = "a";
-
if (output_file)
{
+ if (string_to_bool(append))
+ open_mode = "a";
if (!freopen(output_file, open_mode, stdout))
- {
perror_msg_and_die("Can't open '%s'", output_file);
- }
}
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
diff --git a/src/plugins/report_Logger.conf b/src/plugins/report_Logger.conf
index 87e36882..d885ce5e 100644
--- a/src/plugins/report_Logger.conf
+++ b/src/plugins/report_Logger.conf
@@ -1 +1,2 @@
Log_File=/tmp/abrt.log
+Append=yes