New upstream release 2.3.0
Signed-off-by: Jakub Filak <jfilak@redhat.com>
This commit is contained in:
parent
3e3a85ccb0
commit
8d317979fd
228266
0001-Translation-updates.patch
Normal file
228266
0001-Translation-updates.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,133 +0,0 @@
|
||||
From 8b3d8dd997d2103087cbaef4642b52147db97f16 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 8 Jul 2014 16:10:01 +0200
|
||||
Subject: [PATCH 1/8] ureport: implement attaching of user comments
|
||||
|
||||
Closes #199
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/json.c | 10 ++++++++++
|
||||
src/lib/ureport.h | 4 ++++
|
||||
src/plugins/ureport.c | 33 +++++++++++++++++++++++++++++----
|
||||
3 files changed, 43 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/lib/json.c b/src/lib/json.c
|
||||
index 66db537..08ffe8c 100644
|
||||
--- a/src/lib/json.c
|
||||
+++ b/src/lib/json.c
|
||||
@@ -133,3 +133,13 @@ struct post_state *ureport_attach_email(const char *bthash, const char *email,
|
||||
|
||||
return post_state;
|
||||
}
|
||||
+
|
||||
+struct post_state *ureport_attach_comment(const char *bthash, const char *comment,
|
||||
+ struct ureport_server_config *config)
|
||||
+{
|
||||
+ char *json_attachment = new_json_attachment(bthash, "comment", comment);
|
||||
+ struct post_state *post_state = post_ureport(json_attachment, config);
|
||||
+ free(json_attachment);
|
||||
+
|
||||
+ return post_state;
|
||||
+}
|
||||
diff --git a/src/lib/ureport.h b/src/lib/ureport.h
|
||||
index 16f40f1..80f26d9 100644
|
||||
--- a/src/lib/ureport.h
|
||||
+++ b/src/lib/ureport.h
|
||||
@@ -51,6 +51,10 @@ struct post_state *ureport_attach_rhbz(const char *bthash, int rhbz_bug_id,
|
||||
struct post_state *ureport_attach_email(const char *bthash, const char *email,
|
||||
struct ureport_server_config *config);
|
||||
|
||||
+#define ureport_attach_comment libreport_ureport_attach_comment
|
||||
+struct post_state *ureport_attach_comment(const char *bthash, const char *comment,
|
||||
+ struct ureport_server_config *config);
|
||||
+
|
||||
#define ureport_from_dump_dir libreport_ureport_from_dump_dir
|
||||
char *ureport_from_dump_dir(const char *dump_dir_path);
|
||||
|
||||
diff --git a/src/plugins/ureport.c b/src/plugins/ureport.c
|
||||
index 59554f4..e6237cc 100644
|
||||
--- a/src/plugins/ureport.c
|
||||
+++ b/src/plugins/ureport.c
|
||||
@@ -435,6 +435,8 @@ int main(int argc, char **argv)
|
||||
bool rhbz_bug_from_rt = false;
|
||||
const char *email_address = NULL;
|
||||
bool email_address_from_env = false;
|
||||
+ char *comment = NULL;
|
||||
+ bool comment_file = NULL;
|
||||
struct dump_dir *dd = NULL;
|
||||
struct options program_options[] = {
|
||||
OPT__VERBOSE(&g_verbose),
|
||||
@@ -456,11 +458,16 @@ int main(int argc, char **argv)
|
||||
_("attach RHBZ bug (requires -a|-A, conflicts with -B)")),
|
||||
OPT_BOOL('B', "bug-id-rt", &rhbz_bug_from_rt,
|
||||
_("attach last RHBZ bug from reported_to (requires -a|-A, conflicts with -b)")),
|
||||
+ OPT_STRING('o', "comment", &comment, "DESCRIPTION",
|
||||
+ _("attach short text (requires -a|-A, conflicts with -D)")),
|
||||
+ OPT_BOOL('O', "comment-file", &comment_file,
|
||||
+ _("attach short text from comment (requires -a|-A, conflicts with -d)")),
|
||||
+
|
||||
OPT_END(),
|
||||
};
|
||||
|
||||
const char *program_usage_string = _(
|
||||
- "& [-v] [-c FILE] [-u URL] [-k] [-t SOURCE] [-A -a bthash -B -b bug-id -E -e email] [-d DIR]\n"
|
||||
+ "& [-v] [-c FILE] [-u URL] [-k] [-t SOURCE] [-A -a bthash -B -b bug-id -E -e email -O -o comment] [-d DIR]\n"
|
||||
"\n"
|
||||
"Upload micro report or add an attachment to a micro report\n"
|
||||
"\n"
|
||||
@@ -495,7 +502,10 @@ int main(int argc, char **argv)
|
||||
if (email_address && email_address_from_env)
|
||||
error_msg_and_die("You need to pass either -e bthash or -E");
|
||||
|
||||
- if (ureport_hash_from_rt || rhbz_bug_from_rt)
|
||||
+ if (comment && comment_file)
|
||||
+ error_msg_and_die("You need to pass either -o comment or -O");
|
||||
+
|
||||
+ if (ureport_hash_from_rt || rhbz_bug_from_rt || comment_file)
|
||||
{
|
||||
dd = dd_opendir(dump_dir_path, DD_OPEN_READONLY);
|
||||
if (!dd)
|
||||
@@ -533,6 +543,15 @@ int main(int argc, char **argv)
|
||||
free_report_result(bz_result);
|
||||
}
|
||||
|
||||
+ if (comment_file)
|
||||
+ {
|
||||
+ comment = dd_load_text(dd, FILENAME_COMMENT);
|
||||
+ if (comment == NULL)
|
||||
+ error_msg_and_die(_("Cannot attach comment from 'comment' file"));
|
||||
+ if (comment[0] == '\0')
|
||||
+ error_msg_and_die(_("'comment' file is empty"));
|
||||
+ }
|
||||
+
|
||||
dd_close(dd);
|
||||
}
|
||||
|
||||
@@ -546,8 +565,8 @@ int main(int argc, char **argv)
|
||||
|
||||
if (ureport_hash)
|
||||
{
|
||||
- if (rhbz_bug < 0 && !email_address)
|
||||
- error_msg_and_die(_("You need to specify bug ID, contact email or both"));
|
||||
+ if (rhbz_bug < 0 && !email_address && !comment)
|
||||
+ error_msg_and_die(_("You need to specify bug ID, contact email, comment or all of them"));
|
||||
|
||||
if (rhbz_bug >= 0)
|
||||
{
|
||||
@@ -561,6 +580,12 @@ int main(int argc, char **argv)
|
||||
goto finalize;
|
||||
}
|
||||
|
||||
+ if (comment)
|
||||
+ {
|
||||
+ if (perform_attach(&config, ureport_hash, (attach_handler)ureport_attach_comment, (void *)comment))
|
||||
+ goto finalize;
|
||||
+ }
|
||||
+
|
||||
ret = 0;
|
||||
goto finalize;
|
||||
}
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,66 +0,0 @@
|
||||
From b1911301e6c8cbe0ae4ea90d4e0cbb08e575e743 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 18 Jul 2014 08:28:04 +0200
|
||||
Subject: [PATCH 2/8] gui: make preferences dialogue modal for parents
|
||||
|
||||
Resolves rhbz#1120879
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/config_dialog.c | 26 +++++++++++++++++++-------
|
||||
1 file changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
|
||||
index 6de08e3..2397df7 100644
|
||||
--- a/src/gtk-helpers/config_dialog.c
|
||||
+++ b/src/gtk-helpers/config_dialog.c
|
||||
@@ -282,7 +282,17 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
|
||||
INITIALIZE_LIBREPORT();
|
||||
|
||||
// config window
|
||||
- GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
+ GtkWidget *window = NULL;
|
||||
+ if (parent != NULL)
|
||||
+ {
|
||||
+ window = gtk_dialog_new();
|
||||
+ gtk_window_set_icon_name(GTK_WINDOW(window), gtk_window_get_icon_name(parent));
|
||||
+ gtk_window_set_modal(GTK_WINDOW(window), TRUE);
|
||||
+ gtk_window_set_transient_for(GTK_WINDOW(window), parent);
|
||||
+ }
|
||||
+ else
|
||||
+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
+
|
||||
gtk_container_set_border_width(GTK_CONTAINER(window), 5);
|
||||
gtk_window_set_title(GTK_WINDOW(window), _("Configuration"));
|
||||
gtk_window_set_default_size(GTK_WINDOW(window), 450, 400);
|
||||
@@ -290,11 +300,6 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
|
||||
? GTK_WIN_POS_CENTER_ON_PARENT
|
||||
: GTK_WIN_POS_CENTER);
|
||||
|
||||
- if (parent != NULL)
|
||||
- {
|
||||
- gtk_window_set_modal(GTK_WINDOW(window), true);
|
||||
- gtk_window_set_transient_for(GTK_WINDOW(window), parent);
|
||||
- }
|
||||
|
||||
//g_signal_connect(window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
@@ -334,7 +339,14 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
|
||||
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(main_vbox), btn_box, 0, 0, 0);
|
||||
- gtk_container_add(GTK_CONTAINER(window), main_vbox);
|
||||
+ if (parent != NULL)
|
||||
+ {
|
||||
+ GtkWidget *content = gtk_dialog_get_content_area(GTK_DIALOG(window));
|
||||
+ gtk_box_pack_start(GTK_BOX(content), main_vbox, /*expand*/TRUE, /*fill*/TRUE, /*padding*/0);
|
||||
+ gtk_widget_show_all(content);
|
||||
+ }
|
||||
+ else
|
||||
+ gtk_container_add(GTK_CONTAINER(window), main_vbox);
|
||||
|
||||
//gtk_widget_show_all(window);
|
||||
return GTK_WINDOW(window);
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 24885018e6cef6fc1c23ca81803a3787c7b30b1d Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 18 Jul 2014 08:51:08 +0200
|
||||
Subject: [PATCH 3/8] gui: select the first in the configuration list
|
||||
|
||||
Resolves rhbz#1120881
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/config_dialog.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
|
||||
index 2397df7..c99ea85 100644
|
||||
--- a/src/gtk-helpers/config_dialog.c
|
||||
+++ b/src/gtk-helpers/config_dialog.c
|
||||
@@ -239,6 +239,14 @@ GtkWidget *create_config_tab_content(const char *column_label,
|
||||
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(model), config_filter_func, NULL, NULL);
|
||||
|
||||
gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(model));
|
||||
+
|
||||
+ { /* Selected the first row, so we do not need to call gtk_tree_view_scroll_to_cell() */
|
||||
+ GtkTreeIter iter;
|
||||
+ gtk_tree_model_get_iter_first(model, &iter);
|
||||
+ GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv));
|
||||
+ gtk_tree_selection_select_iter(selection, &iter);
|
||||
+ }
|
||||
+
|
||||
gtk_container_add(GTK_CONTAINER(scroll), tv);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(main_vbox), scroll, true, true, 10);
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 36ef849dce4cb702852822017807ad8faf8ae622 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 18 Jul 2014 09:04:47 +0200
|
||||
Subject: [PATCH 4/8] gui: wrap lines for human readable files
|
||||
|
||||
Wrap lines for comment and reason files.
|
||||
|
||||
Do not wrap lines for maps, backtrace, environ and ... becuase
|
||||
these files are something like lists consiting from lines.
|
||||
|
||||
Resolves rhbz#1120871
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index ae3e2df..68af9bd 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -1129,6 +1129,10 @@ static void append_item_to_ls_details(gpointer name, gpointer value, gpointer da
|
||||
{
|
||||
GtkWidget *tab_lbl = gtk_label_new((char *)name);
|
||||
GtkWidget *tev = gtk_text_view_new();
|
||||
+
|
||||
+ if (strcmp(name, FILENAME_COMMENT) == 0 || strcmp(name, FILENAME_REASON) == 0)
|
||||
+ gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(tev), GTK_WRAP_WORD);
|
||||
+
|
||||
gtk_widget_override_font(GTK_WIDGET(tev), g_monospace_font);
|
||||
load_text_to_text_view(GTK_TEXT_VIEW(tev), (char *)name);
|
||||
/* init searching */
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,32 +0,0 @@
|
||||
From f5ca628791e23af0ebfae6bbee715efe1e90e34d Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 18 Jul 2014 13:38:40 +0200
|
||||
Subject: [PATCH 5/8] wizard: fix help text for screencasting
|
||||
|
||||
Related to rhbz#1120870
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 68af9bd..16b06db 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -3490,10 +3490,10 @@ void create_assistant(bool expert_mode)
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(g_btn_startcast), false);
|
||||
gtk_widget_set_tooltip_markup(GTK_WIDGET(g_btn_startcast),
|
||||
_("In order to enable the built-in screencasting "
|
||||
- "functionality the package recordmydesktop has to be installed. "
|
||||
+ "functionality the package fros-recordmydesktop has to be installed. "
|
||||
"Please run the following command if you want to install it."
|
||||
"\n\n"
|
||||
- "<b>su -c \"yum install recordmydesktop\"</b>"
|
||||
+ "<b>su -c \"yum install fros-recordmydesktop\"</b>"
|
||||
));
|
||||
}
|
||||
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,91 +0,0 @@
|
||||
From 7eccd835673ebea736a756537c8ca7c1b9ab711a Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 18 Jul 2014 11:11:57 +0200
|
||||
Subject: [PATCH 6/8] gui: support Enter & 2Click in Preferences list
|
||||
|
||||
Related to rhbz#1067123
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/config_dialog.c | 43 +++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 39 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
|
||||
index c99ea85..2a723cc 100644
|
||||
--- a/src/gtk-helpers/config_dialog.c
|
||||
+++ b/src/gtk-helpers/config_dialog.c
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
+#include <gdk/gdk.h>
|
||||
#include "internal_libreport_gtk.h"
|
||||
|
||||
enum
|
||||
@@ -206,6 +207,40 @@ static gboolean config_filter_func(GtkTreeModel *model,
|
||||
return visible;
|
||||
}
|
||||
|
||||
+static void open_config_for_selected_row(GtkTreeView *tv)
|
||||
+{
|
||||
+ config_dialog_t *cdialog = (config_dialog_t *)get_column_value_from_row(tv, CONFIG_DIALOG, TYPE_POINTER);
|
||||
+ const char *name = (const char *)get_column_value_from_row(tv, COLUMN_NAME, TYPE_STR);
|
||||
+
|
||||
+ cdialog_run(cdialog, name);
|
||||
+}
|
||||
+
|
||||
+static gboolean on_key_press_event_cb(GtkWidget *btn, GdkEvent *event, gpointer user_data)
|
||||
+{
|
||||
+ GdkEventKey *ek = (GdkEventKey *)event;
|
||||
+
|
||||
+ if (ek->keyval == GDK_KEY_Return)
|
||||
+ {
|
||||
+ GtkTreeView *tv = (GtkTreeView *)user_data;
|
||||
+ open_config_for_selected_row(tv);
|
||||
+ }
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+static gboolean on_button_press_event_cb(GtkWidget *btn, GdkEvent *event, gpointer user_data)
|
||||
+{
|
||||
+ GdkEventButton *eb = (GdkEventButton *)event;
|
||||
+
|
||||
+ if (eb->type == GDK_2BUTTON_PRESS)
|
||||
+ {
|
||||
+ GtkTreeView *tv = (GtkTreeView *)user_data;
|
||||
+ open_config_for_selected_row(tv);
|
||||
+ }
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
GtkWidget *create_config_tab_content(const char *column_label,
|
||||
GtkListStore *store)
|
||||
{
|
||||
@@ -216,6 +251,9 @@ GtkWidget *create_config_tab_content(const char *column_label,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
/* workflow list treeview */
|
||||
GtkWidget *tv = gtk_tree_view_new();
|
||||
+ g_signal_connect(tv, "key-press-event", G_CALLBACK(on_key_press_event_cb), tv);
|
||||
+ g_signal_connect(tv, "button-press-event", G_CALLBACK(on_button_press_event_cb), tv);
|
||||
+
|
||||
/* column with workflow name and description */
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
@@ -272,11 +310,8 @@ static void on_configure_cb(GtkWidget *btn, gpointer user_data)
|
||||
GtkWidget *vbox = gtk_notebook_get_nth_page(nb, current_page_n);
|
||||
GList *children = gtk_container_get_children(GTK_CONTAINER(vbox));
|
||||
GtkScrolledWindow *sw = (GtkScrolledWindow *)children->data;
|
||||
- GtkTreeView *tv = (GtkTreeView *)gtk_bin_get_child(GTK_BIN(sw));
|
||||
- config_dialog_t *cdialog = (config_dialog_t *)get_column_value_from_row(tv, CONFIG_DIALOG, TYPE_POINTER);
|
||||
- const char *name = (const char *)get_column_value_from_row(tv, COLUMN_NAME, TYPE_STR);
|
||||
|
||||
- cdialog_run(cdialog, name);
|
||||
+ open_config_for_selected_row((GtkTreeView *)gtk_bin_get_child(GTK_BIN(sw)));
|
||||
}
|
||||
|
||||
static void on_close_cb(GtkWidget *btn, gpointer config_list_w)
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,50 +0,0 @@
|
||||
From ebfe7e07c42b0052ecd27c1889f3a0a29976ec63 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 18 Jul 2014 12:20:06 +0200
|
||||
Subject: [PATCH 7/8] gui: apply configuration dialogues changes on Enter key
|
||||
|
||||
Related to rhbz#1067123
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/event_config_dialog.c | 3 +++
|
||||
src/gtk-helpers/workflow_config_dialog.c | 2 ++
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/gtk-helpers/event_config_dialog.c b/src/gtk-helpers/event_config_dialog.c
|
||||
index cfd7433..3cc111c 100644
|
||||
--- a/src/gtk-helpers/event_config_dialog.c
|
||||
+++ b/src/gtk-helpers/event_config_dialog.c
|
||||
@@ -122,6 +122,7 @@ static void add_option_to_table(gpointer data, gpointer user_data)
|
||||
/*left,top:*/ 0, last_row,
|
||||
/*width,height:*/ 1, 1);
|
||||
option_input = gtk_entry_new();
|
||||
+ gtk_entry_set_activates_default(GTK_ENTRY(option_input), TRUE);
|
||||
gtk_widget_set_hexpand(option_input, TRUE);
|
||||
if (option->eo_value != NULL)
|
||||
gtk_entry_set_text(GTK_ENTRY(option_input), option->eo_value);
|
||||
@@ -331,6 +332,8 @@ config_dialog_t *create_event_config_dialog(const char *event_name, GtkWindow *p
|
||||
|
||||
free(window_title);
|
||||
|
||||
+ gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_APPLY);
|
||||
+
|
||||
/* Allow resize?
|
||||
* W/o resize, e.g. upload configuration hint looks awfully
|
||||
* line wrapped.
|
||||
diff --git a/src/gtk-helpers/workflow_config_dialog.c b/src/gtk-helpers/workflow_config_dialog.c
|
||||
index 6c4d77c..d55f2f0 100644
|
||||
--- a/src/gtk-helpers/workflow_config_dialog.c
|
||||
+++ b/src/gtk-helpers/workflow_config_dialog.c
|
||||
@@ -94,6 +94,8 @@ config_dialog_t *create_workflow_config_dialog(const char *workflow_name, GtkWin
|
||||
|
||||
free(window_title);
|
||||
|
||||
+ gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_APPLY);
|
||||
+
|
||||
gtk_window_set_resizable(GTK_WINDOW(dialog), true);
|
||||
gtk_window_set_default_size(GTK_WINDOW(dialog), 450, 450);
|
||||
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,73 +0,0 @@
|
||||
From 74cff8bbb789e388ff74510e1be12e3a6958a923 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 18 Jul 2014 13:44:53 +0200
|
||||
Subject: [PATCH 8/8] gui: close ask dialogues on Enter key
|
||||
|
||||
Related to rhbz#1067123
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/ask_dialogs.c | 7 ++++++-
|
||||
src/gui-wizard-gtk/wizard.c | 6 ++++++
|
||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gtk-helpers/ask_dialogs.c b/src/gtk-helpers/ask_dialogs.c
|
||||
index d188dc5..81beea4 100644
|
||||
--- a/src/gtk-helpers/ask_dialogs.c
|
||||
+++ b/src/gtk-helpers/ask_dialogs.c
|
||||
@@ -81,8 +81,11 @@ static int run_ask_yes_no_save_generic_result_dialog(ask_yes_no_dialog_flags fla
|
||||
/* let's try to use the text as markup
|
||||
* this allows us to use hyperlinks to man pages */
|
||||
gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), message);
|
||||
- gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Yes"), GTK_RESPONSE_YES);
|
||||
+ /* Follow GTK3's yes-no-buttons order:
|
||||
+ * [No] [Yes]
|
||||
+ */
|
||||
GtkWidget *no_button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("_No"), GTK_RESPONSE_NO);
|
||||
+ gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Yes"), GTK_RESPONSE_YES);
|
||||
|
||||
gint response = GTK_RESPONSE_NO;
|
||||
g_signal_connect(G_OBJECT(dialog), "response",
|
||||
@@ -101,6 +104,8 @@ static int run_ask_yes_no_save_generic_result_dialog(ask_yes_no_dialog_flags fla
|
||||
G_CALLBACK(on_toggle_ask_yes_no_yesforever_cb), (gpointer)no_button);
|
||||
}
|
||||
|
||||
+ /* Esc -> No, Enter -> Yes */
|
||||
+ gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
|
||||
gtk_widget_show(ask_yes_no_cb);
|
||||
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 16b06db..0fde0f4 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -1584,6 +1584,7 @@ static char *ask_helper(const char *msg, void *args, bool password)
|
||||
GTK_BUTTONS_OK_CANCEL,
|
||||
"%s", msg);
|
||||
char *tagged_msg = tag_url(msg, "\n");
|
||||
+ gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
|
||||
gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), tagged_msg);
|
||||
free(tagged_msg);
|
||||
|
||||
@@ -1636,6 +1637,8 @@ static int run_event_gtk_ask_yes_no(const char *msg, void *args)
|
||||
gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), tagged_msg);
|
||||
free(tagged_msg);
|
||||
|
||||
+ /* Esc -> No, Enter -> Yes */
|
||||
+ gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
|
||||
const int ret = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_YES;
|
||||
|
||||
gtk_widget_destroy(dialog);
|
||||
@@ -1892,6 +1895,9 @@ static int ask_replace_old_private_group_name(void)
|
||||
free(message);
|
||||
free(markup_message);
|
||||
|
||||
+ /* Esc -> No, Enter -> Yes */
|
||||
+ gtk_dialog_set_default_response(GTK_DIALOG(old_private_group), GTK_RESPONSE_YES);
|
||||
+
|
||||
gint result = gtk_dialog_run(GTK_DIALOG(old_private_group));
|
||||
gtk_widget_destroy(old_private_group);
|
||||
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,75 +0,0 @@
|
||||
From 7d30aa09f740b3559ba610022577189a46dce112 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 24 Jul 2014 13:34:50 +0200
|
||||
Subject: [PATCH 09/20] logging: test log level at first step
|
||||
|
||||
Return from the logger immediately if message's log level is not
|
||||
sufficient to write it to the log.
|
||||
|
||||
This patch is a workaround for rhbz#1122690 where we try to log a
|
||||
'post'ed string which has 18MB of size. It is not worth to try to fix it
|
||||
properly. We do not log such a big amount of data in non-debug mode, we
|
||||
need to have the logging extremely fast and we can live with crashes in
|
||||
debug mode.
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/logging.c | 26 +++++++++++---------------
|
||||
1 file changed, 11 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/lib/logging.c b/src/lib/logging.c
|
||||
index 259a634..4b9dd87 100644
|
||||
--- a/src/lib/logging.c
|
||||
+++ b/src/lib/logging.c
|
||||
@@ -66,7 +66,7 @@ static void log_handler(int level,
|
||||
int line,
|
||||
const char *func)
|
||||
{
|
||||
- if (!logmode)
|
||||
+ if (!logmode || !should_log(level))
|
||||
return;
|
||||
|
||||
/* This is ugly and costs +60 bytes compared to multiple
|
||||
@@ -122,29 +122,25 @@ static void log_handler(int level,
|
||||
strcpy(&msg[used], msg_eol);
|
||||
|
||||
if (flags & LOGMODE_STDIO) {
|
||||
- if(should_log(level))
|
||||
- full_write(STDERR_FILENO, msg, used + msgeol_len);
|
||||
+ full_write(STDERR_FILENO, msg, used + msgeol_len);
|
||||
}
|
||||
msg[used] = '\0'; /* remove msg_eol (usually "\n") */
|
||||
if (flags & LOGMODE_SYSLOG) {
|
||||
- if(should_log(level))
|
||||
- syslog(level, "%s", msg + prefix_len);
|
||||
+ syslog(level, "%s", msg + prefix_len);
|
||||
}
|
||||
|
||||
if ((flags & LOGMODE_CUSTOM) && g_custom_logger) {
|
||||
- if(should_log(level))
|
||||
- g_custom_logger(msg + prefix_len);
|
||||
+ g_custom_logger(msg + prefix_len);
|
||||
}
|
||||
|
||||
if (flags & LOGMODE_JOURNAL) {
|
||||
- if(should_log(level))
|
||||
- sd_journal_send("MESSAGE=%s", msg + prefix_len,
|
||||
- "PRIORITY=%d", level,
|
||||
- "CODE_FILE=%s", file,
|
||||
- "CODE_LINE=%d", line,
|
||||
- "CODE_FUNC=%s", func,
|
||||
- "SYSLOG_FACILITY=1",
|
||||
- NULL);
|
||||
+ sd_journal_send("MESSAGE=%s", msg + prefix_len,
|
||||
+ "PRIORITY=%d", level,
|
||||
+ "CODE_FILE=%s", file,
|
||||
+ "CODE_LINE=%d", line,
|
||||
+ "CODE_FUNC=%s", func,
|
||||
+ "SYSLOG_FACILITY=1",
|
||||
+ NULL);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 1cef1ddc28f327534cfdb433d1f2e10d01b10f44 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 24 Jul 2014 16:07:36 +0200
|
||||
Subject: [PATCH 10/20] json: include json.h accordingly to json-c CFLAGS
|
||||
|
||||
We use $(pkg-config --cflags json-c) but we include <json/json.h>. The
|
||||
proper way to include the json-c header is to include <json.h>.
|
||||
|
||||
That absolute include causes errors while compiling with json-c-0.12
|
||||
where the base include directory was changed to "json-c".
|
||||
|
||||
https://github.com/json-c/json-c/blob/master/ChangeLog
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/json.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/json.c b/src/lib/json.c
|
||||
index 08ffe8c..fc26bc6 100644
|
||||
--- a/src/lib/json.c
|
||||
+++ b/src/lib/json.c
|
||||
@@ -17,7 +17,7 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
-#include <json/json.h>
|
||||
+#include <json.h>
|
||||
|
||||
#include <satyr/abrt.h>
|
||||
#include <satyr/report.h>
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,45 +0,0 @@
|
||||
From cc36c5c2b109fa7ac864400e695c88808b19a5ed Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 25 Jul 2014 12:39:28 +0200
|
||||
Subject: [PATCH 11/20] ureport: include json.h accordingly to json-c CFLAGS
|
||||
|
||||
commit 1cef1ddc28f327534cfdb433d1f2e10d01b10f44
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/Makefile.am | 2 ++
|
||||
src/plugins/ureport.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
|
||||
index 2d95f07..7e0e753 100644
|
||||
--- a/src/plugins/Makefile.am
|
||||
+++ b/src/plugins/Makefile.am
|
||||
@@ -260,9 +260,11 @@ reporter_ureport_CPPFLAGS = \
|
||||
-I$(srcdir)/../lib \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(LIBREPORT_CFLAGS) \
|
||||
+ $(JSON_C_CFLAGS) \
|
||||
-DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
|
||||
-D_GNU_SOURCE
|
||||
reporter_ureport_LDADD = \
|
||||
+ $(JSON_C_LIBS) \
|
||||
../lib/libreport.la \
|
||||
../lib/libreport-web.la
|
||||
endif
|
||||
diff --git a/src/plugins/ureport.c b/src/plugins/ureport.c
|
||||
index e6237cc..063a1e7 100644
|
||||
--- a/src/plugins/ureport.c
|
||||
+++ b/src/plugins/ureport.c
|
||||
@@ -17,7 +17,7 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
-#include <json/json.h>
|
||||
+#include <json.h>
|
||||
#include "internal_libreport.h"
|
||||
#include "ureport.h"
|
||||
#include "libreport_curl.h"
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,432 +0,0 @@
|
||||
From 8190657d9fb808277f29e5535983a0a1f55badcf Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 29 Jul 2014 18:59:31 +0200
|
||||
Subject: [PATCH 12/20] gui: port to gtk-3.13
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/config_dialog.c | 7 ++++-
|
||||
src/gtk-helpers/event_config_dialog.c | 24 +++++++++++++-
|
||||
src/gtk-helpers/workflow_config_dialog.c | 7 ++++-
|
||||
src/gui-wizard-gtk/wizard.c | 47 ++++++++++++++++++++++-----
|
||||
src/gui-wizard-gtk/wizard.glade | 54 ++++++++++++++++----------------
|
||||
5 files changed, 101 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
|
||||
index 2a723cc..5370fcb 100644
|
||||
--- a/src/gtk-helpers/config_dialog.c
|
||||
+++ b/src/gtk-helpers/config_dialog.c
|
||||
@@ -366,7 +366,7 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
|
||||
//buttons
|
||||
GtkWidget *btn_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
|
||||
GtkWidget *configure_btn = gtk_button_new_with_mnemonic(_("C_onfigure"));
|
||||
- GtkWidget *align = gtk_alignment_new(0, 0, 0, 0);
|
||||
+
|
||||
GtkWidget *close_btn = gtk_button_new_with_mnemonic(_("_Close"));
|
||||
GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
|
||||
//force apply and close to have the same size
|
||||
@@ -377,8 +377,13 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
|
||||
g_signal_connect(close_btn, "clicked", (GCallback)on_close_cb, window);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(btn_box), close_btn, 0, 0, 5);
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
+ GtkWidget *align = gtk_alignment_new(0, 0, 0, 0);
|
||||
gtk_box_pack_start(GTK_BOX(btn_box), align, true, true, 5);
|
||||
gtk_box_pack_start(GTK_BOX(btn_box), configure_btn, 0, 0, 5);
|
||||
+#else
|
||||
+ gtk_box_pack_end(GTK_BOX(btn_box), configure_btn, 0, 0, 5);
|
||||
+#endif
|
||||
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(main_vbox), btn_box, 0, 0, 0);
|
||||
diff --git a/src/gtk-helpers/event_config_dialog.c b/src/gtk-helpers/event_config_dialog.c
|
||||
index 3cc111c..e5ce612 100644
|
||||
--- a/src/gtk-helpers/event_config_dialog.c
|
||||
+++ b/src/gtk-helpers/event_config_dialog.c
|
||||
@@ -35,9 +35,16 @@ static GtkWidget *gtk_label_new_justify_left(const gchar *label_str)
|
||||
{
|
||||
GtkWidget *label = gtk_label_new(label_str);
|
||||
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
gtk_misc_set_alignment(GTK_MISC(label), /*xalign:*/ 0, /*yalign:*/ 0.5);
|
||||
/* Make some space between label and input field to the right of it: */
|
||||
gtk_misc_set_padding(GTK_MISC(label), /*xpad:*/ 5, /*ypad:*/ 0);
|
||||
+#else
|
||||
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
+ /* Make some space between label and input field to the right of it: */
|
||||
+ gtk_widget_set_margin_start(label, 5);
|
||||
+ gtk_widget_set_margin_end(label, 5);
|
||||
+#endif
|
||||
return label;
|
||||
}
|
||||
|
||||
@@ -146,7 +153,12 @@ static void add_option_to_table(gpointer data, gpointer user_data)
|
||||
case OPTION_TYPE_HINT_HTML:
|
||||
label = gtk_label_new(option_label);
|
||||
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
gtk_misc_set_alignment(GTK_MISC(label), /*x,yalign:*/ 0.0, 0.0);
|
||||
+#else
|
||||
+ gtk_widget_set_halign(label, GTK_ALIGN_START);
|
||||
+ gtk_widget_set_valign(label, GTK_ALIGN_START);
|
||||
+#endif
|
||||
make_label_autowrap_on_resize(GTK_LABEL(label));
|
||||
|
||||
last_row = add_one_row_to_grid(option_table);
|
||||
@@ -178,7 +190,12 @@ static void add_option_to_table(gpointer data, gpointer user_data)
|
||||
{
|
||||
label = gtk_label_new(option->eo_note_html);
|
||||
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
gtk_misc_set_alignment(GTK_MISC(label), /*x,yalign:*/ 0.0, 0.0);
|
||||
+#else
|
||||
+ gtk_widget_set_halign(label, GTK_ALIGN_START);
|
||||
+ gtk_widget_set_valign(label, GTK_ALIGN_START);
|
||||
+#endif
|
||||
make_label_autowrap_on_resize(GTK_LABEL(label));
|
||||
|
||||
last_row = add_one_row_to_grid(option_table);
|
||||
@@ -194,9 +211,14 @@ static GtkWidget *create_event_config_grid()
|
||||
{
|
||||
GtkWidget *option_table = gtk_grid_new();
|
||||
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 11) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 11 && GTK_MICRO_VERSION < 2))
|
||||
gtk_widget_set_margin_left(option_table, 5);
|
||||
- gtk_widget_set_margin_top(option_table, 5);
|
||||
gtk_widget_set_margin_right(option_table, 5);
|
||||
+#else
|
||||
+ gtk_widget_set_margin_start(option_table, 5);
|
||||
+ gtk_widget_set_margin_end(option_table, 5);
|
||||
+#endif
|
||||
+ gtk_widget_set_margin_top(option_table, 5);
|
||||
gtk_widget_set_margin_bottom(option_table, 5);
|
||||
|
||||
gtk_grid_set_row_homogeneous(GTK_GRID(option_table), FALSE);
|
||||
diff --git a/src/gtk-helpers/workflow_config_dialog.c b/src/gtk-helpers/workflow_config_dialog.c
|
||||
index d55f2f0..6ae130d 100644
|
||||
--- a/src/gtk-helpers/workflow_config_dialog.c
|
||||
+++ b/src/gtk-helpers/workflow_config_dialog.c
|
||||
@@ -37,9 +37,14 @@ static void create_event_config_dialog_content_cb(event_config_t *ec, gpointer n
|
||||
GtkWidget *ev_lbl = gtk_label_new(ec_get_screen_name(ec));
|
||||
|
||||
GtkWidget *content = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 11) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 11 && GTK_MICRO_VERSION < 2))
|
||||
gtk_widget_set_margin_left(content, 10);
|
||||
- gtk_widget_set_margin_top(content, 5);
|
||||
gtk_widget_set_margin_right(content, 10);
|
||||
+#else
|
||||
+ gtk_widget_set_margin_start(content, 10);
|
||||
+ gtk_widget_set_margin_end(content, 10);
|
||||
+#endif
|
||||
+ gtk_widget_set_margin_top(content, 5);
|
||||
gtk_widget_set_margin_bottom(content, 10);
|
||||
|
||||
config_dialog_t *cdialog = create_event_config_dialog_content(ec, (GtkWidget *)content);
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 0fde0f4..d442495 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -261,12 +261,19 @@ static void wrap_fixer(GtkWidget *widget, gpointer data_unused)
|
||||
{
|
||||
GtkLabel *label = (GtkLabel*)widget;
|
||||
//const char *txt = gtk_label_get_label(label);
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
GtkMisc *misc = (GtkMisc*)widget;
|
||||
gfloat yalign; // = 111;
|
||||
gint ypad; // = 111;
|
||||
if (gtk_label_get_line_wrap(label)
|
||||
&& (gtk_misc_get_alignment(misc, NULL, &yalign), yalign == 0)
|
||||
&& (gtk_misc_get_padding(misc, NULL, &ypad), ypad == 0)
|
||||
+#else
|
||||
+ if (gtk_label_get_line_wrap(label)
|
||||
+ && (gtk_widget_get_halign(widget) == GTK_ALIGN_START)
|
||||
+ && (gtk_widget_get_margin_top(widget) == 0)
|
||||
+ && (gtk_widget_get_margin_bottom(widget) == 0)
|
||||
+#endif
|
||||
) {
|
||||
//log("label '%s' set to autowrap", txt);
|
||||
make_label_autowrap_on_resize(label);
|
||||
@@ -942,7 +949,12 @@ static event_gui_data_t *add_event_buttons(GtkBox *box,
|
||||
if (!event_name || !event_name[0])
|
||||
{
|
||||
GtkWidget *lbl = gtk_label_new(_("No reporting targets are defined for this problem. Check configuration in /etc/libreport/*"));
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
gtk_misc_set_alignment(GTK_MISC(lbl), /*x*/ 0.0, /*y*/ 0.0);
|
||||
+#else
|
||||
+ gtk_widget_set_halign (lbl, GTK_ALIGN_START);
|
||||
+ gtk_widget_set_valign (lbl, GTK_ALIGN_END);
|
||||
+#endif
|
||||
make_label_autowrap_on_resize(GTK_LABEL(lbl));
|
||||
gtk_box_pack_start(box, lbl, /*expand*/ true, /*fill*/ false, /*padding*/ 0);
|
||||
return NULL;
|
||||
@@ -1487,12 +1499,13 @@ static void hide_next_step_button()
|
||||
/* 1. hide next button */
|
||||
gtk_widget_hide(g_btn_next);
|
||||
/* 2. move close button to the last position */
|
||||
- gtk_box_reorder_child(g_box_buttons, g_btn_close, 3);
|
||||
+ gtk_box_set_child_packing(g_box_buttons, g_btn_close, false, false, 5, GTK_PACK_END);
|
||||
}
|
||||
|
||||
static void show_next_step_button()
|
||||
{
|
||||
- gtk_box_reorder_child(g_box_buttons, g_btn_close, 0);
|
||||
+ gtk_box_set_child_packing(g_box_buttons, g_btn_close, false, false, 5, GTK_PACK_START);
|
||||
+
|
||||
gtk_widget_show(g_btn_next);
|
||||
}
|
||||
|
||||
@@ -2044,7 +2057,12 @@ static void add_warning(const char *warning)
|
||||
/* should be safe to free it, gtk calls strdup() to copy it */
|
||||
free(label_str);
|
||||
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
gtk_misc_set_alignment(GTK_MISC(warning_lbl), 0.0, 0.0);
|
||||
+#else
|
||||
+ gtk_widget_set_halign (warning_lbl, GTK_ALIGN_START);
|
||||
+ gtk_widget_set_valign (warning_lbl, GTK_ALIGN_END);
|
||||
+#endif
|
||||
gtk_label_set_justify(GTK_LABEL(warning_lbl), GTK_JUSTIFY_LEFT);
|
||||
gtk_label_set_line_wrap(GTK_LABEL(warning_lbl), TRUE);
|
||||
|
||||
@@ -3415,17 +3433,16 @@ void create_assistant(bool expert_mode)
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_stop, false, false, 5);
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_onfail, false, false, 5);
|
||||
/* Btns above are to the left, the rest are to the right: */
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
GtkWidget *w = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
|
||||
gtk_box_pack_start(g_box_buttons, w, true, true, 5);
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_next, false, false, 5);
|
||||
+#else
|
||||
+ gtk_widget_set_valign(GTK_WIDGET(g_btn_next), GTK_ALIGN_END);
|
||||
+ gtk_box_pack_end(g_box_buttons, g_btn_next, false, false, 5);
|
||||
+#endif
|
||||
|
||||
{ /* Warnings area widget definition start */
|
||||
- GtkWidget *alignment_left = gtk_alignment_new(0.5,0.5,1,1);
|
||||
- gtk_widget_set_visible(alignment_left, TRUE);
|
||||
-
|
||||
- GtkWidget *alignment_right = gtk_alignment_new(0.5,0.5,1,1);
|
||||
- gtk_widget_set_visible(alignment_right, TRUE);
|
||||
-
|
||||
g_box_warning_labels = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
|
||||
gtk_widget_set_visible(GTK_WIDGET(g_box_warning_labels), TRUE);
|
||||
|
||||
@@ -3439,10 +3456,24 @@ void create_assistant(bool expert_mode)
|
||||
g_widget_warnings_area = GTK_WIDGET(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
gtk_widget_set_visible(g_widget_warnings_area, FALSE);
|
||||
gtk_widget_set_no_show_all(g_widget_warnings_area, TRUE);
|
||||
+
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
+ GtkWidget *alignment_left = gtk_alignment_new(0.5,0.5,1,1);
|
||||
+ gtk_widget_set_visible(alignment_left, TRUE);
|
||||
gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_left, true, false, 0);
|
||||
+#else
|
||||
+ gtk_widget_set_valign(GTK_WIDGET(image), GTK_ALIGN_CENTER);
|
||||
+ gtk_widget_set_valign(GTK_WIDGET(vbox), GTK_ALIGN_CENTER);
|
||||
+#endif
|
||||
+
|
||||
gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), image, false, false, 5);
|
||||
gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), GTK_WIDGET(vbox), false, false, 0);
|
||||
+
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_right, true, false, 0);
|
||||
+ GtkWidget *alignment_right = gtk_alignment_new(0.5,0.5,1,1);
|
||||
+ gtk_widget_set_visible(alignment_right, TRUE);
|
||||
+#endif
|
||||
} /* Warnings area widget definition end */
|
||||
|
||||
g_box_assistant = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
|
||||
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
||||
index 2c1f99e..3ad43d6 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.glade
|
||||
+++ b/src/gui-wizard-gtk/wizard.glade
|
||||
@@ -31,8 +31,8 @@
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="margin_left">4</property>
|
||||
- <property name="stock">gtk-media-record</property>
|
||||
+ <property name="margin_start">4</property>
|
||||
+ <property name="icon_name">media-record</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -45,7 +45,7 @@
|
||||
<object class="GtkLabel" id="label10">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="margin_left">6</property>
|
||||
+ <property name="margin_start">6</property>
|
||||
<property name="margin_top">3</property>
|
||||
<property name="margin_bottom">3</property>
|
||||
<property name="label" translatable="yes">Possible sensitive data detected, feel free to edit the report and remove them.</property>
|
||||
@@ -81,7 +81,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -151,8 +151,8 @@
|
||||
<object class="GtkLabel" id="lbl_cd_reason">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="yalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
<property name="wrap">True</property>
|
||||
<attributes>
|
||||
<attribute name="style" value="normal"/>
|
||||
@@ -170,8 +170,8 @@
|
||||
<object class="GtkLabel" id="label7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="yalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
<property name="label" translatable="yes">On the following screens, you will be asked to describe how the problem occurred, to choose how to analyze the problem (if needed), to review collected data, and to choose where the problem should be reported. Click 'Forward' to proceed.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
@@ -230,8 +230,8 @@
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="yalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
<property name="label" translatable="yes">How did this problem happen (step-by-step)? How can it be reproduced? Any additional comments useful for diagnosing the problem? Please use English if possible.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
@@ -282,8 +282,8 @@
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="yalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
<property name="label" translatable="yes"><b>Your comments are not private.</b> They may be included into publicly visible problem reports.</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
@@ -302,7 +302,7 @@
|
||||
<object class="GtkLabel" id="label9">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">1</property>
|
||||
+ <property name="xalign">end</property>
|
||||
<property name="label" translatable="yes">If you don't know how to describe it, you can</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -319,7 +319,7 @@
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="relief">none</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -340,7 +340,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -486,8 +486,8 @@
|
||||
<object class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="yalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
<property name="label" translatable="yes">Please review the data before it gets reported. Depending on reporter chosen, it may end up publicly visible.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
@@ -553,7 +553,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
@@ -569,7 +569,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">rb_forbidden_words</property>
|
||||
</object>
|
||||
@@ -700,7 +700,7 @@
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Size:</property>
|
||||
<property name="justify">right</property>
|
||||
<attributes>
|
||||
@@ -716,7 +716,7 @@
|
||||
<object class="GtkLabel" id="lbl_size">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@@ -781,7 +781,7 @@
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">If you are reporting to a remote server, make sure you removed all private data (such as usernames and passwords). Backtrace, command line, environment variables are the typical items in need of examining.</property>
|
||||
<property name="use_underline">True</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -835,7 +835,7 @@
|
||||
<object class="GtkLabel" id="lbl_event_log">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Processing did not start yet</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">fill</property>
|
||||
@@ -902,8 +902,8 @@
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="yalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
<property name="label" translatable="yes">Reporting has finished. You can close this window now.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
@@ -917,8 +917,8 @@
|
||||
<object class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="yalign">0</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
<property name="label" translatable="yes">If you want to report the problem to a different destination, collect additional information, or provide a better problem description and repeat reporting process, press 'Forward'.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 4f5c37633628ddc5ade13ba8407c2e2c725aa206 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 08:02:17 +0200
|
||||
Subject: [PATCH 13/20] gui: fix build errors introduced in the previous commit
|
||||
|
||||
Fixes commit 8190657d9fb808277f29e5535983a0a1f55badcf
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index d442495..993b602 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -3470,9 +3470,9 @@ void create_assistant(bool expert_mode)
|
||||
gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), GTK_WIDGET(vbox), false, false, 0);
|
||||
|
||||
#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
- gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_right, true, false, 0);
|
||||
GtkWidget *alignment_right = gtk_alignment_new(0.5,0.5,1,1);
|
||||
gtk_widget_set_visible(alignment_right, TRUE);
|
||||
+ gtk_box_pack_start(GTK_BOX(g_widget_warnings_area), alignment_right, true, false, 0);
|
||||
#endif
|
||||
} /* Warnings area widget definition end */
|
||||
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,542 +0,0 @@
|
||||
From 2f8a61ce9fcf8e83a6cc54b7e5b64c0baf91999f Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 08:28:54 +0200
|
||||
Subject: [PATCH 14/20] gui: generate the glade file with glade-3.18
|
||||
|
||||
No code changes.
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.glade | 447 ++++++++++++++++++++--------------------
|
||||
1 file changed, 226 insertions(+), 221 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
||||
index 3ad43d6..c4a86f1 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.glade
|
||||
+++ b/src/gui-wizard-gtk/wizard.glade
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<!-- Generated with glade 3.18.3 -->
|
||||
<interface>
|
||||
- <!-- interface-requires gtk+ 3.0 -->
|
||||
+ <requires lib="gtk+" version="3.0"/>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
@@ -16,6 +17,217 @@
|
||||
<column type="gpointer"/>
|
||||
</columns>
|
||||
</object>
|
||||
+ <object class="GtkWindow" id="window3">
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="tooltip_text" translatable="yes">Use this button to generate more informative backtrace after you installed additional debug packages</property>
|
||||
+ <child>
|
||||
+ <object class="GtkVBox" id="page_3">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="vexpand">True</property>
|
||||
+ <property name="spacing">3</property>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="label8">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="valign">start</property>
|
||||
+ <property name="label" translatable="yes">Please review the data before it gets reported. Depending on reporter chosen, it may end up publicly visible.</property>
|
||||
+ <property name="wrap">True</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkPaned" id="paned1">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="orientation">vertical</property>
|
||||
+ <child>
|
||||
+ <object class="GtkNotebook" id="notebook_edit">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="vexpand">True</property>
|
||||
+ <property name="scrollable">True</property>
|
||||
+ <child>
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ <child type="tab">
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ <child type="tab">
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ <child type="tab">
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="resize">True</property>
|
||||
+ <property name="shrink">True</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkExpander" id="expander_search">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="border_width">1</property>
|
||||
+ <child>
|
||||
+ <object class="GtkBox" id="box7">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="orientation">vertical</property>
|
||||
+ <child>
|
||||
+ <object class="GtkBox" id="box8">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <child>
|
||||
+ <object class="GtkRadioButton" id="rb_forbidden_words">
|
||||
+ <property name="label" translatable="yes">Sensitive words</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="receives_default">False</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="xalign">0.5</property>
|
||||
+ <property name="active">True</property>
|
||||
+ <property name="draw_indicator">True</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkRadioButton" id="rb_custom_search">
|
||||
+ <property name="label" translatable="yes">Custom</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="receives_default">False</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="xalign">0.5</property>
|
||||
+ <property name="draw_indicator">True</property>
|
||||
+ <property name="group">rb_forbidden_words</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkEntry" id="entry_search_bt">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="sensitive">False</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="has_tooltip">True</property>
|
||||
+ <property name="invisible_char">●</property>
|
||||
+ <property name="secondary_icon_name">edit-find</property>
|
||||
+ <property name="primary_icon_activatable">False</property>
|
||||
+ <property name="secondary_icon_tooltip_text" translatable="yes">Clear the search bar to see the list of security sensitive words.</property>
|
||||
+ <property name="secondary_icon_tooltip_markup" translatable="yes">Clear the search bar to see the list of security sensitive words.</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">True</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">2</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="shadow_type">in</property>
|
||||
+ <child>
|
||||
+ <object class="GtkTreeView" id="tv_sensitive_words">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="model">ls_sensitive_words</property>
|
||||
+ <property name="headers_visible">False</property>
|
||||
+ <property name="headers_clickable">False</property>
|
||||
+ <property name="enable_search">False</property>
|
||||
+ <property name="search_column">0</property>
|
||||
+ <property name="enable_grid_lines">both</property>
|
||||
+ <property name="enable_tree_lines">True</property>
|
||||
+ <child internal-child="selection">
|
||||
+ <object class="GtkTreeSelection" id="tv_sensitive_words_selection"/>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||
+ <property name="resizable">True</property>
|
||||
+ <property name="title" translatable="yes">file</property>
|
||||
+ <child>
|
||||
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
+ <attributes>
|
||||
+ <attribute name="text">0</attribute>
|
||||
+ </attributes>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkTreeViewColumn" id="treeviewcolumn2">
|
||||
+ <property name="resizable">True</property>
|
||||
+ <property name="title" translatable="yes">data</property>
|
||||
+ <child>
|
||||
+ <object class="GtkCellRendererText" id="crt_sensitive_word_value"/>
|
||||
+ <attributes>
|
||||
+ <attribute name="markup">1</attribute>
|
||||
+ </attributes>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">True</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ <child type="label">
|
||||
+ <object class="GtkLabel" id="label12">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">Search</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="resize">True</property>
|
||||
+ <property name="shrink">True</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">True</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
<object class="GtkWindow" id="sensitiveDataWarning_w">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
@@ -33,7 +245,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_start">4</property>
|
||||
<property name="icon_name">media-record</property>
|
||||
- <property name="icon-size">1</property>
|
||||
+ <property name="icon_size">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -82,6 +294,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
+ <property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -302,7 +515,7 @@
|
||||
<object class="GtkLabel" id="label9">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="xalign">end</property>
|
||||
+ <property name="halign">end</property>
|
||||
<property name="label" translatable="yes">If you don't know how to describe it, you can</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -318,8 +531,8 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
- <property name="relief">none</property>
|
||||
<property name="halign">start</property>
|
||||
+ <property name="relief">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -341,6 +554,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
+ <property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -472,215 +686,11 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
- <object class="GtkWindow" id="window3">
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="tooltip_text" translatable="yes">Use this button to generate more informative backtrace after you installed additional debug packages</property>
|
||||
- <child>
|
||||
- <object class="GtkVBox" id="page_3">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="hexpand">True</property>
|
||||
- <property name="vexpand">True</property>
|
||||
- <property name="spacing">3</property>
|
||||
- <child>
|
||||
- <object class="GtkLabel" id="label8">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="halign">start</property>
|
||||
- <property name="valign">start</property>
|
||||
- <property name="label" translatable="yes">Please review the data before it gets reported. Depending on reporter chosen, it may end up publicly visible.</property>
|
||||
- <property name="wrap">True</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkPaned" id="paned1">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="orientation">vertical</property>
|
||||
- <child>
|
||||
- <object class="GtkNotebook" id="notebook_edit">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="hexpand">True</property>
|
||||
- <property name="vexpand">True</property>
|
||||
- <property name="scrollable">True</property>
|
||||
- <child>
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- <child type="tab">
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- <child>
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- <child type="tab">
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- <child>
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- <child type="tab">
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="resize">True</property>
|
||||
- <property name="shrink">True</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkExpander" id="expander_search">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="border_width">1</property>
|
||||
- <child>
|
||||
- <object class="GtkBox" id="box7">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="orientation">vertical</property>
|
||||
- <child>
|
||||
- <object class="GtkBox" id="box8">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <child>
|
||||
- <object class="GtkRadioButton" id="rb_forbidden_words">
|
||||
- <property name="label" translatable="yes">Sensitive words</property>
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="receives_default">False</property>
|
||||
- <property name="halign">start</property>
|
||||
- <property name="active">True</property>
|
||||
- <property name="draw_indicator">True</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkRadioButton" id="rb_custom_search">
|
||||
- <property name="label" translatable="yes">Custom</property>
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="receives_default">False</property>
|
||||
- <property name="halign">start</property>
|
||||
- <property name="draw_indicator">True</property>
|
||||
- <property name="group">rb_forbidden_words</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkEntry" id="entry_search_bt">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="sensitive">False</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="has_tooltip">True</property>
|
||||
- <property name="invisible_char">●</property>
|
||||
- <property name="invisible_char_set">True</property>
|
||||
- <property name="secondary_icon_name">edit-find</property>
|
||||
- <property name="primary_icon_activatable">False</property>
|
||||
- <property name="secondary_icon_tooltip_text" translatable="yes">Clear the search bar to see the list of security sensitive words.</property>
|
||||
- <property name="secondary_icon_tooltip_markup" translatable="yes">Clear the search bar to see the list of security sensitive words.</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">2</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="shadow_type">in</property>
|
||||
- <child>
|
||||
- <object class="GtkTreeView" id="tv_sensitive_words">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="model">ls_sensitive_words</property>
|
||||
- <property name="headers_visible">False</property>
|
||||
- <property name="headers_clickable">False</property>
|
||||
- <property name="enable_search">False</property>
|
||||
- <property name="search_column">0</property>
|
||||
- <property name="enable_grid_lines">both</property>
|
||||
- <property name="enable_tree_lines">True</property>
|
||||
- <child internal-child="selection">
|
||||
- <object class="GtkTreeSelection" id="tv_sensitive_words_selection"/>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||
- <property name="resizable">True</property>
|
||||
- <property name="title" translatable="yes">file</property>
|
||||
- <child>
|
||||
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
- <attributes>
|
||||
- <attribute name="text">0</attribute>
|
||||
- </attributes>
|
||||
- </child>
|
||||
- </object>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkTreeViewColumn" id="treeviewcolumn2">
|
||||
- <property name="resizable">True</property>
|
||||
- <property name="title" translatable="yes">data</property>
|
||||
- <child>
|
||||
- <object class="GtkCellRendererText" id="crt_sensitive_word_value"/>
|
||||
- <attributes>
|
||||
- <attribute name="markup">1</attribute>
|
||||
- </attributes>
|
||||
- </child>
|
||||
- </object>
|
||||
- </child>
|
||||
- </object>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- </object>
|
||||
- </child>
|
||||
- <child type="label">
|
||||
- <object class="GtkLabel" id="label12">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="label" translatable="yes">Search</property>
|
||||
- </object>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="resize">True</property>
|
||||
- <property name="shrink">True</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- </object>
|
||||
- </child>
|
||||
+ <object class="GtkSizeGroup" id="sizegroup1">
|
||||
+ <widgets>
|
||||
+ <widget name="alignment2"/>
|
||||
+ <widget name="alignment1"/>
|
||||
+ </widgets>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window4">
|
||||
<property name="can_focus">False</property>
|
||||
@@ -780,8 +790,9 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">If you are reporting to a remote server, make sure you removed all private data (such as usernames and passwords). Backtrace, command line, environment variables are the typical items in need of examining.</property>
|
||||
- <property name="use_underline">True</property>
|
||||
<property name="halign">start</property>
|
||||
+ <property name="use_underline">True</property>
|
||||
+ <property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -822,7 +833,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="icon_name">dialog-error</property>
|
||||
- <property name="icon-size">1</property>
|
||||
+ <property name="icon_size">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -954,10 +965,4 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
- <object class="GtkSizeGroup" id="sizegroup1">
|
||||
- <widgets>
|
||||
- <widget name="alignment2"/>
|
||||
- <widget name="alignment1"/>
|
||||
- </widgets>
|
||||
- </object>
|
||||
</interface>
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,126 +0,0 @@
|
||||
From 277b702a90a2d0406c8edb542d80d07f920362ae Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 08:33:37 +0200
|
||||
Subject: [PATCH 15/20] gui: simplify the event selector page
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.glade | 74 ++++++++++++-----------------------------
|
||||
1 file changed, 21 insertions(+), 53 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
||||
index c4a86f1..9e43cce 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.glade
|
||||
+++ b/src/gui-wizard-gtk/wizard.glade
|
||||
@@ -352,6 +352,7 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
+ <object class="GtkSizeGroup" id="sizegroup1"/>
|
||||
<object class="GtkWindow" id="window0">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
@@ -575,67 +576,40 @@
|
||||
<property name="border_width">10</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
- <object class="GtkBox" id="vb_workflows_aligned">
|
||||
+ <object class="GtkBox" id="vb_workflows">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
- <object class="GtkAlignment" id="alignment2">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <child>
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkBox" id="vb_workflows">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="orientation">vertical</property>
|
||||
- <child>
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkAlignment" id="alignment1">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <child>
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">2</property>
|
||||
- </packing>
|
||||
+ <placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
- <property name="expand">True</property>
|
||||
+ <property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
- <object class="GtkVBox" id="vb_events">
|
||||
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="no_show_all">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="shadow_type">in</property>
|
||||
<child>
|
||||
- <placeholder/>
|
||||
+ <object class="GtkViewport" id="viewport1">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <child>
|
||||
+ <object class="GtkVBox" id="vb_events">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="no_show_all">True</property>
|
||||
+ <child>
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -686,12 +660,6 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
- <object class="GtkSizeGroup" id="sizegroup1">
|
||||
- <widgets>
|
||||
- <widget name="alignment2"/>
|
||||
- <widget name="alignment1"/>
|
||||
- </widgets>
|
||||
- </object>
|
||||
<object class="GtkWindow" id="window4">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,238 +0,0 @@
|
||||
From b0462c5b29b78961e4ec4a8ee706baa25b936d43 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 09:33:54 +0200
|
||||
Subject: [PATCH 16/20] gui: conver report-gtk to GtkApplication
|
||||
|
||||
- improves compatibility with GNOME
|
||||
- allows us to move "Preferences" to the application menu
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/main.c | 60 ++++++++++++++++++++++++++++++++++++-----
|
||||
src/gui-wizard-gtk/wizard.c | 26 ++++--------------
|
||||
src/gui-wizard-gtk/wizard.glade | 39 ---------------------------
|
||||
src/gui-wizard-gtk/wizard.h | 2 +-
|
||||
4 files changed, 60 insertions(+), 67 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c
|
||||
index 0bfa45c..697b91f 100644
|
||||
--- a/src/gui-wizard-gtk/main.c
|
||||
+++ b/src/gui-wizard-gtk/main.c
|
||||
@@ -72,6 +72,55 @@ void problem_data_reload_from_dump_dir(void)
|
||||
g_cd = new_cd;
|
||||
}
|
||||
|
||||
+static void
|
||||
+preferences_activated(GSimpleAction *action,
|
||||
+ GVariant *parameter,
|
||||
+ gpointer data)
|
||||
+{
|
||||
+ GtkApplication *app = GTK_APPLICATION(data);
|
||||
+ show_config_list_dialog(GTK_WINDOW(gtk_application_get_active_window(app)));
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+quit_activated(GSimpleAction *action,
|
||||
+ GVariant *parameter,
|
||||
+ gpointer data)
|
||||
+{
|
||||
+ g_application_quit(G_APPLICATION(data));
|
||||
+}
|
||||
+
|
||||
+static GActionEntry app_entries[] =
|
||||
+{
|
||||
+ { "preferences", preferences_activated, NULL, NULL, NULL },
|
||||
+ { "quit", quit_activated, NULL, NULL, NULL }
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+startup_wizard(GApplication *app,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ g_action_map_add_action_entries(G_ACTION_MAP (app),
|
||||
+ app_entries, G_N_ELEMENTS (app_entries),
|
||||
+ app);
|
||||
+
|
||||
+ GMenu *app_menu = g_menu_new();
|
||||
+ g_menu_append(app_menu, _("Preferences"), "app.preferences");
|
||||
+
|
||||
+ GMenu *service_app_menu_sec = g_menu_new();
|
||||
+ g_menu_append(service_app_menu_sec, _("Quit"), "app.quit");
|
||||
+ g_menu_append_section(app_menu, /*no title*/NULL, G_MENU_MODEL(service_app_menu_sec));
|
||||
+
|
||||
+ gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL(app_menu));
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+activate_wizard(GApplication *app,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ create_assistant(GTK_APPLICATION(app), (bool)user_data);
|
||||
+ update_gui_state_from_problem_data(UPDATE_SELECTED_EVENT);
|
||||
+}
|
||||
+
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
bool expert_mode = false;
|
||||
@@ -166,14 +215,13 @@ int main(int argc, char **argv)
|
||||
|
||||
problem_data_reload_from_dump_dir();
|
||||
|
||||
- create_assistant(expert_mode);
|
||||
-
|
||||
g_custom_logger = &show_error_as_msgbox;
|
||||
-
|
||||
- update_gui_state_from_problem_data(UPDATE_SELECTED_EVENT);
|
||||
-
|
||||
+ GtkApplication *app = gtk_application_new("org.freedesktop.libreport.report", G_APPLICATION_FLAGS_NONE);
|
||||
+ g_signal_connect(app, "activate", G_CALLBACK(activate_wizard), (gpointer)expert_mode);
|
||||
+ g_signal_connect(app, "startup", G_CALLBACK(startup_wizard), NULL);
|
||||
/* Enter main loop */
|
||||
- gtk_main();
|
||||
+ g_application_run(G_APPLICATION(app), argc, argv);
|
||||
+ g_object_unref(app);
|
||||
|
||||
if (opts & OPT_d)
|
||||
delete_dump_dir_possibly_using_abrtd(g_dump_dir_name);
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 993b602..5c4bd6a 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -2174,12 +2174,6 @@ static void on_log_changed(GtkTextBuffer *buffer, gpointer user_data)
|
||||
gtk_widget_show(GTK_WIDGET(g_exp_report_log));
|
||||
}
|
||||
|
||||
-
|
||||
-static void on_show_event_list_cb(GtkWidget *button, gpointer user_data)
|
||||
-{
|
||||
- show_config_list_dialog(GTK_WINDOW(g_wnd_assistant));
|
||||
-}
|
||||
-
|
||||
#if 0
|
||||
static void log_ready_state(void)
|
||||
{
|
||||
@@ -3237,16 +3231,6 @@ static void add_pages(void)
|
||||
gtk_widget_override_font(GTK_WIDGET(g_tv_event_log), g_monospace_font);
|
||||
fix_all_wrapped_labels(GTK_WIDGET(g_assistant));
|
||||
|
||||
- /* Configure btn on select analyzers page */
|
||||
- GtkWidget *img_config_btn = gtk_image_new_from_icon_name("preferences-system", GTK_ICON_SIZE_BUTTON);
|
||||
- GtkWidget *config_btn = GTK_WIDGET(gtk_builder_get_object(g_builder, "button_cfg1"));
|
||||
- if (config_btn)
|
||||
- {
|
||||
- g_signal_connect(G_OBJECT(config_btn), "clicked", G_CALLBACK(on_show_event_list_cb), NULL);
|
||||
- gtk_button_set_image(GTK_BUTTON(config_btn), img_config_btn);
|
||||
- gtk_button_set_image_position(GTK_BUTTON(config_btn), GTK_POS_RIGHT);
|
||||
- }
|
||||
-
|
||||
g_signal_connect(g_cb_no_comment, "toggled", G_CALLBACK(on_no_comment_toggled), NULL);
|
||||
|
||||
g_signal_connect(g_rb_forbidden_words, "toggled", G_CALLBACK(on_forbidden_words_toggled), NULL);
|
||||
@@ -3342,7 +3326,7 @@ static void assistant_quit_cb(void *obj, void *data)
|
||||
g_loaded_texts = NULL;
|
||||
}
|
||||
|
||||
- gtk_main_quit();
|
||||
+ gtk_widget_destroy(GTK_WIDGET(data));
|
||||
}
|
||||
|
||||
static void on_btn_startcast(GtkWidget *btn, gpointer user_data)
|
||||
@@ -3398,7 +3382,7 @@ static bool is_screencast_available()
|
||||
return status == 0;
|
||||
}
|
||||
|
||||
-void create_assistant(bool expert_mode)
|
||||
+void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
{
|
||||
g_loaded_texts = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
|
||||
|
||||
@@ -3487,7 +3471,7 @@ void create_assistant(bool expert_mode)
|
||||
gtk_widget_hide(g_btn_onfail);
|
||||
gtk_widget_show(g_btn_next);
|
||||
|
||||
- g_wnd_assistant = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
|
||||
+ g_wnd_assistant = GTK_WINDOW(gtk_application_window_new(app));
|
||||
gtk_container_add(GTK_CONTAINER(g_wnd_assistant), GTK_WIDGET(g_box_assistant));
|
||||
|
||||
gtk_window_set_default_size(g_wnd_assistant, DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
||||
@@ -3502,12 +3486,12 @@ void create_assistant(bool expert_mode)
|
||||
|
||||
create_details_treeview();
|
||||
|
||||
- g_signal_connect(g_btn_close, "clicked", G_CALLBACK(assistant_quit_cb), NULL);
|
||||
+ g_signal_connect(g_btn_close, "clicked", G_CALLBACK(assistant_quit_cb), g_wnd_assistant);
|
||||
g_signal_connect(g_btn_stop, "clicked", G_CALLBACK(on_btn_cancel_event), NULL);
|
||||
g_signal_connect(g_btn_onfail, "clicked", G_CALLBACK(on_btn_failed_cb), NULL);
|
||||
g_signal_connect(g_btn_next, "clicked", G_CALLBACK(on_next_btn_cb), NULL);
|
||||
|
||||
- g_signal_connect(g_wnd_assistant, "destroy", G_CALLBACK(assistant_quit_cb), NULL);
|
||||
+ g_signal_connect(g_wnd_assistant, "destroy", G_CALLBACK(assistant_quit_cb), g_wnd_assistant);
|
||||
g_signal_connect(g_assistant, "switch-page", G_CALLBACK(on_page_prepare), NULL);
|
||||
|
||||
g_signal_connect(g_tb_approve_bt, "toggled", G_CALLBACK(on_bt_approve_toggle), NULL);
|
||||
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
||||
index 9e43cce..854a402 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.glade
|
||||
+++ b/src/gui-wizard-gtk/wizard.glade
|
||||
@@ -618,45 +618,6 @@
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
- <child>
|
||||
- <object class="GtkHBox" id="hbox2">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <child>
|
||||
- <object class="GtkButton" id="button_cfg1">
|
||||
- <property name="label">_Preferences</property>
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <property name="receives_default">True</property>
|
||||
- <property name="use_underline">True</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">False</property>
|
||||
- <property name="position">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkAlignment" id="alignment3">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <child>
|
||||
- <placeholder/>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">False</property>
|
||||
- <property name="position">2</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
diff --git a/src/gui-wizard-gtk/wizard.h b/src/gui-wizard-gtk/wizard.h
|
||||
index a6d8b5d..4c891dc 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.h
|
||||
+++ b/src/gui-wizard-gtk/wizard.h
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "internal_libreport_gtk.h"
|
||||
|
||||
-void create_assistant(bool expert_mode);
|
||||
+void create_assistant(GtkApplication *app, bool expert_mode);
|
||||
|
||||
enum
|
||||
{
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 109702a42d08e52f54c5f740b370a3ec9a3a5d16 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 13:44:02 +0200
|
||||
Subject: [PATCH 17/20] gui: clear the sensitive cache between two event runs
|
||||
|
||||
Was causing a SIGSEGV.
|
||||
|
||||
Related to rhbz#1069917
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 5c4bd6a..fc44547 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -1123,6 +1123,31 @@ static void remove_tabs_from_notebook(GtkNotebook *notebook)
|
||||
*/
|
||||
gtk_notebook_remove_page(notebook, 0); //we need to always the page 0
|
||||
}
|
||||
+
|
||||
+ /* Turn off the changed callback during the update */
|
||||
+ g_signal_handler_block(g_tv_sensitive_sel, g_tv_sensitive_sel_hndlr);
|
||||
+
|
||||
+ g_current_highlighted_word = NULL;
|
||||
+
|
||||
+ GtkTreeIter iter;
|
||||
+ gboolean valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(g_ls_sensitive_list), &iter);
|
||||
+ while (valid)
|
||||
+ {
|
||||
+ char *text = NULL;
|
||||
+ search_item_t *word = NULL;
|
||||
+
|
||||
+ gtk_tree_model_get(GTK_TREE_MODEL(g_ls_sensitive_list), &iter,
|
||||
+ SEARCH_COLUMN_TEXT, &text,
|
||||
+ SEARCH_COLUMN_ITEM, &word,
|
||||
+ -1);
|
||||
+
|
||||
+ free(text);
|
||||
+ free(word);
|
||||
+
|
||||
+ valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(g_ls_sensitive_list), &iter);
|
||||
+ }
|
||||
+ gtk_list_store_clear(g_ls_sensitive_list);
|
||||
+ g_signal_handler_unblock(g_tv_sensitive_sel, g_tv_sensitive_sel_hndlr);
|
||||
}
|
||||
|
||||
static void append_item_to_ls_details(gpointer name, gpointer value, gpointer data)
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,54 +0,0 @@
|
||||
From b4dbde9febbc85ead1d7c650df858936828e31a2 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 13:46:57 +0200
|
||||
Subject: [PATCH 18/20] gui: don't remove already removed GTimeoutSource
|
||||
|
||||
Was causing a GLib warning
|
||||
|
||||
Related to rhbz#1069917
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index fc44547..c9d5926 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -2956,17 +2956,20 @@ static void on_sensitive_word_selection_changed(GtkTreeSelection *sel, gpointer
|
||||
gtk_text_view_scroll_to_iter(new_word->tev, &(new_word->start), 0.0, false, 0, 0);
|
||||
}
|
||||
|
||||
-static gboolean highlight_search(gpointer user_data)
|
||||
+static void highlight_search(GtkEntry *entry)
|
||||
{
|
||||
- GtkEntry *entry = GTK_ENTRY(user_data);
|
||||
-
|
||||
g_search_text = gtk_entry_get_text(entry);
|
||||
|
||||
log_notice("searching: '%s'", g_search_text);
|
||||
GList *words = g_list_append(NULL, (gpointer)g_search_text);
|
||||
highligh_words_in_tabs(words, NULL, /*case insensitive*/true);
|
||||
g_list_free(words);
|
||||
+}
|
||||
|
||||
+static gboolean highlight_search_on_timeout(gpointer user_data)
|
||||
+{
|
||||
+ g_timeout = 0;
|
||||
+ highlight_search(GTK_ENTRY(user_data));
|
||||
/* returning false will make glib to remove this event */
|
||||
return false;
|
||||
}
|
||||
@@ -2980,7 +2983,7 @@ static void search_timeout(GtkEntry *entry)
|
||||
*/
|
||||
if (g_timeout != 0)
|
||||
g_source_remove(g_timeout);
|
||||
- g_timeout = g_timeout_add(500, &highlight_search, (gpointer)entry);
|
||||
+ g_timeout = g_timeout_add(500, &highlight_search_on_timeout, (gpointer)entry);
|
||||
}
|
||||
|
||||
static void on_forbidden_words_toggled(GtkToggleButton *btn, gpointer user_data)
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,130 +0,0 @@
|
||||
From aa8b6220a83dbccc9df31f988c1b8dcfef8833b5 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 13:48:59 +0200
|
||||
Subject: [PATCH 19/20] gui: reload destroyed sensitive data warn widgets from
|
||||
the galde
|
||||
|
||||
clear_warnings() destroys the warning widgets. The sensitive data
|
||||
widgets needs to be reloaded as GtkBuilder does not return clones of
|
||||
object but the instances from its cache.
|
||||
|
||||
Related to rhbz#1069917
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 75 +++++++++++++++++++++++++++------------------
|
||||
1 file changed, 46 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index c9d5926..e803394 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -229,6 +229,45 @@ static bool check_minimal_bt_rating(const char *event_name);
|
||||
static char *get_next_processed_event(GList **events_list);
|
||||
static void on_next_btn_cb(GtkWidget *btn, gpointer user_data);
|
||||
|
||||
+/* wizard.glade file as a string WIZARD_GLADE_CONTENTS: */
|
||||
+#include "wizard_glade.c"
|
||||
+
|
||||
+static GtkBuilder *make_builder()
|
||||
+{
|
||||
+ GError *error = NULL;
|
||||
+ GtkBuilder *builder = gtk_builder_new();
|
||||
+ if (!g_glade_file)
|
||||
+ {
|
||||
+ /* load additional widgets from glade */
|
||||
+ gtk_builder_add_objects_from_string(builder,
|
||||
+ WIZARD_GLADE_CONTENTS, sizeof(WIZARD_GLADE_CONTENTS) - 1,
|
||||
+ (gchar**)misc_widgets,
|
||||
+ &error);
|
||||
+ if (error != NULL)
|
||||
+ error_msg_and_die("Error loading glade data: %s", error->message);
|
||||
+ /* Load pages from internal string */
|
||||
+ gtk_builder_add_objects_from_string(builder,
|
||||
+ WIZARD_GLADE_CONTENTS, sizeof(WIZARD_GLADE_CONTENTS) - 1,
|
||||
+ (gchar**)page_names,
|
||||
+ &error);
|
||||
+ if (error != NULL)
|
||||
+ error_msg_and_die("Error loading glade data: %s", error->message);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* -g FILE: load UI from it */
|
||||
+ /* load additional widgets from glade */
|
||||
+ gtk_builder_add_objects_from_file(builder, g_glade_file, (gchar**)misc_widgets, &error);
|
||||
+ if (error != NULL)
|
||||
+ error_msg_and_die("Can't load %s: %s", g_glade_file, error->message);
|
||||
+ gtk_builder_add_objects_from_file(builder, g_glade_file, (gchar**)page_names, &error);
|
||||
+ if (error != NULL)
|
||||
+ error_msg_and_die("Can't load %s: %s", g_glade_file, error->message);
|
||||
+ }
|
||||
+
|
||||
+ return builder;
|
||||
+}
|
||||
+
|
||||
static void label_wrapper(GtkWidget *widget, gpointer data_unused)
|
||||
{
|
||||
if (GTK_IS_CONTAINER(widget))
|
||||
@@ -2108,11 +2147,15 @@ static void on_sensitive_ticket_clicked_cb(GtkWidget *button, gpointer user_data
|
||||
|
||||
static void add_sensitive_data_warning(void)
|
||||
{
|
||||
- GtkWidget *sens_data_warn = GTK_WIDGET(gtk_builder_get_object(g_builder, SENSITIVE_DATA_WARN));
|
||||
- GtkButton *sens_ticket_cb = GTK_BUTTON(gtk_builder_get_object(g_builder, PRIVATE_TICKET_CB));
|
||||
+ GtkBuilder *builder = make_builder();
|
||||
+
|
||||
+ GtkWidget *sens_data_warn = GTK_WIDGET(gtk_builder_get_object(builder, SENSITIVE_DATA_WARN));
|
||||
+ GtkButton *sens_ticket_cb = GTK_BUTTON(gtk_builder_get_object(builder, PRIVATE_TICKET_CB));
|
||||
|
||||
g_signal_connect(sens_ticket_cb, "toggled", G_CALLBACK(on_sensitive_ticket_clicked_cb), NULL);
|
||||
add_widget_to_warning_area(GTK_WIDGET(sens_data_warn));
|
||||
+
|
||||
+ g_object_unref(builder);
|
||||
}
|
||||
|
||||
static void show_warnings(void)
|
||||
@@ -3173,9 +3216,6 @@ static gint on_key_press_event_in_item_list(GtkTreeView *treeview, GdkEventKey *
|
||||
|
||||
/* Initialization */
|
||||
|
||||
-/* wizard.glade file as a string WIZARD_GLADE_CONTENTS: */
|
||||
-#include "wizard_glade.c"
|
||||
-
|
||||
static void on_next_btn_cb(GtkWidget *btn, gpointer user_data)
|
||||
{
|
||||
gint current_page_no = gtk_notebook_get_current_page(g_assistant);
|
||||
@@ -3190,30 +3230,7 @@ static void on_next_btn_cb(GtkWidget *btn, gpointer user_data)
|
||||
|
||||
static void add_pages(void)
|
||||
{
|
||||
- GError *error = NULL;
|
||||
- g_builder = gtk_builder_new();
|
||||
- if (!g_glade_file)
|
||||
- {
|
||||
- /* load additional widgets from glade */
|
||||
- gtk_builder_add_objects_from_string(g_builder,
|
||||
- WIZARD_GLADE_CONTENTS, sizeof(WIZARD_GLADE_CONTENTS) - 1,
|
||||
- (gchar**)misc_widgets,
|
||||
- &error);
|
||||
- /* Load pages from internal string */
|
||||
- gtk_builder_add_objects_from_string(g_builder,
|
||||
- WIZARD_GLADE_CONTENTS, sizeof(WIZARD_GLADE_CONTENTS) - 1,
|
||||
- (gchar**)page_names,
|
||||
- &error);
|
||||
- if (error != NULL)
|
||||
- error_msg_and_die("Error loading glade data: %s", error->message);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* -g FILE: load IU from it */
|
||||
- gtk_builder_add_objects_from_file(g_builder, g_glade_file, (gchar**)page_names, &error);
|
||||
- if (error != NULL)
|
||||
- error_msg_and_die("Can't load %s: %s", g_glade_file, error->message);
|
||||
- }
|
||||
+ g_builder = make_builder();
|
||||
|
||||
int i;
|
||||
int page_no = 0;
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,244 +0,0 @@
|
||||
From 8db880a2c6add7137aac9f8562ae73aef3e1e436 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 30 Jul 2014 13:53:02 +0200
|
||||
Subject: [PATCH 20/20] gui: add "Repeat" button
|
||||
|
||||
If an event run fails, the button allows users to modify the
|
||||
configuration and re-run the event.
|
||||
|
||||
v2:
|
||||
- add a help text explaining what to do before clicking "Repeat" button
|
||||
|
||||
Related to rhbz#1069917
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 83 ++++++++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 63 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index e803394..e4718bf 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -68,6 +68,7 @@ static GtkWidget *g_btn_stop;
|
||||
static GtkWidget *g_btn_close;
|
||||
static GtkWidget *g_btn_next;
|
||||
static GtkWidget *g_btn_onfail;
|
||||
+static GtkWidget *g_btn_repeat;
|
||||
|
||||
static GtkBox *g_box_events;
|
||||
static GtkBox *g_box_workflows;
|
||||
@@ -1573,24 +1574,31 @@ static void show_next_step_button()
|
||||
gtk_widget_show(g_btn_next);
|
||||
}
|
||||
|
||||
-static void terminate_event_chain()
|
||||
+enum {
|
||||
+ TERMINATE_NOFLAGS = 0,
|
||||
+ TERMINATE_WITH_RERUN = 1 << 0,
|
||||
+};
|
||||
+
|
||||
+static void terminate_event_chain(int flags)
|
||||
{
|
||||
if (g_expert_mode)
|
||||
return;
|
||||
|
||||
+ hide_next_step_button();
|
||||
+ if ((flags & TERMINATE_WITH_RERUN))
|
||||
+ return;
|
||||
+
|
||||
free(g_event_selected);
|
||||
g_event_selected = NULL;
|
||||
|
||||
g_list_free_full(g_auto_event_list, free);
|
||||
g_auto_event_list = NULL;
|
||||
-
|
||||
- hide_next_step_button();
|
||||
}
|
||||
|
||||
-static void cancel_processing(GtkLabel *status_label, const char *message)
|
||||
+static void cancel_processing(GtkLabel *status_label, const char *message, int terminate_flags)
|
||||
{
|
||||
gtk_label_set_text(status_label, message ? message : _("Processing was canceled"));
|
||||
- terminate_event_chain();
|
||||
+ terminate_event_chain(terminate_flags);
|
||||
}
|
||||
|
||||
static void update_command_run_log(const char* message, struct analyze_event_data *evd)
|
||||
@@ -1755,6 +1763,25 @@ static void on_btn_failed_cb(GtkButton *button)
|
||||
gtk_widget_hide(GTK_WIDGET(button));
|
||||
}
|
||||
|
||||
+static gint select_next_page_no(gint current_page_no, gpointer data);
|
||||
+static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer user_data);
|
||||
+
|
||||
+static void on_btn_repeat_cb(GtkButton *button)
|
||||
+{
|
||||
+ g_auto_event_list = g_list_prepend(g_auto_event_list, g_event_selected);
|
||||
+ g_event_selected = NULL;
|
||||
+
|
||||
+ show_next_step_button();
|
||||
+ clear_warnings();
|
||||
+
|
||||
+ const gint current_page_no = gtk_notebook_get_current_page(g_assistant);
|
||||
+ const int next_page_no = select_next_page_no(pages[PAGENO_SUMMARY].page_no, NULL);
|
||||
+ if (current_page_no == next_page_no)
|
||||
+ on_page_prepare(g_assistant, gtk_notebook_get_nth_page(g_assistant, next_page_no), NULL);
|
||||
+ else
|
||||
+ gtk_notebook_set_current_page(g_assistant, next_page_no);
|
||||
+}
|
||||
+
|
||||
static void on_failed_event(const char *event_name)
|
||||
{
|
||||
/* Don't show the 'on failure' button if the processed event
|
||||
@@ -1764,14 +1791,25 @@ static void on_failed_event(const char *event_name)
|
||||
return;
|
||||
|
||||
add_warning(
|
||||
-_("Processing of the problem failed. This can have many reasons but there are two most common:\n"\
|
||||
+_("Processing of the problem failed. This can have many reasons but there are three most common:\n"\
|
||||
"\t▫ <b>network connection problems</b>\n"\
|
||||
-"\t▫ <b>corrupted problem data</b>\n"));
|
||||
+"\t▫ <b>corrupted problem data</b>\n"\
|
||||
+"\t▫ <b>invalid configuration</b>"
|
||||
+));
|
||||
+
|
||||
+ if (!g_expert_mode)
|
||||
+ {
|
||||
+ add_warning(
|
||||
+_("If you want to update the configuration and try to report again, please open <b>Preferences</b> item\n"
|
||||
+"in the application menu and after applying the configuration changes click <b>Repeat</b> button."));
|
||||
+ gtk_widget_show(g_btn_repeat);
|
||||
+ }
|
||||
|
||||
add_warning(
|
||||
-_("If you want to help us, please click on the upload button and provide all problem data for a deep analysis.\n"\
|
||||
-"<i>Before you do that, please consider the security risks. Problem data may contain sensitive information like passwords.\n"\
|
||||
-"The uploaded data are stored in a protected storage and only a limited number of persons can read them.</i>"));
|
||||
+_("If you are sure that this problem is not caused by network problems neither by invalid configuration\n"
|
||||
+"and want to help us, please click on the upload button and provide all problem data for a deep analysis.\n"\
|
||||
+"<i>Before you do that, please consider the security risks. Problem data may contain sensitive information like\n"\
|
||||
+"passwords. The uploaded data are stored in a protected storage and only a limited number of persons can read them.</i>"));
|
||||
|
||||
show_warnings();
|
||||
|
||||
@@ -1798,7 +1836,7 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
|
||||
retval = 0;
|
||||
run_state->process_status = 0;
|
||||
stop_requested = true;
|
||||
- terminate_event_chain();
|
||||
+ terminate_event_chain(TERMINATE_NOFLAGS);
|
||||
}
|
||||
|
||||
unexport_event_config(evd->env_list);
|
||||
@@ -1887,17 +1925,17 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
|
||||
gtk_widget_show(GTK_WIDGET(g_img_process_fail));
|
||||
/* 256 means NOT_REPORTABLE */
|
||||
if (retval == 256)
|
||||
- cancel_processing(g_lbl_event_log, _("Processing was interrupted because the problem is not reportable."));
|
||||
+ cancel_processing(g_lbl_event_log, _("Processing was interrupted because the problem is not reportable."), TERMINATE_NOFLAGS);
|
||||
else
|
||||
{
|
||||
/* We use SIGTERM to stop event processing on user's request.
|
||||
* So SIGTERM is not a failure.
|
||||
*/
|
||||
if (retval == EXIT_CANCEL_BY_USER || WTERMSIG(run_state->process_status) == SIGTERM)
|
||||
- cancel_processing(g_lbl_event_log, /* default message */ NULL);
|
||||
+ cancel_processing(g_lbl_event_log, /* default message */ NULL, TERMINATE_NOFLAGS);
|
||||
else
|
||||
{
|
||||
- cancel_processing(g_lbl_event_log, _("Processing failed."));
|
||||
+ cancel_processing(g_lbl_event_log, _("Processing failed."), TERMINATE_WITH_RERUN);
|
||||
on_failed_event(evd->event_name);
|
||||
}
|
||||
}
|
||||
@@ -2036,7 +2074,7 @@ static void start_event_run(const char *event_name)
|
||||
char *msg = xasprintf(_("No processing for event '%s' is defined"), event_name);
|
||||
append_to_textview(g_tv_event_log, msg);
|
||||
free(msg);
|
||||
- cancel_processing(g_lbl_event_log, _("Processing failed."));
|
||||
+ cancel_processing(g_lbl_event_log, _("Processing failed."), TERMINATE_NOFLAGS);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2047,7 +2085,7 @@ static void start_event_run(const char *event_name)
|
||||
free_run_event_state(state);
|
||||
if (!g_expert_mode)
|
||||
{
|
||||
- cancel_processing(g_lbl_event_log, _("Processing interrupted: can't continue without writable directory."));
|
||||
+ cancel_processing(g_lbl_event_log, _("Processing interrupted: can't continue without writable directory."), TERMINATE_NOFLAGS);
|
||||
}
|
||||
return; /* user refused to steal, or write error, etc... */
|
||||
}
|
||||
@@ -2534,8 +2572,6 @@ static gboolean highlight_forbidden(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
-static gint select_next_page_no(gint current_page_no, gpointer data);
|
||||
-
|
||||
static char *get_next_processed_event(GList **events_list)
|
||||
{
|
||||
if (!events_list || !*events_list)
|
||||
@@ -2647,6 +2683,8 @@ static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer us
|
||||
}
|
||||
|
||||
gtk_widget_hide(g_btn_onfail);
|
||||
+ if (!g_expert_mode)
|
||||
+ gtk_widget_hide(g_btn_repeat);
|
||||
/* Save text fields if changed */
|
||||
/* Must be called before any GUI operation because the following two
|
||||
* functions causes recreating of the text items tabs, thus all updates to
|
||||
@@ -2867,7 +2905,7 @@ static gint select_next_page_no(gint current_page_no, gpointer data)
|
||||
{
|
||||
free(event);
|
||||
|
||||
- cancel_processing(g_lbl_event_log, /* default message */ NULL);
|
||||
+ cancel_processing(g_lbl_event_log, /* default message */ NULL, TERMINATE_NOFLAGS);
|
||||
current_page_no = pages[PAGENO_EVENT_PROGRESS].page_no - 1;
|
||||
goto again;
|
||||
}
|
||||
@@ -2880,7 +2918,7 @@ static gint select_next_page_no(gint current_page_no, gpointer data)
|
||||
"(it is likely a known problem). %s"),
|
||||
problem_data_get_content_or_NULL(g_cd, FILENAME_NOT_REPORTABLE)
|
||||
);
|
||||
- cancel_processing(g_lbl_event_log, msg);
|
||||
+ cancel_processing(g_lbl_event_log, msg, TERMINATE_NOFLAGS);
|
||||
free(msg);
|
||||
current_page_no = pages[PAGENO_EVENT_PROGRESS].page_no - 1;
|
||||
goto again;
|
||||
@@ -3453,6 +3491,8 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
g_btn_onfail = gtk_button_new_with_label(_("Upload for analysis"));
|
||||
gtk_button_set_image(GTK_BUTTON(g_btn_onfail), gtk_image_new_from_icon_name("go-up", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_widget_set_no_show_all(g_btn_onfail, true); /* else gtk_widget_hide won't work */
|
||||
+ g_btn_repeat = gtk_button_new_with_label(_("Repeat"));
|
||||
+ gtk_widget_set_no_show_all(g_btn_repeat, true); /* else gtk_widget_hide won't work */
|
||||
g_btn_next = gtk_button_new_with_mnemonic(_("_Forward"));
|
||||
gtk_button_set_image(GTK_BUTTON(g_btn_next), gtk_image_new_from_icon_name("go-next", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_widget_set_no_show_all(g_btn_next, true); /* else gtk_widget_hide won't work */
|
||||
@@ -3461,6 +3501,7 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_close, false, false, 5);
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_stop, false, false, 5);
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_onfail, false, false, 5);
|
||||
+ gtk_box_pack_start(g_box_buttons, g_btn_repeat, false, false, 5);
|
||||
/* Btns above are to the left, the rest are to the right: */
|
||||
#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
GtkWidget *w = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
|
||||
@@ -3514,6 +3555,7 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
gtk_widget_show_all(GTK_WIDGET(g_box_buttons));
|
||||
gtk_widget_hide(g_btn_stop);
|
||||
gtk_widget_hide(g_btn_onfail);
|
||||
+ gtk_widget_hide(g_btn_repeat);
|
||||
gtk_widget_show(g_btn_next);
|
||||
|
||||
g_wnd_assistant = GTK_WINDOW(gtk_application_window_new(app));
|
||||
@@ -3534,6 +3576,7 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
g_signal_connect(g_btn_close, "clicked", G_CALLBACK(assistant_quit_cb), g_wnd_assistant);
|
||||
g_signal_connect(g_btn_stop, "clicked", G_CALLBACK(on_btn_cancel_event), NULL);
|
||||
g_signal_connect(g_btn_onfail, "clicked", G_CALLBACK(on_btn_failed_cb), NULL);
|
||||
+ g_signal_connect(g_btn_repeat, "clicked", G_CALLBACK(on_btn_repeat_cb), NULL);
|
||||
g_signal_connect(g_btn_next, "clicked", G_CALLBACK(on_next_btn_cb), NULL);
|
||||
|
||||
g_signal_connect(g_wnd_assistant, "destroy", G_CALLBACK(assistant_quit_cb), g_wnd_assistant);
|
||||
--
|
||||
2.0.4
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 1ed0116488c53f93fe4b8e9d607972dacc9b2146 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 20 Aug 2014 13:10:31 +0200
|
||||
Subject: [PATCH 21/33] Get rid of deprecation warnings introduced with
|
||||
gtk-3.13.6
|
||||
|
||||
Fixes #271
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/config_dialog.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
|
||||
index 5370fcb..b65c217 100644
|
||||
--- a/src/gtk-helpers/config_dialog.c
|
||||
+++ b/src/gtk-helpers/config_dialog.c
|
||||
@@ -270,8 +270,13 @@ GtkWidget *create_config_tab_content(const char *column_label,
|
||||
g_object_set(G_OBJECT(renderer), "wrap-width", 440, NULL);
|
||||
gtk_tree_view_column_set_sort_column_id(column, COLUMN_NAME);
|
||||
gtk_tree_view_append_column(GTK_TREE_VIEW(tv), column);
|
||||
+
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 6))
|
||||
+ /* https://bugzilla.gnome.org/show_bug.cgi?id=733312 */
|
||||
/* "Please draw rows in alternating colors": */
|
||||
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tv), TRUE);
|
||||
+#endif
|
||||
+
|
||||
// TODO: gtk_tree_view_set_headers_visible(FALSE)? We have only one column anyway...
|
||||
GtkTreeModel *model = gtk_tree_model_filter_new(GTK_TREE_MODEL(store), NULL);
|
||||
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(model), config_filter_func, NULL, NULL);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 8bea4c9b68fcdb62879b603ba5c2914b6cd8c33a Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 26 Aug 2014 12:51:19 +0200
|
||||
Subject: [PATCH 22/33] wizard: terminate event chain after the emergency
|
||||
analysis
|
||||
|
||||
Resolves rhbz#1133549
|
||||
Related to rhbz#1069917
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index e4718bf..5779052 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -1752,6 +1752,16 @@ static bool event_need_review(const char *event_name)
|
||||
|
||||
static void on_btn_failed_cb(GtkButton *button)
|
||||
{
|
||||
+ /* Since the Repeat button has been introduced, the event chain isn't
|
||||
+ * terminated upon a failure in order to be able to continue in processing
|
||||
+ * in the retry action.
|
||||
+ *
|
||||
+ * Now, user decided to run the emergency analysis instead of trying to
|
||||
+ * reconfigure libreport, so we have to terminate the event chain.
|
||||
+ */
|
||||
+ gtk_widget_hide(g_btn_repeat);
|
||||
+ terminate_event_chain(TERMINATE_NOFLAGS);
|
||||
+
|
||||
/* Show detailed log */
|
||||
gtk_expander_set_expanded(g_exp_report_log, TRUE);
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 9bfb39ab7a7a1aa71726bcae242d483b003869dc Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 26 Aug 2014 22:13:02 +0200
|
||||
Subject: [PATCH 23/33] lib: don't spit unnecessary debug messages
|
||||
|
||||
Related to rhbz#1133674
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/dump_dir.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c
|
||||
index 28439af..045a45b 100644
|
||||
--- a/src/lib/dump_dir.c
|
||||
+++ b/src/lib/dump_dir.c
|
||||
@@ -251,7 +251,7 @@ static const char *dd_check(struct dump_dir *dd)
|
||||
dd->dd_time = parse_time_file(filename_buf);
|
||||
if (dd->dd_time < 0)
|
||||
{
|
||||
- log_warning("Missing file: "FILENAME_TIME);
|
||||
+ log_debug("Missing file: "FILENAME_TIME);
|
||||
return FILENAME_TIME;
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ static const char *dd_check(struct dump_dir *dd)
|
||||
dd->dd_type = load_text_file(filename_buf, DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
|
||||
if (!dd->dd_type || (strlen(dd->dd_type) == 0))
|
||||
{
|
||||
- log_warning("Missing or empty file: "FILENAME_TYPE);
|
||||
+ log_debug("Missing or empty file: "FILENAME_TYPE);
|
||||
return FILENAME_TYPE;
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ static int dd_lock(struct dump_dir *dd, unsigned sleep_usec, int flags)
|
||||
if (missing_file)
|
||||
{
|
||||
xunlink(lock_buf);
|
||||
- log_warning("Unlocked '%s' (no or corrupted '%s' file)", lock_buf, missing_file);
|
||||
+ log_notice("Unlocked '%s' (no or corrupted '%s' file)", lock_buf, missing_file);
|
||||
if (--count == 0 || flags & DD_DONT_WAIT_FOR_LOCK)
|
||||
{
|
||||
errno = EISDIR; /* "this is an ordinary dir, not dump dir" */
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 8cc3a91e7f07365d760d8716067ba03bb0d53aa7 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 27 Aug 2014 09:07:54 +0200
|
||||
Subject: [PATCH 24/33] mailx: print only one log message in notify_only mode
|
||||
|
||||
Related to rhbz#1133674
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/reporter-mailx.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/reporter-mailx.c b/src/plugins/reporter-mailx.c
|
||||
index 92e78a4..caacbe8 100644
|
||||
--- a/src/plugins/reporter-mailx.c
|
||||
+++ b/src/plugins/reporter-mailx.c
|
||||
@@ -132,7 +132,11 @@ static void create_and_send_email(
|
||||
*/
|
||||
putenv((char*)"sendwait=1");
|
||||
|
||||
- log(_("Sending an email..."));
|
||||
+ if (notify_only)
|
||||
+ log(_("Sending a notification email to: %s"), email_to);
|
||||
+ else
|
||||
+ log(_("Sending an email..."));
|
||||
+
|
||||
exec_and_feed_input(dsc, args);
|
||||
|
||||
free(dsc);
|
||||
@@ -154,8 +158,9 @@ static void create_and_send_email(
|
||||
free(msg);
|
||||
dd_close(dd);
|
||||
}
|
||||
+ log(_("Email was sent to: %s"), email_to);
|
||||
}
|
||||
- log(_("Email was sent to: %s"), email_to);
|
||||
+
|
||||
free(email_to);
|
||||
}
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,91 +0,0 @@
|
||||
From 0deb730abc45a4cfa13d93fc07d5b609fb4f0043 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 26 Aug 2014 22:36:30 +0200
|
||||
Subject: [PATCH 25/33] gui: use -symbolic icons
|
||||
|
||||
Related to abrt/gnome-abrt#72
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 10 +++++-----
|
||||
src/gui-wizard-gtk/wizard.glade | 8 ++++----
|
||||
2 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 5779052..525d275 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -3494,17 +3494,17 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
gtk_notebook_set_show_tabs(g_assistant, (g_verbose != 0 && g_expert_mode));
|
||||
|
||||
g_btn_close = gtk_button_new_with_mnemonic(_("_Close"));
|
||||
- gtk_button_set_image(GTK_BUTTON(g_btn_close), gtk_image_new_from_icon_name("window-close", GTK_ICON_SIZE_BUTTON));
|
||||
+ gtk_button_set_image(GTK_BUTTON(g_btn_close), gtk_image_new_from_icon_name("window-close-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
g_btn_stop = gtk_button_new_with_mnemonic(_("_Stop"));
|
||||
- gtk_button_set_image(GTK_BUTTON(g_btn_stop), gtk_image_new_from_icon_name("process-close", GTK_ICON_SIZE_BUTTON));
|
||||
+ gtk_button_set_image(GTK_BUTTON(g_btn_stop), gtk_image_new_from_icon_name("process-close-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_widget_set_no_show_all(g_btn_stop, true); /* else gtk_widget_hide won't work */
|
||||
g_btn_onfail = gtk_button_new_with_label(_("Upload for analysis"));
|
||||
- gtk_button_set_image(GTK_BUTTON(g_btn_onfail), gtk_image_new_from_icon_name("go-up", GTK_ICON_SIZE_BUTTON));
|
||||
+ gtk_button_set_image(GTK_BUTTON(g_btn_onfail), gtk_image_new_from_icon_name("go-up-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_widget_set_no_show_all(g_btn_onfail, true); /* else gtk_widget_hide won't work */
|
||||
g_btn_repeat = gtk_button_new_with_label(_("Repeat"));
|
||||
gtk_widget_set_no_show_all(g_btn_repeat, true); /* else gtk_widget_hide won't work */
|
||||
g_btn_next = gtk_button_new_with_mnemonic(_("_Forward"));
|
||||
- gtk_button_set_image(GTK_BUTTON(g_btn_next), gtk_image_new_from_icon_name("go-next", GTK_ICON_SIZE_BUTTON));
|
||||
+ gtk_button_set_image(GTK_BUTTON(g_btn_next), gtk_image_new_from_icon_name("go-next-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_widget_set_no_show_all(g_btn_next, true); /* else gtk_widget_hide won't work */
|
||||
|
||||
g_box_buttons = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
@@ -3530,7 +3530,7 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
gtk_widget_set_visible(GTK_WIDGET(vbox), TRUE);
|
||||
gtk_box_pack_start(vbox, GTK_WIDGET(g_box_warning_labels), false, false, 5);
|
||||
|
||||
- GtkWidget *image = gtk_image_new_from_icon_name("dialog-warning", GTK_ICON_SIZE_DIALOG);
|
||||
+ GtkWidget *image = gtk_image_new_from_icon_name("dialog-warning-symbolic", GTK_ICON_SIZE_DIALOG);
|
||||
gtk_widget_set_visible(image, TRUE);
|
||||
|
||||
g_widget_warnings_area = GTK_WIDGET(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
||||
index 854a402..b0953db 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.glade
|
||||
+++ b/src/gui-wizard-gtk/wizard.glade
|
||||
@@ -5,7 +5,7 @@
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
- <property name="icon_name">media-record</property>
|
||||
+ <property name="icon_name">media-record-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkListStore" id="ls_sensitive_words">
|
||||
<columns>
|
||||
@@ -133,7 +133,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
- <property name="secondary_icon_name">edit-find</property>
|
||||
+ <property name="secondary_icon_name">edit-find-symbolic</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_tooltip_text" translatable="yes">Clear the search bar to see the list of security sensitive words.</property>
|
||||
<property name="secondary_icon_tooltip_markup" translatable="yes">Clear the search bar to see the list of security sensitive words.</property>
|
||||
@@ -244,7 +244,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_start">4</property>
|
||||
- <property name="icon_name">media-record</property>
|
||||
+ <property name="icon_name">media-record-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -761,7 +761,7 @@
|
||||
<object class="GtkImage" id="img_process_fail">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
- <property name="icon_name">dialog-error</property>
|
||||
+ <property name="icon_name">dialog-error-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,751 +0,0 @@
|
||||
From 6043bf96131374c9af27f0d7e1200901ab6f8e5d Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 25 Aug 2014 17:18:02 +0200
|
||||
Subject: [PATCH 26/33] gui: Problem Details suite
|
||||
|
||||
+ ProblemDetailsWidget
|
||||
+ ProblemDetailsDialog
|
||||
|
||||
Related to abrt/gnome-abrt#64
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
po/POTFILES.in | 2 +
|
||||
src/gtk-helpers/Makefile.am | 10 +-
|
||||
src/gtk-helpers/internal_libreport_gtk.h | 6 +
|
||||
src/gtk-helpers/problem_details_dialog.c | 80 +++++++
|
||||
src/gtk-helpers/problem_details_dialog.h | 37 +++
|
||||
src/gtk-helpers/problem_details_widget.c | 375 +++++++++++++++++++++++++++++++
|
||||
src/gtk-helpers/problem_details_widget.h | 62 +++++
|
||||
src/gtk-helpers/utils.c | 25 +++
|
||||
src/gui-wizard-gtk/wizard.c | 21 +-
|
||||
9 files changed, 596 insertions(+), 22 deletions(-)
|
||||
create mode 100644 src/gtk-helpers/problem_details_dialog.c
|
||||
create mode 100644 src/gtk-helpers/problem_details_dialog.h
|
||||
create mode 100644 src/gtk-helpers/problem_details_widget.c
|
||||
create mode 100644 src/gtk-helpers/problem_details_widget.h
|
||||
create mode 100644 src/gtk-helpers/utils.c
|
||||
|
||||
diff --git a/po/POTFILES.in b/po/POTFILES.in
|
||||
index 4a0b565..c599dab 100644
|
||||
--- a/po/POTFILES.in
|
||||
+++ b/po/POTFILES.in
|
||||
@@ -10,6 +10,8 @@ src/gtk-helpers/config_dialog.c
|
||||
src/gtk-helpers/event_config_dialog.c
|
||||
src/gtk-helpers/secrets.c
|
||||
src/gtk-helpers/workflow_config_dialog.c
|
||||
+src/gtk-helpers/problem_details_widget.c
|
||||
+src/gtk-helpers/problem_details_dialog.c
|
||||
src/gui-wizard-gtk/main.c
|
||||
src/gui-wizard-gtk/wizard.c
|
||||
src/gui-wizard-gtk/wizard.glade
|
||||
diff --git a/src/gtk-helpers/Makefile.am b/src/gtk-helpers/Makefile.am
|
||||
index 13b9072..a7cc554 100644
|
||||
--- a/src/gtk-helpers/Makefile.am
|
||||
+++ b/src/gtk-helpers/Makefile.am
|
||||
@@ -3,12 +3,15 @@ libreport_gtk_includedir = \
|
||||
$(includedir)/libreport
|
||||
|
||||
libreport_gtk_include_HEADERS = \
|
||||
- internal_libreport_gtk.h
|
||||
+ internal_libreport_gtk.h \
|
||||
+ problem_details_widget.h \
|
||||
+ problem_details_dialog.h
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
libreport-gtk.la
|
||||
|
||||
libreport_gtk_la_SOURCES = \
|
||||
+ utils.c \
|
||||
event_config_dialog.c \
|
||||
secrets.c \
|
||||
hyperlinks.c \
|
||||
@@ -16,11 +19,14 @@ libreport_gtk_la_SOURCES = \
|
||||
workflow_config_dialog.c \
|
||||
config_dialog.c \
|
||||
ask_dialogs.c \
|
||||
- search_item.c search_item.h
|
||||
+ search_item.c search_item.h \
|
||||
+ problem_details_widget.c problem_details_widget.h \
|
||||
+ problem_details_dialog.c problem_details_dialog.h
|
||||
|
||||
libreport_gtk_la_CPPFLAGS = \
|
||||
-I$(srcdir)/../include \
|
||||
-I$(srcdir)/../lib \
|
||||
+ -Wno-error=unused-local-typedefs \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GIO_CFLAGS) \
|
||||
diff --git a/src/gtk-helpers/internal_libreport_gtk.h b/src/gtk-helpers/internal_libreport_gtk.h
|
||||
index f8f1c13..57f5889 100644
|
||||
--- a/src/gtk-helpers/internal_libreport_gtk.h
|
||||
+++ b/src/gtk-helpers/internal_libreport_gtk.h
|
||||
@@ -20,6 +20,8 @@
|
||||
#define INTERNAL_LIBREPORT_GTK_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
+#include "problem_details_dialog.h"
|
||||
+#include "problem_details_widget.h"
|
||||
#include "report.h"
|
||||
#include "internal_libreport.h"
|
||||
|
||||
@@ -96,6 +98,10 @@ struct url_token
|
||||
#define find_url_tokens libreport_find_url_tokens
|
||||
GList *find_url_tokens(const char *line);
|
||||
|
||||
+
|
||||
+#define reload_text_to_text_view libreport_reload_text_to_text_view
|
||||
+void reload_text_to_text_view(GtkTextView *tv, const char *text);
|
||||
+
|
||||
/* Ask dialogs */
|
||||
|
||||
/*
|
||||
diff --git a/src/gtk-helpers/problem_details_dialog.c b/src/gtk-helpers/problem_details_dialog.c
|
||||
new file mode 100644
|
||||
index 0000000..dc2362e
|
||||
--- /dev/null
|
||||
+++ b/src/gtk-helpers/problem_details_dialog.c
|
||||
@@ -0,0 +1,80 @@
|
||||
+/*
|
||||
+ Copyright (C) 2014 ABRT Team
|
||||
+ Copyright (C) 2014 RedHat inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along
|
||||
+ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+*/
|
||||
+
|
||||
+#include "problem_details_dialog.h"
|
||||
+#include "internal_libreport_gtk.h"
|
||||
+#include "internal_libreport.h"
|
||||
+
|
||||
+GtkWidget *
|
||||
+problem_details_dialog_new(problem_data_t *problem, GtkWindow *parent)
|
||||
+{
|
||||
+ INITIALIZE_LIBREPORT();
|
||||
+
|
||||
+ GtkWidget *dialog = gtk_dialog_new_with_buttons(
|
||||
+ _("Problem details"),
|
||||
+ parent,
|
||||
+ GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
+ _("OK"),
|
||||
+ GTK_RESPONSE_NONE,
|
||||
+ NULL
|
||||
+ );
|
||||
+
|
||||
+ gtk_window_set_default_size(GTK_WINDOW(dialog), 800, 600);
|
||||
+
|
||||
+ g_signal_connect_swapped(dialog, "response", G_CALLBACK(gtk_widget_destroy), dialog);
|
||||
+
|
||||
+ ProblemDetailsWidget *details = problem_details_widget_new(problem);
|
||||
+
|
||||
+ GtkWidget *scrolled = gtk_scrolled_window_new(NULL, NULL);
|
||||
+ gtk_widget_set_halign(scrolled, GTK_ALIGN_FILL);
|
||||
+ gtk_widget_set_valign(scrolled, GTK_ALIGN_FILL);
|
||||
+ gtk_widget_set_hexpand(scrolled, TRUE);
|
||||
+ gtk_widget_set_vexpand(scrolled, TRUE);
|
||||
+
|
||||
+ gtk_container_add(GTK_CONTAINER(scrolled), GTK_WIDGET(details));
|
||||
+
|
||||
+ GtkWidget *content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
|
||||
+ gtk_container_add(GTK_CONTAINER(content_area), GTK_WIDGET(scrolled));
|
||||
+
|
||||
+ gtk_widget_show_all(dialog);
|
||||
+
|
||||
+ return dialog;
|
||||
+}
|
||||
+
|
||||
+GtkWidget *
|
||||
+problem_details_dialog_new_for_dir(const char *dir, GtkWindow *parent)
|
||||
+{
|
||||
+ INITIALIZE_LIBREPORT();
|
||||
+
|
||||
+ struct dump_dir *dd = dd_opendir(dir, DD_OPEN_READONLY);
|
||||
+ if (!dd)
|
||||
+ return NULL;
|
||||
+
|
||||
+ problem_data_t *problem = create_problem_data_from_dump_dir(dd);
|
||||
+ problem_data_add_text_noteditable(problem, CD_DUMPDIR, dir);
|
||||
+
|
||||
+ dd_close(dd);
|
||||
+
|
||||
+ GtkWidget *dialog = problem_details_dialog_new(problem, parent);
|
||||
+
|
||||
+ g_signal_connect_swapped(dialog, "destroy", G_CALLBACK(problem_data_free), problem);
|
||||
+
|
||||
+ return dialog;
|
||||
+}
|
||||
+
|
||||
diff --git a/src/gtk-helpers/problem_details_dialog.h b/src/gtk-helpers/problem_details_dialog.h
|
||||
new file mode 100644
|
||||
index 0000000..e8ba8ad
|
||||
--- /dev/null
|
||||
+++ b/src/gtk-helpers/problem_details_dialog.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ Copyright (C) 2014 ABRT Team
|
||||
+ Copyright (C) 2014 RedHat inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along
|
||||
+ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+*/
|
||||
+#ifndef _PROBLEM_DETAILS_DIALOG_H
|
||||
+#define _PROBLEM_DETAILS_DIALOG_H
|
||||
+
|
||||
+#include <gtk/gtk.h>
|
||||
+#include "problem_data.h"
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
+GtkWidget *problem_details_dialog_new(problem_data_t *problem, GtkWindow *parent);
|
||||
+GtkWidget *problem_details_dialog_new_for_dir(const char *dir, GtkWindow *parent);
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
+#endif /* _PROBLEM_DETAILS_DIALOG_H */
|
||||
+
|
||||
diff --git a/src/gtk-helpers/problem_details_widget.c b/src/gtk-helpers/problem_details_widget.c
|
||||
new file mode 100644
|
||||
index 0000000..2cb3206
|
||||
--- /dev/null
|
||||
+++ b/src/gtk-helpers/problem_details_widget.c
|
||||
@@ -0,0 +1,375 @@
|
||||
+/*
|
||||
+ Copyright (C) 2014 ABRT Team
|
||||
+ Copyright (C) 2014 RedHat inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along
|
||||
+ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+*/
|
||||
+
|
||||
+#include "problem_details_widget.h"
|
||||
+#include "internal_libreport_gtk.h"
|
||||
+#include "internal_libreport.h"
|
||||
+
|
||||
+#define PROBLEM_DETAILS_WIDGET_GET_PRIVATE(o) \
|
||||
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_PROBLEM_DETAILS_WIDGET, ProblemDetailsWidgetPrivate))
|
||||
+
|
||||
+#define EXPLICIT_ITEMS \
|
||||
+ CD_DUMPDIR, \
|
||||
+ FILENAME_TIME, \
|
||||
+ FILENAME_LAST_OCCURRENCE, \
|
||||
+ FILENAME_UID, \
|
||||
+ FILENAME_USERNAME, \
|
||||
+ FILENAME_TYPE, \
|
||||
+ FILENAME_COMMENT, \
|
||||
+ FILENAME_ANALYZER
|
||||
+
|
||||
+#define ORDERED_ITEMS \
|
||||
+ FILENAME_EXPLOITABLE, \
|
||||
+ FILENAME_NOT_REPORTABLE, \
|
||||
+ FILENAME_REASON, \
|
||||
+ FILENAME_BACKTRACE, \
|
||||
+ FILENAME_CRASH_FUNCTION, \
|
||||
+ FILENAME_CMDLINE, \
|
||||
+ FILENAME_EXECUTABLE, \
|
||||
+ FILENAME_PACKAGE, \
|
||||
+ FILENAME_COMPONENT, \
|
||||
+ FILENAME_PID, \
|
||||
+ FILENAME_PWD, \
|
||||
+ FILENAME_HOSTNAME, \
|
||||
+ FILENAME_COUNT
|
||||
+
|
||||
+static const char *items_orderlist[] = {
|
||||
+ ORDERED_ITEMS,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static const char *items_auto_blacklist[] = {
|
||||
+ EXPLICIT_ITEMS,
|
||||
+ ORDERED_ITEMS,
|
||||
+ FILENAME_PKG_NAME,
|
||||
+ FILENAME_PKG_VERSION,
|
||||
+ FILENAME_PKG_RELEASE,
|
||||
+ FILENAME_PKG_ARCH,
|
||||
+ FILENAME_PKG_EPOCH,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+struct ProblemDetailsWidgetPrivate {
|
||||
+ PangoFontDescription *font;
|
||||
+ gulong rows;
|
||||
+ problem_data_t *problem_data;
|
||||
+};
|
||||
+
|
||||
+G_DEFINE_TYPE(ProblemDetailsWidget, problem_details_widget, GTK_TYPE_GRID)
|
||||
+
|
||||
+static void problem_details_widget_finalize(GObject *object);
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_class_init(ProblemDetailsWidgetClass *klass)
|
||||
+{
|
||||
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
|
||||
+
|
||||
+ object_class->finalize = problem_details_widget_finalize;
|
||||
+
|
||||
+ g_type_class_add_private(klass, sizeof(ProblemDetailsWidgetPrivate));
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_finalize(GObject *object)
|
||||
+{
|
||||
+ ProblemDetailsWidget *self;
|
||||
+
|
||||
+ self = PROBLEM_DETAILS_WIDGET(object);
|
||||
+
|
||||
+ self->priv->problem_data = (void *)0xdeadbeaf;
|
||||
+
|
||||
+ G_OBJECT_CLASS(problem_details_widget_parent_class)->finalize(object);
|
||||
+}
|
||||
+
|
||||
+static gulong
|
||||
+problem_details_widget_append_row(ProblemDetailsWidget *self)
|
||||
+{
|
||||
+ gtk_grid_insert_row(GTK_GRID(self), self->priv->rows);
|
||||
+ return self->priv->rows++;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_add_single_line(ProblemDetailsWidget *self, const char *name, const char *content)
|
||||
+{
|
||||
+ GtkWidget *label = gtk_label_new(name);
|
||||
+ gtk_widget_set_halign(label, GTK_ALIGN_START);
|
||||
+ gtk_widget_set_valign(label, GTK_ALIGN_START);
|
||||
+ gtk_widget_set_margin_start(label, 20);
|
||||
+ gtk_widget_set_margin_end(label, 20);
|
||||
+
|
||||
+ GtkWidget *value = gtk_label_new(content);
|
||||
+ gtk_label_set_selectable(GTK_LABEL(value), TRUE);
|
||||
+ gtk_label_set_line_wrap(GTK_LABEL(value), TRUE);
|
||||
+ gtk_label_set_line_wrap_mode(GTK_LABEL(value), GTK_WRAP_WORD);
|
||||
+ gtk_widget_set_halign(value, GTK_ALIGN_START);
|
||||
+ gtk_widget_set_hexpand(value, TRUE);
|
||||
+ gtk_widget_set_margin_start(value, 5);
|
||||
+ gtk_widget_override_font(GTK_WIDGET(value), self->priv->font);
|
||||
+
|
||||
+ const gulong row = problem_details_widget_append_row(self);
|
||||
+
|
||||
+ gtk_grid_attach(GTK_GRID(self), label, 0, row, 1, 1);
|
||||
+ gtk_grid_attach(GTK_GRID(self), value, 1, row, 1, 1);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_add_multi_line(ProblemDetailsWidget *self, const char *name, const char *content)
|
||||
+{
|
||||
+#if 0
|
||||
+ GtkWidget *value = gtk_text_view_new();
|
||||
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(value), FALSE);
|
||||
+
|
||||
+ if (strcmp(name, FILENAME_COMMENT) == 0
|
||||
+ || strcmp(name, FILENAME_REASON) == 0)
|
||||
+ gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(value), GTK_WRAP_WORD);
|
||||
+
|
||||
+ reload_text_to_text_view(GTK_TEXT_VIEW(value), content);
|
||||
+#else
|
||||
+ GtkWidget *value = gtk_label_new(content);
|
||||
+ gtk_widget_set_halign(value, GTK_ALIGN_START);
|
||||
+
|
||||
+ if (strcmp(name, FILENAME_COMMENT) == 0
|
||||
+ || strcmp(name, FILENAME_REASON) == 0)
|
||||
+ {
|
||||
+ gtk_label_set_line_wrap(GTK_LABEL(value), TRUE);
|
||||
+ gtk_label_set_line_wrap_mode(GTK_LABEL(value), GTK_WRAP_WORD);
|
||||
+ gtk_widget_set_margin_bottom(value, 12);
|
||||
+ }
|
||||
+
|
||||
+ gtk_label_set_selectable(GTK_LABEL(value), TRUE);
|
||||
+#endif
|
||||
+
|
||||
+ gtk_widget_override_font(GTK_WIDGET(value), self->priv->font);
|
||||
+
|
||||
+ GtkWidget *expander = gtk_expander_new(name);
|
||||
+ gtk_widget_set_hexpand(expander, TRUE);
|
||||
+ gtk_container_add(GTK_CONTAINER(expander), value);
|
||||
+
|
||||
+ const gulong row = problem_details_widget_append_row(self);
|
||||
+
|
||||
+ gtk_grid_attach(GTK_GRID(self), expander, 0, row, 2, 1);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_add_binary(ProblemDetailsWidget *self, const char *label, const char *path)
|
||||
+{
|
||||
+ struct stat statbuf;
|
||||
+ statbuf.st_size = 0;
|
||||
+
|
||||
+ if (stat(path, &statbuf) != 0)
|
||||
+ {
|
||||
+ log("File '%s' does not exist", path);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ gchar *size = g_format_size_full((long long)statbuf.st_size, G_FORMAT_SIZE_IEC_UNITS);
|
||||
+ char *msg = xasprintf(_("$DATA_DIRECTORY/%s (binary file, %s)"), label, size);
|
||||
+ problem_details_widget_add_single_line(self, label, msg);
|
||||
+ free(msg);
|
||||
+ g_free(size);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_add_time_stamp(ProblemDetailsWidget *self, const char *label, const char *stamp)
|
||||
+{
|
||||
+ struct tm tm;
|
||||
+ memset(&tm, 0, sizeof(struct tm));
|
||||
+
|
||||
+ const char *ret = strptime(stamp, "%s", &tm);
|
||||
+
|
||||
+ if (ret == NULL || ret[0] != '\0')
|
||||
+ return;
|
||||
+
|
||||
+ char buf[255];
|
||||
+ strftime(buf, sizeof(buf), "%F %T", &tm);
|
||||
+
|
||||
+ problem_details_widget_add_single_line(self, label, buf);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_add_problem_item(ProblemDetailsWidget *self, const char *name, problem_item *item)
|
||||
+{
|
||||
+ if (item->flags & CD_FLAG_TXT)
|
||||
+ {
|
||||
+ if (strchr(item->content, '\n') == NULL)
|
||||
+ problem_details_widget_add_single_line(self, name, item->content);
|
||||
+ else
|
||||
+ problem_details_widget_add_multi_line(self, name, item->content);
|
||||
+ }
|
||||
+ else if (item->flags & CD_FLAG_BIN)
|
||||
+ problem_details_widget_add_binary(self, name, item->content);
|
||||
+ else
|
||||
+ log("Unsupported file type");
|
||||
+}
|
||||
+
|
||||
+/* Callback for GHashTable */
|
||||
+static void
|
||||
+problem_data_entry_to_grid_row_one_line(const char *item_name, problem_item *item, ProblemDetailsWidget *self)
|
||||
+{
|
||||
+ if (((item->flags & CD_FLAG_TXT) && (strchr(item->content, '\n') == NULL))
|
||||
+ && !is_in_string_list(item_name, (char **)items_auto_blacklist))
|
||||
+ problem_details_widget_add_single_line(self, item_name, item->content);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_data_entry_to_grid_row_multi_line(const char *item_name, problem_item *item, ProblemDetailsWidget *self)
|
||||
+{
|
||||
+ if (((item->flags & CD_FLAG_TXT) && (strchr(item->content, '\n') != NULL))
|
||||
+ && !is_in_string_list(item_name, (char **)items_auto_blacklist))
|
||||
+ problem_details_widget_add_multi_line(self, item_name, item->content);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_data_entry_to_grid_row_binary(const char *item_name, problem_item *item, ProblemDetailsWidget *self)
|
||||
+{
|
||||
+ if ((item->flags & CD_FLAG_BIN)
|
||||
+ && !is_in_string_list(item_name, (char **)items_auto_blacklist))
|
||||
+ problem_details_widget_add_binary(self, item_name, item->content);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_populate(ProblemDetailsWidget *self)
|
||||
+{
|
||||
+ { /* Explicit order */
|
||||
+ for (const char **iter = items_orderlist; *iter; ++iter)
|
||||
+ {
|
||||
+ struct problem_item *item = problem_data_get_item_or_NULL(
|
||||
+ self->priv->problem_data, *iter);
|
||||
+
|
||||
+ if (item == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ problem_details_widget_add_problem_item(self, *iter, item);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ { /* comment: */
|
||||
+ const char *dd = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, FILENAME_COMMENT);
|
||||
+ if (dd)
|
||||
+ problem_details_widget_add_multi_line(self, FILENAME_COMMENT, dd);
|
||||
+ }
|
||||
+
|
||||
+ { /* First occurence: 2014-08-26 11:08 */
|
||||
+ const char *ts = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, FILENAME_TIME);
|
||||
+ if (ts)
|
||||
+ problem_details_widget_add_time_stamp(self, "first_occurence", ts);
|
||||
+ }
|
||||
+
|
||||
+ { /* Last occurence: 2014-08-27 11:08 */
|
||||
+ const char *ts = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, FILENAME_LAST_OCCURRENCE);
|
||||
+ if (ts)
|
||||
+ problem_details_widget_add_time_stamp(self, "last_occurence", ts);
|
||||
+ }
|
||||
+
|
||||
+ { /* User: login(UID) */
|
||||
+ const char *uid = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, FILENAME_UID);
|
||||
+
|
||||
+ const char *username = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, "username");
|
||||
+
|
||||
+ char *line = NULL;
|
||||
+ if (uid && username)
|
||||
+ line = xasprintf("%s (%s)", username, uid);
|
||||
+ else if (!uid && !username)
|
||||
+ line = xstrdup("unknown user");
|
||||
+ else
|
||||
+ line = xasprintf("%s", uid ? uid : username);
|
||||
+
|
||||
+ problem_details_widget_add_single_line(self, "user", line);
|
||||
+ }
|
||||
+
|
||||
+ { /* Type/Analyzer: CCpp */
|
||||
+ const char *type = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, FILENAME_TYPE);
|
||||
+ const char *analyzer = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, FILENAME_ANALYZER);
|
||||
+
|
||||
+ char *label = NULL;
|
||||
+ char *line = NULL;
|
||||
+ if (type != NULL && analyzer != NULL)
|
||||
+ {
|
||||
+ if (strcmp(type, analyzer) != 0)
|
||||
+ {
|
||||
+ label = xstrdup("type/analyzer");
|
||||
+ line = xasprintf("%s/%s", type, analyzer);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ label = xstrdup("type");
|
||||
+ line = xstrdup(type);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ label = xstrdup(type ? "type" : "anlyzer");
|
||||
+ line = xstrdup(type ? type : analyzer);
|
||||
+ }
|
||||
+
|
||||
+ problem_details_widget_add_single_line(self, label, line);
|
||||
+
|
||||
+ free(line);
|
||||
+ free(label);
|
||||
+ }
|
||||
+
|
||||
+ g_hash_table_foreach(self->priv->problem_data,
|
||||
+ (GHFunc)problem_data_entry_to_grid_row_one_line, self);
|
||||
+
|
||||
+ { /* data directory: */
|
||||
+ const char *dd = problem_data_get_content_or_NULL(
|
||||
+ self->priv->problem_data, CD_DUMPDIR);
|
||||
+ if (dd)
|
||||
+ problem_details_widget_add_single_line(self, "data_directory", dd);
|
||||
+
|
||||
+ /* show binaries below the data_directory entry */
|
||||
+ g_hash_table_foreach(self->priv->problem_data,
|
||||
+ (GHFunc)problem_data_entry_to_grid_row_binary, self);
|
||||
+ }
|
||||
+
|
||||
+ g_hash_table_foreach(self->priv->problem_data,
|
||||
+ (GHFunc)problem_data_entry_to_grid_row_multi_line, self);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+problem_details_widget_init(ProblemDetailsWidget *self)
|
||||
+{
|
||||
+ self->priv = PROBLEM_DETAILS_WIDGET_GET_PRIVATE(self);
|
||||
+ self->priv->font = pango_font_description_from_string("monospace");
|
||||
+ self->priv->rows = 0;
|
||||
+ self->priv->problem_data = NULL;
|
||||
+}
|
||||
+
|
||||
+ProblemDetailsWidget *
|
||||
+problem_details_widget_new(problem_data_t *problem)
|
||||
+{
|
||||
+ INITIALIZE_LIBREPORT();
|
||||
+
|
||||
+ GObject *object = g_object_new(TYPE_PROBLEM_DETAILS_WIDGET, NULL);
|
||||
+ ProblemDetailsWidget *self = PROBLEM_DETAILS_WIDGET(object);
|
||||
+ self->priv->problem_data = problem;
|
||||
+
|
||||
+ problem_details_widget_populate(self);
|
||||
+ gtk_widget_show_all(GTK_WIDGET(self));
|
||||
+
|
||||
+ return self;
|
||||
+}
|
||||
+
|
||||
diff --git a/src/gtk-helpers/problem_details_widget.h b/src/gtk-helpers/problem_details_widget.h
|
||||
new file mode 100644
|
||||
index 0000000..c736a5d
|
||||
--- /dev/null
|
||||
+++ b/src/gtk-helpers/problem_details_widget.h
|
||||
@@ -0,0 +1,62 @@
|
||||
+/*
|
||||
+ Copyright (C) 2014 ABRT Team
|
||||
+ Copyright (C) 2014 RedHat inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along
|
||||
+ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+*/
|
||||
+#ifndef _PROBLEM_DETAILS_WIDGET_H
|
||||
+#define _PROBLEM_DETAILS_WIDGET_H
|
||||
+
|
||||
+#include <gtk/gtk.h>
|
||||
+#include "problem_data.h"
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
+G_BEGIN_DECLS
|
||||
+
|
||||
+#define TYPE_PROBLEM_DETAILS_WIDGET (problem_details_widget_get_type())
|
||||
+#define PROBLEM_DETAILS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROBLEM_DETAILS_WIDGET, ProblemDetailsWidget))
|
||||
+#define PROBLEM_DETAILS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROBLEM_DETAILS_WIDGET, ProblemDetailsWidgetClass))
|
||||
+#define IS_PROBLEM_DETAILS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROBLEM_DETAILS_WIDGET))
|
||||
+#define IS_PROBLEM_DETAILS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROBLEM_DETAILS_WIDGET))
|
||||
+#define PROBLEM_DETAILS_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROBLEM_DETAILS_WIDGET, ProblemDetailsWidgetClass))
|
||||
+
|
||||
+typedef struct _ProblemDetailsWidget ProblemDetailsWidget;
|
||||
+typedef struct _ProblemDetailsWidgetClass ProblemDetailsWidgetClass;
|
||||
+typedef struct ProblemDetailsWidgetPrivate ProblemDetailsWidgetPrivate;
|
||||
+
|
||||
+struct _ProblemDetailsWidget {
|
||||
+ GtkGrid parent_instance;
|
||||
+ ProblemDetailsWidgetPrivate *priv;
|
||||
+};
|
||||
+
|
||||
+struct _ProblemDetailsWidgetClass {
|
||||
+ GtkGridClass parent_class;
|
||||
+};
|
||||
+
|
||||
+GType problem_details_widget_get_type (void) G_GNUC_CONST;
|
||||
+
|
||||
+ProblemDetailsWidget *problem_details_widget_new(problem_data_t *problem);
|
||||
+
|
||||
+G_END_DECLS
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
+#endif /* _PROBLEM_DETAILS_WIDGET_H */
|
||||
+
|
||||
diff --git a/src/gtk-helpers/utils.c b/src/gtk-helpers/utils.c
|
||||
new file mode 100644
|
||||
index 0000000..4ba2c0e
|
||||
--- /dev/null
|
||||
+++ b/src/gtk-helpers/utils.c
|
||||
@@ -0,0 +1,25 @@
|
||||
+#include "internal_libreport_gtk.h"
|
||||
+
|
||||
+void reload_text_to_text_view(GtkTextView *tv, const char *text)
|
||||
+{
|
||||
+ GtkTextBuffer *tb = gtk_text_view_get_buffer(tv);
|
||||
+ GtkTextIter beg_iter, end_iter;
|
||||
+ gtk_text_buffer_get_iter_at_offset(tb, &beg_iter, 0);
|
||||
+ gtk_text_buffer_get_iter_at_offset(tb, &end_iter, -1);
|
||||
+ gtk_text_buffer_delete(tb, &beg_iter, &end_iter);
|
||||
+
|
||||
+ if (!text)
|
||||
+ return;
|
||||
+
|
||||
+ const gchar *end;
|
||||
+ while (!g_utf8_validate(text, -1, &end))
|
||||
+ {
|
||||
+ gtk_text_buffer_insert_at_cursor(tb, text, end - text);
|
||||
+ char buf[8];
|
||||
+ unsigned len = snprintf(buf, sizeof(buf), "<%02X>", (unsigned char)*end);
|
||||
+ gtk_text_buffer_insert_at_cursor(tb, buf, len);
|
||||
+ text = end + 1;
|
||||
+ }
|
||||
+
|
||||
+ gtk_text_buffer_insert_at_cursor(tb, text, strlen(text));
|
||||
+}
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 5779052..a5f6119 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -393,31 +393,12 @@ static void load_text_to_text_view(GtkTextView *tv, const char *name)
|
||||
/* a result of xstrdup() is freed */
|
||||
g_hash_table_insert(g_loaded_texts, (gpointer)xstrdup(name), (gpointer)1);
|
||||
|
||||
- GtkTextBuffer *tb = gtk_text_view_get_buffer(tv);
|
||||
-
|
||||
const char *str = g_cd ? problem_data_get_content_or_NULL(g_cd, name) : NULL;
|
||||
/* Bad: will choke at any text with non-Unicode parts: */
|
||||
/* gtk_text_buffer_set_text(tb, (str ? str : ""), -1);*/
|
||||
/* Start torturing ourself instead: */
|
||||
|
||||
- GtkTextIter beg_iter, end_iter;
|
||||
- gtk_text_buffer_get_iter_at_offset(tb, &beg_iter, 0);
|
||||
- gtk_text_buffer_get_iter_at_offset(tb, &end_iter, -1);
|
||||
- gtk_text_buffer_delete(tb, &beg_iter, &end_iter);
|
||||
-
|
||||
- if (!str)
|
||||
- return;
|
||||
-
|
||||
- const gchar *end;
|
||||
- while (!g_utf8_validate(str, -1, &end))
|
||||
- {
|
||||
- gtk_text_buffer_insert_at_cursor(tb, str, end - str);
|
||||
- char buf[8];
|
||||
- unsigned len = snprintf(buf, sizeof(buf), "<%02X>", (unsigned char)*end);
|
||||
- gtk_text_buffer_insert_at_cursor(tb, buf, len);
|
||||
- str = end + 1;
|
||||
- }
|
||||
- gtk_text_buffer_insert_at_cursor(tb, str, strlen(str));
|
||||
+ reload_text_to_text_view(tv, str);
|
||||
}
|
||||
|
||||
static gchar *get_malloced_string_from_text_view(GtkTextView *tv)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,168 +0,0 @@
|
||||
From b4044bad5c86b552e252376f1b520afa28c8c63e Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 25 Aug 2014 17:20:16 +0200
|
||||
Subject: [PATCH 27/34] gui: port to Problem Details suite
|
||||
|
||||
- show the "Details" button on the comment page
|
||||
- use the problem details widget on the summary page
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 43 ++++++++++++++++++++---------------------
|
||||
src/gui-wizard-gtk/wizard.glade | 16 +++++++--------
|
||||
2 files changed, 29 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index a5f6119..b6629ba 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -69,6 +69,7 @@ static GtkWidget *g_btn_close;
|
||||
static GtkWidget *g_btn_next;
|
||||
static GtkWidget *g_btn_onfail;
|
||||
static GtkWidget *g_btn_repeat;
|
||||
+static GtkWidget *g_btn_detail;
|
||||
|
||||
static GtkBox *g_box_events;
|
||||
static GtkBox *g_box_workflows;
|
||||
@@ -2673,6 +2674,7 @@ static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer us
|
||||
clear_warnings();
|
||||
}
|
||||
|
||||
+ gtk_widget_hide(g_btn_detail);
|
||||
gtk_widget_hide(g_btn_onfail);
|
||||
if (!g_expert_mode)
|
||||
gtk_widget_hide(g_btn_repeat);
|
||||
@@ -2710,31 +2712,12 @@ static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer us
|
||||
show_warnings();
|
||||
}
|
||||
|
||||
- if (pages[PAGENO_SUMMARY].page_widget == page
|
||||
- || pages[PAGENO_REVIEW_DATA].page_widget == page
|
||||
- ) {
|
||||
- GtkWidget *w = GTK_WIDGET(g_tv_details);
|
||||
- GtkContainer *c = GTK_CONTAINER(gtk_widget_get_parent(w));
|
||||
- if (c)
|
||||
- gtk_container_remove(c, w);
|
||||
- gtk_container_add(pages[PAGENO_SUMMARY].page_widget == page ?
|
||||
- g_container_details1 : g_container_details2,
|
||||
- w
|
||||
- );
|
||||
- /* Make checkbox column visible only on the last page */
|
||||
- gtk_tree_view_column_set_visible(g_tv_details_col_checkbox,
|
||||
- (pages[PAGENO_REVIEW_DATA].page_widget == page)
|
||||
- );
|
||||
-
|
||||
- if (pages[PAGENO_REVIEW_DATA].page_widget == page)
|
||||
- {
|
||||
- gtk_widget_set_sensitive(g_btn_next, gtk_toggle_button_get_active(g_tb_approve_bt));
|
||||
- update_ls_details_checkboxes(g_event_selected);
|
||||
- }
|
||||
- }
|
||||
+ if (pages[PAGENO_REVIEW_DATA].page_widget == page)
|
||||
+ update_ls_details_checkboxes(g_event_selected);
|
||||
|
||||
if (pages[PAGENO_EDIT_COMMENT].page_widget == page)
|
||||
{
|
||||
+ gtk_widget_show(g_btn_detail);
|
||||
gtk_widget_set_sensitive(g_btn_next, false);
|
||||
on_comment_changed(gtk_text_view_get_buffer(g_tv_comment), NULL);
|
||||
}
|
||||
@@ -3192,6 +3175,12 @@ static void on_btn_add_file(GtkButton *button)
|
||||
}
|
||||
}
|
||||
|
||||
+static void on_btn_detail(GtkButton *button)
|
||||
+{
|
||||
+ GtkWidget *pdd = problem_details_dialog_new(g_cd, g_wnd_assistant);
|
||||
+ gtk_dialog_run(GTK_DIALOG(pdd));
|
||||
+}
|
||||
+
|
||||
/* [Del] key handling in item list */
|
||||
static void delete_item(GtkTreeView *treeview)
|
||||
{
|
||||
@@ -3317,6 +3306,8 @@ static void add_pages(void)
|
||||
|
||||
g_signal_connect(g_tv_details, "key-press-event", G_CALLBACK(on_key_press_event_in_item_list), NULL);
|
||||
g_tv_sensitive_sel_hndlr = g_signal_connect(g_tv_sensitive_sel, "changed", G_CALLBACK(on_sensitive_word_selection_changed), NULL);
|
||||
+
|
||||
+
|
||||
}
|
||||
|
||||
static void create_details_treeview(void)
|
||||
@@ -3487,6 +3478,8 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
g_btn_next = gtk_button_new_with_mnemonic(_("_Forward"));
|
||||
gtk_button_set_image(GTK_BUTTON(g_btn_next), gtk_image_new_from_icon_name("go-next-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_widget_set_no_show_all(g_btn_next, true); /* else gtk_widget_hide won't work */
|
||||
+ g_btn_detail = gtk_button_new_with_mnemonic(_("Details"));
|
||||
+ gtk_widget_set_no_show_all(g_btn_detail, true); /* else gtk_widget_hide won't work */
|
||||
|
||||
g_box_buttons = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_close, false, false, 5);
|
||||
@@ -3497,10 +3490,12 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 13) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 13 && GTK_MICRO_VERSION < 5))
|
||||
GtkWidget *w = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
|
||||
gtk_box_pack_start(g_box_buttons, w, true, true, 5);
|
||||
+ gtk_box_pack_start(g_box_buttons, g_btn_detail, false, false, 5);
|
||||
gtk_box_pack_start(g_box_buttons, g_btn_next, false, false, 5);
|
||||
#else
|
||||
gtk_widget_set_valign(GTK_WIDGET(g_btn_next), GTK_ALIGN_END);
|
||||
gtk_box_pack_end(g_box_buttons, g_btn_next, false, false, 5);
|
||||
+ gtk_box_pack_end(g_box_buttons, g_btn_detail, false, false, 5);
|
||||
#endif
|
||||
|
||||
{ /* Warnings area widget definition start */
|
||||
@@ -3564,6 +3559,9 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
|
||||
create_details_treeview();
|
||||
|
||||
+ ProblemDetailsWidget *details = problem_details_widget_new(g_cd);
|
||||
+ gtk_container_add(GTK_CONTAINER(g_container_details1), GTK_WIDGET(details));
|
||||
+
|
||||
g_signal_connect(g_btn_close, "clicked", G_CALLBACK(assistant_quit_cb), g_wnd_assistant);
|
||||
g_signal_connect(g_btn_stop, "clicked", G_CALLBACK(on_btn_cancel_event), NULL);
|
||||
g_signal_connect(g_btn_onfail, "clicked", G_CALLBACK(on_btn_failed_cb), NULL);
|
||||
@@ -3577,6 +3575,7 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
g_signal_connect(gtk_text_view_get_buffer(g_tv_comment), "changed", G_CALLBACK(on_comment_changed), NULL);
|
||||
|
||||
g_signal_connect(g_btn_add_file, "clicked", G_CALLBACK(on_btn_add_file), NULL);
|
||||
+ g_signal_connect(g_btn_detail, "clicked", G_CALLBACK(on_btn_detail), NULL);
|
||||
|
||||
if (is_screencast_available()) {
|
||||
/* we need to override the activate-link handler, because we use
|
||||
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
||||
index 854a402..e6c0fc1 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.glade
|
||||
+++ b/src/gui-wizard-gtk/wizard.glade
|
||||
@@ -405,13 +405,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">out</property>
|
||||
<child>
|
||||
- <object class="GtkTreeView" id="tv_details">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- <child internal-child="selection">
|
||||
- <object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
- </child>
|
||||
- </object>
|
||||
+ <placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -676,7 +670,13 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">out</property>
|
||||
<child>
|
||||
- <placeholder/>
|
||||
+ <object class="GtkTreeView" id="tv_details">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <child internal-child="selection">
|
||||
+ <object class="GtkTreeSelection" id="treeview-selection"/>
|
||||
+ </child>
|
||||
+ </object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,48 +0,0 @@
|
||||
From fbd0a76180633c7d50be01ea69ad734749db18a8 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 28 Aug 2014 09:38:16 +0200
|
||||
Subject: [PATCH 29/33] gui: fix build with older gtk
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gtk-helpers/problem_details_widget.c | 15 ++++++++++++---
|
||||
1 file changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/gtk-helpers/problem_details_widget.c b/src/gtk-helpers/problem_details_widget.c
|
||||
index 2cb3206..c314d4d 100644
|
||||
--- a/src/gtk-helpers/problem_details_widget.c
|
||||
+++ b/src/gtk-helpers/problem_details_widget.c
|
||||
@@ -110,8 +110,6 @@ problem_details_widget_add_single_line(ProblemDetailsWidget *self, const char *n
|
||||
GtkWidget *label = gtk_label_new(name);
|
||||
gtk_widget_set_halign(label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign(label, GTK_ALIGN_START);
|
||||
- gtk_widget_set_margin_start(label, 20);
|
||||
- gtk_widget_set_margin_end(label, 20);
|
||||
|
||||
GtkWidget *value = gtk_label_new(content);
|
||||
gtk_label_set_selectable(GTK_LABEL(value), TRUE);
|
||||
@@ -119,9 +117,20 @@ problem_details_widget_add_single_line(ProblemDetailsWidget *self, const char *n
|
||||
gtk_label_set_line_wrap_mode(GTK_LABEL(value), GTK_WRAP_WORD);
|
||||
gtk_widget_set_halign(value, GTK_ALIGN_START);
|
||||
gtk_widget_set_hexpand(value, TRUE);
|
||||
- gtk_widget_set_margin_start(value, 5);
|
||||
gtk_widget_override_font(GTK_WIDGET(value), self->priv->font);
|
||||
|
||||
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 11) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 11 && GTK_MICRO_VERSION < 2))
|
||||
+ gtk_widget_set_margin_left(label, 20);
|
||||
+ gtk_widget_set_margin_right(label, 20);
|
||||
+
|
||||
+ gtk_widget_set_margin_left(value, 5);
|
||||
+#else
|
||||
+ gtk_widget_set_margin_start(label, 20);
|
||||
+ gtk_widget_set_margin_end(label, 20);
|
||||
+
|
||||
+ gtk_widget_set_margin_start(value, 5);
|
||||
+#endif
|
||||
+
|
||||
const gulong row = problem_details_widget_append_row(self);
|
||||
|
||||
gtk_grid_attach(GTK_GRID(self), label, 0, row, 1, 1);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,111 +0,0 @@
|
||||
From c781531f2c04be3d99830a28997e7b1fb2132dba Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 28 Aug 2014 12:22:39 +0200
|
||||
Subject: [PATCH 30/33] wizard: don't work with destroyed widgets
|
||||
|
||||
Resolves rhbz#1133055
|
||||
Related to rhbz#1069917
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 35 ++++++++++++++++++++++++++++-------
|
||||
1 file changed, 28 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index f0445eb..8620823 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -57,6 +57,7 @@ static char *g_event_selected;
|
||||
static unsigned g_black_event_count = 0;
|
||||
|
||||
static pid_t g_event_child_pid = 0;
|
||||
+static guint g_event_source_id = 0;
|
||||
|
||||
static bool g_expert_mode;
|
||||
|
||||
@@ -1529,10 +1530,18 @@ static void update_event_log_on_disk(const char *str)
|
||||
dd_close(dd);
|
||||
}
|
||||
|
||||
+static bool cancel_event_run()
|
||||
+{
|
||||
+ if (g_event_child_pid <= 0)
|
||||
+ return false;
|
||||
+
|
||||
+ kill(- g_event_child_pid, SIGTERM);
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static void on_btn_cancel_event(GtkButton *button)
|
||||
{
|
||||
- if (g_event_child_pid > 0)
|
||||
- kill(- g_event_child_pid, SIGTERM);
|
||||
+ cancel_event_run();
|
||||
}
|
||||
|
||||
static bool is_processing_finished()
|
||||
@@ -1938,8 +1947,10 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
|
||||
: _("Processing finished, please proceed to the next step."));
|
||||
}
|
||||
|
||||
- /*g_source_remove(evd->event_source_id);*/
|
||||
+ g_source_remove(g_event_source_id);
|
||||
+ g_event_source_id = 0;
|
||||
close(evd->fd);
|
||||
+ g_io_channel_unref(evd->channel);
|
||||
free_run_event_state(evd->run_state);
|
||||
strbuf_free(evd->event_log);
|
||||
free(evd->event_name);
|
||||
@@ -2108,7 +2119,7 @@ static void start_event_run(const char *event_name)
|
||||
|
||||
ndelay_on(evd->fd);
|
||||
evd->channel = g_io_channel_unix_new(evd->fd);
|
||||
- /*evd->event_source_id = */ g_io_add_watch(evd->channel,
|
||||
+ g_event_source_id = g_io_add_watch(evd->channel,
|
||||
G_IO_IN | G_IO_ERR | G_IO_HUP, /* need HUP to detect EOF w/o any data */
|
||||
consume_cmd_output,
|
||||
evd
|
||||
@@ -3385,13 +3396,23 @@ static void init_pages(void)
|
||||
|
||||
static void assistant_quit_cb(void *obj, void *data)
|
||||
{
|
||||
+ /* Suppress execution of consume_cmd_output() */
|
||||
+ if (g_event_source_id != 0)
|
||||
+ {
|
||||
+ g_source_remove(g_event_source_id);
|
||||
+ g_event_source_id = 0;
|
||||
+ }
|
||||
+
|
||||
+ cancel_event_run();
|
||||
+
|
||||
if (g_loaded_texts)
|
||||
{
|
||||
g_hash_table_destroy(g_loaded_texts);
|
||||
g_loaded_texts = NULL;
|
||||
}
|
||||
|
||||
- gtk_widget_destroy(GTK_WIDGET(data));
|
||||
+ gtk_widget_destroy(GTK_WIDGET(g_wnd_assistant));
|
||||
+ g_wnd_assistant = (void *)0xdeadbeaf;
|
||||
}
|
||||
|
||||
static void on_btn_startcast(GtkWidget *btn, gpointer user_data)
|
||||
@@ -3562,13 +3583,13 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||
ProblemDetailsWidget *details = problem_details_widget_new(g_cd);
|
||||
gtk_container_add(GTK_CONTAINER(g_container_details1), GTK_WIDGET(details));
|
||||
|
||||
- g_signal_connect(g_btn_close, "clicked", G_CALLBACK(assistant_quit_cb), g_wnd_assistant);
|
||||
+ g_signal_connect(g_btn_close, "clicked", G_CALLBACK(assistant_quit_cb), NULL);
|
||||
g_signal_connect(g_btn_stop, "clicked", G_CALLBACK(on_btn_cancel_event), NULL);
|
||||
g_signal_connect(g_btn_onfail, "clicked", G_CALLBACK(on_btn_failed_cb), NULL);
|
||||
g_signal_connect(g_btn_repeat, "clicked", G_CALLBACK(on_btn_repeat_cb), NULL);
|
||||
g_signal_connect(g_btn_next, "clicked", G_CALLBACK(on_next_btn_cb), NULL);
|
||||
|
||||
- g_signal_connect(g_wnd_assistant, "destroy", G_CALLBACK(assistant_quit_cb), g_wnd_assistant);
|
||||
+ g_signal_connect(g_wnd_assistant, "destroy", G_CALLBACK(assistant_quit_cb), NULL);
|
||||
g_signal_connect(g_assistant, "switch-page", G_CALLBACK(on_page_prepare), NULL);
|
||||
|
||||
g_signal_connect(g_tb_approve_bt, "toggled", G_CALLBACK(on_bt_approve_toggle), NULL);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 8fc56865d8945e2923fec7c95d025f12d45693ae Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 28 Aug 2014 15:17:30 +0200
|
||||
Subject: [PATCH 31/33] wizard: "Next" button insensitive on the review page by
|
||||
default
|
||||
|
||||
This feature was accidentally removed in commit
|
||||
b4044bad5c86b552e252376f1b520afa28c8c63e
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 8620823..8d0429e 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -2724,7 +2724,10 @@ static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer us
|
||||
}
|
||||
|
||||
if (pages[PAGENO_REVIEW_DATA].page_widget == page)
|
||||
+ {
|
||||
update_ls_details_checkboxes(g_event_selected);
|
||||
+ gtk_widget_set_sensitive(g_btn_next, gtk_toggle_button_get_active(g_tb_approve_bt));
|
||||
+ }
|
||||
|
||||
if (pages[PAGENO_EDIT_COMMENT].page_widget == page)
|
||||
{
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,130 +0,0 @@
|
||||
From 4e4bd7c0011f3ea4565fb9488cedec4fee935d35 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 23 Jul 2014 10:59:55 +0200
|
||||
Subject: [PATCH 32/33] report: parse release/version from os-release
|
||||
|
||||
Related to rhbz#1101240
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/report-python/__init__.py | 69 ++++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 61 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py
|
||||
index 3d2595f..ce7ea06 100644
|
||||
--- a/src/report-python/__init__.py
|
||||
+++ b/src/report-python/__init__.py
|
||||
@@ -27,6 +27,9 @@ import os
|
||||
|
||||
SYSTEM_RELEASE_PATHS = ["/etc/system-release","/etc/redhat-release"]
|
||||
SYSTEM_RELEASE_DEPS = ["system-release", "redhat-release"]
|
||||
+SYSTEM_OS_RELEASE_FILE = "/etc/os-release"
|
||||
+OS_RELEASE_PRODUCT_FIELDS = ["REDHAT_BUGZILLA_PRODUCT", "REDHAT_SUPPORT_PRODUCT", "NAME"]
|
||||
+OS_RELEASE_VERSION_FIELDS = ["REDHAT_BUGZILLA_VERSION", "REDHAT_SUPPORT_VERSION", "NAME"]
|
||||
|
||||
_hardcoded_default_product = ""
|
||||
_hardcoded_default_version = ""
|
||||
@@ -61,6 +64,57 @@ def getVersion_fromRPM():
|
||||
return ""
|
||||
"""
|
||||
|
||||
+def parse_os_release_lines(osreleaselines):
|
||||
+ osrel = {}
|
||||
+
|
||||
+ for line in osreleaselines:
|
||||
+ kvp = line.split('=')
|
||||
+ if len(kvp) < 2:
|
||||
+ continue
|
||||
+
|
||||
+ key = kvp[0]
|
||||
+ value = kvp[1]
|
||||
+ if len(kvp) > 2:
|
||||
+ value = "=".join(kvp[1:])
|
||||
+
|
||||
+ if value:
|
||||
+ osrel[key] = value.strip('"')
|
||||
+ else:
|
||||
+ osrel[key] = value
|
||||
+
|
||||
+ return osrel
|
||||
+
|
||||
+# /etc/os-release file parser
|
||||
+# see man os-release
|
||||
+def parse_os_release_file(filepath):
|
||||
+ osrel = {}
|
||||
+ try:
|
||||
+ with open(filepath) as osrelfil:
|
||||
+ osrel = parse_os_release_lines(osrelfil)
|
||||
+ except IOError as ex:
|
||||
+ # I am sorry, but we do not support logging here :(
|
||||
+ pass
|
||||
+
|
||||
+ return osrel
|
||||
+
|
||||
+def getProduct_fromOSRELEASE(file_path=SYSTEM_OS_RELEASE_FILE):
|
||||
+ osrel = parse_os_release_file(file_path)
|
||||
+
|
||||
+ for pf in OS_RELEASE_PRODUCT_FIELDS:
|
||||
+ if pf in osrel:
|
||||
+ return osrel[pf]
|
||||
+
|
||||
+ return None
|
||||
+
|
||||
+def getVersion_fromOSRELEASE(file_path=SYSTEM_OS_RELEASE_FILE):
|
||||
+ osrel = parse_os_release_file(file_path)
|
||||
+
|
||||
+ for vf in OS_RELEASE_VERSION_FIELDS:
|
||||
+ if vf in osrel:
|
||||
+ return osrel[vf]
|
||||
+
|
||||
+ return None
|
||||
+
|
||||
def getProduct_fromFILE():
|
||||
for each_path in SYSTEM_RELEASE_PATHS:
|
||||
if os.path.exists(each_path):
|
||||
@@ -73,7 +127,6 @@ def getProduct_fromFILE():
|
||||
content = file.read()
|
||||
if content.startswith("Red Hat Enterprise Linux"):
|
||||
return "Red Hat Enterprise Linux"
|
||||
-
|
||||
if content.startswith("Fedora"):
|
||||
return "Fedora"
|
||||
|
||||
@@ -96,11 +149,11 @@ def getVersion_fromFILE():
|
||||
if content.find("Rawhide") > -1:
|
||||
return "rawhide"
|
||||
|
||||
- clist = content.split(" ")
|
||||
- i = clist.index("release")
|
||||
- return clist[i+1]
|
||||
- else:
|
||||
- return ""
|
||||
+ i = content.find(" release")
|
||||
+ if i > -1:
|
||||
+ return content[i + len(" release"):]
|
||||
+
|
||||
+ return ""
|
||||
|
||||
def getProduct_fromPRODUCT():
|
||||
try:
|
||||
@@ -131,7 +184,7 @@ def getProduct():
|
||||
asking anaconda
|
||||
Always return as a string.
|
||||
"""
|
||||
- for getter in (getProduct_fromFILE, getProduct_fromPRODUCT):
|
||||
+ for getter in (getProduct_fromOSRELEASE, getProduct_fromFILE, getProduct_fromPRODUCT):
|
||||
product = getter()
|
||||
if product:
|
||||
return product
|
||||
@@ -144,7 +197,7 @@ def getVersion():
|
||||
asking anaconda
|
||||
Always return as a string.
|
||||
"""
|
||||
- for getter in (getVersion_fromFILE, getVersion_fromPRODUCT):
|
||||
+ for getter in (getVersion_fromOSRELEASE, getVersion_fromFILE, getVersion_fromPRODUCT):
|
||||
version = getter()
|
||||
if version:
|
||||
return version
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,162 +0,0 @@
|
||||
From 00312a80f569f149aa888fcc17765378cd7f799f Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 23 Jul 2014 11:00:28 +0200
|
||||
Subject: [PATCH 33/33] testsuite: report python sanity tests
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
tests/Makefile.am | 3 ++-
|
||||
tests/local.at | 13 +++++++++++++
|
||||
tests/osinfo.at | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
tests/report_python.at | 33 ++++++++++++++++++++++++++++++++
|
||||
tests/testsuite.at | 1 +
|
||||
5 files changed, 101 insertions(+), 1 deletion(-)
|
||||
create mode 100644 tests/report_python.at
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 8ec40e1..750fa16 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -38,7 +38,8 @@ TESTSUITE_AT = \
|
||||
reported_to.at \
|
||||
make_description.at \
|
||||
libreport_types.at \
|
||||
- xml_definition.at
|
||||
+ xml_definition.at \
|
||||
+ report_python.at
|
||||
|
||||
EXTRA_DIST += $(TESTSUITE_AT)
|
||||
TESTSUITE = $(srcdir)/testsuite
|
||||
diff --git a/tests/local.at b/tests/local.at
|
||||
index 758906d..b5fae97 100644
|
||||
--- a/tests/local.at
|
||||
+++ b/tests/local.at
|
||||
@@ -24,4 +24,17 @@ AT_COMPILE([$1])
|
||||
AT_CHECK([./$1], 0, [ignore], [ignore])
|
||||
AT_CLEANUP])
|
||||
|
||||
+# ------------------------
|
||||
+# AT_PYTESTFUN(NAME, SOURCE)
|
||||
+# ------------------------
|
||||
+
|
||||
+# Create a test named NAME by running Python file with contents SOURCE. The
|
||||
+# stdout and stderr output of the Python program is ignored by Autotest.
|
||||
+
|
||||
+m4_define([AT_PYTESTFUN],
|
||||
+[AT_SETUP([$1])
|
||||
+AT_DATA([$1], [$2])
|
||||
+AT_CHECK([PYTHONPATH=../../../src python ./$1], 0, [ignore], [ignore])
|
||||
+AT_CLEANUP])
|
||||
+
|
||||
AT_INIT
|
||||
diff --git a/tests/osinfo.at b/tests/osinfo.at
|
||||
index 529ca13..b57452d 100644
|
||||
--- a/tests/osinfo.at
|
||||
+++ b/tests/osinfo.at
|
||||
@@ -393,3 +393,55 @@ int main(void)
|
||||
return 0;
|
||||
}
|
||||
]])
|
||||
+
|
||||
+## ------------------- ##
|
||||
+## parse_osinfo_python ##
|
||||
+## ------------------- ##
|
||||
+
|
||||
+AT_PYTESTFUN([parse_osinfo_python],
|
||||
+[[import sys
|
||||
+
|
||||
+sys.path.insert(0, "../../../src/report-python/.libs")
|
||||
+
|
||||
+report = __import__("report-python", globals(), locals(), [], -1)
|
||||
+sys.modules["report"] = report
|
||||
+
|
||||
+lines = [
|
||||
+ 'NAME=fedora',
|
||||
+ 'VERSION="20 (Heisenbug)"',
|
||||
+ 'ID=fedora',
|
||||
+ 'VERSION_ID=20',
|
||||
+ 'PRETTY_NAME="Fedora 20 (Heisenbug)"',
|
||||
+ 'ANSI_COLOR="0;34"',
|
||||
+ 'CPE_NAME="cpe:/o:fedoraproject:fedora:20"',
|
||||
+ 'HOME_URL="https://fedoraproject.org/"',
|
||||
+ 'BUG_REPORT_URL="https://bugzilla.redhat.com/"',
|
||||
+ 'REDHAT_BUGZILLA_PRODUCT="Fedora"',
|
||||
+ 'REDHAT_BUGZILLA_PRODUCT_VERSION=20',
|
||||
+ 'REDHAT_SUPPORT_PRODUCT="Fedora"',
|
||||
+ 'REDHAT_SUPPORT_PRODUCT_VERSION=20',
|
||||
+]
|
||||
+
|
||||
+expected = {
|
||||
+ 'NAME':'fedora',
|
||||
+ 'VERSION':'20 (Heisenbug)',
|
||||
+ 'ID':'fedora',
|
||||
+ 'VERSION_ID':'20',
|
||||
+ 'PRETTY_NAME':'Fedora 20 (Heisenbug)',
|
||||
+ 'ANSI_COLOR':'0;34',
|
||||
+ 'CPE_NAME':'cpe:/o:fedoraproject:fedora:20',
|
||||
+ 'HOME_URL':'https://fedoraproject.org/',
|
||||
+ 'BUG_REPORT_URL':'https://bugzilla.redhat.com/',
|
||||
+ 'REDHAT_BUGZILLA_PRODUCT':'Fedora',
|
||||
+ 'REDHAT_BUGZILLA_PRODUCT_VERSION':'20',
|
||||
+ 'REDHAT_SUPPORT_PRODUCT':'Fedora',
|
||||
+ 'REDHAT_SUPPORT_PRODUCT_VERSION':'20'
|
||||
+}
|
||||
+
|
||||
+osrel = report.parse_os_release_lines(lines)
|
||||
+
|
||||
+print sorted(expected.items())
|
||||
+print sorted(osrel.items())
|
||||
+
|
||||
+sys.exit(not bool(osrel == expected))
|
||||
+]])
|
||||
diff --git a/tests/report_python.at b/tests/report_python.at
|
||||
new file mode 100644
|
||||
index 0000000..17e4fb3
|
||||
--- /dev/null
|
||||
+++ b/tests/report_python.at
|
||||
@@ -0,0 +1,33 @@
|
||||
+# -*- Autotest -*-
|
||||
+
|
||||
+AT_BANNER([report_python])
|
||||
+
|
||||
+## ----------------------- ##
|
||||
+## get_from_etc_os_release ##
|
||||
+## ----------------------- ##
|
||||
+
|
||||
+AT_PYTESTFUN([get_from_etc_os_release],
|
||||
+[[import sys
|
||||
+
|
||||
+sys.path.insert(0, "../../../src/report-python/.libs")
|
||||
+
|
||||
+report = __import__("report-python", globals(), locals(), [], -1)
|
||||
+sys.modules["report"] = report
|
||||
+
|
||||
+import os
|
||||
+
|
||||
+if not os.path.exists("/etc/os-release"):
|
||||
+ print "Cannot run the test: '/etc/os-release' does not exist"
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+exit_code = 0
|
||||
+if report.getProduct_fromOSRELEASE() != report.getProduct():
|
||||
+ print "getProduct() did not return PRODUCT from /etc/os-release"
|
||||
+ exit_code += 1
|
||||
+
|
||||
+if report.getVersion_fromOSRELEASE() != report.getVersion():
|
||||
+ print "getVersion() did not return PRODUCT from /etc/os-release"
|
||||
+ exit_code += 1
|
||||
+
|
||||
+sys.exit(exit_code)
|
||||
+]])
|
||||
diff --git a/tests/testsuite.at b/tests/testsuite.at
|
||||
index 97b2442..a569457 100644
|
||||
--- a/tests/testsuite.at
|
||||
+++ b/tests/testsuite.at
|
||||
@@ -13,3 +13,4 @@ m4_include([reported_to.at])
|
||||
m4_include([make_description.at])
|
||||
m4_include([libreport_types.at])
|
||||
m4_include([xml_definition.at])
|
||||
+m4_include([report_python.at])
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 084de59a8ed21e9feb50b49ccbba6b472641c284 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 3 Sep 2014 13:38:46 +0200
|
||||
Subject: [PATCH 34/34] testsuite: work around the issue with 'report-python'
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/report-python/__init__.py | 9 ++++++++-
|
||||
tests/osinfo.at | 1 +
|
||||
tests/report_python.at | 1 +
|
||||
3 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py
|
||||
index ce7ea06..71e2d62 100644
|
||||
--- a/src/report-python/__init__.py
|
||||
+++ b/src/report-python/__init__.py
|
||||
@@ -17,7 +17,14 @@ try:
|
||||
except ImportError:
|
||||
from report._py3report import *
|
||||
|
||||
-from report.io import TextIO, GTKIO, NewtIO
|
||||
+try:
|
||||
+ from report.io import TextIO, GTKIO, NewtIO
|
||||
+except ImportError:
|
||||
+ # Support testing
|
||||
+ _temp = __import__("io", globals(), locals(), ["TextIO", "GTKIO", "NewtIO"], -1)
|
||||
+ TextIO = _temp.TextIO
|
||||
+ GTKIO = _temp.GTKIO
|
||||
+ NewtIO = _temp.NewtIO
|
||||
|
||||
#Compatibility with report package:
|
||||
# Author(s): Gavin Romig-Koch <gavin@redhat.com>
|
||||
diff --git a/tests/osinfo.at b/tests/osinfo.at
|
||||
index b57452d..868a9a2 100644
|
||||
--- a/tests/osinfo.at
|
||||
+++ b/tests/osinfo.at
|
||||
@@ -401,6 +401,7 @@ int main(void)
|
||||
AT_PYTESTFUN([parse_osinfo_python],
|
||||
[[import sys
|
||||
|
||||
+sys.path.insert(0, "../../../src/report-python")
|
||||
sys.path.insert(0, "../../../src/report-python/.libs")
|
||||
|
||||
report = __import__("report-python", globals(), locals(), [], -1)
|
||||
diff --git a/tests/report_python.at b/tests/report_python.at
|
||||
index 17e4fb3..5569b1f 100644
|
||||
--- a/tests/report_python.at
|
||||
+++ b/tests/report_python.at
|
||||
@@ -9,6 +9,7 @@ AT_BANNER([report_python])
|
||||
AT_PYTESTFUN([get_from_etc_os_release],
|
||||
[[import sys
|
||||
|
||||
+sys.path.insert(0, "../../../src/report-python")
|
||||
sys.path.insert(0, "../../../src/report-python/.libs")
|
||||
|
||||
report = __import__("report-python", globals(), locals(), [], -1)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 05453bdb8715f69bf026c9bd06ae8c537fb744c0 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <matejhabrnal@gmail.com>
|
||||
Date: Thu, 4 Sep 2014 05:19:41 -0400
|
||||
Subject: [PATCH 35/37] testsuite: add test not-reportable
|
||||
|
||||
Testing make_description to print not-reportable.
|
||||
---
|
||||
tests/make_description.at | 38 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
diff --git a/tests/make_description.at b/tests/make_description.at
|
||||
index 87c1fd4..7415cf8 100644
|
||||
--- a/tests/make_description.at
|
||||
+++ b/tests/make_description.at
|
||||
@@ -188,3 +188,41 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
]])
|
||||
+
|
||||
+## -------------- ##
|
||||
+## not_reportable ##
|
||||
+## -------------- ##
|
||||
+
|
||||
+AT_TESTFUN([not_reportable],
|
||||
+[[
|
||||
+
|
||||
+#include "internal_libreport.h"
|
||||
+#include <assert.h>
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ g_verbose = 3;
|
||||
+
|
||||
+ problem_data_t *pd = problem_data_new();
|
||||
+
|
||||
+ problem_data_add_text_noteditable(pd, FILENAME_NOT_REPORTABLE, "not-reportable");
|
||||
+
|
||||
+ char *description = make_description(pd, /*skipped names*/NULL, CD_MAX_TEXT_SIZE,
|
||||
+ MAKEDESC_SHOW_URLS);
|
||||
+
|
||||
+ char *expected = xasprintf("%s: %*s%s\n",
|
||||
+ "Reported", 14 - strlen("Reported"), "", "cannot be reported");
|
||||
+
|
||||
+ if (strstr(description, expected) == NULL)
|
||||
+ {
|
||||
+ printf("E:\n'%s'\n\nC:\n'%s'\n", expected, description);
|
||||
+ assert(!"The description for not-reportable do not matches the expected description");
|
||||
+ }
|
||||
+
|
||||
+ free(description);
|
||||
+ free(expected);
|
||||
+ problem_data_free(pd);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+]])
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,79 +0,0 @@
|
||||
From 4f1646b26b967d0d4d9b93cf15fe71e31dd511b0 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <matejhabrnal@gmail.com>
|
||||
Date: Thu, 4 Sep 2014 05:27:42 -0400
|
||||
Subject: [PATCH 36/37] lib: make_description show not-reportable
|
||||
|
||||
When the flag from desc_flags is set to MAKEDESC_SHOW_URLS and problem is
|
||||
not-reportable. The abrt-cli shows not-reportable in listing.
|
||||
|
||||
Related: rhbz#1066520
|
||||
---
|
||||
src/lib/make_descr.c | 45 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 25 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/lib/make_descr.c b/src/lib/make_descr.c
|
||||
index d183ac1..7f5c10b 100644
|
||||
--- a/src/lib/make_descr.c
|
||||
+++ b/src/lib/make_descr.c
|
||||
@@ -101,33 +101,38 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip,
|
||||
|
||||
if (desc_flags & MAKEDESC_SHOW_URLS)
|
||||
{
|
||||
- const char *reported_to = problem_data_get_content_or_NULL(problem_data, FILENAME_REPORTED_TO);
|
||||
- if (reported_to != NULL)
|
||||
+ if (problem_data_get_content_or_NULL(problem_data, FILENAME_NOT_REPORTABLE) != NULL)
|
||||
+ strbuf_append_strf(buf_dsc, "%s%*s%s\n", _("Reported:"), 16 - strlen(_("Reported:")), "" , _("cannot be reported"));
|
||||
+ else
|
||||
{
|
||||
- GList *reports = read_entire_reported_to_data(reported_to);
|
||||
-
|
||||
- /* The value part begins on 17th column */
|
||||
- /* 0123456789ABCDEF*/
|
||||
- const char *pad_prefix = " ";
|
||||
- char *first_prefix = xasprintf("%s%*s", _("Reported:"), 16 - strlen(_("Reported:")), "");
|
||||
- const char *prefix = first_prefix;
|
||||
- for (GList *iter = reports; iter != NULL; iter = g_list_next(iter))
|
||||
+ const char *reported_to = problem_data_get_content_or_NULL(problem_data, FILENAME_REPORTED_TO);
|
||||
+ if (reported_to != NULL)
|
||||
{
|
||||
- const report_result_t *const report = (report_result_t *)iter->data;
|
||||
+ GList *reports = read_entire_reported_to_data(reported_to);
|
||||
+
|
||||
+ /* The value part begins on 17th column */
|
||||
+ /* 0123456789ABCDEF*/
|
||||
+ const char *pad_prefix = " ";
|
||||
+ char *first_prefix = xasprintf("%s%*s", _("Reported:"), 16 - strlen(_("Reported:")), "");
|
||||
+ const char *prefix = first_prefix;
|
||||
+ for (GList *iter = reports; iter != NULL; iter = g_list_next(iter))
|
||||
+ {
|
||||
+ const report_result_t *const report = (report_result_t *)iter->data;
|
||||
|
||||
- if (report->url == NULL)
|
||||
- continue;
|
||||
+ if (report->url == NULL)
|
||||
+ continue;
|
||||
|
||||
- strbuf_append_strf(buf_dsc, "%s%s\n", prefix, report->url);
|
||||
+ strbuf_append_strf(buf_dsc, "%s%s\n", prefix, report->url);
|
||||
|
||||
- if (prefix == first_prefix)
|
||||
- { /* Only the first URL is prefixed by 'Reported:' */
|
||||
- empty = false;
|
||||
- prefix = pad_prefix;
|
||||
+ if (prefix == first_prefix)
|
||||
+ { /* Only the first URL is prefixed by 'Reported:' */
|
||||
+ empty = false;
|
||||
+ prefix = pad_prefix;
|
||||
+ }
|
||||
}
|
||||
+ free(first_prefix);
|
||||
+ g_list_free_full(reports, (GDestroyNotify)free_report_result);
|
||||
}
|
||||
- free(first_prefix);
|
||||
- g_list_free_full(reports, (GDestroyNotify)free_report_result);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,28 +0,0 @@
|
||||
From e457344b79f872294338b7ec3006709a2d9f806a Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 9 Sep 2014 10:55:43 +0200
|
||||
Subject: [PATCH 37/37] wizard: make report-gtk's application nonunique
|
||||
|
||||
Resolves: rhbz#1135782
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c
|
||||
index 697b91f..44918ec 100644
|
||||
--- a/src/gui-wizard-gtk/main.c
|
||||
+++ b/src/gui-wizard-gtk/main.c
|
||||
@@ -216,7 +216,7 @@ int main(int argc, char **argv)
|
||||
problem_data_reload_from_dump_dir();
|
||||
|
||||
g_custom_logger = &show_error_as_msgbox;
|
||||
- GtkApplication *app = gtk_application_new("org.freedesktop.libreport.report", G_APPLICATION_FLAGS_NONE);
|
||||
+ GtkApplication *app = gtk_application_new("org.freedesktop.libreport.report", G_APPLICATION_NON_UNIQUE);
|
||||
g_signal_connect(app, "activate", G_CALLBACK(activate_wizard), (gpointer)expert_mode);
|
||||
g_signal_connect(app, "startup", G_CALLBACK(startup_wizard), NULL);
|
||||
/* Enter main loop */
|
||||
--
|
||||
2.1.0
|
||||
|
@ -2,55 +2,19 @@
|
||||
# platform-dependent
|
||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
%define satyr_ver 0.13
|
||||
%define satyr_ver 0.14
|
||||
|
||||
Summary: Generic library for reporting various problems
|
||||
Name: libreport
|
||||
Version: 2.2.3
|
||||
Release: 7%{?dist}
|
||||
Version: 2.3.0
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: https://fedorahosted.org/abrt/
|
||||
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
|
||||
Source1: autogen.sh
|
||||
|
||||
Patch1: 0001-ureport-implement-attaching-of-user-comments.patch
|
||||
Patch2: 0002-gui-make-preferences-dialogue-modal-for-parents.patch
|
||||
Patch3: 0003-gui-select-the-first-in-the-configuration-list.patch
|
||||
Patch4: 0004-gui-wrap-lines-for-human-readable-files.patch
|
||||
Patch5: 0005-wizard-fix-help-text-for-screencasting.patch
|
||||
Patch6: 0006-gui-support-Enter-2Click-in-Preferences-list.patch
|
||||
Patch7: 0007-gui-apply-configuration-dialogues-changes-on-Enter-k.patch
|
||||
Patch8: 0008-gui-close-ask-dialogues-on-Enter-key.patch
|
||||
Patch9: 0009-logging-test-log-level-at-first-step.patch
|
||||
Patch10: 0010-json-include-json.h-accordingly-to-json-c-CFLAGS.patch
|
||||
Patch11: 0011-ureport-include-json.h-accordingly-to-json-c-CFLAGS.patch
|
||||
Patch12: 0012-gui-port-to-gtk-3.13.patch
|
||||
Patch13: 0013-gui-fix-build-errors-introduced-in-the-previous-comm.patch
|
||||
Patch14: 0014-gui-generate-the-glade-file-with-glade-3.18.patch
|
||||
Patch15: 0015-gui-simplify-the-event-selector-page.patch
|
||||
Patch16: 0016-gui-conver-report-gtk-to-GtkApplication.patch
|
||||
Patch17: 0017-gui-clear-the-sensitive-cache-between-two-event-runs.patch
|
||||
Patch18: 0018-gui-don-t-remove-already-removed-GTimeoutSource.patch
|
||||
Patch19: 0019-gui-reload-destroyed-sensitive-data-warn-widgets-fro.patch
|
||||
Patch20: 0020-gui-add-Repeat-button.patch
|
||||
Patch21: 0021-Get-rid-of-deprecation-warnings-introduced-with-gtk-.patch
|
||||
Patch22: 0022-wizard-terminate-event-chain-after-the-emergency-ana.patch
|
||||
Patch23: 0023-lib-don-t-spit-unnecessary-debug-messages.patch
|
||||
Patch24: 0024-mailx-print-only-one-log-message-in-notify_only-mode.patch
|
||||
Patch25: 0025-gui-use-symbolic-icons.patch
|
||||
Patch26: 0026-gui-Problem-Details-suite.patch
|
||||
Patch27: 0027-gui-port-to-Problem-Details-suite.patch
|
||||
#Patch28: 0028-spec-install-Problem-Details-stuff.patch
|
||||
Patch29: 0029-gui-fix-build-with-older-gtk.patch
|
||||
Patch30: 0030-wizard-don-t-work-with-destroyed-widgets.patch
|
||||
Patch31: 0031-wizard-Next-button-insensitive-on-the-review-page-by.patch
|
||||
Patch32: 0032-report-parse-release-version-from-os-release.patch
|
||||
Patch33: 0033-testsuite-report-python-sanity-tests.patch
|
||||
Patch34: 0034-testsuite-work-around-the-issue-with-report-python.patch
|
||||
Patch35: 0035-testsuite-add-test-not-reportable.patch
|
||||
Patch36: 0036-lib-make_description-show-not-reportable.patch
|
||||
Patch37: 0037-wizard-make-report-gtk-s-application-nonunique.patch
|
||||
Patch0001: 0001-Translation-updates.patch
|
||||
|
||||
# git is need for '%%autosetup -S git' which automatically applies all the
|
||||
# patches above. Please, be aware that the patches must be generated
|
||||
@ -131,6 +95,7 @@ Summary: Python bindings for report-libs
|
||||
# Is group correct here? -
|
||||
Group: System Environment/Libraries
|
||||
Requires: libreport = %{version}-%{release}
|
||||
Requires: yum
|
||||
Provides: report = 0:0.23-1
|
||||
Obsoletes: report < 0:0.23-1
|
||||
# in report the rhtsupport is in the main package, so we need to install it too
|
||||
@ -486,6 +451,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_includedir}/libreport/workflow.h
|
||||
%{_includedir}/libreport/problem_details_widget.h
|
||||
%{_includedir}/libreport/problem_details_dialog.h
|
||||
%{_includedir}/libreport/ureport.h
|
||||
# Private api headers:
|
||||
%{_includedir}/libreport/internal_abrt_dbus.h
|
||||
%{_includedir}/libreport/internal_libreport.h
|
||||
@ -550,8 +516,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events/report_Logger.conf
|
||||
%{_mandir}/man5/report_Logger.conf.5.*
|
||||
%{_datadir}/%{name}/events/report_Logger.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_Logger.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_LoggerCCpp.xml
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/print_event.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_logger.conf
|
||||
%{_mandir}/man5/print_event.conf.5.*
|
||||
%{_mandir}/man5/report_logger.conf.5.*
|
||||
%{_bindir}/reporter-print
|
||||
%{_mandir}/man*/reporter-print.*
|
||||
|
||||
@ -561,9 +531,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_datadir}/%{name}/conf.d/plugins/mailx.conf
|
||||
%{_datadir}/%{name}/events/report_Mailx.xml
|
||||
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.mailx.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_Mailx.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_MailxCCpp.xml
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/mailx_event.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_mailx.conf
|
||||
%{_mandir}/man5/mailx.conf.5.*
|
||||
%{_mandir}/man5/mailx_event.conf.5.*
|
||||
%{_mandir}/man5/report_mailx.conf.5.*
|
||||
%{_mandir}/man*/reporter-mailx.*
|
||||
%{_bindir}/reporter-mailx
|
||||
|
||||
@ -583,7 +557,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_datadir}/%{name}/conf.d/plugins/bugzilla.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_formatdup.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_libreport.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_analyzer_libreport.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_kernel.conf
|
||||
%{_datadir}/%{name}/events/report_Bugzilla.xml
|
||||
%{_datadir}/%{name}/events/watch_Bugzilla.xml
|
||||
@ -597,7 +571,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_mandir}/man5/bugzilla.conf.5.*
|
||||
%{_mandir}/man5/bugzilla_format.conf.5.*
|
||||
%{_mandir}/man5/bugzilla_formatdup.conf.5.*
|
||||
%{_mandir}/man5/bugzilla_format_libreport.conf.5.*
|
||||
%{_mandir}/man5/bugzilla_format_analyzer_libreport.conf.5.*
|
||||
%{_mandir}/man5/bugzilla_format_kernel.conf.5.*
|
||||
%{_bindir}/reporter-bugzilla
|
||||
|
||||
@ -626,8 +600,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_datadir}/%{name}/events/report_Uploader.xml
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/uploader_event.conf
|
||||
%{_datadir}/%{name}/workflows/workflow_Upload.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_UploadCCpp.xml
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/upload.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_uploader.conf
|
||||
%{_datadir}/%{name}/conf.d/plugins/upload.conf
|
||||
%{_mandir}/man5/report_uploader.conf.5.*
|
||||
|
||||
%if 0%{?fedora}
|
||||
%files fedora
|
||||
@ -694,6 +671,21 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 06 2014 Jakub Filak <jfilak@redhat.com> 2.3.0-1
|
||||
- Translation updates
|
||||
- uploader: correct capitalization of the event name
|
||||
- uploader: read credentials from environment variables
|
||||
- uploader: handle access denials and ask for updated credentials
|
||||
- ureport: polish public API
|
||||
- bugzilla: add comment to closed bugs too
|
||||
- corrected man pages
|
||||
- augeas: exclude bugzilla format configurations
|
||||
- add new workflows for Uploader, Mailx and Logger
|
||||
- make_desc: add reason to the list
|
||||
- lib: use userfriendly order in the make_description
|
||||
- fix bugzilla bug formating for libreport analyzer
|
||||
- lib: make_description show not-reportable
|
||||
|
||||
* Tue Sep 09 2014 Jakub Filak <jfilak@redhat.com> 2.2.3-7
|
||||
- reporting GUI: allow users to run it multiple times
|
||||
- Resolves: #1134407
|
||||
|
Loading…
Reference in New Issue
Block a user