~verterok/ubuntuone-client/fix-987376

« back to all changes in this revision

Viewing changes to gsd-plugin/test-gsd-ubuntuone.c

  • Committer: Alejandro J. Cura
  • Date: 2010-07-14 04:11:20 UTC
  • mto: This revision was merged to the branch mainline in revision 578.
  • Revision ID: alecu@canonical.com-20100714041120-va8cjghubtb01s03
starting from scratch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
 
2
 * 
 
3
 * Authors: Alejandro J. Cura <alecu@canonical.com>
 
4
 *
 
5
 * Copyright (C) 2010 Canonical Ltd.
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License version 3,
 
9
 * as published by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 */
 
20
 
 
21
#include "config.h"
 
22
 
 
23
#include <stdlib.h>
 
24
#include <libintl.h>
 
25
#include <locale.h>
 
26
#include <string.h>
 
27
#include <unistd.h>
 
28
 
 
29
#include <glib/gi18n.h>
 
30
#include <gtk/gtk.h>
 
31
 
 
32
#include "gsd-ubuntuone.h"
 
33
 
 
34
static gboolean
 
35
idle (GsdUbuntuOne *plugin)
 
36
{
 
37
        gsd_ubuntuone_activate (GNOME_SETTINGS_PLUGIN (plugin));
 
38
        return FALSE;
 
39
}
 
40
 
 
41
int
 
42
main (int argc, char *argv[])
 
43
{
 
44
        GsdUbuntuOne *plugin;
 
45
 
 
46
        bindtextdomain (GETTEXT_PACKAGE, GNOME_SETTINGS_LOCALEDIR);
 
47
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
48
        textdomain (GETTEXT_PACKAGE);
 
49
 
 
50
        setlocale (LC_ALL, "");
 
51
 
 
52
        gtk_init (&argc, &argv);
 
53
 
 
54
        plugin = g_object_new (GSD_TYPE_UBUNTUONE, NULL);
 
55
        g_idle_add ((GSourceFunc)idle, plugin);
 
56
 
 
57
        gtk_main ();
 
58
 
 
59
        return 0;
 
60
}