aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJesse Pavel <jpavel@src.gnome.org>2000-11-09 07:27:06 +0800
committerJesse Pavel <jpavel@src.gnome.org>2000-11-09 07:27:06 +0800
commit8cda86512ba503a030204855fade1415ac06a614 (patch)
tree49ea665e4482015b4b5c340499979894206a7c88 /calendar
parentd6fade43cf3eb5fcf722b3a01342705fc312bd79 (diff)
downloadgsoc2013-evolution-8cda86512ba503a030204855fade1415ac06a614.tar.gz
gsoc2013-evolution-8cda86512ba503a030204855fade1415ac06a614.tar.zst
gsoc2013-evolution-8cda86512ba503a030204855fade1415ac06a614.zip
updated the GUI to allow the user to add PUBLISHed events to his calendar,
* gui/e-itip-control.c, gui/e-itip-control.glade: updated the GUI to allow the user to add PUBLISHed events to his calendar, and created unworking buttons for meeting requests. svn path=/trunk/; revision=6518
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/e-itip-control.c70
-rw-r--r--calendar/gui/e-itip-control.glade76
3 files changed, 125 insertions, 27 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 9e3ac57452..558cb4c66f 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-08 Jesse Pavel <jpavel@helixcode.com>
+
+ * gui/e-itip-control.c, gui/e-itip-control.glade: updated the GUI
+ to allow the user to add PUBLISHed events to his calendar, and created
+ unworking buttons for meeting requests.
+
2000-11-08 Federico Mena Quintero <federico@helixcode.com>
These changes fix bugzilla bugs #874 and #875.
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index b28ee1a2b1..93825513dd 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -21,8 +21,8 @@
#include <cal-client/cal-client.h>
-#define DEFAULT_WIDTH 450
-#define DEFAULT_HEIGHT 350
+#define DEFAULT_WIDTH 400
+#define DEFAULT_HEIGHT 300
extern gchar *evolution_dir;
@@ -33,6 +33,7 @@ struct _EItipControlPrivate {
GtkWidget *main_frame;
GtkWidget *organizer_entry, *dtstart_label, *dtend_label;
GtkWidget *summary_entry, *description_box, *message_text;
+ GtkWidget *button_box;
GtkWidget *address_entry;
GtkWidget *add_button;
GtkWidget *loading_window;
@@ -64,7 +65,7 @@ get_icalparam_by_type (icalproperty *prop, icalparameter_kind kind)
/********
* find_attendee() searches through the attendee properties of `comp'
- * and returns the one whose value is the same as `address' if such
+ * and returns the one the value of which is the same as `address' if such
* a property exists. Otherwise, it will return NULL.
********/
static icalproperty *
@@ -132,11 +133,21 @@ itip_control_destroy_cb (GtkObject *object,
static void
itip_control_size_request_cb (GtkWidget *widget, GtkRequisition *requisition)
{
+
+ /* gtk_widget_set (GTK_WIDGET (widget), "width", DEFAULT_WIDTH, NULL); */
+ /* gtk_widget_set (GTK_WIDGET (widget), "height", DEFAULT_HEIGHT, NULL); */
requisition->width = DEFAULT_WIDTH;
requisition->height = DEFAULT_HEIGHT;
}
static void
+itip_control_size_allocation_cb (GtkWidget *widget, GtkRequisition *requisition)
+{
+ widget->requisition.height = requisition->height;
+ widget->requisition.width = requisition->width;
+}
+
+static void
cal_loaded_cb (GtkObject *object, CalClientGetStatus status, gpointer data)
{
CalClient *client = CAL_CLIENT (object);
@@ -155,7 +166,7 @@ cal_loaded_cb (GtkObject *object, CalClientGetStatus status, gpointer data)
/* We have success. */
GtkWidget *dialog;
- dialog = gnome_ok_dialog("Component successfully added.");
+ dialog = gnome_ok_dialog("Component successfully updated.");
gnome_dialog_run (GNOME_DIALOG(dialog));
}
}
@@ -287,6 +298,26 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
priv->comp = icalcomponent_get_first_component (priv->main_comp,
ICAL_ANY_COMPONENT);
+
+#if 0
+ {
+ FILE *fp;
+
+ fp = fopen ("evo.debug", "w");
+
+ fputs ("The raw vCalendar data:\n\n", fp);
+ fputs (priv->vcalendar, fp);
+
+ fputs ("The main component:\n\n", fp);
+ fputs (icalcomponent_as_ical_string (priv->main_comp), fp);
+
+ fputs ("The child component:\n\n", fp);
+ fputs (icalcomponent_as_ical_string (priv->comp), fp);
+
+ fclose (fp);
+ }
+#endif
+
if (priv->comp == NULL) {
g_printerr ("e-itip-control.c: I could not extract a proper component from\n"
" the vCalendar data.\n");
@@ -392,11 +423,23 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
prop = icalcomponent_get_first_property (priv->main_comp, ICAL_METHOD_PROPERTY);
switch (icalproperty_get_method (prop)) {
case ICAL_METHOD_PUBLISH:
+ {
+ GtkWidget *button;
+
sprintf (message, "%s has published calendar information, "
- "which you can add to your own calendar."
+ "which you can add to your own calendar. "
"No reply is necessary.",
priv->from_address);
+
+ button = gtk_button_new_with_label ("Add to Calendar");
+ gtk_box_pack_start (GTK_BOX (priv->button_box), button, FALSE, FALSE, 3);
+ gtk_widget_show (button);
+
+ gtk_signal_connect (GTK_OBJECT (button), "clicked",
+ GTK_SIGNAL_FUNC (add_button_clicked_cb), priv);
+
break;
+ }
case ICAL_METHOD_REQUEST:
{
/* I'll check if I have to rsvp. */
@@ -419,6 +462,22 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
(priv->organizer ? priv->organizer : "an unknown person"),
(rsvp ? "should" : "don't have to") );
+ if (rsvp) {
+ GtkWidget *accept_button, *decline_button, *tentative_button;
+
+ accept_button = gtk_button_new_with_label ("Accept");
+ decline_button = gtk_button_new_with_label ("Decline");
+ tentative_button = gtk_button_new_with_label ("Tentative");
+
+ gtk_box_pack_start (GTK_BOX (priv->button_box), accept_button, FALSE, FALSE, 3);
+ gtk_box_pack_start (GTK_BOX (priv->button_box), decline_button, FALSE, FALSE, 3);
+ gtk_box_pack_start (GTK_BOX (priv->button_box), tentative_button, FALSE, FALSE, 3);
+
+ gtk_widget_show (accept_button);
+ gtk_widget_show (decline_button);
+ gtk_widget_show (tentative_button);
+ }
+
}
break;
default:
@@ -540,6 +599,7 @@ e_itip_control_factory (BonoboGenericFactory *Factory, void *closure)
priv->summary_entry = glade_xml_get_widget (priv->xml, "summary_entry");
priv->description_box = glade_xml_get_widget (priv->xml, "description_box");
/* priv->add_button = glade_xml_get_widget (priv->xml, "add_button"); */
+ priv->button_box = glade_xml_get_widget (priv->xml, "button_box");
priv->address_entry = glade_xml_get_widget (priv->xml, "address_entry");
priv->message_text = glade_xml_get_widget (priv->xml, "message_text");
diff --git a/calendar/gui/e-itip-control.glade b/calendar/gui/e-itip-control.glade
index 6233f7b409..481874368a 100644
--- a/calendar/gui/e-itip-control.glade
+++ b/calendar/gui/e-itip-control.glade
@@ -381,42 +381,74 @@
</widget>
<widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow3</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <class>GtkHBox</class>
+ <name>hbox3</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
- <fill>True</fill>
+ <fill>False</fill>
</child>
<widget>
- <class>GtkText</class>
- <name>message_text</name>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow3</name>
+ <border_width>3</border_width>
+ <width>365</width>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>message_text</name>
+ <can_focus>True</can_focus>
+ <editable>False</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label12</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>False</fill>
+ </child>
</widget>
</widget>
<widget>
- <class>GtkHButtonBox</class>
+ <class>GtkHBox</class>
<name>button_box</name>
- <height>35</height>
- <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
- <spacing>30</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
+ <border_width>3</border_width>
+ <height>30</height>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
<child>
<padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
</widget>
</widget>
</widget>