Commit 31652a34 authored by Eskil Heyn Olsen's avatar Eskil Heyn Olsen
Browse files

Changed for the _uri change.


	* components/services/trilobite/src/trilobite-service-private.h:
	* components/services/trilobite/src/trilobite-service-public.h:
	* components/services/trilobite/src/trilobite-service.c:
	Changed for the _uri change.

	* components/services/trilobite/sample/service/main.c:
	* components/services/trilobite/sample/command-line/main.c:
	Changed for the new OAFID's.

	* components/services/trilobite/idl/trilobite-service.idl:
	Removed the _uri from get_icon_uri

	* components/services/time/service/trilobite-eazel-time-service.c:
	Better error handling, eg. for bad urls and whatnot.

	* components/services/time/service/Makefile.am (pixmap_DATA):
	Installs an icon for the service (now we need an icon, currently
	uses the gnome-clock icon)

	* components/services/time/idl/trilobite-eazel-time-service.idl:
	Added two strings to the CannotGetTime exception.

	* components/services/time/command-line/main.c (main):
	Updated to use the new oafids. Better error handling.

	* components/services/Makefile.am (SUBDIRS):
	Added the time service

	* components/services/trilobite/sample/service/trilobite-eazel-sample-service.oafinfo:
	* components/services/time/service/trilobite-eazel-time-service.oafinfo:
	Added attributes to the oafinfo files. Also gave them some real oafids.
