Re: Finding path of file / folder present on emulator
Hi, I am working on N900 emulator. When i use the following commands in my code getenv(HOME) or getenv(MYDOCSDIR) they give me the path present on Scratchbox file-system. N900 emulator contains some folders like Images listed inside File Manager folder. I want to find path of the Images folder. How can i get it? Thanks. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Finding path of file / folder present on emulator
Hi Pallavi! You can use g_get_user_special_dir(G_USER_DIRECTORY_PICTURES); http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-get-user-special-dir http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Utility-Functions.html#GUserDirectory Thanks, Daniil. On Thu, May 20, 2010 at 10:03 AM, Pallavi Kandhare pallavi.kandh...@yahoo.com wrote: Hi, I am working on N900 emulator. When i use the following commands in my code getenv(HOME) or getenv(MYDOCSDIR) they give me the path present on Scratchbox file-system. N900 emulator contains some folders like Images listed inside File Manager folder. I want to find path of the Images folder. How can i get it? Thanks. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Finding path of file / folder present on emulator
Hi Daniil, I tried using suggested APIs G_USER_DIRECTORY_DOCUMENTS, G_USER_DIRECTORY_PICTURES, G_USER_DIRECTORY_VIDEOS const char *dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS); if (dir == NULL) printf(NULL); else printf(%s,dir); But every time it returns me NULL value. It means the logical id isnt found. But these folders are present on N900 emulator Pls suggest if any thing else needs to be done? Thanks ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Finding path of file / folder present on emulator
Hi Pallavi! It works on N900 you may file a bug about scratchbox here: https://bugs.maemo.org/ const char *dir = g_strdup(g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)); if (!dir) { dir = g_strconcat (getenv(MYDOCSDIR), /.videos, NULL); } printf(%s\n, dir ? dir : NULL); g_free(dir); Thanks, Daniil. On Thu, May 20, 2010 at 11:23 AM, Pallavi Kandhare pallavi.kandh...@yahoo.com wrote: Hi Daniil, I tried using suggested APIs G_USER_DIRECTORY_DOCUMENTS, G_USER_DIRECTORY_PICTURES, G_USER_DIRECTORY_VIDEOS const char *dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS); if (dir == NULL) printf(NULL); else printf(%s,dir); But every time it returns me NULL value. It means the logical id isnt found. But these folders are present on N900 emulator Pls suggest if any thing else needs to be done? Thanks ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Finding path of file / folder present on emulator
Hi Pallavi! And what is File Manager folder? If you are asking about user's home directory, then you can get it with getenv(HOME) or getenv(MYDOCSDIR) for MyDocs directory. Thanks, Daniil. On Mon, May 17, 2010 at 8:10 AM, Pallavi Kandhare pallavi.kandh...@yahoo.com wrote: I write my appliccation using ESbox. Then build the application and run it on Xephyr. This we call as emulator. In the emulator I want to find the path of File Manager folder. Pls do tell me how can i do this. Thanks. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Finding path of file / folder present on emulator
On 2010-05-16 22:10, Pallavi Kandhare pallavi.kandh...@yahoo.com wrote: I write my appliccation using ESbox. Then build the application and run it on Xephyr. This we call as emulator. In the emulator I want to find the path of File Manager folder. Pls do tell me how can i do this. Do you mean that you want to show a file chooser dialog, like: http://maemomm.garage.maemo.org/docs/tutorial/figures/filechooser.png so that you can select a file? If so, you would use hildonfm: http://maemo.org/api_refs/5.0/5.0-final/hildonfm/HildonFileChooserDialog.html You will need to use the ‘hildon-fm-2’ module with pkg-config so that you can compile and link against the hildonfm headers and libraries. As HildonFileChooserDialog implements the GtkFileChooser interface, you will also want to read the API reference for that: http://library.gnome.org/devel/gtk/stable/GtkFileChooser.html Also, the GtkFileChooserDialog documentation has some useful examples: http://library.gnome.org/devel/gtk/stable/GtkFileChooserDialog.html I am not quite sure if this was what you wanted, so let me know if this solves your problem. -- David King | http://amigadave.com/ | dav...@openismus.com ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers