It is set if there's a placeholder (and GTK+ 3 returns NULL text).
if (priv->ignore_changed_filter)
return;
- if (gtk_entry_get_placeholder_text(GTK_ENTRY(editable)) != NULL)
+ if (!g_object_get_data (G_OBJECT (editable), "sokoke_has_default"))
text = gtk_entry_get_text(GTK_ENTRY(editable));
else
text = NULL;
cookie_manager_update_filter(priv->parent, text);
- if (*text != '\0')
- gtk_tree_view_expand_all(GTK_TREE_VIEW(priv->treeview));
- else
+ if (text && *text)
gtk_tree_view_collapse_all(GTK_TREE_VIEW(priv->treeview));
+ else
+ gtk_tree_view_expand_all(GTK_TREE_VIEW(priv->treeview));
}
static void cm_tree_selection_changed_cb(GtkTreeSelection *selection, CookieManagerPage *cmp)
if (bookmarks->filter_timeout)
g_source_remove (bookmarks->filter_timeout);
- if (gtk_entry_get_placeholder_text (entry) != NULL)
+ if (!g_object_get_data (G_OBJECT (entry), "sokoke_has_default"))
katze_assign (bookmarks->filter, g_strdup (gtk_entry_get_text (entry)));
else
katze_assign (bookmarks->filter, NULL);
history->filter_timeout = g_timeout_add (COMPLETION_DELAY,
midori_history_filter_timeout_cb, history);
- if (gtk_entry_get_placeholder_text (entry) != NULL)
+ if (!g_object_get_data (G_OBJECT (entry), "sokoke_has_default"))
katze_assign (history->filter, g_strdup (gtk_entry_get_text (entry)));
else
katze_assign (history->filter, NULL);