[evolution] Remove EHintedEntry.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Remove EHintedEntry.
- Date: Thu, 6 Oct 2011 12:54:05 +0000 (UTC)
commit ef05d73b0a06cfc5eaf1a74c7b5c25134d81e328
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun Sep 4 13:04:55 2011 -0400
Remove EHintedEntry.
GtkEntry in GTK+ 3.2 now provides this functionality through the new
GtkEntry:placeholder-text property.
shell/e-shell-content.c | 1 -
shell/e-shell-searchbar.c | 32 +++--
widgets/misc/Makefile.am | 2 -
widgets/misc/e-hinted-entry.c | 293 -----------------------------------------
widgets/misc/e-hinted-entry.h | 73 ----------
5 files changed, 18 insertions(+), 383 deletions(-)
---
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index c7a4151..069e0bf 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -40,7 +40,6 @@
#include "filter/e-rule-editor.h"
#include "widgets/misc/e-action-combo-box.h"
#include "widgets/misc/e-alert-bar.h"
-#include "widgets/misc/e-hinted-entry.h"
#include "e-shell-backend.h"
#include "e-shell-searchbar.h"
diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c
index 13b0b49..370d6b4 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -36,7 +36,6 @@
#include "e-util/e-util.h"
#include "widgets/misc/e-action-combo-box.h"
-#include "widgets/misc/e-hinted-entry.h"
#include "e-shell-window-actions.h"
@@ -979,7 +978,7 @@ e_shell_searchbar_init (EShellSearchbar *searchbar)
label = GTK_LABEL (widget);
- widget = e_hinted_entry_new ();
+ widget = gtk_entry_new ();
gtk_label_set_mnemonic_widget (label, widget);
gtk_box_pack_start (box, widget, TRUE, TRUE, 0);
searchbar->priv->search_entry = widget;
@@ -1168,26 +1167,26 @@ e_shell_searchbar_set_filter_visible (EShellSearchbar *searchbar,
const gchar *
e_shell_searchbar_get_search_hint (EShellSearchbar *searchbar)
{
- EHintedEntry *entry;
+ GtkEntry *entry;
g_return_val_if_fail (E_IS_SHELL_SEARCHBAR (searchbar), NULL);
- entry = E_HINTED_ENTRY (searchbar->priv->search_entry);
+ entry = GTK_ENTRY (searchbar->priv->search_entry);
- return e_hinted_entry_get_hint (entry);
+ return gtk_entry_get_placeholder_text (entry);
}
void
e_shell_searchbar_set_search_hint (EShellSearchbar *searchbar,
const gchar *search_hint)
{
- EHintedEntry *entry;
+ GtkEntry *entry;
g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar));
- entry = E_HINTED_ENTRY (searchbar->priv->search_entry);
+ entry = GTK_ENTRY (searchbar->priv->search_entry);
- e_hinted_entry_set_hint (entry, search_hint);
+ gtk_entry_set_placeholder_text (entry, search_hint);
g_object_notify (G_OBJECT (searchbar), "search-hint");
}
@@ -1233,26 +1232,31 @@ e_shell_searchbar_set_search_option (EShellSearchbar *searchbar,
const gchar *
e_shell_searchbar_get_search_text (EShellSearchbar *searchbar)
{
- EHintedEntry *entry;
+ GtkEntry *entry;
g_return_val_if_fail (E_IS_SHELL_SEARCHBAR (searchbar), NULL);
- entry = E_HINTED_ENTRY (searchbar->priv->search_entry);
+ entry = GTK_ENTRY (searchbar->priv->search_entry);
- return e_hinted_entry_get_text (entry);
+ return gtk_entry_get_text (entry);
}
void
e_shell_searchbar_set_search_text (EShellSearchbar *searchbar,
const gchar *search_text)
{
- EHintedEntry *entry;
+ GtkEntry *entry;
g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar));
- entry = E_HINTED_ENTRY (searchbar->priv->search_entry);
+ entry = GTK_ENTRY (searchbar->priv->search_entry);
- e_hinted_entry_set_text (entry, search_text);
+ /* XXX Really wish gtk_entry_set_text()
+ * would just learn to accept NULL. */
+ if (search_text == NULL)
+ search_text = "";
+
+ gtk_entry_set_text (entry, search_text);
shell_searchbar_update_search_widgets (searchbar);
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index cd5cada..79bc14b 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -38,7 +38,6 @@ widgetsinclude_HEADERS = \
e-contact-marker.h \
e-dateedit.h \
e-focus-tracker.h \
- e-hinted-entry.h \
e-image-chooser.h \
e-import-assistant.h \
e-map.h \
@@ -123,7 +122,6 @@ libemiscwidgets_la_SOURCES = \
e-contact-marker.c \
e-dateedit.c \
e-focus-tracker.c \
- e-hinted-entry.c \
e-image-chooser.c \
e-import-assistant.c \
e-map.c \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]