aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--data/glade/prefs-dialog.glade6
-rw-r--r--src/ephy-tab.c48
3 files changed, 57 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 99be9759a..9dc21422e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-07-22 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * data/glade/prefs-dialog.glade:
+
+ Try to use more friendly description for cache prefs.
+
+ * src/ephy-tab.c: (open_link_in_new_tab),
+ (ephy_tab_dom_mouse_click_cb):
+
+ Middle click open in new tab for http, ftp and file,
+ hope to not have missed any protocol that make sense.
+
2003-07-22 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-tab.c: (ephy_tab_set_title):
diff --git a/data/glade/prefs-dialog.glade b/data/glade/prefs-dialog.glade
index cdeb03031..809221203 100644
--- a/data/glade/prefs-dialog.glade
+++ b/data/glade/prefs-dialog.glade
@@ -1441,7 +1441,7 @@
<child>
<widget class="GtkLabel" id="label1256">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Cache&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;Temporary Files&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1507,7 +1507,7 @@
<child>
<widget class="GtkLabel" id="cache_size">
<property name="visible">True</property>
- <property name="label" translatable="yes">Si_ze:</property>
+ <property name="label" translatable="yes">_Disk space:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1588,7 +1588,7 @@
<widget class="GtkButton" id="clear_cache_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Cl_ear Cache</property>
+ <property name="label" translatable="yes">Cl_ear</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="prefs_clear_cache_button_clicked_cb" last_modification_time="Sat, 07 Jun 2003 11:07:21 GMT"/>
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index d4256ff89..69a881007 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -872,20 +872,56 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height,
g_list_free (tabs);
}
+static void
+open_link_in_new_tab (EphyTab *tab,
+ const char *link_address)
+{
+ GnomeVFSURI *uri;
+ const char *scheme;
+ EphyWindow *window;
+ gboolean new_tab = FALSE;
+
+ window = ephy_tab_get_window (tab);
+ g_return_if_fail (window != NULL);
+
+ uri = gnome_vfs_uri_new (link_address);
+ if (uri != NULL)
+ {
+ scheme = gnome_vfs_uri_get_scheme (uri);
+
+ new_tab = (strcmp (scheme, "http") == 0 ||
+ strcmp (scheme, "ftp") == 0 ||
+ strcmp (scheme, "file") == 0);
+
+ gnome_vfs_uri_unref (uri);
+ }
+
+ if (new_tab)
+ {
+ ephy_shell_new_tab (ephy_shell, window, tab,
+ link_address,
+ EPHY_NEW_TAB_OPEN_PAGE);
+ }
+ else
+ {
+ ephy_window_load_url (window, link_address);
+ }
+}
+
static gint
ephy_tab_dom_mouse_click_cb (EphyEmbed *embed,
EphyEmbedEvent *event,
EphyTab *tab)
{
- EphyWindow *window;
EphyEmbedEventType type;
EmbedEventContext context;
-
- g_assert (IS_EPHY_EMBED_EVENT(event));
+ EphyWindow *window;
window = ephy_tab_get_window (tab);
g_return_val_if_fail (window != NULL, FALSE);
+ g_assert (IS_EPHY_EMBED_EVENT(event));
+
ephy_embed_event_get_event_type (event, &type);
ephy_embed_event_get_context (event, &context);
@@ -893,11 +929,11 @@ ephy_tab_dom_mouse_click_cb (EphyEmbed *embed,
&& (context & EMBED_CONTEXT_LINK))
{
const GValue *value;
+ const char *link_address;
ephy_embed_event_get_property (event, "link", &value);
- ephy_shell_new_tab (ephy_shell, window, tab,
- g_value_get_string (value),
- EPHY_NEW_TAB_OPEN_PAGE);
+ link_address = g_value_get_string (value);
+ open_link_in_new_tab (tab, link_address);
}
else if (type == EPHY_EMBED_EVENT_MOUSE_BUTTON2 &&
eel_gconf_get_boolean (CONF_INTERFACE_MIDDLE_CLICK_OPEN_URL) &&