Talk:AbiWord SDK

From AbiWiki

(Difference between revisions)
Jump to: navigation, search
m (Reverted edits by Unedyxofiri (Talk) to last revision by Peb)
 
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 16: Line 15:
  [...]
  [...]
  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)

Current revision as of 13:16, 27 November 2010

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)