- report-only command line option removed - report-only lines deleted from wizard code - report-only helpers removed
Signed-off-by: Jakub Filak <[email protected]> --- src/gui-wizard-gtk/main.c | 7 ++----- src/gui-wizard-gtk/wizard.c | 33 +++++---------------------------- src/gui-wizard-gtk/wizard.glade | 10 +++++----- src/gui-wizard-gtk/wizard.h | 1 - 4 files changed, 12 insertions(+), 39 deletions(-) diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c index 05d01e9..437fd7f 100644 --- a/src/gui-wizard-gtk/main.c +++ b/src/gui-wizard-gtk/main.c @@ -27,7 +27,6 @@ char *g_glade_file = NULL; char *g_dump_dir_name = NULL; char *g_events = NULL; GList *g_auto_event_list = NULL; -int g_report_only = false; problem_data_t *g_cd; @@ -113,9 +112,8 @@ int main(int argc, char **argv) OPT_v = 1 << 0, OPT_g = 1 << 1, OPT_p = 1 << 2, - OPT_o = 1 << 3, // report only - OPT_d = 1 << 4, - OPT_e = 1 << 5, + OPT_d = 1 << 3, + OPT_e = 1 << 4, }; /* Keep enum above and order of options below in sync! */ struct options program_options[] = { @@ -123,7 +121,6 @@ int main(int argc, char **argv) OPT_STRING('g', NULL, &g_glade_file, "FILE", _("Alternate GUI file")), OPT_BOOL( 'p', NULL, NULL, _("Add program names to log")), /* for use from 3rd party apps to show just a reporter selector */ - OPT_BOOL( 'o', "report-only", &g_report_only, _("Skip analyze steps, go through report steps only")), OPT_BOOL( 'd', "delete", NULL, _("Remove DIR after reporting")), OPT_LIST( 'e', "event", &g_auto_event_list, "EVENT", _("Run only this event")), OPT_END() diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index 30c25ee..1806499 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -157,13 +157,13 @@ enum { * instead of strcmp. */ static const gchar PAGE_SUMMARY[] = "page_0"; -static const gchar PAGE_EVENT_SELECTOR[] = "page_2_report"; +static const gchar PAGE_EVENT_SELECTOR[] = "page_2"; static const gchar PAGE_EDIT_COMMENT[] = "page_1"; static const gchar PAGE_EDIT_ELEMENTS[] = "page_3"; -static const gchar PAGE_REVIEW_DATA[] = "page_4_report"; -static const gchar PAGE_EVENT_PROGRESS[] = "page_5_report"; -static const gchar PAGE_EVENT_DONE[] = "page_6_report"; -static const gchar PAGE_NOT_SHOWN[] = "page_7_report"; +static const gchar PAGE_REVIEW_DATA[] = "page_4"; +static const gchar PAGE_EVENT_PROGRESS[] = "page_5"; +static const gchar PAGE_EVENT_DONE[] = "page_6"; +static const gchar PAGE_NOT_SHOWN[] = "page_7"; static const gchar *const page_names[] = { @@ -2027,18 +2027,6 @@ static gint select_next_page_no(gint current_page_no, gpointer data) { GtkWidget *page; - if (g_report_only) - { - /* In only-report mode, we only need to wrap back at the end */ - page = gtk_notebook_get_nth_page(g_assistant, current_page_no); - if (page == pages[PAGENO_EVENT_DONE].page_widget) - current_page_no = 0; - else - current_page_no++; - VERB1 log("%s: selected page #%d", __func__, current_page_no); - return current_page_no; - } - again: VERB1 log("%s: current_page_no:%d", __func__, current_page_no); current_page_no++; @@ -2427,17 +2415,6 @@ static void add_pages(void) int page_no = 0; for (i = 0; page_names[i] != NULL; i++) { - char *delim = strrchr(page_names[i], '_'); - if (!not_reportable && delim) - { - if (g_report_only && (strncmp(delim + 1, "report", strlen("report"))) != 0) - { - pages[i].page_widget = NULL; - pages[i].page_no = -1; - continue; - } - } - GtkWidget *page = GTK_WIDGET(gtk_builder_get_object(g_builder, page_names[i])); pages[i].page_widget = page; pages[i].page_no = page_no++; diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade index 41924eb..7029677 100644 --- a/src/gui-wizard-gtk/wizard.glade +++ b/src/gui-wizard-gtk/wizard.glade @@ -178,7 +178,7 @@ <object class="GtkWindow" id="window2"> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="page_2_report"> + <object class="GtkVBox" id="page_2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">10</property> @@ -485,7 +485,7 @@ <object class="GtkWindow" id="window4"> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="page_4_report"> + <object class="GtkVBox" id="page_4"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">10</property> @@ -598,7 +598,7 @@ <object class="GtkWindow" id="window5"> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="page_5_report"> + <object class="GtkVBox" id="page_5"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">10</property> @@ -683,7 +683,7 @@ <object class="GtkWindow" id="window6"> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="page_6_report"> + <object class="GtkVBox" id="page_6"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">10</property> @@ -727,7 +727,7 @@ <object class="GtkWindow" id="window7"> <property name="can_focus">False</property> <child> - <object class="GtkVBox" id="page_7_report"> + <object class="GtkVBox" id="page_7"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">10</property> diff --git a/src/gui-wizard-gtk/wizard.h b/src/gui-wizard-gtk/wizard.h index a818828..b60e0b2 100644 --- a/src/gui-wizard-gtk/wizard.h +++ b/src/gui-wizard-gtk/wizard.h @@ -31,7 +31,6 @@ extern char *g_dump_dir_name; extern char *g_events; extern GList *g_auto_event_list; extern problem_data_t *g_cd; -extern int g_report_only; void reload_problem_data_from_dump_dir(void); #endif -- 1.7.10.2
