X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fgtkmathview-bonobo%2Fsrc%2Fhandlers.c;h=4861b2f0b0ec6f7205d3be03e5a2c79ae80fc396;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=78dc7ee66a4d51a47ba0212bc90db2c40b27c4bc;hpb=4faf0e37e7019de16dd6862bb34d84f799a2a230;p=helm.git diff --git a/helm/gtkmathview-bonobo/src/handlers.c b/helm/gtkmathview-bonobo/src/handlers.c index 78dc7ee66..4861b2f0b 100644 --- a/helm/gtkmathview-bonobo/src/handlers.c +++ b/helm/gtkmathview-bonobo/src/handlers.c @@ -38,6 +38,21 @@ set_frame(BonoboControl *control, gpointer data) { } +static void +notify_browser(GtkMathViewControlData* control_data, const char* url) +{ + BonoboObject* evs = bonobo_object_query_local_interface(BONOBO_OBJECT(control_data->control), + "IDL:Bonobo/EventSource:1.0"); + if (evs != NULL) + { + BonoboArg* arg = bonobo_arg_new(BONOBO_ARG_STRING); + BONOBO_ARG_SET_STRING(arg, url); + bonobo_event_source_notify_listeners (evs, "URL", arg, NULL); + /* bonobo_arg_release(arg); */ + bonobo_object_unref(BONOBO_OBJECT(evs)); + } +} + void click_cb(GtkMathView* math_view, GdomeElement* elem, gint state, GtkMathViewControlData* control_data) @@ -46,7 +61,7 @@ click_cb(GtkMathView* math_view, GdomeElement* elem, gint state, g_return_if_fail(math_view != NULL); g_return_if_fail(control_data != NULL); - + if (elem != NULL) { GdomeElement* action; @@ -55,7 +70,10 @@ click_cb(GtkMathView* math_view, GdomeElement* elem, gint state, if (href != NULL) { /*gtk_math_view_load_uri(math_view,href->str);*/ - set_clipboard(href); + + notify_browser(control_data, href->str); + + //set_clipboard(href); gdome_str_unref(href); return; }