The location is empty and focused by default
When a new tab is opened it won't default to about:blank but be empty and also gain focus automatically.
This commit is contained in:
parent
b01eb78c9d
commit
ccba177ecb
2 changed files with 18 additions and 12 deletions
|
@ -573,14 +573,14 @@ static void
|
|||
_action_window_new_activate (GtkAction* action,
|
||||
MidoriBrowser* browser)
|
||||
{
|
||||
g_signal_emit (browser, signals[NEW_WINDOW], 0, "about:blank");
|
||||
g_signal_emit (browser, signals[NEW_WINDOW], 0, "");
|
||||
}
|
||||
|
||||
static void
|
||||
_action_tab_new_activate (GtkAction* action,
|
||||
MidoriBrowser* browser)
|
||||
{
|
||||
midori_browser_append_uri (browser, "about:blank");
|
||||
midori_browser_append_uri (browser, "");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2865,7 +2865,10 @@ midori_browser_append_tab (MidoriBrowser* browser,
|
|||
|
||||
n = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), scrolled);
|
||||
if (!config->openTabsInTheBackground)
|
||||
{
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), n);
|
||||
gtk_window_set_focus (GTK_WINDOW (browser), priv->location);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ midori_web_view_class_init (MidoriWebViewClass* class)
|
|||
"uri",
|
||||
"Uri",
|
||||
_("The URI of the currently loaded page"),
|
||||
"about:blank",
|
||||
"",
|
||||
flags));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
|
@ -669,9 +669,12 @@ midori_web_view_set_property (GObject* object,
|
|||
priv->icon);
|
||||
break;
|
||||
case PROP_URI:
|
||||
if (priv->uri && *priv->uri)
|
||||
{
|
||||
// FIXME: Autocomplete the uri
|
||||
webkit_web_view_open (WEBKIT_WEB_VIEW (web_view),
|
||||
g_value_get_string (value));
|
||||
}
|
||||
break;
|
||||
case PROP_TITLE:
|
||||
katze_assign (priv->title, g_value_dup_string (value));
|
||||
|
@ -1030,19 +1033,19 @@ midori_web_view_get_progress (MidoriWebView* web_view)
|
|||
* @web_view: a #MidoriWebView
|
||||
*
|
||||
* Retrieves a string that is suitable for displaying, particularly an
|
||||
* empty uri is represented as "about:blank".
|
||||
* empty URI is represented as "".
|
||||
*
|
||||
* You can assume that the string is not %NULL.
|
||||
*
|
||||
* Return value: an uri string
|
||||
* Return value: an URI string
|
||||
**/
|
||||
const gchar*
|
||||
midori_web_view_get_display_uri (MidoriWebView* web_view)
|
||||
{
|
||||
g_return_val_if_fail (MIDORI_IS_WEB_VIEW (web_view), "about:blank");
|
||||
g_return_val_if_fail (MIDORI_IS_WEB_VIEW (web_view), "");
|
||||
|
||||
MidoriWebViewPrivate* priv = web_view->priv;
|
||||
return priv->uri ? priv->uri : "about:blank";
|
||||
return priv->uri ? priv->uri : "";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1050,7 +1053,7 @@ midori_web_view_get_display_uri (MidoriWebView* web_view)
|
|||
* @web_view: a #MidoriWebView
|
||||
*
|
||||
* Retrieves a string that is suitable for displaying as a title. Most of the
|
||||
* time this will be the title or the current uri.
|
||||
* time this will be the title or the current URI.
|
||||
*
|
||||
* You can assume that the string is not %NULL.
|
||||
*
|
||||
|
@ -1077,7 +1080,7 @@ midori_web_view_get_display_title (MidoriWebView* web_view)
|
|||
* Retrieves the uri of the currently focused link, particularly while the
|
||||
* mouse hovers a link or a context menu is being opened.
|
||||
*
|
||||
* Return value: an uri string, or %NULL if there is no link focussed
|
||||
* Return value: an URI string, or %NULL if there is no link focussed
|
||||
**/
|
||||
const gchar*
|
||||
midori_web_view_get_link_uri (MidoriWebView* web_view)
|
||||
|
|
Loading…
Reference in a new issue