[epiphany/mcatanzaro/cli: 6/10] shell: Open new tab in primary instance when activated without args



commit f601feb4c0b0e8aabf5885e56fe6423b73f21fff
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Thu Jan 3 15:27:52 2019 -0600

    shell: Open new tab in primary instance when activated without args
    
    This makes more sense. When a secondary instance is activated without
    any arguments, previously we would open a new window by default. Now
    we'll open a new tab in the current window instead, matching gedit's
    behavior. Get the old behavior by passing --new-window.

 src/ephy-shell.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 3449692c7..28f9b0d4d 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -1086,7 +1086,6 @@ open_uris_data_new (EphyShell       *shell,
 {
   OpenURIsData *data;
   gboolean fullscreen_lockdown;
-  gboolean have_uris;
   EphySession *session = ephy_shell_get_session (shell);
 
   data = g_new0 (OpenURIsData, 1);
@@ -1098,9 +1097,7 @@ open_uris_data_new (EphyShell       *shell,
   fullscreen_lockdown = g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
                                                 EPHY_PREFS_LOCKDOWN_FULLSCREEN);
 
-  have_uris = uris && !(g_strv_length ((char **)uris) == 1 && !g_strcmp0 (uris[0], ""));
-
-  if (((startup_flags & EPHY_STARTUP_NEW_WINDOW) && !fullscreen_lockdown) || !have_uris) {
+  if ((startup_flags & EPHY_STARTUP_NEW_WINDOW) && !fullscreen_lockdown) {
     data->window = ephy_window_new ();
   } else {
     data->flags |= EPHY_NEW_TAB_JUMP;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]