summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorKernc <kerncece@gmail.com>2014-08-30 17:07:52 +0200
committerArx Cruz <arxcruz@gnome.org>2014-10-22 15:44:38 +0200
commit5b0553e9ef4fcabebefbc510a088b009af73d4ab (patch)
treefeabcb514d3bc1aa0cc91f951c527b17f91b5239 /src/option.c
parentBug #700249 - Progress dialog does not wrap (diff)
downloadzenity-5b0553e9ef4fcabebefbc510a088b009af73d4ab.tar.gz
zenity-5b0553e9ef4fcabebefbc510a088b009af73d4ab.tar.bz2
zenity-5b0553e9ef4fcabebefbc510a088b009af73d4ab.zip
Allow user to interact with --text-info --html WebView
This commit changes the default --text-view behavior (when --html is also in effect) so that the clicked links are opened in the default browser (closes #732626). Additionally, a new option is introduced, --prevent-interaction, which disables above behavior.
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index e11c1ba9..eb0a03a3 100644
--- a/src/option.c
+++ b/src/option.c
@@ -113,6 +113,7 @@ static gboolean zenity_text_auto_scroll;
#ifdef HAVE_WEBKITGTK
static gboolean zenity_text_enable_html;
+static gboolean zenity_text_no_interaction;
static gchar *zenity_text_url;
#endif
@@ -916,6 +917,15 @@ static GOptionEntry text_options[] = {
NULL
},
{
+ "no-interaction",
+ '\0',
+ G_OPTION_FLAG_NOALIAS,
+ G_OPTION_ARG_NONE,
+ &zenity_text_no_interaction,
+ N_("Do not enable user interaction with the WebView. Only works if you use --html option"),
+ NULL
+ },
+ {
"url",
'\0',
G_OPTION_FLAG_NOALIAS,
@@ -1600,6 +1610,7 @@ zenity_text_pre_callback (GOptionContext *context,
zenity_text_auto_scroll = FALSE;
#ifdef HAVE_WEBKITGTK
zenity_text_enable_html = FALSE;
+ zenity_text_no_interaction = FALSE;
zenity_text_url = NULL;
#endif
return TRUE;
@@ -2028,6 +2039,7 @@ zenity_text_post_callback (GOptionContext *context,
results->text_data->auto_scroll = zenity_text_auto_scroll;
#ifdef HAVE_WEBKITGTK
results->text_data->html = zenity_text_enable_html;
+ results->text_data->no_interaction = zenity_text_no_interaction;
results->text_data->url = zenity_text_url;
#endif
} else {
bgstack15