How do you implement help (using mallard) for a gtk3 app? - gtk3

I am trying to create my own gtk3 application. I like to use mallard to display some help about how to use my application. However I do not know how to code such that when the help menu item is clicked the help (mallard) is shown. I have the .page files already ready.
Please note, I am not asking how to create help files using mallard. But rather how to integrate mallard into my gtk3 help.

Good question. In cases like this, I always look on git.gnome.org to see how Gedit does it. That's an excellent 'example' application.
First, look here at how they organize their help files:
help
\--C
| \--*.page
\--Makefile.am
\--ar
\--bg
\--ca
\--...other languages...
In help/Makefile.am, they use #YELP_HELP_RULES# to install the files (which is set up by YELP_HELP_INIT in configure.ac.)
Then, when the user clicks Help/Contents, they open the URI help:gedit or help:gedit/link_id with gtk_show_uri() (see here, in the functions gedit_app_show_help_impl() and gedit_app_help_link_id_impl()) The files are then, presumably, automatically fetched by the desktop help system, translated into the proper language, and displayed in Yelp.

Related

How can I do Junit tests for Google Maps in Android?

I am using the Google Maps API in an Android project and now I need to test it using JUnit if possible. (I am somewhat new to both JUnit and Google Maps.) I have been scouring the internet but was unable to find anything.
The map view has dots/pins for stations and when I tap one I get a balloon popup with the name and other info. Then when I tap the balloon I get a new view with information about the location and actions to perform such as navigate.
What I want to know is, is it possible to write a JUnit test case that finds all these dots/pins, taps them, and verifies information on the new view that pops up? Additionally, I would like to change/mock the location that the GPS has and see what happens if I try to, say navigate overseas or something like that.
I do have a list view of the same locations which I will test as well, but I would like to know if there is a way to test the map view.
I would prefer an automated test script like what JUnit provides. If this is not possible with JUnit what is the best alternative?
I am working with Android 4.0 and using Eclipse.
Any help would be greatly appreciated.
In case anyone wants to know after much searching I finally found something that can test Google Maps. Things such as zoom level and I believe tap pin (method is called tapMapMarkerItem()) are supported. I have not tested the pin tap yet tho.
Apparently the awesome Robotium does not support map testing by itself. Nicholas Albion was nice enough to create an extension to provides testing support for maps on Android. Thank you so much Nicholas!
So here it is:
1. Download the Robotium jars from robotium.org (I found this helpful http://www.vogella.com/articles/AndroidTesting/article.html - by Lars Vogel)
2. Download the extension from https://github.com/nalbion/robotium-maps

Intellij Idea plugin - possibility to click on an link of class/file to open it

Could you please suggest how is it possible to implement the next thing : when the user clicks on the file name/line number, the editor is switched to that file.
P.S. The source code is available there.
Check the following classes/methods:
com.intellij.execution.filters.TextConsoleBuilder#addFilter
com.intellij.execution.filters.RegexpFilter
Usage example:
org.intellij.lang.xpath.xslt.run.CustomRegexpFilter
org.intellij.lang.xpath.xslt.run.XsltRunConfiguration#getState
See also Output Filters Dialog help section.

Converting 'Current Location' Languages OR passing lon/lat

To whoever that can help,
My question comes from another topic # Open Maps app from Code - Where/How to find the "Current Location"?.
Did anyone successfully use the source code from martip # http://www.martip.net/blog/localized-current-location-string-for-iphone-apps with the ‘LocalizedCurrentLocation.zip’ file?
I've been trying but I'm not sure where I should place the example codes & how to 'call' the strings. I'm sorry for posting such newbie question but I have no where else to go~
I’ve been trying to work with it but I’m kinda lost. I’m not sure how to ‘call’ the localized string and use the ‘example usage’. I apologize for asking such a newbie question.
Please help me out here as I’m scratching my head over this matter. Anyone? Please~
Thanks in advance!^^
P/S: I'm actually trying to open iPhone maps from my app with directions from 'Current Location'. I know there are 2 ways of doing it; by CoreLocation (pass lon/lat) and replacing 'Current Location' with Strings BUT as I mention I'm a real beginner here and would appreciate it if anyone can advise & instruct me on which way is better & how to accomplish it. Btw, I'm using jquery and phonegap.
I have just completed the same task for current location. I came to know that, probably u also know that, we can't get current location in simulator. For just checking that is ur app working for location, u can add .gpx file and set ur current static location.
This is what I know...:)

Gtkwebkit, save html to pdf

Last days I search for best and shortest way to convert html files to pdf. Since I create my html files with C program and see them through gtkwebkit which uses cairo it should be some efficient and direct way to convert content of showed page to html with C (I think).
But can't find any example or direction to go on the net.
Until now, among different virtual printers, I find only commandline tools which are maded in perl or which depends on qt what is not wanted.
Please for any suggestion, example or advice to get this functionality from gtkwebkit and if not, maybe something with some tiny C library.
As far as I can tell from reading the documentation (haven't tried it out myself):
Get the main frame with webkit_web_view_get_main_frame().
Create a GtkPrintOperation with gtk_print_operation_new().
Set the export-file property on your print operation to be the name of the PDF you want to export to.
Print the frame with webkit_web_frame_print_full(). Make sure to pass GTK_PRINT_OPERATION_ACTION_EXPORT as the 'action' parameter.
I once wrote some code, to accomplish that without opening a window. But then I ran into a problem with using that code from multiple threads (in a webserver e.g.). I made some research and I figured out that gtk itself is single threaded. So I made my code thread safe, by queuing the print operations to the main thread. Anyway, if it helps, check it out... https://github.com/gnudles/wkgtkprinter

Call Progress Procedure in kSoap

I'm completely new with Progress. I'm trying to access my Progress Procedure (which works when I export it as an XML-page) in my Android app. I'm using kSoap to do the trick, because I've had some decent results of it.
But I can't seem to access my Progress Procedure in my Android project, can anyone help me to do this?
Thank you very much.
Hannelore, from your comment it looks like you're trying to access your .P via WebSpeed, which is not the same thing as WebServices (it's more of a normal web server).
The URL should look something like http://localhost:8080/wsa/wsa1 (depending on your config). You'll need to install the WSA (WebServicesAdapter from progress.com/esd if you don't have it already), and also something like Tomcat.
Lots more details in the OpenEdge doc (here); specifically look at the OpenEdge Development:Web Services book
-- peter