~ubuntu-branches/ubuntu/precise/gedit/precise

« back to all changes in this revision

Viewing changes to gedit/gedit-dirs.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-04-14 16:41:13 UTC
  • mfrom: (1.1.78 upstream)
  • Revision ID: james.westby@ubuntu.com-20100414164113-0xgl3u73pcs0ngbc
Tags: 2.30.0git20100413-0ubuntu1
* Updating to git snaptshot since 2.30.1 will be after lucid
* debian/patches/90_autoconf.patch:
  - new version update

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        gchar *config_dir = NULL;
37
37
 
38
38
#ifndef G_OS_WIN32
 
39
        const gchar *envvar;
39
40
        const gchar *home;
40
 
        
41
 
        home = g_get_home_dir ();
42
41
 
43
 
        if (home != NULL)
 
42
        /* Support old libgnome env var */
 
43
        envvar = g_getenv ("GNOME22_USER_DIR");
 
44
        if (envvar != NULL)
44
45
        {
45
 
                config_dir = g_build_filename (home,
46
 
                                               ".gnome2",
 
46
                config_dir = g_build_filename (envvar,
47
47
                                               "gedit",
48
48
                                               NULL);
 
49
 
 
50
        }
 
51
        else
 
52
        {
 
53
                home = g_get_home_dir ();
 
54
 
 
55
                if (home != NULL)
 
56
                {
 
57
                        config_dir = g_build_filename (home,
 
58
                                                       ".gnome2",
 
59
                                                       "gedit",
 
60
                                                       NULL);
 
61
                }
49
62
        }
50
63
#else
51
64
        config_dir = g_build_filename (g_get_user_config_dir (),
90
103
        gchar *accels = NULL;
91
104
 
92
105
#ifndef G_OS_WIN32
 
106
        const gchar *envvar;
93
107
        const gchar *home;
94
 
        
95
 
        home = g_get_home_dir ();
96
 
 
97
 
        if (home != NULL)
 
108
 
 
109
        /* on linux accels are stored in .gnome2/accels
 
110
         * for historic reasons (backward compat with the
 
111
         * old libgnome that took care of saving them */
 
112
 
 
113
        /* Support old libgnome env var */
 
114
        envvar = g_getenv ("GNOME22_USER_DIR");
 
115
        if (envvar != NULL)
98
116
        {
99
 
                /* on linux accels are stored in .gnome2/accels
100
 
                 * for historic reasons (backward compat with the
101
 
                 * old libgnome that took care of saving them */
102
 
                accels = g_build_filename (home,
103
 
                                           ".gnome2",
 
117
                accels = g_build_filename (envvar,
104
118
                                           "accels",
105
119
                                           "gedit",
106
120
                                           NULL);
107
121
        }
 
122
        else
 
123
        {
 
124
                home = g_get_home_dir ();
 
125
 
 
126
                if (home != NULL)
 
127
                {
 
128
                        accels = g_build_filename (home,
 
129
                                                   ".gnome2",
 
130
                                                   "accels",
 
131
                                                   "gedit",
 
132
                                                   NULL);
 
133
                }
 
134
        }
108
135
#else
109
136
        {
110
137
                gchar *config_dir = NULL;