~joel-auterson/ubuntu/maverick/ibus/newmenuname

« back to all changes in this revision

Viewing changes to src/ibusbus.c

  • Committer: Bazaar Package Importer
  • Author(s): LI Daobing
  • Date: 2009-10-05 20:45:18 UTC
  • mfrom: (1.1.5 upstream) (6.1.15 sid)
  • Revision ID: james.westby@ubuntu.com-20091005204518-069vlwrl3r8v7bbr
Tags: 1.2.0.20090927-2
* create po template when build (LP: #188690)
  - debian/rules: updated.
  - debian/clean: remove pot file when clean.
* debian/control: build depends on python-rsvg (LP: #432375)

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
static void
181
181
ibus_bus_connect (IBusBus *bus)
182
182
{
183
 
    const gchar *socket_path;
184
 
    struct stat buf;
185
 
 
186
183
    IBusBusPrivate *priv;
187
184
    priv = IBUS_BUS_GET_PRIVATE (bus);
188
185
 
239
236
ibus_bus_init (IBusBus *bus)
240
237
{
241
238
    struct stat buf;
242
 
    const gchar *path;
 
239
    gchar *path;
243
240
    GFile *file;
244
241
 
245
242
    IBusBusPrivate *priv;
249
246
    priv->connection = NULL;
250
247
    priv->watch_dbus_signal = FALSE;
251
248
 
252
 
    path = ibus_get_socket_path ();
 
249
    path = g_path_get_dirname (ibus_get_socket_path ());
253
250
 
254
251
    if (stat (path, &buf) == 0) {
255
252
        if (buf.st_uid != ibus_get_daemon_uid ()) {
257
254
            return;
258
255
        }
259
256
    }
 
257
#if 0
260
258
    else {
261
259
        if (getuid () == ibus_get_daemon_uid ()) {
262
260
            mkdir (path, 0700);
263
261
            chmod (path, 0700);
264
262
        }
265
263
    }
 
264
#endif
266
265
 
267
266
    ibus_bus_connect (bus);
268
267
 
269
268
 
270
 
    file = g_file_new_for_path (path);
 
269
    file = g_file_new_for_path (ibus_get_socket_path ());
271
270
    priv->monitor = g_file_monitor_file (file, 0, NULL, NULL);
272
271
 
273
272
    g_signal_connect (priv->monitor, "changed", (GCallback) _changed_cb, bus);
274
273
 
275
274
    g_object_unref (file);
 
275
    g_free (path);
276
276
}
277
277
 
278
278
static void