~ubuntu-branches/debian/stretch/gnome-builder/stretch

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2015-10-11 12:38:45 UTC
  • Revision ID: package-import@ubuntu.com-20151011123845-a0hvkz01se0p1p5a
Tags: upstream-3.16.3
ImportĀ upstreamĀ versionĀ 3.16.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* main.c
 
2
 *
 
3
 * Copyright (C) 2014 Christian Hergert <christian@hergert.me>
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation, either version 3 of the License, or
 
8
 * (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#define G_LOG_DOMAIN "Builder"
 
20
 
 
21
#ifdef HAVE_CONFIG_H
 
22
# include "config.h"
 
23
#endif
 
24
 
 
25
#include <glib.h>
 
26
#include <glib/gi18n.h>
 
27
#include <gtk/gtk.h>
 
28
#include <ide.h>
 
29
#include <locale.h>
 
30
 
 
31
#include "gb-application.h"
 
32
 
 
33
int
 
34
main (int   argc,
 
35
      char *argv[])
 
36
{
 
37
  GApplication *app;
 
38
  int ret;
 
39
 
 
40
  setlocale (LC_ALL, "");
 
41
 
 
42
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
 
43
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
44
  textdomain (GETTEXT_PACKAGE);
 
45
 
 
46
  g_set_prgname (PACKAGE_TARNAME);
 
47
  g_set_application_name (_("Builder"));
 
48
 
 
49
  ide_set_program_name ("gnome-builder");
 
50
 
 
51
  ide_log_init (TRUE, NULL);
 
52
 
 
53
  g_message ("Initializing with Gtk+ version %d.%d.%d.",
 
54
             gtk_get_major_version (),
 
55
             gtk_get_minor_version (),
 
56
             gtk_get_micro_version ());
 
57
 
 
58
  app = g_object_new (GB_TYPE_APPLICATION,
 
59
                      "application-id", "org.gnome.Builder",
 
60
                      "flags", G_APPLICATION_HANDLES_OPEN,
 
61
                      NULL);
 
62
  g_application_set_default (app);
 
63
  ret = g_application_run (app, argc, argv);
 
64
  g_clear_object (&app);
 
65
 
 
66
  ide_log_shutdown ();
 
67
 
 
68
  return ret;
 
69
}