diff options
author | Xan Lopez <xan@src.gnome.org> | 2007-10-26 04:00:20 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2007-10-26 04:00:20 +0800 |
commit | 51a7dc7dd4e0871d0da50228a163a1b124aeda1c (patch) | |
tree | fa8d40b6c4fae38fb657b2ef6147579d786d5aec | |
parent | f083f631bc0c22a990c87215583b3237fa886426 (diff) | |
download | gsoc2013-epiphany-51a7dc7dd4e0871d0da50228a163a1b124aeda1c.tar gsoc2013-epiphany-51a7dc7dd4e0871d0da50228a163a1b124aeda1c.tar.gz gsoc2013-epiphany-51a7dc7dd4e0871d0da50228a163a1b124aeda1c.tar.bz2 gsoc2013-epiphany-51a7dc7dd4e0871d0da50228a163a1b124aeda1c.tar.lz gsoc2013-epiphany-51a7dc7dd4e0871d0da50228a163a1b124aeda1c.tar.xz gsoc2013-epiphany-51a7dc7dd4e0871d0da50228a163a1b124aeda1c.tar.zst gsoc2013-epiphany-51a7dc7dd4e0871d0da50228a163a1b124aeda1c.zip |
Change ephy_embed_get_title to return const char*.
Also replace all ephy_tab_get_title by ephy_embed_get_title.
svn path=/trunk/; revision=7559
-rw-r--r-- | embed/ephy-embed.c | 2 | ||||
-rw-r--r-- | embed/ephy-embed.h | 4 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 4 | ||||
-rw-r--r-- | src/ephy-location-action.c | 2 | ||||
-rw-r--r-- | src/ephy-notebook.c | 2 | ||||
-rw-r--r-- | src/ephy-session.c | 2 | ||||
-rw-r--r-- | src/ephy-tab.h | 2 | ||||
-rw-r--r-- | src/ephy-tabs-menu.c | 2 | ||||
-rw-r--r-- | src/ephy-window.c | 2 | ||||
-rw-r--r-- | src/epiphany.defs | 8 | ||||
-rw-r--r-- | src/window-commands.c | 2 |
11 files changed, 12 insertions, 20 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 458849a2c..ae6ea6d74 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -647,7 +647,7 @@ ephy_embed_go_up (EphyEmbed *embed) * * Return value: the title of the web page displayed in @embed **/ -char * +const char * ephy_embed_get_title (EphyEmbed *embed) { EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h index 7dffe063d..70058eec6 100644 --- a/embed/ephy-embed.h +++ b/embed/ephy-embed.h @@ -196,7 +196,7 @@ struct _EphyEmbedIface void (* go_forward) (EphyEmbed *embed); void (* go_up) (EphyEmbed *embed); - char * (* get_title) (EphyEmbed *embed); + const char * (* get_title) (EphyEmbed *embed); char * (* get_location) (EphyEmbed *embed, gboolean toplevel); char * (* get_link_message) (EphyEmbed *embed); @@ -278,7 +278,7 @@ void ephy_embed_stop_load (EphyEmbed *embed); void ephy_embed_reload (EphyEmbed *embed, gboolean force); -char *ephy_embed_get_title (EphyEmbed *embed); +const char *ephy_embed_get_title (EphyEmbed *embed); char *ephy_embed_get_location (EphyEmbed *embed, gboolean toplevel); diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 2031ae9df..7adbcceb6 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -622,10 +622,10 @@ impl_go_up (EphyEmbed *embed) ephy_embed_load_url (embed, parent_uri.get ()); } -static char * +static const char * impl_get_title (EphyEmbed *embed) { - return gtk_moz_embed_get_title (GTK_MOZ_EMBED (embed)); + return MOZILLA_EMBED (embed)->priv->title; } static char * diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c index 9c30f0dc6..9791f61a8 100644 --- a/src/ephy-location-action.c +++ b/src/ephy-location-action.c @@ -299,7 +299,7 @@ get_title_cb (EphyLocationEntry *entry, tab = ephy_window_get_active_tab (action->priv->window); - return g_strdup (ephy_tab_get_title (tab)); + return g_strdup (ephy_embed_get_title (ephy_tab_get_embed (tab))); } static void diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 2e0a5a8c8..5cdbebc42 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -563,7 +563,7 @@ sync_label (EphyTab *tab, GParamSpec *pspec, GtkWidget *label) { const char *title; - title = ephy_tab_get_title (tab); + title = ephy_tab_get_title (ephy_tab_get_embed (tab)); gtk_label_set_text (GTK_LABEL (label), title); diff --git a/src/ephy-session.c b/src/ephy-session.c index 727a4927f..0c84eccbf 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -1073,7 +1073,7 @@ write_tab (xmlTextWriterPtr writer, (const xmlChar *) address); if (ret < 0) return ret; - title = ephy_tab_get_title (tab); + title = ephy_embed_get_title (ephy_tab_get_embed (tab)); ret = xmlTextWriterWriteAttribute (writer, (xmlChar *) "title", (const xmlChar *) title); if (ret < 0) return ret; diff --git a/src/ephy-tab.h b/src/ephy-tab.h index 3af85fb80..d8317167c 100644 --- a/src/ephy-tab.h +++ b/src/ephy-tab.h @@ -85,8 +85,6 @@ void ephy_tab_set_size (EphyTab *tab, const char *ephy_tab_get_status_message (EphyTab *tab); -const char *ephy_tab_get_title (EphyTab *tab); - const char *ephy_tab_get_title_composite (EphyTab *tab); /* private */ diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c index de79472f0..d580c4e32 100644 --- a/src/ephy-tabs-menu.c +++ b/src/ephy-tabs-menu.c @@ -123,7 +123,7 @@ sync_tab_title (EphyTab *tab, { const char *title; - title = ephy_tab_get_title_composite (tab); + title = ephy_embed_get_title_composite (ephy_tab_get_embed (tab)); g_object_set (action, "label", title, NULL); } diff --git a/src/ephy-window.c b/src/ephy-window.c index 1f4b47555..2be477879 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1710,7 +1710,7 @@ sync_tab_title (EphyTab *tab, if (priv->closing) return; gtk_window_set_title (GTK_WINDOW(window), - ephy_tab_get_title_composite (tab)); + ephy_embed_get_title_composite (ephy_tab_get_embed (tab))); } static void diff --git a/src/epiphany.defs b/src/epiphany.defs index d6904a4e4..c622c8f96 100644 --- a/src/epiphany.defs +++ b/src/epiphany.defs @@ -1009,7 +1009,7 @@ (define-method get_title (of-object "EphyEmbed") (c-name "ephy_embed_get_title") - (return-type "char*") + (return-type "const char*") ) (define-method get_location @@ -3408,12 +3408,6 @@ (return-type "const-char*") ) -(define-method get_title - (of-object "EphyTab") - (c-name "ephy_tab_get_title") - (return-type "const-char*") -) - (define-method get_title_composite (of-object "EphyTab") (c-name "ephy_tab_get_title_composite") diff --git a/src/window-commands.c b/src/window-commands.c index b4a801e2b..d8cf7a73e 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -128,7 +128,7 @@ window_cmd_file_send_to (GtkAction *action, g_return_if_fail (embed != NULL); location = gnome_vfs_escape_string (ephy_tab_get_address (tab)); - title = gnome_vfs_escape_string (ephy_tab_get_title (tab)); + title = gnome_vfs_escape_string (ephy_embed_get_title (embed)); url = g_strconcat ("mailto:", "?Subject=", title, |