aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-10-23 02:49:30 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-10-23 02:49:30 +0800
commitb37af8f269484ebd836996c140ea718885954ca3 (patch)
tree8ed883fcc7c60b5200be9438514902accd991cd1 /plugins/itip-formatter
parent16af69fb17d52a18b0c308e8ed137f71d2dba1fa (diff)
downloadgsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.gz
gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.zst
gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.zip
** Fixes part of bug #417999
2007-10-22 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #417999 * addressbook/gui/contact-editor/contact-editor.glade: * addressbook/gui/contact-editor/e-contact-editor.c: * addressbook/gui/contact-editor/e-contact-quick-add.c: * addressbook/gui/contact-list-editor/contact-list-editor.c: * addressbook/gui/contact-list-editor/contact-list-editor.glade: * calendar/gui/dialogs/event-page.c: * calendar/gui/dialogs/event-page.glade: * calendar/gui/dialogs/memo-page.c: * calendar/gui/dialogs/memo-page.glade: * calendar/gui/dialogs/task-page.c: * calendar/gui/dialogs/task-page.glade: * calendar/gui/e-itip-control.c: * plugins/bbdb/bbdb.c: * plugins/bbdb/gaimbuddies.c: * plugins/itip-formatter/itip-view.c: * widgets/misc/e-pilot-settings.c: Use ESourceComboBox instead of ESourceOptionMenu (deprecated). svn path=/trunk/; revision=34408
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r--plugins/itip-formatter/ChangeLog7
-rw-r--r--plugins/itip-formatter/itip-formatter.c1
-rw-r--r--plugins/itip-formatter/itip-view.c60
3 files changed, 40 insertions, 28 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog
index b453e46dcd..5aed2a1f68 100644
--- a/plugins/itip-formatter/ChangeLog
+++ b/plugins/itip-formatter/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #417999
+
+ * itip-view.c:
+ Use ESourceComboBox instead of ESourceOptionMenu (deprecated).
+
2007-10-04 Milan Crha <mcrha@redhat.com>
** Fix for bug #331578
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 952f45a622..e44740ff6e 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -40,7 +40,6 @@
#include <camel/camel-store.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-time-util.h>
-#include <libedataserverui/e-source-option-menu.h>
#include <libedataserverui/e-source-selector.h>
#include <gtkhtml/gtkhtml-embedded.h>
#include <mail/em-format-hook.h>
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index acc4f50fb2..f6e2e06855 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -35,7 +35,7 @@
#include <camel/camel-mime-message.h>
#include <libedataserver/e-time-utils.h>
#include <libedataserver/e-data-server-util.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-time-util.h>
#include <gtkhtml/gtkhtml-embedded.h>
@@ -105,8 +105,8 @@ struct _ItipViewPrivate {
char *description;
GtkWidget *selector_box;
- GtkWidget *esom;
- GtkWidget *esom_header;
+ GtkWidget *escb;
+ GtkWidget *escb_header;
ESourceList *source_list;
GtkWidget *rsvp_box;
@@ -1791,10 +1791,12 @@ itip_view_clear_lower_info_items (ItipView *view)
}
static void
-source_selected_cb (ESourceOptionMenu *esom, ESource *source, gpointer data)
+source_changed_cb (ESourceComboBox *escb, ItipView *view)
{
- ItipView *view = data;
-
+ ESource *source;
+
+ source = e_source_combo_box_get_active (escb);
+
g_signal_emit (view, signals[SOURCE_SELECTED], 0, source);
}
@@ -1811,40 +1813,42 @@ itip_view_set_source_list (ItipView *view, ESourceList *source_list)
if (priv->source_list)
g_object_unref (priv->source_list);
- if (priv->esom)
- gtk_widget_destroy (priv->esom);
+ if (priv->escb)
+ gtk_widget_destroy (priv->escb);
if (!source_list) {
- if (priv->esom_header)
- gtk_widget_destroy (priv->esom_header);
+ if (priv->escb_header)
+ gtk_widget_destroy (priv->escb_header);
priv->source_list = NULL;
- priv->esom = NULL;
- priv->esom_header = NULL;
+ priv->escb = NULL;
+ priv->escb_header = NULL;
return;
}
priv->source_list = g_object_ref (source_list);
- priv->esom = e_source_option_menu_new (source_list);
- gtk_widget_show (priv->esom);
- g_signal_connect (priv->esom, "source_selected", G_CALLBACK (source_selected_cb), view);
+ priv->escb = e_source_combo_box_new (source_list);
+ gtk_widget_show (priv->escb);
+ g_signal_connect (
+ priv->escb, "changed",
+ G_CALLBACK (source_changed_cb), view);
- if (!priv->esom_header) {
+ if (!priv->escb_header) {
if (priv->type == E_CAL_SOURCE_TYPE_EVENT)
- priv->esom_header = gtk_label_new_with_mnemonic (_("_Calendar:"));
+ priv->escb_header = gtk_label_new_with_mnemonic (_("_Calendar:"));
else if (priv->type == E_CAL_SOURCE_TYPE_TODO)
- priv->esom_header = gtk_label_new_with_mnemonic (_("_Tasks :"));
+ priv->escb_header = gtk_label_new_with_mnemonic (_("_Tasks :"));
else if (priv->type == E_CAL_SOURCE_TYPE_JOURNAL)
- priv->esom_header = gtk_label_new_with_mnemonic (_("Memos :"));
+ priv->escb_header = gtk_label_new_with_mnemonic (_("Memos :"));
- gtk_label_set_mnemonic_widget (GTK_LABEL (priv->esom_header), priv->esom);
- gtk_widget_show (priv->esom_header);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (priv->escb_header), priv->escb);
+ gtk_widget_show (priv->escb_header);
}
- gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->esom_header, FALSE, TRUE, 6);
- gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->esom, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->escb_header, FALSE, TRUE, 6);
+ gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->escb, FALSE, TRUE, 0);
}
ESourceList *
@@ -1870,10 +1874,11 @@ itip_view_set_source (ItipView *view, ESource *source)
priv = view->priv;
- if (!priv->esom)
+ if (!priv->escb)
return;
- e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->esom), source);
+ e_source_combo_box_set_active (
+ E_SOURCE_COMBO_BOX (priv->escb), source);
}
ESource *
@@ -1886,10 +1891,11 @@ itip_view_get_source (ItipView *view)
priv = view->priv;
- if (!priv->esom)
+ if (!priv->escb)
return NULL;
- return e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (priv->esom));
+ return e_source_combo_box_get_active (
+ E_SOURCE_COMBO_BOX (priv->escb));
}
void