parent 938da8de
2000-05-22 Eskil Heyn Olsen <eskil@eazel.om>
* components/services/trilobite/src/trilobite-service-private.h:
* components/services/trilobite/src/trilobite-service-public.h:
* components/services/trilobite/src/trilobite-service.c:
Changed for the _uri change.
* components/services/trilobite/sample/service/main.c:
* components/services/trilobite/sample/command-line/main.c:
Changed for the new OAFID's.
* components/services/trilobite/idl/trilobite-service.idl:
Removed the _uri from get_icon_uri
* components/services/time/service/trilobite-eazel-time-service.c:
Better error handling, eg. for bad urls and whatnot.
* components/services/time/service/Makefile.am (pixmap_DATA):
Installs an icon for the service (now we need an icon)
* components/services/time/idl/trilobite-eazel-time-service.idl:
Added two strings to the CannotGetTime exception.
* components/services/time/command-line/main.c (main):
Updated to use the new oafids. Better error handling.
* components/services/Makefile.am (SUBDIRS):
Added the time service
* components/services/trilobite/sample/service/trilobite-eazel-sample-service.oafinfo:
* components/services/time/service/trilobite-eazel-time-service.oafinfo:
Added attributes to the oafinfo files. Also gave them some real oafids.
2000-05-22 Andy Hertzfeld <andy@eazel.com>
fixed task 514, show file/folder permissions with emblems.
......
SUBDIRS = trilobite startup install
SUBDIRS = trilobite startup install time
......@@ -32,7 +32,7 @@
#include "trilobite-eazel-time-service.h"
#define OAF_ID "OAFIID:trilobite_eazel_time_service:134276-deadbeef-deed"
#define OAF_ID "OAFIID:trilobite_eazel_time_service:13a2dbd9-84f9-4400-bd9e-bb4575b86894"
int arg_list_info,
arg_max_diff,
......@@ -88,7 +88,7 @@ int main(int argc, char *argv[]) {
g_message ("service vendor name : %s", Trilobite_Service_get_vendor_name (trilobite, &ev));
g_message ("service vendor url : %s", Trilobite_Service_get_vendor_url (trilobite, &ev));
g_message ("service url : %s", Trilobite_Service_get_url (trilobite, &ev));
g_message ("service icon : %s", Trilobite_Service_get_icon_uri (trilobite, &ev));
g_message ("service icon : %s", Trilobite_Service_get_icon (trilobite, &ev));
Trilobite_Service_unref (trilobite, &ev);
}
......@@ -100,15 +100,18 @@ int main(int argc, char *argv[]) {
if (arg_url) {
Trilobite_Eazel_Time_set_time_url (timeservice, arg_url, &ev);
} else {
Trilobite_Eazel_Time_set_time_url (timeservice, "", &ev);
}
}
diff = Trilobite_Eazel_Time_check_time (timeservice, &ev);
if (ev._major == CORBA_USER_EXCEPTION) {
if (ev._major != CORBA_NO_EXCEPTION) {
if (strcmp (ex_Trilobite_Eazel_Time_CannotGetTime, CORBA_exception_id (&ev)) == 0) {
Trilobite_Eazel_Time_CannotGetTime *exn;
fprintf (stderr, "Unable to obtain time from server\n");
exn = (Trilobite_Eazel_Time_CannotGetTime*)CORBA_exception_value (&ev);
fprintf (stderr, "URL was %s\nReason is %s\n", exn->url, exn->reason);
} else {
fprintf (stderr, "Unhandleable error occured while communicating with the time-service\n");
fprintf (stderr, "Caught %s\n", CORBA_exception_id (&ev));
}
arg_update_time = 0;
CORBA_exception_free (&ev);
......
......@@ -6,12 +6,15 @@ module Trilobite {
exception NotPermitted {};
exception CannotGetTime {};
exception CannotGetTime {
string url;
string reason;
};
void set_max_difference (in long maxd);
void set_time_url (in string url);
unsigned long check_time () raises (CannotGetTime);
void update_time () raises (NotPermitted);
void update_time () raises (NotPermitted, CannotGetTime);
};
};
};
......@@ -26,10 +26,13 @@ LDFLAGS = \
$(NULL)
pixmapdir = $(datadir)/pixmaps
pixmap_DATA = trilobite-eazel-time-service.png
# CORBA magic
oafdir = $(datadir)/oaf
oaf_DATA = trilobite-eazel-time-service.oafinfo
CORBA_GENERATED = \
......@@ -64,6 +67,10 @@ trilobite_eazel_time_service_LDADD = \
$(top_builddir)/components/services/trilobite/src/libtrilobited.la \
$(NULL)
## Extra stuff
EXTRA_DIST = \
$(oaf_DATA) \
$(pixmap_DATA) \
$(NULL)
......@@ -32,9 +32,8 @@
#include "trilobite-eazel-time-service.h"
#include <trilobite-eazel-time-service-public.h>
#define OAF_ID_FACTORY "OAFIID:trilobite_eazel_time_service_factory:134276-deadbeef"
#define OAF_ID "OAFIID:trilobite_eazel_time_service:134276-deadbeef-deed"
#define OAF_ID_FACTORY "OAFIID:trilobite_eazel_time_service_factory:1acc6ab1-f79f-4c8d-ab87-04982fc8c19f"
#define OAF_ID "OAFIID:trilobite_eazel_time_service:13a2dbd9-84f9-4400-bd9e-bb4575b86894"
/*
These are some generally needed objects to get CORBA connectivity
*/
......@@ -76,7 +75,7 @@ trilobite_eazel_time_service_factory (BonoboGenericFactory *this_factory,
"vendor_name", "Eazel, inc.",
"vendor_url", "http://www.eazel.com",
"url", "http://www.eazel.com/",
"icon_uri", "file:///gnome/share/pixmaps/gnome-default-dlg.png",
"icon", "file:///gnome/share/pixmaps/gnome-default-dlg.png",
NULL));
service = trilobite_eazel_time_service_new ();
......
......@@ -42,7 +42,7 @@ static GtkObjectClass *trilobite_eazel_time_service_parent_class;
/* prototypes */
time_t trilobite_eazel_time_service_get_server_time (TrilobiteEazelTimeService*);
time_t trilobite_eazel_time_service_get_server_time (TrilobiteEazelTimeService*, CORBA_Environment *ev);
/*****************************************
Corba stuff
......@@ -84,14 +84,10 @@ impl_Trilobite_Eazel_Time_Service_check_time (impl_POA_Trilobite_Eazel_Time_Ser
result = 0;
local_time = time (NULL);
server_time = trilobite_eazel_time_service_get_server_time (service->object);
server_time = trilobite_eazel_time_service_get_server_time (service->object, ev);
/* If we did not get the time, raise an exception */
if (server_time == 0) {
Trilobite_Eazel_Time_CannotGetTime *exn;
exn = Trilobite_Eazel_Time_CannotGetTime__alloc ();
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Trilobite_Eazel_Time_CannotGetTime, exn);
} else {
if (server_time != 0) {
/* if we are beyond the max difference, return it */
if (abs (server_time - local_time) > service->object->private->maxd) {
result = server_time - local_time;
......@@ -119,7 +115,13 @@ impl_Trilobite_Eazel_Time_Service_update_time (impl_POA_Trilobite_Eazel_Time_Se
}
if (get_time == TRUE) {
trilobite_eazel_time_service_get_server_time (service->object);
time_t server_time;
server_time = trilobite_eazel_time_service_get_server_time (service->object, ev);
if (server_time == 0) {
return;
}
} else {
time_t diff;
......@@ -177,15 +179,6 @@ trilobite_eazel_time_service_destroy (GtkObject *object)
g_free (service->private);
/* FIXME bugzilla.eazel.com 945:
These defaults should probably be read from somewhere */
/* Default to the eazel test time server */
service->private->time_url = g_strdup ("http://eazel24.eazel.com/time.pl");
/* Default to 5 secs diff, to allow for network latency, bad weather and whotnot */
service->private->maxd = 5;
/* FIXME bugzilla.eazel.com 937:
implement this properly */
g_message ("in trilobite_eazel_time_service_destroy");
......@@ -264,6 +257,15 @@ trilobite_eazel_time_service_initialize (TrilobiteEazelTimeService *service) {
service->private = g_new0 (TrilobiteEazelTimeServicePrivate, 1);
/* FIXME bugzilla.eazel.com 945:
These defaults should probably be read from somewhere */
/* Default to the eazel test time server */
service->private->time_url = g_strdup ("http://eazel24.eazel.com/time.pl");
/* Default to 5 secs diff, to allow for network latency, bad weather and whotnot */
service->private->maxd = 5;
/* This sets the bonobo structures in service using the corba object */
if (!bonobo_object_construct (BONOBO_OBJECT (service), corba_service)) {
g_warning ("bonobo_object_construct failed");
......@@ -345,7 +347,8 @@ trilobite_eazel_time_service_parse_body (char *body)
Requesting via. HTTP
*/
static time_t
trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service)
trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service,
CORBA_Environment *ev)
{
time_t result;
ghttp_request *request;
......@@ -356,16 +359,29 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service
g_return_val_if_fail (service->private != NULL, 0);
request = ghttp_request_new ();
ghttp_set_header (request, http_hdr_User_Agent, "trilobite");
ghttp_set_uri (request, service->private->time_url);
ghttp_set_type (request, ghttp_type_get);
ghttp_prepare (request);
request_status = ghttp_process (request);
switch (request_status) {
case ghttp_error:
case ghttp_error: {
Trilobite_Eazel_Time_CannotGetTime *exn;
const char *reason;
exn = Trilobite_Eazel_Time_CannotGetTime__alloc ();
reason = ghttp_get_error (request);
g_message ("setting exn \"%s\" \"%s\"", service->private->time_url, reason);
exn->url = CORBA_string_dup (service->private->time_url);
exn->reason = reason==NULL ? CORBA_string_dup ("Bad url"): CORBA_string_dup ( reason );
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Trilobite_Eazel_Time_CannotGetTime, exn);
result = 0;
break;
}
break;
case ghttp_not_done:
g_message ("hest");
result = 0;
break;
case ghttp_done:
......@@ -380,13 +396,14 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service
}
time_t
trilobite_eazel_time_service_get_server_time (TrilobiteEazelTimeService *service)
trilobite_eazel_time_service_get_server_time (TrilobiteEazelTimeService *service,
CORBA_Environment *ev)
{
time_t result;
switch (service->private->method) {
case REQUEST_BY_HTTP:
result = trilobite_eazel_time_service_do_http_request (service);
result = trilobite_eazel_time_service_do_http_request (service, ev);
break;
default:
result = 0;
......
<oaf_info>
<oaf_server iid="OAFIID:trilobite_eazel_time_service_factory:134276-deadbeef" type="exe" location="trilobite-eazel-time-service">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/GenericFactory:1.0"/>
</oaf_attribute>
<oaf_attribute name="description" type="string" value="Factory for the time service"/>
</oaf_server>
<oaf_server iid="OAFIID:trilobite_eazel_time_service:134276-deadbeef-deed" type="factory" location="OAFIID:trilobite_eazel_time_service_factory:134276-deadbeef">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
<item value="IDL:Trilobite/Service:1.0"/>
<item value="IDL:Trilobite/Eazel/Time:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Time"/>
<oaf_attribute name="icon" type="string" value="gnome-clock.png"/>
</oaf_server>
</oaf_info>
......@@ -7,29 +7,30 @@ module Trilobite {
interface Service : Bonobo::Unknown {
/* Should return the name of the service, eg. "TimeService" */
string get_name();
string get_name ();
/* Should return the version of the service, eg. "1.0" */
string get_version();
string get_version ();
/* Should return the company/organization who's responsible for the service,
eg. "Eazel, inc."
*/
string get_vendor_name();
string get_vendor_name ();
/* Should return URL of the company/organization who's responsible for the service,
eg. "http://www.eazel.com"
*/
string get_vendor_url();
string get_vendor_url ();
/* Should give a URL for the service. This should either contain
a decription or a page containing account info or whatnor for the service
*/
string get_url();
string get_url ();
/* Should return a URI for an icon for the service
/* Should return a filename an icon for the service. The filename
should be in a format that can be used by gnome_pixmap_file
*/
string get_icon_uri();
string get_icon ();
};
};
......
......@@ -31,7 +31,7 @@
#include "sample-service.h"
#define OAF_ID "OAFIID:trilobite_eazel_sample_service:134276"
#define OAF_ID "OAFIID:trilobite_eazel_sample_service:3d972cc6-d42d-4669-bd42-966998b3c306"
CORBA_Environment ev;
......@@ -83,7 +83,7 @@ int main(int argc, char *argv[]) {
g_message ("service vendor name : %s", Trilobite_Service_get_vendor_name (trilobite, &ev));
g_message ("service vendor url : %s", Trilobite_Service_get_vendor_url (trilobite, &ev));
g_message ("service url : %s", Trilobite_Service_get_url (trilobite, &ev));
g_message ("service icon : %s", Trilobite_Service_get_icon_uri (trilobite, &ev));
g_message ("service icon : %s", Trilobite_Service_get_icon (trilobite, &ev));
Trilobite_Service_unref (trilobite, &ev);
} else {
......
<oaf_info>
<oaf_server iid="OAFIID:trilobite_eazel_sample_service_factory:134276" type="exe" location="trilobite-eazel-sample-service">
<oaf_server iid="OAFIID:trilobite_eazel_sample_service_factory:19084a03-2f85-456e-95ed-bcebf8141e97" type="exe" location="trilobite-eazel-sample-service">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/GenericFactory:1.0"/>
</oaf_attribute>
<oaf_attribute name="description" type="string" value="Factory for the sample service"/>
</oaf_server>
<oaf_server iid="OAFIID:trilobite_eazel_sample_service:134276" type="factory" location="OAFIID:trilobite_eazel_sample_service_factory:134276">
<oaf_server iid="OAFIID:trilobite_eazel_sample_service:3d972cc6-d42d-4669-bd42-966998b3c306" type="factory" location="OAFIID:trilobite_eazel_sample_service_factory:19084a03-2f85-456e-95ed-bcebf8141e97">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
<item value="IDL:Trilobite/Service:1.0"/>
<item value="IDL:Trilobite/Eazel/Sample:1.0"/>
</oaf_attribute>
<oaf_attribute name="trilobite:name" type="string" value="Sample"/>
<oaf_attribute name="trilobite:version" type="string" value="0.1"/>
<oaf_attribute name="trilobite:vendor_name" type="string" value="Eazel, inc."/>
<oaf_attribute name="trilobite:vendor_url" type="string" value="http://www.eazel.com"/>
<oaf_attribute name="trilobite:info_url" type="string" value="http://www.eazel.com/sample/"/>
<oaf_attribute name="trilobite:icon" type="string" value="gnome-default-dlg.png"/>
<oaf_attribute name="trilobite:uri_scheme" type="string" value="eazel-sample:"/>
<oaf attribute name="bonobo:supported_uri_schemes" type="stringv">
<item value="eazel-sample:"/>
</oaf_attribute
</oaf_server>
</oaf_info>
......@@ -32,8 +32,8 @@
#include "sample-service.h"
#include <sample-service-public.h>
#define OAF_ID_FACTORY "OAFIID:trilobite_eazel_sample_service_factory:134276"
#define OAF_ID "OAFIID:trilobite_eazel_sample_service:134276"
#define OAF_ID_FACTORY "OAFIID:trilobite_eazel_sample_service_factory:19084a03-2f85-456e-95ed-bcebf8141e97"
#define OAF_ID "OAFIID:trilobite_eazel_sample_service:3d972cc6-d42d-4669-bd42-966998b3c306"
/*
These are some generally needed objects to get CORBA connectivity
......@@ -77,7 +77,7 @@ trilobite_sample_service_factory (BonoboGenericFactory *this_factory,
"vendor_name", "Eazel, inc.",
"vendor_url", "http://www.eazel.com",
"url", "http://www.eazel.com/sample",
"icon_uri", "file:///gnome/share/pixmaps/gnome-default-dlg.png",
"icon", "gnome-default-dlg.png",
NULL));
service = sample_service_new ();
......
<oaf_info>
<oaf_server iid="OAFIID:trilobite_eazel_sample_service_factory:134276" type="exe" location="trilobite-eazel-sample-service">
<oaf_server iid="OAFIID:trilobite_eazel_sample_service_factory:19084a03-2f85-456e-95ed-bcebf8141e97" type="exe" location="trilobite-eazel-sample-service">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/GenericFactory:1.0"/>
</oaf_attribute>
<oaf_attribute name="description" type="string" value="Factory for the sample service"/>
</oaf_server>
<oaf_server iid="OAFIID:trilobite_eazel_sample_service:134276" type="factory" location="OAFIID:trilobite_eazel_sample_service_factory:134276">
<oaf_server iid="OAFIID:trilobite_eazel_sample_service:3d972cc6-d42d-4669-bd42-966998b3c306" type="factory" location="OAFIID:trilobite_eazel_sample_service_factory:19084a03-2f85-456e-95ed-bcebf8141e97">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
<item value="IDL:Trilobite/Service:1.0"/>
<item value="IDL:Trilobite/Eazel/Sample:1.0"/>
</oaf_attribute>
<oaf_attribute name="trilobite:name" type="string" value="Sample"/>
<oaf_attribute name="trilobite:version" type="string" value="0.1"/>
<oaf_attribute name="trilobite:vendor_name" type="string" value="Eazel, inc."/>
<oaf_attribute name="trilobite:vendor_url" type="string" value="http://www.eazel.com"/>
<oaf_attribute name="trilobite:info_url" type="string" value="http://www.eazel.com/sample/"/>
<oaf_attribute name="trilobite:icon" type="string" value="gnome-default-dlg.png"/>
<oaf_attribute name="trilobite:uri_scheme" type="string" value="eazel-sample:"/>
<oaf attribute name="bonobo:supported_uri_schemes" type="stringv">
<item value="eazel-sample:"/>
</oaf_attribute
</oaf_server>
</oaf_info>
......@@ -36,7 +36,7 @@ struct _TrilobiteServicePrivate {
char *service_vendor_name;
char *service_vendor_url;
char *service_url;
char *service_icon_uri;
char *service_icon;
};
......
......@@ -53,14 +53,14 @@ struct _TrilobiteServiceClass
char* (*get_vendor_name) (TrilobiteService *trilobite);
char* (*get_vendor_url) (TrilobiteService *trilobite);
char* (*get_url) (TrilobiteService *trilobite);
char* (*get_icon_uri) (TrilobiteService *trilobite);
char* (*get_icon) (TrilobiteService *trilobite);
void (*set_name) (TrilobiteService *trilobite, char *value);
void (*set_version) (TrilobiteService *trilobite, char *value);
void (*set_vendor_name) (TrilobiteService *trilobite, char *value);
void (*set_vendor_url) (TrilobiteService *trilobite, char *value);
void (*set_url) (TrilobiteService *trilobite, char *value);
void (*set_icon_uri) (TrilobiteService *trilobite, char *value);
void (*set_icon) (TrilobiteService *trilobite, char *value);
gpointer servant_init;
gpointer servant_fini;
......@@ -86,14 +86,14 @@ char* trilobite_service_get_version (TrilobiteService *tril
char* trilobite_service_get_vendor_name (TrilobiteService *trilobite);
char* trilobite_service_get_vendor_url (TrilobiteService *trilobite);
char* trilobite_service_get_url (TrilobiteService *trilobite);
char* trilobite_service_get_icon_uri (TrilobiteService *trilobite);
char* trilobite_service_get_icon (TrilobiteService *trilobite);
void trilobite_service_set_name (TrilobiteService *trilobite, char *value);
void trilobite_service_set_version (TrilobiteService *trilobite, char *value);
void trilobite_service_set_vendor_name (TrilobiteService *trilobite, char *value);
void trilobite_service_set_vendor_url (TrilobiteService *trilobite, char *value);
void trilobite_service_set_url (TrilobiteService *trilobite, char *value);
void trilobite_service_set_icon_uri (TrilobiteService *trilobite, char *value);
void trilobite_service_set_icon (TrilobiteService *trilobite, char *value);
#ifdef __cplusplus
}
......
......@@ -41,7 +41,7 @@ enum {
GET_VENDOR_NAME,
GET_VENDOR_URL,
GET_URL,
GET_ICON_URI,
GET_ICON,
LAST_SIGNAL
};
......@@ -52,7 +52,7 @@ enum {
ARG_VENDOR_NAME,
ARG_VENDOR_URL,
ARG_URL,
ARG_ICON_URI
ARG_ICON
};
/* The signal array and prototypes for default handlers */
......@@ -128,13 +128,13 @@ impl_Trilobite_Service_get_url(impl_POA_Trilobite_Service *trilobite,
};
static CORBA_char*
impl_Trilobite_Service_get_icon_uri(impl_POA_Trilobite_Service *trilobite,
impl_Trilobite_Service_get_icon(impl_POA_Trilobite_Service *trilobite,
CORBA_Environment *ev)
{
char *result;
/* g_message ("in impl_Trilobite_Service_get_icon_uri"); */
gtk_signal_emit (GTK_OBJECT (trilobite->bonobo_object), trilobite_service_signals[GET_ICON_URI], &result);
/* g_message ("in impl_Trilobite_Service_get_icon"); */
gtk_signal_emit (GTK_OBJECT (trilobite->bonobo_object), trilobite_service_signals[GET_ICON], &result);
return CORBA_string_dup (result);
};
......@@ -150,7 +150,7 @@ trilobite_service_get_epv(void)
epv->get_vendor_name = (gpointer) &impl_Trilobite_Service_get_vendor_name;
epv->get_vendor_url = (gpointer) &impl_Trilobite_Service_get_vendor_url;
epv->get_url = (gpointer) &impl_Trilobite_Service_get_url;
epv->get_icon_uri = (gpointer) &impl_Trilobite_Service_get_icon_uri;
epv->get_icon = (gpointer) &impl_Trilobite_Service_get_icon;
return epv;
};
......@@ -196,7 +196,7 @@ trilobite_service_destroy (GtkObject *object)
g_free (trilobite->private->service_vendor_name);
g_free (trilobite->private->service_vendor_url);
g_free (trilobite->private->service_url);
g_free (trilobite->private->service_icon_uri);
g_free (trilobite->private->service_icon);
g_free (trilobite->private);
g_free (trilobite);
}
......@@ -236,8 +236,8 @@ trilobite_service_set_arg (GtkObject *object,
case ARG_URL:
trilobite_service_set_url (trilobite, (char*)GTK_VALUE_OBJECT(*arg));
break;
case ARG_ICON_URI:
trilobite_service_set_icon_uri (trilobite, (char*)GTK_VALUE_OBJECT(*arg));
case ARG_ICON:
trilobite_service_set_icon (trilobite, (char*)GTK_VALUE_OBJECT(*arg));
break;
}
}
......@@ -298,11 +298,11 @@ trilobite_service_class_initialize (TrilobiteServiceClass *klass)
GTK_SIGNAL_OFFSET (TrilobiteServiceClass,get_url),
gtk_marshal_POINTER__NONE,
GTK_TYPE_POINTER,0);
trilobite_service_signals[GET_ICON_URI] =
gtk_signal_new ("get_icon_uri",
trilobite_service_signals[GET_ICON] =
gtk_signal_new ("get_icon",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (TrilobiteServiceClass,get_icon_uri),
GTK_SIGNAL_OFFSET (TrilobiteServiceClass,get_icon),
gtk_marshal_POINTER__NONE,
GTK_TYPE_POINTER,0);
......@@ -328,24 +328,24 @@ trilobite_service_class_initialize (TrilobiteServiceClass *klass)
GTK_TYPE_POINTER,
GTK_ARG_WRITABLE | GTK_ARG_CONSTRUCT_ONLY,
ARG_URL);
gtk_object_add_arg_type ("TrilobiteService::icon_uri",
gtk_object_add_arg_type ("TrilobiteService::icon",
GTK_TYPE_POINTER,
GTK_ARG_WRITABLE | GTK_ARG_CONSTRUCT_ONLY,
ARG_ICON_URI);
ARG_ICON);
klass->get_name = trilobite_service_get_name;
klass->get_version = trilobite_service_get_version;
klass->get_vendor_name = trilobite_service_get_vendor_name;
klass->get_vendor_url = trilobite_service_get_vendor_url;
klass->get_url = trilobite_service_get_url;
klass->get_icon_uri = trilobite_service_get_icon_uri;
klass->get_icon = trilobite_service_get_icon;
klass->set_name = trilobite_service_set_name;
klass->set_version = trilobite_service_set_version;
klass->set_vendor_name = trilobite_service_set_vendor_name;
klass->set_vendor_url = trilobite_service_set_vendor_url;
klass->set_url = trilobite_service_set_url;
klass->set_icon_uri = trilobite_service_set_icon_uri;
klass->set_icon = trilobite_service_set_icon;
};
gboolean
......@@ -421,7 +421,7 @@ trilobite_service_initialize (TrilobiteService *trilobite)
trilobite->private->service_vendor_name = NULL;
trilobite->private->service_vendor_url = NULL;
trilobite->private->service_url = NULL;
trilobite->private->service_icon_uri = NULL;
trilobite->private->service_icon = NULL;