[evolution-jescs] Remove EConfigListener, replace E_ICON_* with GTK_ICON_*, fix a few warnings and
- From: Jedy Jedy Wang <jedywang src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-jescs] Remove EConfigListener, replace E_ICON_* with GTK_ICON_*, fix a few warnings and
- Date: Fri, 24 Jul 2009 08:39:32 +0000 (UTC)
commit 76a89680815183182fbabd4e286c9395fbdd08f1
Author: Jedy Wang <jedy wang sun com>
Date: Fri Jul 24 16:36:45 2009 +0800
Remove EConfigListener, replace E_ICON_* with GTK_ICON_*, fix a few warnings and
bump to 2.27.1.
calendar/cal-backend-wcap-events.c | 2 +-
calendar/cal-backend-wcap-tasks.c | 2 +-
calendar/cal-backend-wcap.c | 4 ++--
configure.in | 2 +-
storage/sunone-folder-tree.c | 6 ++++--
storage/sunone-invitation-list-model.c | 23 +++++++++++++----------
storage/sunone-invitation-list-model.h | 1 -
storage/sunone-invitation-list.c | 18 +++++++++++-------
storage/sunone-invitation-list.h | 1 -
9 files changed, 33 insertions(+), 26 deletions(-)
---
diff --git a/calendar/cal-backend-wcap-events.c b/calendar/cal-backend-wcap-events.c
index 733242e..fd4d721 100644
--- a/calendar/cal-backend-wcap-events.c
+++ b/calendar/cal-backend-wcap-events.c
@@ -160,7 +160,7 @@ process_events_component_to_server (CalBackendWCAP *wcap, ECalComponent *comp, g
icalcomponent *icalcomp;
icalproperty *prop;
icaltimezone *zone = NULL, *old_zone = NULL;
- char *location = NULL;
+ const char *location = NULL;
if (allday)
*allday = FALSE;
diff --git a/calendar/cal-backend-wcap-tasks.c b/calendar/cal-backend-wcap-tasks.c
index 729690d..abb8cf0 100644
--- a/calendar/cal-backend-wcap-tasks.c
+++ b/calendar/cal-backend-wcap-tasks.c
@@ -33,7 +33,7 @@ process_tasks_component_to_server (CalBackendWCAP *wcap, ECalComponent *comp, gb
icalcomponent *icalcomp;
icalproperty *prop;
icaltimezone *zone = NULL, *old_zone = NULL;
- char *location = NULL;
+ const char *location = NULL;
/* Every task has a start time */
e_cal_component_get_dtstart (comp, &dt);
diff --git a/calendar/cal-backend-wcap.c b/calendar/cal-backend-wcap.c
index 384f26a..142c402 100644
--- a/calendar/cal-backend-wcap.c
+++ b/calendar/cal-backend-wcap.c
@@ -2172,7 +2172,7 @@ add_timezone (CalBackendWCAP *wcap, icalcomponent *icalcomp)
icaltimezone *zone;
icalcomponent *clone, *vcomp;
icalproperty *prop;
- char *tzid;
+ const char *tzid;
zone = icaltimezone_new ();
clone = icalcomponent_new_clone (icalcomp);
@@ -2217,7 +2217,7 @@ add_timezone (CalBackendWCAP *wcap, icalcomponent *icalcomp)
return GNOME_Evolution_Calendar_ObjectIdAlreadyExists;
}
- g_hash_table_insert (priv->timezones, tzid, zone);
+ g_hash_table_insert (priv->timezones, (gpointer)tzid, zone);
return GNOME_Evolution_Calendar_Success;
}
diff --git a/configure.in b/configure.in
index bf32031..33fc0be 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT(evolution-jescs, 2.27.0, http://bugzilla.gnome.org/enter_bug.cgi?product=evolution-jescs)
+AC_INIT(evolution-jescs, 2.27.1, http://bugzilla.gnome.org/enter_bug.cgi?product=evolution-jescs)
AC_CONFIG_SRCDIR(README)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_INIT_AUTOMAKE([foreign])
diff --git a/storage/sunone-folder-tree.c b/storage/sunone-folder-tree.c
index 5ae78ee..5c884a7 100644
--- a/storage/sunone-folder-tree.c
+++ b/storage/sunone-folder-tree.c
@@ -598,8 +598,10 @@ static void render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
char *folder_type;
if (!initialised) {
- folder_icons[FOLDER_ICON_NORMAL] = e_icon_factory_get_icon ("stock_normal", E_ICON_SIZE_MENU);
- folder_icons[FOLDER_ICON_INVITATION] = e_icon_factory_get_icon ("stock_new-meeting", E_ICON_SIZE_MENU);
+ folder_icons[FOLDER_ICON_NORMAL] = e_icon_factory_get_icon ("stock_normal",
+ GTK_ICON_SIZE_MENU);
+ folder_icons[FOLDER_ICON_INVITATION] = e_icon_factory_get_icon ("stock_new-meeting",
+ GTK_ICON_SIZE_MENU);
initialised = TRUE;
}
diff --git a/storage/sunone-invitation-list-model.c b/storage/sunone-invitation-list-model.c
index d93d68f..b36997f 100644
--- a/storage/sunone-invitation-list-model.c
+++ b/storage/sunone-invitation-list-model.c
@@ -37,7 +37,7 @@ struct _SunOneInvitationListModelPrivate {
SunOneConnection *so_cnc;
GHashTable *invitations;
GList *invitations_list;
- EConfigListener *config;
+ GConfClient *client;
gint timeout_id;
gint stamp;
char *uri;
@@ -79,13 +79,12 @@ sunone_invitation_list_model_class_init (SunOneInvitationListModelClass *klass)
}
static void
-key_changed_cb (EConfigListener *listener, const char *key, void *data)
+key_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer data)
{
SunOneInvitationListModel *model = SUNONE_INVITATION_LIST_MODEL (data);
- SunOneInvitationListModelPrivate *priv = model->priv;
char *location;
- location = e_config_listener_get_string_with_default (priv->config, "/apps/evolution/calendar/display/timezone", "UTC", NULL);
+ location = gconf_client_get_string (client, "/apps/evolution/calendar/display/timezone", NULL);
model->zone = icaltimezone_get_builtin_timezone (location);
g_free (location);
@@ -108,12 +107,16 @@ sunone_invitation_list_model_init (SunOneInvitationListModel *object)
priv->stamp = g_random_int ();
priv->invitations = g_hash_table_new (g_str_hash, g_str_equal);
priv->invitations_list = NULL;
- priv->config = e_config_listener_new ();
- g_signal_connect (G_OBJECT (priv->config), "key_changed", G_CALLBACK (key_changed_cb), model);
+ priv->client = gconf_client_get_default ();
+ gconf_client_notify_add (priv->client,
+ "/apps/evolution/calendar/display/timezone",
+ key_changed_cb, model,
+ NULL, NULL);
priv->timeout_id = -1;
model->account = NULL;
- location = e_config_listener_get_string_with_default (priv->config, "/apps/evolution/calendar/display/timezone", "UTC", NULL);
+ location = gconf_client_get_string (priv->client,
+ "/apps/evolution/calendar/display/timezone", NULL);
model->zone = icaltimezone_get_builtin_timezone (location);
g_free (location);
@@ -151,9 +154,9 @@ sunone_invitation_list_model_dispose (GObject *object)
priv->calid = NULL;
}
- if (priv->config) {
- g_object_unref (G_OBJECT (priv->config));
- priv->config = NULL;
+ if (priv->client) {
+ g_object_unref (G_OBJECT (priv->client));
+ priv->client = NULL;
}
if (priv->timeout_id != -1) {
diff --git a/storage/sunone-invitation-list-model.h b/storage/sunone-invitation-list-model.h
index 2331a77..72bb842 100644
--- a/storage/sunone-invitation-list-model.h
+++ b/storage/sunone-invitation-list-model.h
@@ -16,7 +16,6 @@
#include <gtk/gtk.h>
#include <bonobo/bonobo-generic-factory.h>
#include <glade/glade-xml.h>
-#include <e-util/e-config-listener.h>
#include <libecal/e-cal-component.h>
#include "lib/sunone-connection.h"
#include "sunone-account.h"
diff --git a/storage/sunone-invitation-list.c b/storage/sunone-invitation-list.c
index f0441ae..ae4c1fd 100644
--- a/storage/sunone-invitation-list.c
+++ b/storage/sunone-invitation-list.c
@@ -40,7 +40,7 @@
#define USE_ITIP_VIEW 0
struct _SunOneInvitationListPrivate {
- EConfigListener *config;
+ GConfClient *client;
SunOneInvitationListModel *model;
@@ -78,7 +78,7 @@ sunone_invitation_list_init (SunOneInvitationList *object)
list->priv = g_new0 (SunOneInvitationListPrivate, 1);
priv = list->priv;
- priv->config = e_config_listener_new ();
+ priv->client = gconf_client_get_default ();
priv->model = NULL;
priv->treeview = NULL;
priv->pane = gtk_vpaned_new ();
@@ -101,7 +101,9 @@ sunone_invitation_list_init (SunOneInvitationList *object)
gtk_paned_add2 (GTK_PANED (priv->pane), GTK_WIDGET (scroll));
- pos = e_config_listener_get_long_with_default (priv->config, "/apps/evolution/evolution-jescs/invitationList/panePosition", 100, NULL);
+ pos = gconf_client_get_int (priv->client,
+ "/apps/evolution/evolution-jescs/invitationList/panePosition",
+ NULL);
gtk_paned_set_position (GTK_PANED (priv->pane), pos);
gtk_box_pack_start (GTK_BOX (list), priv->pane, TRUE, TRUE, 0);
@@ -116,12 +118,14 @@ sunone_invitation_list_destroy (GtkObject *object)
g_return_if_fail (IS_SUNONE_INVITATION_LIST (list));
if (priv) {
- if (priv->config) {
+ if (priv->client) {
int pos = gtk_paned_get_position (GTK_PANED (priv->pane));
- e_config_listener_set_long (priv->config, "/apps/evolution/evolution-jescs/invitationList/panePosition", pos);
- g_object_unref (G_OBJECT (priv->config));
- priv->config = NULL;
+ gconf_client_set_int (priv->client,
+ "/apps/evolution/evolution-jescs/invitationList/panePosition",
+ pos, NULL);
+ g_object_unref (G_OBJECT (priv->client));
+ priv->client = NULL;
}
if (priv->model) {
/* Don't listen to model updates any more */
diff --git a/storage/sunone-invitation-list.h b/storage/sunone-invitation-list.h
index 6042f84..8e1b396 100644
--- a/storage/sunone-invitation-list.h
+++ b/storage/sunone-invitation-list.h
@@ -16,7 +16,6 @@
#include <gtk/gtkvbox.h>
#include <bonobo/bonobo-generic-factory.h>
#include <glade/glade-xml.h>
-#include <e-util/e-config-listener.h>
#include <lib/sunone-connection.h>
#include "sunone-invitation-list-model.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]