# Copyright (C) 2007,2009 Osmo Salomaa
#
# This file is part of Gaupol.
#
# Gaupol is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# Gaupol is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Gaupol. If not, see <http://www.gnu.org/licenses/>.

"""Website URLs.

:var BUG_REPORT_URL: Web page where to submit new bug reports
:var EXTENSIONS_URL: Web page listing third party extensions
:var HOMEPAGE_URL: Web page of the Gaupol project
:var PREVIEW_HELP_URL: Documentation on the preview function
:var REGEX_HELP_URL: Documentation on regular expressions
:var SPEECH_RECOGNITION_HELP_URL: Documentation on speech recognition
:var WIKI_URL: Wiki documentation
"""

import gaupol
import gtk

__all__ = ("BUG_REPORT_URL",
           "EXTENSIONS_URL",
           "HOMEPAGE_URL",
           "PREVIEW_HELP_URL",
           "REGEX_HELP_URL",
           "SPEECH_RECOGNITION_HELP_URL",
           "WIKI_URL")

BUG_REPORT_URL = "http://bugzilla.gnome.org/enter_bug.cgi?product=gaupol"
EXTENSIONS_URL = "http://live.gnome.org/Gaupol/Extensions"
HOMEPAGE_URL = "http://home.gna.org/gaupol/"
PREVIEW_HELP_URL = "http://live.gnome.org/Gaupol/Preview"
REGEX_HELP_URL = "http://docs.python.org/lib/re-syntax.html"
SPEECH_RECOGNITION_HELP_URL = "http://live.gnome.org/Gaupol/SpeechRecognition"
WIKI_URL = "http://live.gnome.org/Gaupol"

def _on_link_button_clicked(link_button, uri):
    return gaupol.util.show_uri(uri)
gtk.link_button_set_uri_hook(_on_link_button_clicked)
