aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/control-factory.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:49:34 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:49:34 +0800
commit653cfffc0e00dfb59b36813c1b45c53d3f773c65 (patch)
tree9b486d5e383ec1391d60973d9cc548be0ef6d9d5 /calendar/gui/control-factory.c
parent0fb08f3ff81575a4749d851404233f34252dd2f2 (diff)
downloadgsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.gz
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.bz2
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.lz
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.xz
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.tar.zst
gsoc2013-evolution-653cfffc0e00dfb59b36813c1b45c53d3f773c65.zip
Merge new-ui-branch to the trunk.
svn path=/trunk/; revision=22965
Diffstat (limited to 'calendar/gui/control-factory.c')
-rw-r--r--calendar/gui/control-factory.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c
index 191a8d85ea..7adc5e83df 100644
--- a/calendar/gui/control-factory.c
+++ b/calendar/gui/control-factory.c
@@ -69,8 +69,11 @@ get_prop (BonoboPropertyBag *bag,
CORBA_Environment *ev,
gpointer user_data)
{
- GnomeCalendar *gcal = user_data;
+ GnomeCalendar *gcal;
const char *uri;
+ BonoboControl *control = user_data;
+
+ gcal = (GnomeCalendar *) bonobo_control_get_widget (control);
switch (arg_id) {
@@ -96,6 +99,7 @@ get_prop (BonoboPropertyBag *bag,
case GNOME_CAL_LIST_VIEW:
BONOBO_ARG_SET_STRING (arg, "list");
break;
+ default:
}
break;
@@ -104,7 +108,6 @@ get_prop (BonoboPropertyBag *bag,
}
}
-
static void
set_prop (BonoboPropertyBag *bag,
const BonoboArg *arg,
@@ -112,14 +115,19 @@ set_prop (BonoboPropertyBag *bag,
CORBA_Environment *ev,
gpointer user_data)
{
- GnomeCalendar *gcal = user_data;
+ GnomeCalendar *gcal;
char *string;
GnomeCalendarViewType view;
+ BonoboControl *control = user_data;
+
+ gcal = (GnomeCalendar *) bonobo_control_get_widget (control);
switch (arg_id) {
case PROPERTY_CALENDAR_URI_IDX:
string = BONOBO_ARG_GET_STRING (arg);
- if (!gnome_calendar_open (gcal, string)) {
+ if (gnome_calendar_add_event_uri (gcal, string)) {
+ calendar_control_sensitize_calendar_commands (control, gcal, TRUE);
+ } else {
char *msg;
msg = g_strdup_printf (_("Could not open the folder in '%s'"), string);
@@ -161,7 +169,7 @@ calendar_properties_init (GnomeCalendar *gcal, BonoboControl *control)
{
BonoboPropertyBag *pbag;
- pbag = bonobo_property_bag_new (get_prop, set_prop, gcal);
+ pbag = bonobo_property_bag_new (get_prop, set_prop, control);
bonobo_property_bag_add (pbag,
PROPERTY_CALENDAR_URI,