diff options
author | Iain Holmes <iain@helixcode.com> | 2000-10-10 08:03:25 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2000-10-10 08:03:25 +0800 |
commit | 31f7447f6cef8ea08fd323e4d56e76a1999431a5 (patch) | |
tree | 944d4845786e9d96b764291b431c0a0f78392770 /executive-summary/evolution-services | |
parent | 24926636e65df9318a9e688f885b34fccdb77cd6 (diff) | |
download | gsoc2013-evolution-31f7447f6cef8ea08fd323e4d56e76a1999431a5.tar gsoc2013-evolution-31f7447f6cef8ea08fd323e4d56e76a1999431a5.tar.gz gsoc2013-evolution-31f7447f6cef8ea08fd323e4d56e76a1999431a5.tar.bz2 gsoc2013-evolution-31f7447f6cef8ea08fd323e4d56e76a1999431a5.tar.lz gsoc2013-evolution-31f7447f6cef8ea08fd323e4d56e76a1999431a5.tar.xz gsoc2013-evolution-31f7447f6cef8ea08fd323e4d56e76a1999431a5.tar.zst gsoc2013-evolution-31f7447f6cef8ea08fd323e4d56e76a1999431a5.zip |
Added an icon parameter to the create_view methods.
2000-10-09 Iain Holmes <iain@helixcode.com>
* idl/SummaryComponent.idl: Added an icon parameter to the
create_view methods.
* evolution-services/executive-summary-component.c: Implement
the icon parameter.
* evolution-services/executive-summary-component-client.c: Ditto
* component/e-summary.c: Draw the specified icon.
* component/e-summary-factory.c: Use the icon parameter
svn path=/trunk/; revision=5805
Diffstat (limited to 'executive-summary/evolution-services')
4 files changed, 24 insertions, 10 deletions
diff --git a/executive-summary/evolution-services/executive-summary-component-client.c b/executive-summary/evolution-services/executive-summary-component-client.c index b33a876450..7702785692 100644 --- a/executive-summary/evolution-services/executive-summary-component-client.c +++ b/executive-summary/evolution-services/executive-summary-component-client.c @@ -199,7 +199,8 @@ executive_summary_component_client_supports (ExecutiveSummaryComponentClient *cl Bonobo_Control executive_summary_component_client_create_bonobo_view (ExecutiveSummaryComponentClient *client, - char **title) + char **title, + char **icon) { Bonobo_Control control; Evolution_SummaryComponent component; @@ -211,7 +212,7 @@ executive_summary_component_client_create_bonobo_view (ExecutiveSummaryComponent CORBA_exception_init (&ev); component = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - control = Evolution_SummaryComponent_create_bonobo_view (component, title, &ev); + control = Evolution_SummaryComponent_create_bonobo_view (component, title, icon, &ev); if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("Error creating view"); @@ -226,7 +227,8 @@ executive_summary_component_client_create_bonobo_view (ExecutiveSummaryComponent char * executive_summary_component_client_create_html_view (ExecutiveSummaryComponentClient *client, - char **title) + char **title, + char **icon) { CORBA_char *ret_html; Evolution_SummaryComponent component; @@ -239,9 +241,8 @@ executive_summary_component_client_create_html_view (ExecutiveSummaryComponentCl CORBA_exception_init (&ev); component = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - g_print ("Here\n"); - ret_html = Evolution_SummaryComponent_create_html_view (component, title, &ev); - g_print ("Not here - %s\n", ret_html); + ret_html = Evolution_SummaryComponent_create_html_view (component, title, icon, &ev); + if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("Error creating HTML view"); CORBA_exception_free (&ev); diff --git a/executive-summary/evolution-services/executive-summary-component-client.h b/executive-summary/evolution-services/executive-summary-component-client.h index bfb3ea1939..d38f860430 100644 --- a/executive-summary/evolution-services/executive-summary-component-client.h +++ b/executive-summary/evolution-services/executive-summary-component-client.h @@ -58,10 +58,12 @@ void executive_summary_component_client_supports (ExecutiveSummaryComponentClien gboolean *bonobo, gboolean *html); Bonobo_Control executive_summary_component_client_create_bonobo_view (ExecutiveSummaryComponentClient *client, - char **title); + char **title, + char **icon); char *executive_summary_component_client_create_html_view (ExecutiveSummaryComponentClient *client, - char **title); + char **title, + char **icon); void executive_summary_component_client_configure (ExecutiveSummaryComponentClient *client); diff --git a/executive-summary/evolution-services/executive-summary-component.c b/executive-summary/evolution-services/executive-summary-component.c index 97e1d6ec97..596a780033 100644 --- a/executive-summary/evolution-services/executive-summary-component.c +++ b/executive-summary/evolution-services/executive-summary-component.c @@ -142,29 +142,35 @@ impl_Evolution_SummaryComponent_unset_owner (PortableServer_Servant servant, static Bonobo_Control impl_Evolution_SummaryComponent_create_bonobo_view (PortableServer_Servant servant, CORBA_char **title, + CORBA_char **icon, CORBA_Environment *ev) { BonoboObject *bonobo_object; ExecutiveSummaryComponent *component; ExecutiveSummaryComponentPrivate *priv; BonoboControl *control; - char *initial_title; + char *initial_title, *initial_icon; bonobo_object = bonobo_object_from_servant (servant); component = EXECUTIVE_SUMMARY_COMPONENT (bonobo_object); priv = component->private; control = (* priv->create_bonobo_view) (component, &initial_title, + &initial_icon, priv->closure); *title = CORBA_string_dup (initial_title ? initial_title:""); + *icon = CORBA_string_dup (initial_icon ? initial_icon:""); g_free (initial_title); + g_free (initial_icon); + return bonobo_object_corba_objref (BONOBO_OBJECT (control)); } static CORBA_char * impl_Evolution_SummaryComponent_create_html_view (PortableServer_Servant servant, CORBA_char **title, + CORBA_char **icon, CORBA_Environment *ev) { BonoboObject *bonobo_object; @@ -172,17 +178,20 @@ impl_Evolution_SummaryComponent_create_html_view (PortableServer_Servant servant ExecutiveSummaryComponentPrivate *priv; CORBA_char *ret_str; char *ret_html; - char *initial_title; + char *initial_title, *initial_icon; bonobo_object = bonobo_object_from_servant (servant); component = EXECUTIVE_SUMMARY_COMPONENT (bonobo_object); priv = component->private; ret_html = (* priv->create_html_view) (component, &initial_title, + &initial_icon, priv->closure); *title = CORBA_string_dup (initial_title ? initial_title:""); + *icon = CORBA_string_dup (initial_icon ? initial_icon:""); g_free (initial_title); + g_free (initial_icon); ret_str = CORBA_string_dup (ret_html ? ret_html:""); g_free (ret_html); diff --git a/executive-summary/evolution-services/executive-summary-component.h b/executive-summary/evolution-services/executive-summary-component.h index 75c1e23eb7..3cf5dade19 100644 --- a/executive-summary/evolution-services/executive-summary-component.h +++ b/executive-summary/evolution-services/executive-summary-component.h @@ -39,9 +39,11 @@ typedef struct _ExecutiveSummaryComponentClass ExecutiveSummaryComponentClass; typedef BonoboObject *(* EvolutionServicesCreateBonoboViewFn) (ExecutiveSummaryComponent *component, char **title, + char **icon, void *closure); typedef char *(* EvolutionServicesCreateHtmlViewFn) (ExecutiveSummaryComponent *component, char **title, + char **icon, void *closure); typedef void (* EvolutionServicesConfigureFn) (ExecutiveSummaryComponent *component, void *closure); |