elementaryart team mailing list archive
-
elementaryart team
-
Mailing list archive
-
Message #01848
[Merge] lp:~xapantu/granite/graniteinit into lp:granite
xapantu has proposed merging lp:~xapantu/granite/graniteinit into lp:granite.
Requested reviews:
elementary Pantheon team (elementary-pantheon)
For more details, see:
https://code.launchpad.net/~xapantu/granite/graniteinit/+merge/81312
Add a Granite.init function, which is called transparently by Granite.Application. It may be needed for the future, if we want to deal with clutter, or with some other things like that.
--
https://code.launchpad.net/~xapantu/granite/graniteinit/+merge/81312
Your team elementaryart (old) is subscribed to branch lp:granite.
=== modified file 'demo/CMakeLists.txt'
--- demo/CMakeLists.txt 2011-09-27 19:26:06 +0000
+++ demo/CMakeLists.txt 2011-11-04 18:52:23 +0000
@@ -2,9 +2,7 @@
include(ValaVersion)
ensure_vala_version("0.11.3" MINIMUM)
include(ValaPrecompile)
-
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../lib/)
-
# pkgconfig, real C code
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -12,13 +10,10 @@
find_package(PkgConfig)
pkg_check_modules(DEPS REQUIRED gtk+-3.0)
-
set(CFLAGS ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER} )
set(LIB_PATHS ${DEPS_LIBRARY_DIRS})
-
link_directories(${LIB_PATHS} ${CMAKE_CURRENT_BINARY_DIR}/../lib/)
add_definitions(${CFLAGS})
-
vala_precompile(VALA_C
main.vala
CUSTOM_VAPIS
=== modified file 'demo/main.vala'
--- demo/main.vala 2011-10-15 20:49:49 +0000
+++ demo/main.vala 2011-11-04 18:52:23 +0000
@@ -182,7 +182,7 @@
public static int main(string[] args)
{
- Gtk.init(ref args);
+ Granite.init(ref args);
new Granite.Demo();
Gtk.main();
=== modified file 'lib/Application.vala'
--- lib/Application.vala 2011-10-24 20:20:21 +0000
+++ lib/Application.vala 2011-11-04 18:52:23 +0000
@@ -69,6 +69,8 @@
public Application () {
+
+ Granite.init ();
// set program name
prctl (15, exec_name, 0, 0, 0);
Environment.set_prgname (exec_name);
@@ -86,10 +88,6 @@
Intl.bindtextdomain (exec_name, build_data_dir + "/locale");
- if (!Thread.supported ())
- error ("Problem initializing thread support.");
- Gdk.threads_init ();
-
// Deprecated
Granite.app = this;
=== modified file 'lib/CMakeLists.txt'
--- lib/CMakeLists.txt 2011-10-30 20:48:16 +0000
+++ lib/CMakeLists.txt 2011-11-04 18:52:23 +0000
@@ -67,6 +67,7 @@
Widgets/Welcome.vala
Widgets/ToolButtonWithMenu.vala
Widgets/PopOver.vala
+ Main.vala
config.vapi
CUSTOM_VAPIS
${CMAKE_CURRENT_SOURCE_DIR}/GtkPatch/gtkpatch-utils.vapi
=== added file 'lib/Main.vala'
--- lib/Main.vala 1970-01-01 00:00:00 +0000
+++ lib/Main.vala 2011-11-04 18:52:23 +0000
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2011 Lucas Baudin <xapantu@xxxxxxxxx>
+ *
+ * This is a 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 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This 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; see the file COPYING. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+namespace Granite {
+ public void init () {
+ if (!Thread.supported ())
+ error ("Problem initializing thread support.");
+ Gdk.threads_init ();
+ }
+}
\ No newline at end of file
Follow ups