aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-control.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-03 02:44:00 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-03 02:44:00 +0800
commitf8374109ac06f8c0528dcf27f214f26c5d2aaf8d (patch)
tree6f433c6f52d6f71cc54e4852c0866c8982e1ecb8 /calendar/gui/tasks-control.c
parent8c122d342656c0cad8babf4cb26796256b636fb4 (diff)
downloadgsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.gz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.bz2
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.lz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.xz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.zst
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.zip
** Fix for bug #471791 (Move away from asserts to g_ret*)
svn path=/trunk/; revision=34156
Diffstat (limited to 'calendar/gui/tasks-control.c')
-rw-r--r--calendar/gui/tasks-control.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 8a49dacca6..53637048c6 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -153,7 +153,11 @@ sensitize_items(BonoboUIComponent *uic, struct _tasks_sensitize_item *items, gui
while (items->command) {
char command[32];
- g_assert(strlen(items->command)<21);
+ if (strlen(items->command)>=21) {
+ g_warning ("Size more than 21: %s\n", items->command);
+ continue;
+ }
+
sprintf(command, "/commands/%s", items->command);
bonobo_ui_component_set_prop (uic, command, "sensitive",
@@ -193,7 +197,7 @@ tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_s
ECalendarTable *cal_table;
uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
+ g_return_if_fail (uic != NULL);
if (bonobo_ui_component_get_container (uic) == CORBA_OBJECT_NIL)
return;
@@ -265,7 +269,7 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks)
char *xmlfile;
uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
+ g_return_if_fail (uic != NULL);
remote_uih = bonobo_control_get_remote_ui_container (control, NULL);
bonobo_ui_component_set_container (uic, remote_uih, NULL);
@@ -321,7 +325,7 @@ tasks_control_deactivate (BonoboControl *control, ETasks *tasks)
{
BonoboUIComponent *uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
+ g_return_if_fail (uic != NULL);
e_menu_activate ((EMenu *)e_tasks_get_tasks_menu (tasks), uic, 0);
e_tasks_set_ui_component (tasks, NULL);