<br><br><div class="gmail_quote">On Fri, Jan 9, 2009 at 6:00 PM,  <span dir="ltr">&lt;<a href="mailto:maemo-developers-request@maemo.org">maemo-developers-request@maemo.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Date: Thu, 08 Jan 2009 15:27:11 +0000<br>
From: Andrew Gatt &lt;<a href="mailto:a.gatt@btinternet.com">a.gatt@btinternet.com</a>&gt;<br>
Subject: Embedded browser upload<br>
To: <a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>
Message-ID: &lt;<a href="mailto:49661B4F.3000308@btinternet.com">49661B4F.3000308@btinternet.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
I&#39;m trying to implement a file chooser for the upload dialog signal for<br>
an embedded browser using the browser-eal. I&#39;ve successfully attached<br>
the signal, which fires correctly when the browse button is pressed, the<br>
file chooser is created and filename_global is filled with the correct<br>
filename, however this filename is not passed into the engine and the<br>
browse entry field remains empty on the web page. Can anyone help shed<br>
some light on this for me.<br>
<br>
Here&#39;s what i&#39;ve got for the upload dialog signal callback. As the name<br>
suggests filename_global is a simple global ghar*.<br>
<br>
gchar* g_web_widget_signal_upload_dialog(GObject *engine_widget,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const gchar *path,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const gchar *filter,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GObject *browser_window)<br>
{<br>
 &nbsp; &nbsp;GtkWidget * dialog ;<br>
 &nbsp; &nbsp;filename_global = NULL;<br>
 &nbsp; &nbsp;dialog = hildon_file_chooser_dialog_new ( GTK_WINDOW<br>
(browser_window), GTK_FILE_CHOOSER_ACTION_OPEN);<br>
 &nbsp; &nbsp;gtk_widget_show_all ( GTK_WIDGET ( dialog ));<br>
 &nbsp; &nbsp;if ( gtk_dialog_run ( GTK_DIALOG ( dialog )) == GTK_RESPONSE_OK ) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;filename_global = gtk_file_chooser_get_filename (<br>
GTK_FILE_CHOOSER (dialog));<br>
 &nbsp; &nbsp;}<br>
 &nbsp; &nbsp;gtk_widget_destroy ( dialog );<br>
<br>
 &nbsp; &nbsp;return filename_global;&nbsp;</blockquote><div><br>try: return gnome_vfs_get_uri_from_local_path(filename_global);<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
}<br>
<br>
If anyone can help i&#39;d really appreciate it.<br>
<br>
Thanks<br>
<br>
Andrew<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br><br>Zhihai Wang<br>