aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/eventedit.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-05-07 00:47:27 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-05-07 00:47:27 +0800
commit9b57702d4d406955ce3ec2e841253ed3efe3bbb8 (patch)
treec2b1ad66aacbc7e4267485c5c34fcc8d0b122c91 /calendar/gui/eventedit.c
parentfc213a4931c274c8f269b21f168c12e728e45bf7 (diff)
downloadgsoc2013-evolution-9b57702d4d406955ce3ec2e841253ed3efe3bbb8.tar
gsoc2013-evolution-9b57702d4d406955ce3ec2e841253ed3efe3bbb8.tar.gz
gsoc2013-evolution-9b57702d4d406955ce3ec2e841253ed3efe3bbb8.tar.bz2
gsoc2013-evolution-9b57702d4d406955ce3ec2e841253ed3efe3bbb8.tar.lz
gsoc2013-evolution-9b57702d4d406955ce3ec2e841253ed3efe3bbb8.tar.xz
gsoc2013-evolution-9b57702d4d406955ce3ec2e841253ed3efe3bbb8.tar.zst
gsoc2013-evolution-9b57702d4d406955ce3ec2e841253ed3efe3bbb8.zip
finish editing event when user hits Return key.
2000-05-06 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c: * gui/e-week-view.c: finish editing event when user hits Return key. (e_week_view_on_text_item_event): stop event signals after doing any other calls, since otherwise it will also stop any other resulting event signals. * gui/e-week-view-event-item.c (e_week_view_event_item_draw): don't draw the start/end times while editing. * gui/eventedit.c: changed the Summary field to a GtkEntry, since we now only want a single line of text. * cal-util/calobj.c (ical_object_normalize_summary): new function to convert the summary field to a single line of text, by converting any sequence of CR & LF characters to a single space. (ical_object_create_from_vobject): call the above function. I think all functions that load iCalObjects go through this. (ical_new): called it here as well just in case. svn path=/trunk/; revision=2827
Diffstat (limited to 'calendar/gui/eventedit.c')
-rw-r--r--calendar/gui/eventedit.c46
1 files changed, 15 insertions, 31 deletions
diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c
index 7ad4afb8cb..f6b14aa67f 100644
--- a/calendar/gui/eventedit.c
+++ b/calendar/gui/eventedit.c
@@ -779,22 +779,8 @@ ee_create_buttons (EventEditor *ee)
return;
}
-/*
- * Load the contents in a delayed fashion, as the GtkText widget needs it
- */
-static void
-ee_fill_summary (GtkWidget *widget, EventEditor *ee)
-{
- int pos = 0;
-
- gtk_editable_insert_text (GTK_EDITABLE (ee->general_summary), ee->ical->summary,
- strlen (ee->ical->summary), &pos);
- gtk_text_thaw (GTK_TEXT (ee->general_summary));
-}
-
enum {
OWNER_LINE,
- DESC_LINE,
SUMMARY_LINE,
TIME_LINE,
ALARM_LINE,
@@ -830,25 +816,23 @@ ee_init_general_page (EventEditor *ee)
gtk_misc_set_alignment (GTK_MISC (ee->general_owner), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), ee->general_owner, TRUE, TRUE, 4);
- l = gtk_label_new (_("Summary:"));
- gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (ee->general_table), l,
- 0, 1, DESC_LINE, DESC_LINE + 1,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK,
- GTK_FILL | GTK_SHRINK,
- 0, 0);
-
- ee->general_summary = gtk_text_new (NULL, NULL);
- gtk_text_freeze (GTK_TEXT (ee->general_summary));
- gtk_signal_connect (GTK_OBJECT (ee->general_summary), "realize",
- GTK_SIGNAL_FUNC (ee_fill_summary), ee);
- gtk_widget_set_usize (ee->general_summary, 0, 60);
- gtk_text_set_editable (GTK_TEXT (ee->general_summary), 1);
- gtk_table_attach (GTK_TABLE (ee->general_table), ee->general_summary,
- 0, 1, SUMMARY_LINE, SUMMARY_LINE+1,
+ hbox = gtk_hbox_new (FALSE, 0);
+ gtk_table_attach (GTK_TABLE (ee->general_table), hbox,
+ 0, 1, SUMMARY_LINE, SUMMARY_LINE + 1,
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
GTK_FILL | GTK_SHRINK,
- 0, 0);
+ 0, 4);
+
+ l = gtk_label_new (_("Summary:"));
+ gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (hbox), l, FALSE, FALSE, 0);
+
+ ee->general_summary = gtk_entry_new ();
+ gtk_entry_set_editable (GTK_ENTRY (ee->general_summary), 1);
+ gtk_entry_set_text (GTK_ENTRY (ee->general_summary),
+ ee->ical->summary ? ee->ical->summary : "");
+ gtk_box_pack_start (GTK_BOX (hbox), ee->general_summary,
+ TRUE, TRUE, 4);
l = ee_alarm_widgets (ee);
gtk_table_attach (GTK_TABLE (ee->general_table), l,