Blob Blame Raw
From f1335017aed375ff539163e00a3e12434a0eeed9 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 8 Feb 2016 19:14:21 +0100
Subject: [PATCH] wizard: remove the code correcting Bugzilla groups

The code was required for Fedora 20 (bug #1087370).
The code was used for almost two years and it is time to get rid of it.

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 src/gui-wizard-gtk/wizard.c | 74 ---------------------------------------------
 1 file changed, 74 deletions(-)

diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 1b05216..50047d5 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -219,8 +219,6 @@ static const gchar *const page_names[] =
     NULL
 };
 
-#define PRIVATE_TICKET_CB "private_ticket_cb"
-
 #define SENSITIVE_DATA_WARN "sensitive_data_warning"
 #define SENSITIVE_DATA_WARN_MSG "sensitive_data_warning_message"
 #define SENSITIVE_LIST "ls_sensitive_words"
@@ -228,7 +226,6 @@ static const gchar *misc_widgets[] =
 {
     SENSITIVE_DATA_WARN,
     SENSITIVE_LIST,
-    PRIVATE_TICKET_CB,
     NULL
 };
 
@@ -2020,83 +2017,12 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
     return TRUE; /* "please don't remove this event (yet)" */
 }
 
-static int ask_replace_old_private_group_name(void)
-{
-    char *message = xasprintf(_("Private ticket is requested but the group name 'private' has been deprecated. "
-                                "We kindly ask you to use 'fedora_contrib_private' group name. "
-                                "Click Yes button or update the configuration manually. Or click No button, if you really want to use 'private' group.\n\n"
-                                "If you are not sure what this dialogue means, please trust us and click Yes button.\n\n"
-                                "Read more about the private bug reports at:\n"
-                                "https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets\n"
-                                "https://bugzilla.redhat.com/show_bug.cgi?id=1044653\n"));
-
-    char *markup_message = xasprintf(_("Private ticket is requested but the group name <i>private</i> has been deprecated. "
-                                "We kindly ask you to use <i>fedora_contrib_private</i> group name. "
-                                "Click Yes button or update the configuration manually. Or click No button, if you really want to use <i>private</i> group.\n\n"
-                                "If you are not sure what this dialogue means, please trust us and click Yes button.\n\n"
-                                "Read more about the private bug reports at:\n"
-                                "<a href=\"https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets\">"
-                                "https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets</a>\n"
-                                "<a href=\"https://bugzilla.redhat.com/show_bug.cgi?id=1044653\">https://bugzilla.redhat.com/show_bug.cgi?id=1044653</a>\n"));
-
-    GtkWidget *old_private_group = gtk_message_dialog_new(GTK_WINDOW(g_wnd_assistant),
-        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-        GTK_MESSAGE_WARNING,
-        GTK_BUTTONS_YES_NO,
-        message);
-
-    gtk_window_set_transient_for(GTK_WINDOW(old_private_group), GTK_WINDOW(g_wnd_assistant));
-    gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(old_private_group),
-                                    markup_message);
-    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);
-
-    return result == GTK_RESPONSE_YES;
-}
-
-/*
- * https://bugzilla.redhat.com/show_bug.cgi?id=1044653
- */
-static void correct_bz_private_goup_name(const char *event_name)
-{
-    if (strcmp("report_Bugzilla", event_name) == 0 &&
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(g_builder, PRIVATE_TICKET_CB))))
-    {
-        event_config_t *cfg = get_event_config(event_name);
-        if (NULL != cfg)
-        {
-            GList *item = cfg->options;
-            for ( ; item != NULL; item = g_list_next(item))
-            {
-                event_option_t *opt = item->data;
-                if (strcmp("Bugzilla_PrivateGroups", opt->eo_name) == 0
-                    && opt->eo_value
-                    && strcmp(opt->eo_value, "private") == 0
-                    && ask_replace_old_private_group_name())
-                {
-                    free(opt->eo_value);
-                    opt->eo_value = xstrdup("fedora_contrib_private");
-                }
-            }
-        }
-    }
-}
-
 static void start_event_run(const char *event_name)
 {
     /* Start event asynchronously on the dump dir
      * (synchronous run would freeze GUI until completion)
      */
 
-    /* https://bugzilla.redhat.com/show_bug.cgi?id=1044653 */
-    correct_bz_private_goup_name(event_name);
-
     struct run_event_state *state = new_run_event_state();
     state->logging_callback = run_event_gtk_logging;
     state->error_callback = run_event_gtk_error;
-- 
2.5.5