Apply URI magic when opening selected text in a tab
This commit is contained in:
parent
7a7b6596a9
commit
0057f32f1e
1 changed files with 11 additions and 6 deletions
|
@ -1111,12 +1111,17 @@ static void
|
||||||
midori_web_view_menu_new_tab_activate_cb (GtkWidget* widget,
|
midori_web_view_menu_new_tab_activate_cb (GtkWidget* widget,
|
||||||
MidoriView* view)
|
MidoriView* view)
|
||||||
{
|
{
|
||||||
gchar* uri = view->link_uri;
|
if (view->link_uri)
|
||||||
|
g_signal_emit (view, signals[NEW_TAB], 0, view->link_uri,
|
||||||
if (!uri)
|
view->open_tabs_in_the_background);
|
||||||
uri = (gchar*)g_object_get_data (G_OBJECT (widget), "uri");
|
else
|
||||||
|
{
|
||||||
|
gchar* data = (gchar*)g_object_get_data (G_OBJECT (widget), "uri");
|
||||||
|
gchar* uri = sokoke_magic_uri (data, NULL);
|
||||||
g_signal_emit (view, signals[NEW_TAB], 0, uri,
|
g_signal_emit (view, signals[NEW_TAB], 0, uri,
|
||||||
view->open_tabs_in_the_background);
|
view->open_tabs_in_the_background);
|
||||||
|
g_free (uri);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue