Check sokoke_has_default instead of placeholder text
It is set if there's a placeholder (and GTK+ 3 returns NULL text).
This commit is contained in:
parent
f145efaabc
commit
60f93f157a
3 changed files with 6 additions and 6 deletions
|
@ -809,7 +809,7 @@ static void cm_filter_entry_changed_cb(GtkEditable *editable, CookieManagerPage
|
||||||
if (priv->ignore_changed_filter)
|
if (priv->ignore_changed_filter)
|
||||||
return;
|
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));
|
text = gtk_entry_get_text(GTK_ENTRY(editable));
|
||||||
else
|
else
|
||||||
text = NULL;
|
text = NULL;
|
||||||
|
@ -817,10 +817,10 @@ static void cm_filter_entry_changed_cb(GtkEditable *editable, CookieManagerPage
|
||||||
|
|
||||||
cookie_manager_update_filter(priv->parent, text);
|
cookie_manager_update_filter(priv->parent, text);
|
||||||
|
|
||||||
if (*text != '\0')
|
if (text && *text)
|
||||||
gtk_tree_view_expand_all(GTK_TREE_VIEW(priv->treeview));
|
|
||||||
else
|
|
||||||
gtk_tree_view_collapse_all(GTK_TREE_VIEW(priv->treeview));
|
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)
|
static void cm_tree_selection_changed_cb(GtkTreeSelection *selection, CookieManagerPage *cmp)
|
||||||
|
|
|
@ -1002,7 +1002,7 @@ midori_bookmarks_filter_entry_changed_cb (GtkEntry* entry,
|
||||||
if (bookmarks->filter_timeout)
|
if (bookmarks->filter_timeout)
|
||||||
g_source_remove (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)));
|
katze_assign (bookmarks->filter, g_strdup (gtk_entry_get_text (entry)));
|
||||||
else
|
else
|
||||||
katze_assign (bookmarks->filter, NULL);
|
katze_assign (bookmarks->filter, NULL);
|
||||||
|
|
|
@ -968,7 +968,7 @@ midori_history_filter_entry_changed_cb (GtkEntry* entry,
|
||||||
history->filter_timeout = g_timeout_add (COMPLETION_DELAY,
|
history->filter_timeout = g_timeout_add (COMPLETION_DELAY,
|
||||||
midori_history_filter_timeout_cb, history);
|
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)));
|
katze_assign (history->filter, g_strdup (gtk_entry_get_text (entry)));
|
||||||
else
|
else
|
||||||
katze_assign (history->filter, NULL);
|
katze_assign (history->filter, NULL);
|
||||||
|
|
Loading…
Reference in a new issue