aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@svn.gnome.org>2007-09-09 07:27:43 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2007-09-09 07:27:43 +0800
commitbc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb (patch)
treeb5a175d18525d8f14446c7d8c50ef4fef4ee3b4b
parent753299c1380ba2feb4866c4079c4d48b033887b1 (diff)
downloadgsoc2013-epiphany-bc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb.tar
gsoc2013-epiphany-bc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb.tar.gz
gsoc2013-epiphany-bc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb.tar.bz2
gsoc2013-epiphany-bc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb.tar.lz
gsoc2013-epiphany-bc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb.tar.xz
gsoc2013-epiphany-bc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb.tar.zst
gsoc2013-epiphany-bc3c4b0089e0c3502f4f6ef87e0e646b0769bcfb.zip
Make 'Not found' on find toolbar temporairly bold and fires
2007-09-09 Cosimo Cecchi <cosimoc@svn.gnome.org> * src/ephy-find-toolbar.c: (set_status_notfound_cb), (set_status), (ephy_find_toolbar_dispose): Make 'Not found' on find toolbar temporairly bold and fires gtk_widget_error_bell () when searching on a page and no results are found. Fixes bug #363004. svn path=/trunk/; revision=7354
-rw-r--r--ChangeLog9
-rw-r--r--src/ephy-find-toolbar.c37
2 files changed, 45 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c00445dba..b9e90f704 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-09-09 Cosimo Cecchi <cosimoc@svn.gnome.org>
+
+ * src/ephy-find-toolbar.c: (set_status_notfound_cb), (set_status),
+ (ephy_find_toolbar_dispose):
+
+ Make 'Not found' on find toolbar temporairly bold and fires
+ gtk_widget_error_bell () when searching on a page and no results are
+ found. Fixes bug #363004.
+
2007-09-08 Cosimo Cecchi <cosimoc@svn.gnome.org>
* embed/downloader-view.c: (downloader_view_finalize),
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index 9a016fa4b..4202710e5 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -55,6 +55,7 @@ struct _EphyFindToolbarPrivate
GtkToolItem *status_item;
GtkWidget *status_label;
gulong set_focus_handler;
+ guint source_id;
guint preedit_changed : 1;
guint prevent_activate : 1;
guint activated : 1;
@@ -101,12 +102,30 @@ get_find (EphyFindToolbar *toolbar)
return priv->find;
}
+static gboolean
+set_status_notfound_cb (EphyFindToolbar *toolbar)
+{
+ EphyFindToolbarPrivate *priv;
+ PangoFontDescription *pango_desc = NULL;
+
+ priv = toolbar->priv;
+
+ pango_desc = pango_font_description_new ();
+ gtk_widget_modify_font (priv->status_label, pango_desc);
+ pango_font_description_free (pango_desc);
+
+ priv->source_id = 0;
+
+ return FALSE;
+}
+
static void
set_status (EphyFindToolbar *toolbar,
EphyEmbedFindResult result)
{
EphyFindToolbarPrivate *priv = toolbar->priv;
char *text = NULL;
+ PangoFontDescription *pango_desc = NULL;
switch (result)
{
@@ -114,7 +133,17 @@ set_status (EphyFindToolbar *toolbar,
text = NULL;
break;
case EPHY_EMBED_FIND_NOTFOUND:
- text = _("Not found");
+ {
+ text = _("Not found");
+
+ pango_desc = pango_font_description_new ();
+ pango_font_description_set_weight (pango_desc, PANGO_WEIGHT_BOLD);
+ gtk_widget_modify_font (priv->status_label, pango_desc);
+ pango_font_description_free (pango_desc);
+
+ gtk_widget_error_bell (GTK_WIDGET (priv->window));
+ priv->source_id = g_timeout_add (500, (GSourceFunc) set_status_notfound_cb, toolbar);
+ }
break;
case EPHY_EMBED_FIND_FOUNDWRAPPED:
text = _("Wrapped");
@@ -429,6 +458,12 @@ ephy_find_toolbar_dispose (GObject *object)
g_object_unref (priv->find);
priv->find = NULL;
}
+
+ if (priv->source_id != 0)
+ {
+ g_source_remove (priv->source_id);
+ priv->source_id = 0;
+ }
parent_class->dispose (object);
}