aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-15 21:37:17 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-15 21:37:17 +0800
commit981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4 (patch)
treecdb4cce7df8339cb930b58227e8b3bec120d5826 /src
parentf8cbf86bbc84292974146504dfa287b119c0ba8e (diff)
downloadgsoc2013-epiphany-981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4.tar
gsoc2013-epiphany-981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4.tar.gz
gsoc2013-epiphany-981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4.tar.bz2
gsoc2013-epiphany-981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4.tar.lz
gsoc2013-epiphany-981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4.tar.xz
gsoc2013-epiphany-981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4.tar.zst
gsoc2013-epiphany-981d9babe49e2cbbcd6fb8a2fbf64da4ebc148e4.zip
Suggest the address as title when web page has no title.
2003-06-15 Marco Pesenti Gritti <marco@it.gnome.org> * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_set_title): Suggest the address as title when web page has no title.
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-new-bookmark.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index 067b48cee..7c3599a2f 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -30,6 +30,7 @@
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkeditable.h>
#include <bonobo/bonobo-i18n.h>
+#include <string.h>
#include "ephy-new-bookmark.h"
#include "ephy-state.h"
@@ -471,9 +472,21 @@ void
ephy_new_bookmark_set_title (EphyNewBookmark *bookmark,
const char *title)
{
+ const char *real_title;
+
LOG ("Setting new bookmark title to: \"%s\"", title)
+
+ if (title == NULL || strlen (title) == 0)
+ {
+ real_title = bookmark->priv->location;
+ }
+ else
+ {
+ real_title = title;
+ }
+
gtk_entry_set_text (GTK_ENTRY (bookmark->priv->title_entry),
- g_strdup (title));
+ real_title);
}
void