~ubuntu-branches/ubuntu/oneiric/gtkhtml3.14/oneiric

« back to all changes in this revision

Viewing changes to components/editor/gtkhtml-spell-language.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-06-21 14:39:07 UTC
  • mfrom: (1.6.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100621143907-h5ph2c0xl03keu1m
Tags: 1:3.30.2-0ubuntu1
* New upstream release:
  - Wrong letter color with HTML content rendering (Milan Crha)
  - Crash after closing an inline view of text attachment
    (Chenthill Palanisamy) (LP: #178959)
  - Cursor/caret mode breaks magic spacebar (Milan Crha)
  - Crash doing table editing. (Bharath Acharya)
  - Translations not working in Emoticons and Find/Replace dialogs.
    (Mario Carrion)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
#define ISOCODESLOCALEDIR ISO_CODES_PREFIX "/share/locale"
42
42
 
 
43
#ifdef G_OS_WIN32
 
44
#ifdef DATADIR
 
45
#undef DATADIR
 
46
#endif
 
47
#include <shlobj.h>
 
48
static HMODULE hmodule;
 
49
 
 
50
BOOL WINAPI
 
51
DllMain (HINSTANCE hinstDLL,
 
52
         DWORD     fdwReason,
 
53
         LPVOID    lpvReserved);
 
54
 
 
55
BOOL WINAPI
 
56
DllMain (HINSTANCE hinstDLL,
 
57
         DWORD     fdwReason,
 
58
         LPVOID    lpvReserved)
 
59
{
 
60
        switch (fdwReason)
 
61
    {
 
62
    case DLL_PROCESS_ATTACH:
 
63
                hmodule = hinstDLL;
 
64
                break;
 
65
    }
 
66
 
 
67
        return TRUE;
 
68
}
 
69
 
 
70
static gchar *
 
71
_get_iso_codes_prefix (void)
 
72
{
 
73
        static gchar retval[1000];
 
74
        static gint beenhere = 0;
 
75
        gchar *temp_dir = 0;
 
76
 
 
77
        if (beenhere)
 
78
                return retval;
 
79
 
 
80
        if (!(temp_dir = g_win32_get_package_installation_directory_of_module ((gpointer)hmodule))) {
 
81
                strcpy(retval, ISO_CODES_PREFIX);
 
82
                return retval;
 
83
        }
 
84
 
 
85
        strcpy (retval, temp_dir);
 
86
        g_free (temp_dir);
 
87
        beenhere = 1;
 
88
        return retval;
 
89
}
 
90
 
 
91
static gchar *
 
92
_get_isocodeslocaledir (void)
 
93
{
 
94
        static gchar retval[1000];
 
95
        static gint beenhere = 0;
 
96
 
 
97
        if (beenhere)
 
98
                return retval;
 
99
 
 
100
        strcpy (retval, _get_iso_codes_prefix ());
 
101
        strcat (retval, "\\share\\locale" );
 
102
        beenhere = 1;
 
103
        return retval;
 
104
}
 
105
 
 
106
#undef ISO_CODES_PREFIX
 
107
#define ISO_CODES_PREFIX _get_iso_codes_prefix ()
 
108
 
 
109
#undef ISOCODESLOCALEDIR
 
110
#define ISOCODESLOCALEDIR _get_isocodeslocaledir ()
 
111
 
 
112
#endif
 
113
 
43
114
static void
44
115
iso_639_start_element (GMarkupParseContext *context,
45
116
                       const gchar *element_name,