Talk:AbiWord SDK

From AbiWiki

(Difference between revisions)
Jump to: navigation, search
(Two issues with the code in test-widget.c)
Line 1: Line 1:
 +
=[http://olitudyxej.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
0) I ran into two (related) issues with the code in test-widget.c:
0) I ran into two (related) issues with the code in test-widget.c:
*libabiword_init clobbers argv
*libabiword_init clobbers argv
-
*abi_widget_load_file expects to be fed an "uri" (and not the simple path string I guessed it wanted).
+
*abi_widget_load_file expects to be fed an "uri" (and not the simple path string I guessed it wanted).
1) Can someone please confirm? If correct I could change the code to something like this:
1) Can someone please confirm? If correct I could change the code to something like this:
Line 15: Line 16:
  [...]
  [...]
  if (uri)
  if (uri)
-
     abi_widget_load_file (ABI_WIDGET (abi), uri, "");
+
     abi_widget_load_file (ABI_WIDGET (abi), uri, "");
  [...]
  [...]
[[User:Peb|Peb]] 11:54, 19 November 2009 (CET)
[[User:Peb|Peb]] 11:54, 19 November 2009 (CET)

Revision as of 02:55, 24 November 2010

Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page

0) I ran into two (related) issues with the code in test-widget.c:

  • libabiword_init clobbers argv
  • abi_widget_load_file expects to be fed an "uri" (and not the simple path string I guessed it wanted).

1) Can someone please confirm? If correct I could change the code to something like this:

[...]
gchar *uri = NULL;
[...]
if (argv[1])
    uri = g_filename_to_uri (argv[1], NULL, NULL);

/* Initialize libabiword */
libabiword_init(argc, (char **)argv);
[...]
if (uri)
    abi_widget_load_file (ABI_WIDGET (abi), uri, "");
[...]

Peb 11:54, 19 November 2009 (CET)

Personal tools