[tasks] Drop KotoHintEntry, use gtk_entry_set_placeholder_text
- From: Ross Burton <rburton src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tasks] Drop KotoHintEntry, use gtk_entry_set_placeholder_text
- Date: Thu, 23 Feb 2012 13:38:05 +0000 (UTC)
commit b34c2b03aaeeaa0efcdef79c5f07d7d0e704faff
Author: Ross Burton <ross linux intel com>
Date: Fri Dec 2 15:04:32 2011 +0000
Drop KotoHintEntry, use gtk_entry_set_placeholder_text
TODO | 1 -
libkoto/Makefile.am | 1 -
libkoto/koto-hint-entry.c | 261 ---------------------------------------------
libkoto/koto-hint-entry.h | 66 ------------
src/gtk/main.c | 11 ++-
5 files changed, 7 insertions(+), 333 deletions(-)
---
diff --git a/TODO b/TODO
index 366e3e3..2f797ae 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,4 @@
port to gtkapplication
remove libowl?
remove handle_libical_memory?
-remove koto entry -> gtk3.1
remove cell renderer?
diff --git a/libkoto/Makefile.am b/libkoto/Makefile.am
index 4283d69..559eb82 100644
--- a/libkoto/Makefile.am
+++ b/libkoto/Makefile.am
@@ -6,7 +6,6 @@ noinst_LIBRARIES = libkoto.a
libkoto_a_SOURCES = \
ical-util.h ical-util.c \
koto-task.h koto-task.c \
- koto-hint-entry.h koto-hint-entry.c \
koto-date-parser.h koto-date-parser.c \
koto-field-editor-factory.h koto-field-editor-factory.c \
koto-task-editor.h koto-task-editor.c \
diff --git a/src/gtk/main.c b/src/gtk/main.c
index 8848bf3..715a537 100644
--- a/src/gtk/main.c
+++ b/src/gtk/main.c
@@ -29,7 +29,6 @@
#include <libkoto/koto-no-category-group.h>
#include <libkoto/koto-meta-group.h>
#include <libkoto/koto-group-store.h>
-#include <libkoto/koto-hint-entry.h>
#include <libkoto/koto-date-parser.h>
#include <libkoto/koto-task.h>
#include <libkoto/koto-task-store.h>
@@ -201,7 +200,7 @@ on_new_clicked (GtkButton *button)
koto_undo_manager_context_end (undo_manager, ctxt);
- koto_hint_entry_clear (KOTO_HINT_ENTRY (new_entry));
+ gtk_entry_set_text (GTK_ENTRY (new_entry), "");
/*
* Select the new task in an idle function so that the store can process the
@@ -220,7 +219,10 @@ on_new_clicked (GtkButton *button)
static void
on_new_entry_changed (GtkEntry *entry, GtkWidget *button)
{
- gtk_widget_set_sensitive (button, ! koto_hint_entry_is_empty (KOTO_HINT_ENTRY (entry)));
+ const char *text;
+
+ text = gtk_entry_get_text (GTK_ENTRY (entry));
+ gtk_widget_set_sensitive (button, strlen (text) > 0);
}
static void
@@ -732,7 +734,8 @@ main (int argc, char **argv)
on_selection_changed (selection, task_action_group);
hbox = gtk_hbox_new (FALSE, 4);
- new_entry = koto_hint_entry_new (_("New task..."));
+ new_entry = gtk_entry_new ();
+ gtk_entry_set_placeholder_text (GTK_ENTRY (new_entry), _("New task..."));
gtk_entry_set_activates_default (GTK_ENTRY (new_entry), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), new_entry, TRUE, TRUE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]