aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-component.c41
-rw-r--r--calendar/gui/calendar-component.h2
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c13
-rw-r--r--calendar/gui/main.c3
4 files changed, 25 insertions, 34 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 50eadcc55a..9b66753dc3 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -575,24 +575,6 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
return CORBA_TRUE;
}
-static void
-init_calendar_publishing (CalendarComponent *calendar_component)
-{
- guint idle_id = 0;
- CalendarComponentPrivate *priv;
-
- priv = calendar_component->priv;
-
- gconf_client_add_dir (priv->gconf_client, CALENDAR_CONFIG_PUBLISH, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- priv->gconf_notify_id
- = gconf_client_notify_add (priv->gconf_client, CALENDAR_CONFIG_PUBLISH,
- (GConfClientNotifyFunc) conf_changed_callback, NULL,
- NULL, NULL);
-
- idle_id = g_idle_add ((GSourceFunc) init_calendar_publishing_cb, GINT_TO_POINTER (idle_id));
-}
-
static gboolean
selector_tree_drag_drop (GtkWidget *widget,
GdkDragContext *context,
@@ -874,9 +856,6 @@ impl_createControls (PortableServer_Servant servant,
e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget));
gtk_widget_show (statusbar_widget);
statusbar_control = bonobo_control_new (statusbar_widget);
-
- /* Initialize Calendar Publishing */
- init_calendar_publishing (calendar_component);
/* connect after setting the initial selections, or we'll get unwanted calls
to calendar_control_sensitize_calendar_commands */
@@ -1215,5 +1194,25 @@ calendar_component_peek_activity_handler (CalendarComponent *component)
return component->priv->activity_handler;
}
+void
+calendar_component_init_publishing (void)
+{
+ guint idle_id = 0;
+ CalendarComponent *calendar_component;
+ CalendarComponentPrivate *priv;
+
+ calendar_component = calendar_component_peek ();
+
+ priv = calendar_component->priv;
+
+ gconf_client_add_dir (priv->gconf_client, CALENDAR_CONFIG_PUBLISH, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+
+ priv->gconf_notify_id
+ = gconf_client_notify_add (priv->gconf_client, CALENDAR_CONFIG_PUBLISH,
+ (GConfClientNotifyFunc) conf_changed_callback, NULL,
+ NULL, NULL);
+
+ idle_id = g_idle_add ((GSourceFunc) init_calendar_publishing_cb, GINT_TO_POINTER (idle_id));
+}
BONOBO_TYPE_FUNC_FULL (CalendarComponent, GNOME_Evolution_Component, PARENT_TYPE, calendar_component)
diff --git a/calendar/gui/calendar-component.h b/calendar/gui/calendar-component.h
index 04672c1122..c0ce1ca80b 100644
--- a/calendar/gui/calendar-component.h
+++ b/calendar/gui/calendar-component.h
@@ -66,5 +66,7 @@ ESourceList *calendar_component_peek_source_list (CalendarComponent *
ESourceSelector *calendar_component_peek_source_selector (CalendarComponent *component);
EActivityHandler *calendar_component_peek_activity_handler (CalendarComponent *component);
+void calendar_component_init_publishing (void);
+
#endif /* _CALENDAR_COMPONENT_H_ */
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 0a6d703cd4..631aedeab1 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -363,8 +363,6 @@ url_list_changed (DialogData *dialog_data)
if ((xml = e_pub_uri_to_xml (url)))
url_list = g_slist_append (url_list, xml);
- g_free (url);
-
valid = gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter);
}
@@ -586,12 +584,6 @@ init_widgets (DialogData *dialog_data)
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
gtk_tree_view_set_headers_visible ((GtkTreeView *) dialog_data->url_list, TRUE);
-
- g_signal_connect (gtk_tree_view_get_selection (dialog_data->url_list),
- "changed",
- G_CALLBACK (cal_prefs_dialog_url_list_change),
- dialog_data);
-
g_signal_connect (dialog_data->url_list, "row-activated",
G_CALLBACK (cal_prefs_dialog_url_list_double_click),
dialog_data);
@@ -641,7 +633,6 @@ cal_prefs_dialog_url_add_clicked (GtkWidget *button, DialogData *dialog_data)
-1);
url_list_changed (dialog_data);
- show_fb_config (dialog_data);
if (!GTK_WIDGET_SENSITIVE ((GtkWidget *) dialog_data->url_remove)) {
selection = gtk_tree_view_get_selection ((GtkTreeView *) dialog_data->url_list);
@@ -687,7 +678,6 @@ cal_prefs_dialog_url_edit_clicked (GtkWidget *button, DialogData *dialog_data)
-1);
url_list_changed (dialog_data);
- show_fb_config (dialog_data);
if (!GTK_WIDGET_SENSITIVE ((GtkWidget *) dialog_data->url_remove)) {
selection = gtk_tree_view_get_selection ((GtkTreeView *) dialog_data->url_list);
@@ -760,7 +750,6 @@ cal_prefs_dialog_url_remove_clicked (GtkWidget *button, DialogData *dialog_data)
}
g_free (url);
url_list_changed (dialog_data);
- show_fb_config (dialog_data);
}
}
@@ -789,7 +778,6 @@ cal_prefs_dialog_url_enable_clicked (GtkWidget *button, DialogData *dialog_data)
url->enabled ? _("Disable") : _("Enable"));
url_list_changed (dialog_data);
- show_fb_config (dialog_data);
}
}
@@ -823,7 +811,6 @@ cal_prefs_dialog_url_list_enable_toggled (GtkCellRendererToggle *renderer,
url->enabled ? _("Disable") : _("Enable"));
url_list_changed (dialog_data);
- show_fb_config (dialog_data);
}
gtk_tree_path_free (path);
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 5441a140fa..80077d49a7 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -140,6 +140,9 @@ initialize (void)
#endif
launch_alarm_daemon ();
+
+ /* Initialize Calendar Publishing */
+ calendar_component_init_publishing ();
}