[Xfce4-commits] <midori:master> Require bookmarks and folders to have a title
Christian Dywan
noreply at xfce.org
Mon Jul 19 21:44:02 CEST 2010
Updating branch refs/heads/master
to b944ce0c838c25ba4b4d290b4d055f18ce84bf8b (commit)
from 7dffde361c86b6f026c25ce1ed506fc8c468119c (commit)
commit b944ce0c838c25ba4b4d290b4d055f18ce84bf8b
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Jul 19 20:47:33 2010 +0200
Require bookmarks and folders to have a title
midori/midori-browser.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index b304d7c..e2063b2 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -679,6 +679,15 @@ midori_browser_edit_bookmark_uri_changed_cb (GtkEntry* entry,
}
static void
+midori_browser_edit_bookmark_title_changed_cb (GtkEntry* entry,
+ GtkDialog* dialog)
+{
+ const gchar* title = gtk_entry_get_text (entry);
+ gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_ACCEPT,
+ title != NULL && title[0] != '\0');
+}
+
+static void
midori_browser_edit_bookmark_add_speed_dial_cb (GtkWidget* button,
KatzeItem* bookmark)
{
@@ -757,6 +766,10 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
gtk_entry_set_activates_default (GTK_ENTRY (entry_title), TRUE);
value = katze_item_get_name (bookmark);
gtk_entry_set_text (GTK_ENTRY (entry_title), value ? value : "");
+ midori_browser_edit_bookmark_title_changed_cb (GTK_ENTRY (entry_title),
+ GTK_DIALOG (dialog));
+ g_signal_connect (entry_title, "changed",
+ G_CALLBACK (midori_browser_edit_bookmark_title_changed_cb), dialog);
gtk_box_pack_start (GTK_BOX (hbox), entry_title, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (content_area), hbox);
gtk_widget_show_all (hbox);
More information about the Xfce4-commits
mailing list