aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-01-24 20:30:38 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:26 +0800
commitfd695a3677d41d145709f69eb2f8335df5178098 (patch)
treec90b60224247981d91221d04136501488433a3f0 /calendar
parent7da22c1960fb1516963429fe9827af2624af7c98 (diff)
downloadgsoc2013-evolution-fd695a3677d41d145709f69eb2f8335df5178098.tar
gsoc2013-evolution-fd695a3677d41d145709f69eb2f8335df5178098.tar.gz
gsoc2013-evolution-fd695a3677d41d145709f69eb2f8335df5178098.tar.bz2
gsoc2013-evolution-fd695a3677d41d145709f69eb2f8335df5178098.tar.lz
gsoc2013-evolution-fd695a3677d41d145709f69eb2f8335df5178098.tar.xz
gsoc2013-evolution-fd695a3677d41d145709f69eb2f8335df5178098.tar.zst
gsoc2013-evolution-fd695a3677d41d145709f69eb2f8335df5178098.zip
Various critical warnings about comp-editor-pages and date edit
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/comp-editor.c26
-rw-r--r--calendar/gui/dialogs/event-page.c9
-rw-r--r--calendar/gui/dialogs/memo-page.c9
-rw-r--r--calendar/gui/dialogs/task-page.c9
-rw-r--r--calendar/gui/dialogs/task-page.ui3
5 files changed, 43 insertions, 13 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index b62e5f2aa8..0115f85a0e 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1419,6 +1419,27 @@ comp_editor_get_property (GObject *object,
}
static void
+unref_page_cb (gpointer editor_page, gpointer comp_editor)
+{
+ if (IS_COMP_EDITOR_PAGE (editor_page)) {
+ GtkWidget *page_widget;
+ CompEditorPage *page = COMP_EDITOR_PAGE (editor_page);
+ CompEditor *editor = COMP_EDITOR (comp_editor);
+
+ g_return_if_fail (page != NULL);
+ g_return_if_fail (editor != NULL);
+
+ page_widget = comp_editor_page_get_widget (page);
+ g_signal_handlers_disconnect_matched (
+ page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
+ }
+
+ g_signal_handlers_disconnect_matched (
+ editor_page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, comp_editor);
+ g_object_unref (editor_page);
+}
+
+static void
comp_editor_dispose (GObject *object)
{
CompEditorPrivate *priv;
@@ -1464,7 +1485,7 @@ comp_editor_dispose (GObject *object)
/* We want to destroy the pages after the widgets get destroyed,
since they have lots of signal handlers connected to the widgets
with the pages as the data. */
- g_list_foreach (priv->pages, (GFunc) g_object_unref, NULL);
+ g_list_foreach (priv->pages, (GFunc) unref_page_cb, object);
g_list_free (priv->pages);
priv->pages = NULL;
@@ -2589,8 +2610,7 @@ page_unmapped_cb (GtkWidget *page_widget,
return;
if (page->accel_group) {
- gtk_window_remove_accel_group (GTK_WINDOW (toplevel),
- page->accel_group);
+ gtk_window_remove_accel_group (GTK_WINDOW (toplevel), page->accel_group);
}
}
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 7595f50915..5bf870e512 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -1107,8 +1107,10 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
g_signal_handlers_block_by_func (gtk_bin_get_child (GTK_BIN (priv->organizer)), organizer_changed_cb, epage);
if (!priv->user_org) {
- gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer))));
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), string);
+ GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer));
+
+ gtk_list_store_clear (GTK_LIST_STORE (model));
+ e_dialog_append_list_store_text (model, 0, string);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE);
} else {
@@ -3206,9 +3208,10 @@ event_page_construct (EventPage *epage,
if (priv->address_strings) {
GList *l;
+ GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer));
for (l = priv->address_strings; l; l = l->next)
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), l->data);
+ e_dialog_append_list_store_text (model, 0, l->data);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 996a4de8a5..414b644d0c 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -270,8 +270,10 @@ memo_page_fill_widgets (CompEditorPage *page,
if (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)) {
gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo))), string);
} else {
- gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo))));
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->org_combo), string);
+ GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo));
+
+ gtk_list_store_clear (GTK_LIST_STORE (model));
+ e_dialog_append_list_store_text (model, 0, string);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->org_combo), 0);
gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->org_combo))), FALSE);
}
@@ -1189,9 +1191,10 @@ memo_page_construct (MemoPage *mpage)
if (priv->address_strings) {
GList *l;
+ GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo));
for (l = priv->address_strings; l; l = l->next)
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->org_combo), l->data);
+ e_dialog_append_list_store_text (model, 0, l->data);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->org_combo), 0);
} else
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 7956b1b5d7..6df7afc9aa 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -729,8 +729,10 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
g_signal_handlers_block_by_func (gtk_bin_get_child (GTK_BIN (priv->organizer)), organizer_changed_cb, tpage);
if (!priv->user_org) {
- gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer))));
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), string);
+ GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer));
+
+ gtk_list_store_clear (GTK_LIST_STORE (model));
+ e_dialog_append_list_store_text (model, 0, string);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE);
} else {
@@ -2086,9 +2088,10 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
if (priv->address_strings) {
GList *l;
+ GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer));
for (l = priv->address_strings; l; l = l->next)
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), l->data);
+ e_dialog_append_list_store_text (model, 0, l->data);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
diff --git a/calendar/gui/dialogs/task-page.ui b/calendar/gui/dialogs/task-page.ui
index 664caadf68..1ca36a12bc 100644
--- a/calendar/gui/dialogs/task-page.ui
+++ b/calendar/gui/dialogs/task-page.ui
@@ -411,7 +411,8 @@
<object class="GtkComboBox" id="organizer">
<property name="visible">True</property>
<property name="model">model1</property>
- <property name="has-entry">TRUE</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
</object>
<packing>
<property name="position">0</property>