|
|
8256c5 |
From 602124e481d700e334de20418b94b2fdf015c834 Mon Sep 17 00:00:00 2001
|
|
|
8256c5 |
From: Martin Kutlak <mkutlak@redhat.com>
|
|
|
8256c5 |
Date: Mon, 9 Jul 2018 10:45:37 +0200
|
|
|
8256c5 |
Subject: [PATCH] Remove option to screencast problems
|
|
|
8256c5 |
|
|
|
8256c5 |
The fros package is broken and hasn't been maintained for quite some time.
|
|
|
8256c5 |
|
|
|
8256c5 |
closes #104
|
|
|
8256c5 |
|
|
|
8256c5 |
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
|
|
8256c5 |
---
|
|
|
8256c5 |
libreport.spec.in | 1 -
|
|
|
8256c5 |
src/gui-wizard-gtk/wizard.c | 75 ---------------------------------
|
|
|
8256c5 |
src/gui-wizard-gtk/wizard.glade | 40 ------------------
|
|
|
8256c5 |
3 files changed, 116 deletions(-)
|
|
|
8256c5 |
|
|
|
8256c5 |
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
|
|
8256c5 |
index b02bc7de..ea49a2ea 100644
|
|
|
8256c5 |
--- a/src/gui-wizard-gtk/wizard.c
|
|
|
8256c5 |
+++ b/src/gui-wizard-gtk/wizard.c
|
|
|
8256c5 |
@@ -127,7 +127,6 @@ static gboolean g_warning_issued;
|
|
|
8256c5 |
static GtkSpinner *g_spinner_event_log;
|
|
|
8256c5 |
static GtkImage *g_img_process_fail;
|
|
|
8256c5 |
|
|
|
8256c5 |
-static GtkButton *g_btn_startcast;
|
|
|
8256c5 |
static GtkExpander *g_exp_report_log;
|
|
|
8256c5 |
|
|
|
8256c5 |
static GtkWidget *g_top_most_window;
|
|
|
8256c5 |
@@ -3487,7 +3486,6 @@ static void add_pages(void)
|
|
|
8256c5 |
g_exp_search = GTK_EXPANDER( gtk_builder_get_object(g_builder, "expander_search"));
|
|
|
8256c5 |
g_spinner_event_log = GTK_SPINNER( gtk_builder_get_object(g_builder, "spinner_event_log"));
|
|
|
8256c5 |
g_img_process_fail = GTK_IMAGE( gtk_builder_get_object(g_builder, "img_process_fail"));
|
|
|
8256c5 |
- g_btn_startcast = GTK_BUTTON( gtk_builder_get_object(g_builder, "btn_startcast"));
|
|
|
8256c5 |
g_exp_report_log = GTK_EXPANDER( gtk_builder_get_object(g_builder, "expand_report"));
|
|
|
8256c5 |
g_vb_simple_details = GTK_BOX( gtk_builder_get_object(g_builder, "vb_simple_details"));
|
|
|
8256c5 |
g_cmb_reproducible = GTK_COMBO_BOX_TEXT(gtk_builder_get_object(g_builder, "cmb_reproducible"));
|
|
|
8256c5 |
@@ -3618,59 +3616,6 @@ static void assistant_quit_cb(void *obj, void *data)
|
|
|
8256c5 |
g_wnd_assistant = (void *)0xdeadbeaf;
|
|
|
8256c5 |
}
|
|
|
8256c5 |
|
|
|
8256c5 |
-static void on_btn_startcast(GtkWidget *btn, gpointer user_data)
|
|
|
8256c5 |
-{
|
|
|
8256c5 |
- const char *args[15];
|
|
|
8256c5 |
- args[0] = (char *) "fros";
|
|
|
8256c5 |
- args[1] = NULL;
|
|
|
8256c5 |
-
|
|
|
8256c5 |
- pid_t castapp = 0;
|
|
|
8256c5 |
- castapp = fork_execv_on_steroids(
|
|
|
8256c5 |
- EXECFLG_QUIET,
|
|
|
8256c5 |
- (char **)args,
|
|
|
8256c5 |
- NULL,
|
|
|
8256c5 |
- /*env_vec:*/ NULL,
|
|
|
8256c5 |
- g_dump_dir_name,
|
|
|
8256c5 |
- /*uid (ignored):*/ 0
|
|
|
8256c5 |
- );
|
|
|
8256c5 |
- gtk_widget_hide(GTK_WIDGET(g_wnd_assistant));
|
|
|
8256c5 |
- /*flush all gui events before we start waitpid
|
|
|
8256c5 |
- * otherwise the main window wouldn't hide
|
|
|
8256c5 |
- */
|
|
|
8256c5 |
- while (gtk_events_pending())
|
|
|
8256c5 |
- gtk_main_iteration_do(false);
|
|
|
8256c5 |
-
|
|
|
8256c5 |
- int status;
|
|
|
8256c5 |
- safe_waitpid(castapp, &status, 0);
|
|
|
8256c5 |
- problem_data_reload_from_dump_dir();
|
|
|
8256c5 |
- update_gui_state_from_problem_data(0 /* don't update the selected event */);
|
|
|
8256c5 |
- gtk_widget_show(GTK_WIDGET(g_wnd_assistant));
|
|
|
8256c5 |
-}
|
|
|
8256c5 |
-
|
|
|
8256c5 |
-static bool is_screencast_available()
|
|
|
8256c5 |
-{
|
|
|
8256c5 |
- const char *args[3];
|
|
|
8256c5 |
- args[0] = (char *) "fros";
|
|
|
8256c5 |
- args[1] = "--is-available";
|
|
|
8256c5 |
- args[2] = NULL;
|
|
|
8256c5 |
-
|
|
|
8256c5 |
- pid_t castapp = 0;
|
|
|
8256c5 |
- castapp = fork_execv_on_steroids(
|
|
|
8256c5 |
- EXECFLG_QUIET,
|
|
|
8256c5 |
- (char **)args,
|
|
|
8256c5 |
- NULL,
|
|
|
8256c5 |
- /*env_vec:*/ NULL,
|
|
|
8256c5 |
- g_dump_dir_name,
|
|
|
8256c5 |
- /*uid (ignored):*/ 0
|
|
|
8256c5 |
- );
|
|
|
8256c5 |
-
|
|
|
8256c5 |
- int status;
|
|
|
8256c5 |
- safe_waitpid(castapp, &status, 0);
|
|
|
8256c5 |
-
|
|
|
8256c5 |
- /* 0 means that it's available */
|
|
|
8256c5 |
- return status == 0;
|
|
|
8256c5 |
-}
|
|
|
8256c5 |
-
|
|
|
8256c5 |
void create_assistant(GtkApplication *app, bool expert_mode)
|
|
|
8256c5 |
{
|
|
|
8256c5 |
g_loaded_texts = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
|
|
|
8256c5 |
@@ -3805,26 +3750,6 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
|
|
8256c5 |
g_signal_connect(g_btn_add_file, "clicked", G_CALLBACK(on_btn_add_file), NULL);
|
|
|
8256c5 |
g_signal_connect(g_btn_detail, "clicked", G_CALLBACK(on_btn_detail), NULL);
|
|
|
8256c5 |
|
|
|
8256c5 |
- if (is_screencast_available()) {
|
|
|
8256c5 |
- /* we need to override the activate-link handler, because we use
|
|
|
8256c5 |
- * the link button instead of normal button and if we wouldn't override it
|
|
|
8256c5 |
- * gtk would try to run it's defualt action and open the associated URI
|
|
|
8256c5 |
- * but since the URI is empty it would complain about it...
|
|
|
8256c5 |
- */
|
|
|
8256c5 |
- g_signal_connect(g_btn_startcast, "activate-link", G_CALLBACK(on_btn_startcast), NULL);
|
|
|
8256c5 |
- }
|
|
|
8256c5 |
- else {
|
|
|
8256c5 |
- gtk_widget_set_sensitive(GTK_WIDGET(g_btn_startcast), false);
|
|
|
8256c5 |
- gtk_widget_set_tooltip_markup(GTK_WIDGET(g_btn_startcast),
|
|
|
8256c5 |
- _("In order to enable the built-in screencasting "
|
|
|
8256c5 |
- "functionality the package fros-recordmydesktop has to be installed. "
|
|
|
8256c5 |
- "Please run the following command if you want to install it."
|
|
|
8256c5 |
- "\n\n"
|
|
|
8256c5 |
- "su -c \"dnf install fros-recordmydesktop\""
|
|
|
8256c5 |
- ));
|
|
|
8256c5 |
- }
|
|
|
8256c5 |
-
|
|
|
8256c5 |
-
|
|
|
8256c5 |
g_signal_connect(g_search_entry_bt, "changed", G_CALLBACK(search_timeout), NULL);
|
|
|
8256c5 |
|
|
|
8256c5 |
g_signal_connect (g_tv_event_log, "key-press-event", G_CALLBACK (key_press_event), NULL);
|
|
|
8256c5 |
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
|
|
8256c5 |
index 47713370..f0bd2a77 100644
|
|
|
8256c5 |
--- a/src/gui-wizard-gtk/wizard.glade
|
|
|
8256c5 |
+++ b/src/gui-wizard-gtk/wizard.glade
|
|
|
8256c5 |
@@ -506,46 +506,6 @@
|
|
|
8256c5 |
<property name="position">4</property>
|
|
|
8256c5 |
</packing>
|
|
|
8256c5 |
</child>
|
|
|
8256c5 |
- <child>
|
|
|
8256c5 |
- <object class="GtkBox" id="box3">
|
|
|
8256c5 |
- <property name="visible">True</property>
|
|
|
8256c5 |
- <property name="can_focus">False</property>
|
|
|
8256c5 |
- <child>
|
|
|
8256c5 |
- <object class="GtkLabel" id="label9">
|
|
|
8256c5 |
- <property name="visible">True</property>
|
|
|
8256c5 |
- <property name="can_focus">False</property>
|
|
|
8256c5 |
- <property name="halign">end</property>
|
|
|
8256c5 |
- <property name="label" translatable="yes">If you don't know how to describe it, you can</property>
|
|
|
8256c5 |
- </object>
|
|
|
8256c5 |
- <packing>
|
|
|
8256c5 |
- <property name="expand">False</property>
|
|
|
8256c5 |
- <property name="fill">False</property>
|
|
|
8256c5 |
- <property name="position">0</property>
|
|
|
8256c5 |
- </packing>
|
|
|
8256c5 |
- </child>
|
|
|
8256c5 |
- <child>
|
|
|
8256c5 |
- <object class="GtkLinkButton" id="btn_startcast">
|
|
|
8256c5 |
- <property name="label" translatable="yes">add a screencast</property>
|
|
|
8256c5 |
- <property name="visible">True</property>
|
|
|
8256c5 |
- <property name="can_focus">True</property>
|
|
|
8256c5 |
- <property name="receives_default">True</property>
|
|
|
8256c5 |
- <property name="has_tooltip">True</property>
|
|
|
8256c5 |
- <property name="halign">start</property>
|
|
|
8256c5 |
- <property name="relief">none</property>
|
|
|
8256c5 |
- </object>
|
|
|
8256c5 |
- <packing>
|
|
|
8256c5 |
- <property name="expand">False</property>
|
|
|
8256c5 |
- <property name="fill">True</property>
|
|
|
8256c5 |
- <property name="position">1</property>
|
|
|
8256c5 |
- </packing>
|
|
|
8256c5 |
- </child>
|
|
|
8256c5 |
- </object>
|
|
|
8256c5 |
- <packing>
|
|
|
8256c5 |
- <property name="expand">False</property>
|
|
|
8256c5 |
- <property name="fill">True</property>
|
|
|
8256c5 |
- <property name="position">5</property>
|
|
|
8256c5 |
- </packing>
|
|
|
8256c5 |
- </child>
|
|
|
8256c5 |
</object>
|
|
|
8256c5 |
</child>
|
|
|
8256c5 |
</object>
|
|
|
8256c5 |
--
|
|
|
8256c5 |
2.17.1
|
|
|
8256c5 |
|