- also added a help text about installing it if it's missing - shouldn't affect Fedora because the dependency is in spec, but on RHEL it can't be installed by default and user has to install it from EPEL --- src/gui-wizard-gtk/wizard.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index d790f7d..f6da4b9 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -3164,12 +3164,30 @@ void create_assistant(bool expert_mode)
g_signal_connect(g_btn_add_file, "clicked", G_CALLBACK(on_btn_add_file), NULL);
- /* we need to override the activate-link handler, because we use - * the link button instead of normal button and if wouldn't override it - * gtk would try to run it's defualt action and open the associated URI - * but since the URI is empty it would complain about it... - */ - g_signal_connect(g_btn_startcast, "activate-link", G_CALLBACK(on_btn_startcast), NULL); + /* the dependency on recordmydesktop has to be soft */ + struct stat st_buf; + int stat_ret = stat("/usr/bin/recordmydesktop", &st_buf); + if (stat_ret == -1) { + if (errno == ENOENT) { + 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. " + "Please run the following command if you want to install it." + "\n\n" + "<b>su -c "yum install recordmydesktop"</b>" + )); + } + } + else { + /* we need to override the activate-link handler, because we use + * the link button instead of normal button and if we wouldn't override it + * gtk would try to run it's defualt action and open the associated URI + * but since the URI is empty it would complain about it... + */ + g_signal_connect(g_btn_startcast, "activate-link", G_CALLBACK(on_btn_startcast), NULL); + } +
g_signal_connect(g_search_entry_bt, "changed", G_CALLBACK(search_timeout), NULL);
crash-catcher@lists.fedorahosted.org