2005-10-26 [wwp] 1.9.15cvs110
[claws.git] / src / manual.c
index 4eb9060ca48657c91830004d29f03108dc835d18..ddd07546d883a4a9651293b4d8560e18153c1d70 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
 
 #include <glib.h>
 #include <string.h>
-#include <locale.h>
+
+#if HAVE_LOCALE_H
+#  include <locale.h>
+#endif
+
 
 #include "prefs_common.h"
 #include "manual.h"
+#include "utils.h"
 
 static gchar *sylpheeddoc_manuals[] =
 {
@@ -43,7 +48,7 @@ static gchar *get_language()
        gchar *language;
        gchar *c;
 
-       language = g_strdup(setlocale(LC_ALL, NULL));
+       language = g_strdup(setlocale(LC_MESSAGES, NULL));
        if((c = strchr(language, ',')) != NULL)
                *c = '\0';
        if((c = strchr(language, '_')) != NULL)
@@ -141,16 +146,20 @@ void manual_open(ManualType type)
 
                case MANUAL_MANUAL_SYLDOC:
                        lang_str = get_syldoc_language();
-                       uri = g_strconcat("http://sylpheeddoc.sourceforge.net/", lang_str, "/manual/manual.html", NULL);
+                       uri = g_strconcat(SYLDOC_URI, lang_str, SYLDOC_MANUAL_HTML_INDEX, NULL);
                        g_free(lang_str);
                        break;
 
                case MANUAL_FAQ_SYLDOC:
                        lang_str = get_syldoc_language();
-                       uri = g_strconcat("http://sylpheeddoc.sourceforge.net/", lang_str, "/faq/faq.html", NULL);
+                       uri = g_strconcat(SYLDOC_URI, lang_str, SYLDOC_FAQ_HTML_INDEX, NULL);
                        g_free(lang_str);
                        break;
 
+               case MANUAL_FAQ_CLAWS:
+                       uri = g_strconcat(FAQ_URI, NULL);
+                       break;
+
                default:
                        break;
        }