aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-07-12 07:46:52 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-07-12 07:46:52 +0800
commit188ec0d0254b5f1e6fa1f98e70f5ad0990184490 (patch)
tree2edc3f1928a6f3ab37474763791e9ca11516270b /calendar/gui/dialogs
parente118c5cdbc09918fc648dd63d6f3c02cdcdfcdc2 (diff)
downloadgsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar
gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar.gz
gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar.bz2
gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar.lz
gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar.xz
gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar.zst
gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.zip
be careful about adding and stripping MAILTO:'s properly
2001-07-11 JP Rosevear <jpr@ximian.com> * gui/dialogs/meeting-page.c: be careful about adding and stripping MAILTO:'s properly * gui/dialogs/meeting-page.etspec: add missing columns * gui/itip-utils.c (itip_strip_mailto): point to the real start of the email address * gui/itip-utils.h: add proto * gui/itip-control-factory.c: get rid of the my address property * gui/e-itip-control.c: use the users real identity to figure out which attendee they are (find_my_address): figure out who the user is among the attendees * gui/e-itip-control.h: remove protos * gui/dialogs/Makefile.am: extra dist etspecs * gui/Makefile.am: ditto svn path=/trunk/; revision=11020
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/Makefile.am3
-rw-r--r--calendar/gui/dialogs/meeting-page.c23
-rw-r--r--calendar/gui/dialogs/meeting-page.etspec12
3 files changed, 21 insertions, 17 deletions
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index cee0600243..bb0778162b 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -75,4 +75,5 @@ etspecdir = $(datadir)/evolution/etspec/
etspec_DATA = meeting-page.etspec
EXTRA_DIST = \
- $(glade_DATA)
+ $(glade_DATA) \
+ $(etspec_DATA)
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index 1504c48968..b4e5732e11 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -305,7 +305,7 @@ clear_widgets (MeetingPage *mpage)
priv->other = FALSE;
}
-/* fill_widgets handler for the task page */
+/* fill_widgets handler for the meeting page */
static void
meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
{
@@ -335,8 +335,9 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
}
gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), priv->address_strings);
- if (organizer.value != NULL) {
- gchar *s = e_utf8_to_gtk_string (priv->existing_organizer, organizer.value);
+ if (organizer.value != NULL) {
+ const gchar *strip = itip_strip_mailto (organizer.value);
+ gchar *s = e_utf8_to_gtk_string (priv->existing_organizer, strip);
gtk_widget_hide (priv->organizer_table);
gtk_widget_show (priv->existing_organizer_table);
@@ -344,7 +345,7 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
gtk_label_set_text (GTK_LABEL (priv->existing_organizer), s);
g_free (s);
-
+
priv->existing = TRUE;
} else {
gtk_widget_hide (priv->other_organizer_lbl);
@@ -387,7 +388,7 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
priv->updating = FALSE;
}
-/* fill_component handler for the task page */
+/* fill_component handler for the meeting page */
static void
meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
{
@@ -448,8 +449,8 @@ meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
att->role = attendee->role;
att->status = attendee->status;
att->rsvp = attendee->rsvp;
- att->delto = attendee->delto;
- att->delfrom = attendee->delfrom;
+ att->delto = (attendee->delto && *attendee->delto) ? attendee->delto : NULL;
+ att->delfrom = (attendee->delfrom && *attendee->delfrom) ? attendee->delfrom : NULL;
att->sentby = attendee->sentby;
att->cn = (attendee->cn && *attendee->cn) ? attendee->cn : NULL;
att->language = (attendee->language && *attendee->language) ? attendee->language : NULL;
@@ -844,7 +845,7 @@ append_row (ETableModel *etm, ETableModel *model, int row, void *data)
attendee = g_new0 (struct attendee, 1);
- attendee->address = g_strdup (e_table_model_value_at (model, MEETING_ATTENDEE_COL, row));
+ attendee->address = g_strdup_printf ("MAILTO:%s", e_table_model_value_at (model, MEETING_ATTENDEE_COL, row));
attendee->member = g_strdup (e_table_model_value_at (model, MEETING_MEMBER_COL, row));
attendee->cutype = text_to_type (e_table_model_value_at (model, MEETING_TYPE_COL, row));
attendee->role = text_to_role (e_table_model_value_at (model, MEETING_ROLE_COL, row));
@@ -878,7 +879,7 @@ value_at (ETableModel *etm, int col, int row, void *data)
switch (col) {
case MEETING_ATTENDEE_COL:
- return attendee->address;
+ return itip_strip_mailto (attendee->address);
case MEETING_MEMBER_COL:
return attendee->member;
case MEETING_TYPE_COL:
@@ -918,7 +919,7 @@ set_value_at (ETableModel *etm, int col, int row, const void *val, void *data)
case MEETING_ATTENDEE_COL:
if (attendee->address)
g_free (attendee->address);
- attendee->address = g_strdup (val);
+ attendee->address = g_strdup_printf ("MAILTO:%s", val);
break;
case MEETING_MEMBER_COL:
if (attendee->member)
@@ -1014,7 +1015,7 @@ init_value (ETableModel *etm, int col, void *data)
case MEETING_CN_COL:
return g_strdup ("");
case MEETING_LANG_COL:
- return g_strdup ("English");
+ return g_strdup ("en");
}
return g_strdup ("");
diff --git a/calendar/gui/dialogs/meeting-page.etspec b/calendar/gui/dialogs/meeting-page.etspec
index 7ab7d8995c..da49873e61 100644
--- a/calendar/gui/dialogs/meeting-page.etspec
+++ b/calendar/gui/dialogs/meeting-page.etspec
@@ -4,16 +4,18 @@
<ETableColumn model_col= "2" _title="Type" expansion="1.0" minimum_width="10" resizable="true" cell="typeedit" compare="string"/>
<ETableColumn model_col= "3" _title="Role" expansion="1.0" minimum_width="10" resizable="true" cell="roleedit" compare="string"/>
<ETableColumn model_col= "4" _title="RSVP" expansion="1.0" minimum_width="10" resizable="true" cell="rsvpedit" compare="string"/>
- <ETableColumn model_col= "5" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="statusedit" compare="string"/>
- <ETableColumn model_col= "6" _title="Common Name" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "7" _title="Language" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
+ <ETableColumn model_col= "5" _title="Delegated To" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
+ <ETableColumn model_col= "6" _title="Delegated From" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
+ <ETableColumn model_col= "7" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="statusedit" compare="string"/>
+ <ETableColumn model_col= "8" _title="Common Name" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
+ <ETableColumn model_col= "9" _title="Language" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
<ETableState>
<column source="0"/>
<column source="2"/>
<column source="3"/>
<column source="4"/>
- <column source="5"/>
+ <column source="7"/>
<grouping></grouping>
</ETableState>
-</ETableSpecification> \ No newline at end of file
+</ETableSpecification>