aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/bookmarks/ephy-new-bookmark.c15
2 files changed, 20 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 423152782..f329aa8d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2003-06-15 Marco Pesenti Gritti <marco@it.gnome.org>
+
* embed/mozilla/FilePicker.cpp:
* embed/mozilla/FilePicker.h:
* lib/egg/eggtreemodelfilter.c:
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