[epiphany] Move the get_title_composite function to EphyWebView.
- From: Xan Lopez <xan src gnome org>
- To: svn-commits-list gnome org
- Subject: [epiphany] Move the get_title_composite function to EphyWebView.
- Date: Tue, 16 Jun 2009 08:14:32 -0400 (EDT)
commit 2c51cb761fe6392f136611cb73d6eeda223288fb
Author: Xan Lopez <xan gnome org>
Date: Tue Jun 16 14:15:43 2009 +0300
Move the get_title_composite function to EphyWebView.
embed/ephy-embed-utils.c | 36 ------------------------------------
embed/ephy-embed-utils.h | 1 -
embed/ephy-web-view.c | 37 +++++++++++++++++++++++++++++++++++++
embed/ephy-web-view.h | 2 +-
src/ephy-tabs-menu.c | 2 +-
src/ephy-window.c | 2 +-
6 files changed, 40 insertions(+), 40 deletions(-)
---
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 672c46b..a5c77a7 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -78,42 +78,6 @@ ephy_embed_utils_link_message_parse (char *message)
}
}
-/**
- * ephy_embed_utils_get_title_composite:
- * @view: an #EphyView
- *
- * Returns the title of the web page loaded in @embed.
- *
- * This differs from #ephy_embed_utils_get_title in that this function
- * will return a special title while the page is still loading.
- *
- * Return value: @view's web page's title. Will never be %NULL.
- **/
-const char *
-ephy_embed_utils_get_title_composite (EphyWebView *view)
-{
- const char *title = "";
- const char *loading_title;
- gboolean is_loading, is_blank;
-
- g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), NULL);
-
- is_loading = ephy_web_view_get_load_status (view);
- is_blank = ephy_web_view_get_is_blank (view);
- loading_title = ephy_web_view_get_loading_title (view);
- title = ephy_web_view_get_title (view);
-
- if (is_blank)
- {
- if (is_loading)
- title = loading_title;
- else
- title = _("Blank page");
- }
-
- return title != NULL ? title : "";
-}
-
gboolean
ephy_embed_utils_address_has_web_scheme (const char *address)
{
diff --git a/embed/ephy-embed-utils.h b/embed/ephy-embed-utils.h
index d9b63b1..fb3c273 100644
--- a/embed/ephy-embed-utils.h
+++ b/embed/ephy-embed-utils.h
@@ -42,7 +42,6 @@ G_BEGIN_DECLS
#define EPHY_WEBKIT_BACK_FORWARD_LIMIT 100
char * ephy_embed_utils_link_message_parse (char *message);
-const char * ephy_embed_utils_get_title_composite (EphyWebView *view);
gboolean ephy_embed_utils_address_has_web_scheme (const char *address);
G_END_DECLS
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index befd65a..5cbaa7c 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2015,3 +2015,40 @@ ephy_web_view_get_go_up_list (EphyWebView *view)
{
return NULL;
}
+
+/**
+ * ephy_embed_utils_get_title_composite:
+ * @view: an #EphyView
+ *
+ * Returns the title of the web page loaded in @view.
+ *
+ * This differs from #ephy_web_view_get_title in that this function
+ * will return a special title while the page is still loading.
+ *
+ * Return value: @view's web page's title. Will never be %NULL.
+ **/
+const char *
+ephy_web_view_get_title_composite (EphyWebView *view)
+{
+ const char *title = "";
+ const char *loading_title;
+ gboolean is_loading, is_blank;
+
+ g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), NULL);
+
+ is_loading = ephy_web_view_get_load_status (view);
+ is_blank = ephy_web_view_get_is_blank (view);
+ loading_title = ephy_web_view_get_loading_title (view);
+ title = ephy_web_view_get_title (view);
+
+ if (is_blank)
+ {
+ if (is_loading)
+ title = loading_title;
+ else
+ title = _("Blank page");
+ }
+
+ return title != NULL ? title : "";
+}
+
diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h
index 0a727a8..69b00ae 100644
--- a/embed/ephy-web-view.h
+++ b/embed/ephy-web-view.h
@@ -220,7 +220,7 @@ const char * ephy_web_view_get_icon_address (EphyWebView
const char * ephy_web_view_get_title (EphyWebView *view);
gboolean ephy_web_view_can_go_up (EphyWebView *view);
const char * ephy_web_view_get_address (EphyWebView *view);
-
+const char * ephy_web_view_get_title_composite (EphyWebView *view);
/* These should be private */
void ephy_web_view_set_address (EphyWebView *embed,
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index 17df51a..7618b00 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -176,7 +176,7 @@ sync_tab_title (EphyWebView *view,
{
const char *title;
- title = ephy_embed_utils_get_title_composite (view);
+ title = ephy_web_view_get_title_composite (view);
g_object_set (action, "label", title, NULL);
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 499c82e..13121fe 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1899,7 +1899,7 @@ sync_tab_title (EphyWebView *view,
if (priv->closing) return;
gtk_window_set_title (GTK_WINDOW(window),
- ephy_embed_utils_get_title_composite (view));
+ ephy_web_view_get_title_composite (view));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]