epiphany r8783 - in trunk: data lib src
- From: xan svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8783 - in trunk: data lib src
- Date: Sun, 15 Feb 2009 22:20:52 +0000 (UTC)
Author: xan
Date: Sun Feb 15 22:20:52 2009
New Revision: 8783
URL: http://svn.gnome.org/viewvc/epiphany?rev=8783&view=rev
Log:
Add option to open new windows in tabs.
Only available as a gconf key for now,
/apps/epiphany/general/open_new_windows_in_tab.
Patch by Alejandro G. Castro.
Bug #571593
Modified:
trunk/data/epiphany.schemas.in
trunk/lib/ephy-prefs.h
trunk/src/ephy-window.c
Modified: trunk/data/epiphany.schemas.in
==============================================================================
--- trunk/data/epiphany.schemas.in (original)
+++ trunk/data/epiphany.schemas.in Sun Feb 15 22:20:52 2009
@@ -167,6 +167,18 @@
"icons", and "text".</long>
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/epiphany/general/open_new_windows_in_tab</key>
+ <applyto>/apps/epiphany/general/open_new_windows_in_tab</applyto>
+ <owner>epiphany</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Force new windows to be opened in tabs</short>
+ <long>Force new window requests to be opened in tabs instead
+ of using a new window.</long>
+ </locale>
+ </schema>
<schema>
<key>/schemas/apps/epiphany/general/show_toolbars</key>
<applyto>/apps/epiphany/general/show_toolbars</applyto>
Modified: trunk/lib/ephy-prefs.h
==============================================================================
--- trunk/lib/ephy-prefs.h (original)
+++ trunk/lib/ephy-prefs.h Sun Feb 15 22:20:52 2009
@@ -37,6 +37,7 @@
#define CONF_WINDOWS_SHOW_STATUSBAR "/apps/epiphany/general/show_statusbar"
#define CONF_INTERFACE_MIDDLE_CLICK_OPEN_URL "/apps/epiphany/general/middle_click_open_url"
#define CONF_INTERFACE_TOOLBAR_STYLE "/apps/epiphany/general/toolbar_style"
+#define CONF_INTERFACE_OPEN_NEW_WINDOWS_IN_TAB "/apps/epiphany/general/open_new_windows_in_tab"
#define CONF_AUTO_DOWNLOADS "/apps/epiphany/general/automatic_downloads"
#define CONF_DESKTOP_IS_HOME_DIR "/apps/nautilus/preferences/desktop_is_home_dir"
#define CONF_NETWORK_MANAGED "/apps/epiphany/general/managed_network"
Modified: trunk/src/ephy-window.c
==============================================================================
--- trunk/src/ephy-window.c (original)
+++ trunk/src/ephy-window.c Sun Feb 15 22:20:52 2009
@@ -2496,11 +2496,27 @@
{
EphyEmbed *embed;
WebKitWebView *new_web_view;
+ EphyNewTabFlags flags;
+ EphyWindow *parent_window;
+
+ if (eel_gconf_get_boolean (CONF_INTERFACE_OPEN_NEW_WINDOWS_IN_TAB))
+ {
+ parent_window = window;
+ flags = EPHY_NEW_TAB_IN_EXISTING_WINDOW |
+ EPHY_NEW_TAB_JUMP;
+
+ }
+ else
+ {
+ parent_window = NULL;
+ flags = EPHY_NEW_TAB_IN_NEW_WINDOW |
+ EPHY_NEW_TAB_DONT_SHOW_WINDOW;
+ }
embed = ephy_shell_new_tab_full (ephy_shell_get_default (),
- NULL, NULL, NULL,
- EPHY_NEW_TAB_IN_NEW_WINDOW |
- EPHY_NEW_TAB_DONT_SHOW_WINDOW,
+ parent_window,
+ NULL, NULL,
+ flags,
EPHY_EMBED_CHROME_ALL,
FALSE,
0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]