From 8b4cac4bf2da65115735dccd2813a24959cb6757 Mon Sep 17 00:00:00 2001 From: Jakub Filak Date: Wed, 23 Jul 2014 09:02:38 +0200 Subject: [PATCH] UX improvements --- ...implement-attaching-of-user-comments.patch | 133 ++++++++++++++++++ ...eferences-dialogue-modal-for-parents.patch | 66 +++++++++ ...-the-first-in-the-configuration-list.patch | 34 +++++ ...-wrap-lines-for-human-readable-files.patch | 35 +++++ ...zard-fix-help-text-for-screencasting.patch | 32 +++++ ...ort-Enter-2Click-in-Preferences-list.patch | 91 ++++++++++++ ...uration-dialogues-changes-on-Enter-k.patch | 50 +++++++ ...gui-close-ask-dialogues-on-Enter-key.patch | 73 ++++++++++ libreport.spec | 20 ++- 9 files changed, 533 insertions(+), 1 deletion(-) create mode 100644 0001-ureport-implement-attaching-of-user-comments.patch create mode 100644 0002-gui-make-preferences-dialogue-modal-for-parents.patch create mode 100644 0003-gui-select-the-first-in-the-configuration-list.patch create mode 100644 0004-gui-wrap-lines-for-human-readable-files.patch create mode 100644 0005-wizard-fix-help-text-for-screencasting.patch create mode 100644 0006-gui-support-Enter-2Click-in-Preferences-list.patch create mode 100644 0007-gui-apply-configuration-dialogues-changes-on-Enter-k.patch create mode 100644 0008-gui-close-ask-dialogues-on-Enter-key.patch diff --git a/0001-ureport-implement-attaching-of-user-comments.patch b/0001-ureport-implement-attaching-of-user-comments.patch new file mode 100644 index 0000000..dbf886e --- /dev/null +++ b/0001-ureport-implement-attaching-of-user-comments.patch @@ -0,0 +1,133 @@ +From 8b3d8dd997d2103087cbaef4642b52147db97f16 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 + diff --git a/0002-gui-make-preferences-dialogue-modal-for-parents.patch b/0002-gui-make-preferences-dialogue-modal-for-parents.patch new file mode 100644 index 0000000..6867b74 --- /dev/null +++ b/0002-gui-make-preferences-dialogue-modal-for-parents.patch @@ -0,0 +1,66 @@ +From b1911301e6c8cbe0ae4ea90d4e0cbb08e575e743 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 + diff --git a/0003-gui-select-the-first-in-the-configuration-list.patch b/0003-gui-select-the-first-in-the-configuration-list.patch new file mode 100644 index 0000000..1e3c894 --- /dev/null +++ b/0003-gui-select-the-first-in-the-configuration-list.patch @@ -0,0 +1,34 @@ +From 24885018e6cef6fc1c23ca81803a3787c7b30b1d Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 + diff --git a/0004-gui-wrap-lines-for-human-readable-files.patch b/0004-gui-wrap-lines-for-human-readable-files.patch new file mode 100644 index 0000000..7472f20 --- /dev/null +++ b/0004-gui-wrap-lines-for-human-readable-files.patch @@ -0,0 +1,35 @@ +From 36ef849dce4cb702852822017807ad8faf8ae622 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 + diff --git a/0005-wizard-fix-help-text-for-screencasting.patch b/0005-wizard-fix-help-text-for-screencasting.patch new file mode 100644 index 0000000..ec9de00 --- /dev/null +++ b/0005-wizard-fix-help-text-for-screencasting.patch @@ -0,0 +1,32 @@ +From f5ca628791e23af0ebfae6bbee715efe1e90e34d Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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" +- "su -c \"yum install recordmydesktop\"" ++ "su -c \"yum install fros-recordmydesktop\"" + )); + } + +-- +1.9.3 + diff --git a/0006-gui-support-Enter-2Click-in-Preferences-list.patch b/0006-gui-support-Enter-2Click-in-Preferences-list.patch new file mode 100644 index 0000000..37350dd --- /dev/null +++ b/0006-gui-support-Enter-2Click-in-Preferences-list.patch @@ -0,0 +1,91 @@ +From 7eccd835673ebea736a756537c8ca7c1b9ab711a Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 ++#include + #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 + diff --git a/0007-gui-apply-configuration-dialogues-changes-on-Enter-k.patch b/0007-gui-apply-configuration-dialogues-changes-on-Enter-k.patch new file mode 100644 index 0000000..15182ed --- /dev/null +++ b/0007-gui-apply-configuration-dialogues-changes-on-Enter-k.patch @@ -0,0 +1,50 @@ +From ebfe7e07c42b0052ecd27c1889f3a0a29976ec63 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 + diff --git a/0008-gui-close-ask-dialogues-on-Enter-key.patch b/0008-gui-close-ask-dialogues-on-Enter-key.patch new file mode 100644 index 0000000..8f12dc8 --- /dev/null +++ b/0008-gui-close-ask-dialogues-on-Enter-key.patch @@ -0,0 +1,73 @@ +From 74cff8bbb789e388ff74510e1be12e3a6958a923 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 + diff --git a/libreport.spec b/libreport.spec index 01153b0..23e78d0 100644 --- a/libreport.spec +++ b/libreport.spec @@ -7,13 +7,22 @@ Summary: Generic library for reporting various problems Name: libreport Version: 2.2.3 -Release: 1%{?dist} +Release: 2%{?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 + # git is need for '%%autosetup -S git' which automatically applies all the # patches above. Please, be aware that the patches must be generated # by 'git format-patch' @@ -651,6 +660,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Jul 23 2014 Jakub Filak 2.2.3-2 +- reporter-ureport: attach anonymous comment +- gui: close dialogues on Enter key +- gui: support Enter & 2Click in Preferences list +- gui: fix help text for screencasting +- gui: wrap lines for human readable files on Data review page +- gui: select the first item in the configuration list +- gui: make the preferences dialogue modal for parents + * Tue Jul 08 2014 Jakub Filak 2.2.3-1 - wizard: Do not highlight sensitive words in user's comment - bugzilla: show description for all configuration options