diff options
Diffstat (limited to 'xparts/src')
-rw-r--r-- | xparts/src/gtk/gtkbrowserextension.c | 38 | ||||
-rw-r--r-- | xparts/src/gtk/gtkbrowserextension.h | 2 |
2 files changed, 40 insertions, 0 deletions
diff --git a/xparts/src/gtk/gtkbrowserextension.c b/xparts/src/gtk/gtkbrowserextension.c index 7e2310e6..5885f5c7 100644 --- a/xparts/src/gtk/gtkbrowserextension.c +++ b/xparts/src/gtk/gtkbrowserextension.c @@ -242,3 +242,41 @@ gboolean gtk_browserextension_open_url_request( GtkXBrowserExtension *part, cons } return TRUE; } + +gboolean gtk_browserextension_set_status_bar_text( GtkXBrowserExtension *part, const char *info ) +{ + dcop_data *reply_data; + char *reply_type; + dcop_data *data = dcop_data_ref( dcop_data_new() ); + + if(!P->client) + fprintf(stderr, "register a dcop client first!\n"); + + dcop_marshal_string16( data, info ); + + if ( !dcop_client_call( P->client, P->host_app_id, "parthost", "setStatusBarText(TQString)", data, + &reply_type, &reply_data ) ) { + g_warning(" setStatusBarText failed"); + return FALSE; + } + return TRUE; +} + +gboolean gtk_browserextension_set_window_caption( GtkXBrowserExtension *part, const char *info ) +{ + dcop_data *reply_data; + char *reply_type; + dcop_data *data = dcop_data_ref( dcop_data_new() ); + + if(!P->client) + fprintf(stderr, "register a dcop client first!\n"); + + dcop_marshal_string16( data, info ); + + if ( !dcop_client_call( P->client, P->host_app_id, "parthost", "setWindowCaption(TQString)", data, + &reply_type, &reply_data ) ) { + g_warning(" setWindowCaption failed"); + return FALSE; + } + return TRUE; +} diff --git a/xparts/src/gtk/gtkbrowserextension.h b/xparts/src/gtk/gtkbrowserextension.h index 7efbd938..b66a53bc 100644 --- a/xparts/src/gtk/gtkbrowserextension.h +++ b/xparts/src/gtk/gtkbrowserextension.h @@ -42,6 +42,8 @@ extern GtkType gtk_xbrowserextension_get_type (void); extern GtkXBrowserExtension *gtk_xbrowserextension_new (void); gboolean gtk_browserextension_open_url_request( GtkXBrowserExtension *ext, const char *url ); +gboolean gtk_browserextension_set_status_bar_text( GtkXBrowserExtension *ext, const char *info ); +gboolean gtk_browserextension_set_window_caption( GtkXBrowserExtension *ext, const char *info ); /* "virtual" functions from DcopObject */ void gtk_xbrowserextension_set_dcop_client( GtkXBrowserExtension *part, DcopClient *client ); |