# Path: Wammu/Locales.py
# def StrConv(txt):
#     """
#     This function coverts something (txt) to string form usable by wxPython. There
#     is problem that in default configuration in most distros (maybe all) default
#     encoding for unicode objects is ascii. This leads to exception when converting
#     something different than ascii. And this exception is not catched inside
#     wxPython and leads to segfault.
# 
#     So if wxPython supports unicode, we give it unicode, otherwise locale
#     dependant text.
#     """
#     try:
#         if isinstance(txt, unicode):
#             return txt
#         elif isinstance(txt, str):
#             return unicode(txt, LOCALE_CHARSET)
#         return str(txt)
#     except UnicodeEncodeError:
#         return '???'
# 
# Path: Wammu/Locales.py
# def ugettext(message):
#     if _TRANSLATION:
#         if six.PY2:
#             return _TRANSLATION.ugettext(message)
#         return _TRANSLATION.gettext(message)
#     return message


import httplib
import urllib
import Wammu.Webbrowser
import re
import wx
import Wammu.TalkbackFeaturesDialog
import Wammu.Utils
import Wammu.Data
    import gammu
from Wammu.Locales import StrConv
from Wammu.Locales import ugettext as _
# This program 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 this program.  If not, see <https://www.gnu.org/licenses/>.
#
# generated by wxGlade 0.4.1 on Thu Feb  8 13:07:50 2007
'''
Wammu - Phone manager
Gammu Phone Database Talkback window
'''


if Wammu.gammu_error is None:

OK_MATCHER = re.compile('Entry created, id=(\d*), url=(.*)')
FAIL_MATCHER = re.compile('Invalid values: (.*)')

# begin wxGlade: dependencies
# end wxGlade


class TalkbackDialog(wx.Dialog):
    def __init__(self, parent, config, phoneid=0, *args, **kwds):
        # begin wxGlade: TalkbackDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.THICK_FRAME
        wx.Dialog.__init__(self, parent, *args, **kwds)
        self.main_panel = wx.Panel(self, -1)

# Path: Wammu/Locales.py
# def StrConv(txt):
#     """
#     This function coverts something (txt) to string form usable by wxPython. There
#     is problem that in default configuration in most distros (maybe all) default
#     encoding for unicode objects is ascii. This leads to exception when converting
#     something different than ascii. And this exception is not catched inside
#     wxPython and leads to segfault.
# 
#     So if wxPython supports unicode, we give it unicode, otherwise locale
#     dependant text.
#     """
#     try:
#         if isinstance(txt, unicode):
#             return txt
#         elif isinstance(txt, str):
#             return unicode(txt, LOCALE_CHARSET)
#         return str(txt)
#     except UnicodeEncodeError:
#         return '???'
# 
# Path: Wammu/Locales.py
# def ugettext(message):
#     if _TRANSLATION:
#         if six.PY2:
#             return _TRANSLATION.ugettext(message)
#         return _TRANSLATION.gettext(message)
#     return message


# Path: Wammu/TalkbackDialog.py
import httplib
import urllib
import Wammu.Webbrowser
import re
import wx
import Wammu.TalkbackFeaturesDialog
import Wammu.Utils
import Wammu.Data
    import gammu
from Wammu.Locales import StrConv
from Wammu.Locales import ugettext as _

# This program 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 this program.  If not, see <https://www.gnu.org/licenses/>.
#
# generated by wxGlade 0.4.1 on Thu Feb  8 13:07:50 2007
'''
Wammu - Phone manager
Gammu Phone Database Talkback window
'''


if Wammu.gammu_error is None:

OK_MATCHER = re.compile('Entry created, id=(\d*), url=(.*)')
FAIL_MATCHER = re.compile('Invalid values: (.*)')

# begin wxGlade: dependencies
# end wxGlade


class TalkbackDialog(wx.Dialog):
    def __init__(self, parent, config, phoneid=0, *args, **kwds):
        # begin wxGlade: TalkbackDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.THICK_FRAME
        wx.Dialog.__init__(self, parent, *args, **kwds)
        self.main_panel = wx.Panel(self, -1)

        self.info_label = wx.StaticText(self, -1, _("Please share your experiences with Wammu and Gammu which is backend library. When you fill in following form, other users can benefit from your experiences in Gammu Phone Database. Only information you see here will be submited."))