[bijiben/wip/sadiq/rewrite: 6/12] Add main



commit dcbdf37c436c073955c90114714900e2902c6065
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Tue Feb 27 07:47:53 2018 +0530

    Add main

 src/main.c |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..ff8aafb
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,41 @@
+/* main.c
+ *
+ * Copyright 2018 Mohammed Sadiq <sadiq sadiqpk org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+#include <libintl.h>
+#include <locale.h>
+
+#include "bjb-app.h"
+
+int
+main (int   argc,
+      char *argv[])
+{
+  g_autoptr(BjbApplication) app = bjb_application_new ();
+
+  setlocale (LC_ALL, "");
+  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+
+  return g_application_run (G_APPLICATION (app), argc, argv);
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]