aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-06 18:48:35 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-06 18:48:35 +0800
commit01044271e5c892367d6b51680ca63cec154d42f9 (patch)
treef1d0656578d88c2fd9c5a0f0fa1f2876a56ca784 /addressbook/gui/widgets
parentc3223fe1a09692bd2f2a4b4d37dafafd97a7bf32 (diff)
downloadgsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar.gz
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar.bz2
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar.lz
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar.xz
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar.zst
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.zip
fix the gnome-xml headers.
2002-11-06 Chris Toshok <toshok@ximian.com> * gui/widgets/gal-view-minicard.c: fix the gnome-xml headers. * gui/widgets/e-addressbook-view.c (e_addressbook_view_class_init): convert from gtk signals and args to GSignal and GObject properties. (e_addressbook_view_dispose): rename _destroy to this. (e_addressbook_view_set_property): rework _set_arg to this. (e_addressbook_view_get_property): rework _get_arg to this. (display_view): if we're here we need to choose a view, regardless of whether or not the GAL_IS_VIEW_* macros tell us which type it is. * gui/widgets/e-addressbook-table-adapter.c: fix the gnome-xml headers. * gui/widgets/e-addressbook-model.c (e_addressbook_model_class_init): use INT, not ENUM in the signal here. * gui/component/addressbook-config.c: another big gtk_* -> g_* renaming. * gui/component/addressbook.c: same. * gui/component/e-address-popup.c: same. * gui/component/e-address-widget.c: same. * gui/component/e-cardlist-model.c: fix the gnome-xml headers, and more gtk_* -> g_* renaming. * gui/component/addressbook-component.c (owner_set_cb): use evolution_shell_client_corba_objref as per ettore's change to EvolutionShellClient.. (create_view): fix the call to bonobo_control_set_property. (create_component): gtk_signal_connect -> g_signal_connect. * gui/component/addressbook-storage.c: fix the gnome-xml headers. (addressbook_storage_setup): use evolution_shell_client_corba_objref as per ettore's change to EvolutionShellClient.. (addressbook_get_other_contact_storage): gtk_signal_connect -> g_signal_connect. (load_source_data): root->childs -> root->childrens. svn path=/trunk/; revision=18598
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c10
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c6
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c115
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c2
4 files changed, 76 insertions, 57 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 1937b33116..6fa61a018b 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -10,9 +10,9 @@
#include <config.h>
#include "e-addressbook-marshal.h"
#include "e-addressbook-model.h"
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xmlmemory.h>
#include <gnome.h>
#include <gal/widgets/e-gui-utils.h>
#include "e-addressbook-util.h"
@@ -332,8 +332,8 @@ e_addressbook_model_class_init (GObjectClass *object_class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EAddressbookModelClass, search_result),
NULL, NULL,
- e_addressbook_marshal_NONE__ENUM,
- G_TYPE_NONE, 1, G_TYPE_ENUM);
+ e_addressbook_marshal_NONE__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
e_addressbook_model_signals [FOLDER_BAR_MESSAGE] =
g_signal_new ("folder_bar_message",
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index 7fc3a8ddd2..2f38cffcff 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -5,9 +5,9 @@
#include "e-addressbook-table-adapter.h"
#include "e-card-merging.h"
#include "e-addressbook-util.h"
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xmlmemory.h>
#include <gnome.h>
struct _EAddressbookTableAdapterPrivate {
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index a4a7830219..0f47f334b1 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -61,8 +61,8 @@
#include <gdk/gdkkeysyms.h>
#include <ctype.h>
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
#define SHOW_ALL_SEARCH "(contains \"x-evolution-any-field\" \"\")"
@@ -70,9 +70,11 @@
static void e_addressbook_view_init (EAddressbookView *card);
static void e_addressbook_view_class_init (EAddressbookViewClass *klass);
-static void e_addressbook_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_addressbook_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_addressbook_view_destroy (GtkObject *object);
+
+static void e_addressbook_view_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void e_addressbook_view_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+
+static void e_addressbook_view_dispose (GObject *object);
static void change_view_type (EAddressbookView *view, EAddressbookViewType view_type);
static void status_message (GtkObject *object, const gchar *status, EAddressbookView *eav);
@@ -96,10 +98,10 @@ static GtkTableClass *parent_class = NULL;
/* The arguments we take */
enum {
- ARG_0,
- ARG_BOOK,
- ARG_QUERY,
- ARG_TYPE,
+ PROP_0,
+ PROP_BOOK,
+ PROP_QUERY,
+ PROP_TYPE,
};
enum {
@@ -153,24 +155,38 @@ e_addressbook_view_get_type (void)
static void
e_addressbook_view_class_init (EAddressbookViewClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
- object_class = GTK_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS(klass);
widget_class = GTK_WIDGET_CLASS(klass);
parent_class = gtk_type_class (gtk_table_get_type ());
- object_class->set_arg = e_addressbook_view_set_arg;
- object_class->get_arg = e_addressbook_view_get_arg;
- object_class->destroy = e_addressbook_view_destroy;
-
- gtk_object_add_arg_type ("EAddressbookView::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
- gtk_object_add_arg_type ("EAddressbookView::query", GTK_TYPE_STRING,
- GTK_ARG_READWRITE, ARG_QUERY);
- gtk_object_add_arg_type ("EAddressbookView::type", GTK_TYPE_ENUM,
- GTK_ARG_READWRITE, ARG_TYPE);
+ object_class->set_property = e_addressbook_view_set_property;
+ object_class->get_property = e_addressbook_view_get_property;
+ object_class->dispose = e_addressbook_view_dispose;
+
+ g_object_class_install_property (object_class, PROP_BOOK,
+ g_param_spec_object ("book",
+ _("Book"),
+ /*_( */"XXX blurb" /*)*/,
+ E_TYPE_BOOK,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class, PROP_QUERY,
+ g_param_spec_string ("query",
+ _("Query"),
+ /*_( */"XXX blurb" /*)*/,
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class, PROP_TYPE,
+ g_param_spec_int ("type",
+ _("Type"),
+ /*_( */"XXX blurb" /*)*/,
+ E_ADDRESSBOOK_VIEW_NONE, E_ADDRESSBOOK_VIEW_MINICARD, E_ADDRESSBOOK_VIEW_NONE,
+ G_PARAM_READWRITE));
e_addressbook_view_signals [STATUS_MESSAGE] =
g_signal_new ("status_message",
@@ -187,8 +203,8 @@ e_addressbook_view_class_init (EAddressbookViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EAddressbookViewClass, search_result),
NULL, NULL,
- e_addressbook_marshal_NONE__ENUM,
- G_TYPE_NONE, 1, G_TYPE_ENUM);
+ e_addressbook_marshal_NONE__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
e_addressbook_view_signals [FOLDER_BAR_MESSAGE] =
g_signal_new ("folder_bar_message",
@@ -293,7 +309,7 @@ e_addressbook_view_init (EAddressbookView *eav)
}
static void
-e_addressbook_view_destroy (GtkObject *object)
+e_addressbook_view_dispose (GObject *object)
{
EAddressbookView *eav = E_ADDRESSBOOK_VIEW(object);
@@ -333,8 +349,8 @@ e_addressbook_view_destroy (GtkObject *object)
eav->invisible = NULL;
}
- if (GTK_OBJECT_CLASS(parent_class)->destroy)
- GTK_OBJECT_CLASS(parent_class)->destroy(object);
+ if (G_OBJECT_CLASS(parent_class)->dispose)
+ G_OBJECT_CLASS(parent_class)->dispose(object);
}
GtkWidget*
@@ -354,6 +370,7 @@ writable_status (GtkObject *object, gboolean writable, EAddressbookView *eav)
static void
init_collection (void)
{
+#ifdef PENDING_PORT_WORK
GalViewFactory *factory;
ETableSpecification *spec;
char *galview;
@@ -384,6 +401,7 @@ init_collection (void)
gal_view_collection_load(collection);
}
+#endif
}
static void
@@ -395,7 +413,7 @@ display_view(GalViewInstance *instance,
if (GAL_IS_VIEW_ETABLE(view)) {
change_view_type (address_view, E_ADDRESSBOOK_VIEW_TABLE);
gal_view_etable_attach_table (GAL_VIEW_ETABLE(view), e_table_scrolled_get_table(E_TABLE_SCROLLED(address_view->widget)));
- } else if (GAL_IS_VIEW_MINICARD(view)) {
+ } else /*if (GAL_IS_VIEW_MINICARD(view))*/ {
change_view_type (address_view, E_ADDRESSBOOK_VIEW_MINICARD);
gal_view_minicard_attach (GAL_VIEW_MINICARD(view), E_MINICARD_VIEW_WIDGET (address_view->object));
}
@@ -422,17 +440,17 @@ setup_menus (EAddressbookView *view)
}
static void
-e_addressbook_view_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+e_addressbook_view_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
EAddressbookView *eav = E_ADDRESSBOOK_VIEW(object);
- switch (arg_id){
- case ARG_BOOK:
+ switch (prop_id){
+ case PROP_BOOK:
if (eav->book) {
g_object_unref (eav->book);
}
- if (GTK_VALUE_OBJECT(*arg)) {
- eav->book = E_BOOK(GTK_VALUE_OBJECT(*arg));
+ if (g_value_get_object (value)) {
+ eav->book = E_BOOK(g_value_get_object (value));
g_object_ref (eav->book);
}
else
@@ -450,14 +468,14 @@ e_addressbook_view_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
setup_menus (eav);
break;
- case ARG_QUERY:
+ case PROP_QUERY:
#if 0 /* This code will mess up ldap a bit. We need to think about the ramifications of this more. */
- if ((GTK_VALUE_STRING (*arg) == NULL && !strcmp (eav->query, SHOW_ALL_SEARCH)) ||
- (GTK_VALUE_STRING (*arg) != NULL && !strcmp (eav->query, GTK_VALUE_STRING (*arg))))
+ if ((g_value_get_string (value) == NULL && !strcmp (eav->query, SHOW_ALL_SEARCH)) ||
+ (g_value_get_string (value) != NULL && !strcmp (eav->query, g_value_get_string (value))))
break;
#endif
g_free(eav->query);
- eav->query = g_strdup(GTK_VALUE_STRING(*arg));
+ eav->query = g_strdup(g_value_get_string (value));
if (!eav->query)
eav->query = g_strdup (SHOW_ALL_SEARCH);
g_object_set(eav->model,
@@ -470,34 +488,35 @@ e_addressbook_view_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (current), FALSE);
}
break;
- case ARG_TYPE:
- change_view_type(eav, GTK_VALUE_ENUM(*arg));
+ case PROP_TYPE:
+ change_view_type(eav, g_value_get_int (value));
break;
default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
-e_addressbook_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+e_addressbook_view_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
EAddressbookView *eav = E_ADDRESSBOOK_VIEW(object);
- switch (arg_id) {
- case ARG_BOOK:
+ switch (prop_id) {
+ case PROP_BOOK:
if (eav->book)
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(eav->book);
+ g_value_set_object (value, eav->book);
else
- GTK_VALUE_OBJECT (*arg) = NULL;
+ g_value_set_object (value, NULL);
break;
- case ARG_QUERY:
- GTK_VALUE_STRING (*arg) = eav->query;
+ case PROP_QUERY:
+ g_value_set_string (value, eav->query);
break;
- case ARG_TYPE:
- GTK_VALUE_ENUM (*arg) = eav->view_type;
+ case PROP_TYPE:
+ g_value_set_int (value, eav->view_type);
break;
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index e685defdbe..aed71e86ac 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -9,7 +9,7 @@
*/
#include <config.h>
#include "gal-view-minicard.h"
-#include <gnome-xml/parser.h>
+#include <libxml/parser.h>
#include <gal/util/e-xml-utils.h>
#define PARENT_TYPE gal_view_get_type ()