First go at using Gtk3. Everything builds but there is stuff (Pango modules) missing... gtk3-branch
authorPete Fotheringham <pete.fotheringham@codethink.co.uk>
Tue, 10 Jan 2012 08:31:13 +0000 (08:31 +0000)
committerPete Fotheringham <pete.fotheringham@codethink.co.uk>
Tue, 10 Jan 2012 08:31:13 +0000 (08:31 +0000)
Makefile.am
configure.ac
mac/gtkrc
mac/launcher.sh
mac/moonshot-ui.bundle
mac/moonshot-ui.plist
src/moonshot-identity-manager-app.vala
src/moonshot-local-flat-file-store.vala

index 20df4f8..bf49796 100644 (file)
@@ -52,7 +52,7 @@ src_moonshot_webp_SOURCES = \
         src/moonshot-webp-parser.vala \
         src/moonshot-id.vala
 
-src_moonshot_VALAFLAGS = --pkg gdk-2.0 --pkg gtk+-2.0 --pkg gee-1.0 $(AM_VALAFLAGS)
+src_moonshot_VALAFLAGS =--pkg gee-1.0 $(AM_VALAFLAGS)
 src_moonshot_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
 src_moonshot_LDADD = $(moonshot_LIBS)
 
@@ -68,7 +68,7 @@ src_moonshot_CFLAGS = -mwindows
 src_moonshot_webp_CFLAGS = -mwindows
     
 AM_CPPFLAGS += -DOS_WIN32
-AM_VALAFLAGS += --define=OS_WIN32
+AM_VALAFLAGS += --define=OS_WIN32 --pkg gdk-2.0 --pkg gtk+-2.0 
 
 noinst_DATA = libmoonshot/libmoonshot.lib
 
@@ -82,12 +82,14 @@ endif
 if  OS_MACOS
 
 AM_CPPFLAGS += -DOS_MACOS
-AM_VALAFLAGS += --define=OS_MACOS
+AM_VALAFLAGS += --define=OS_MACOS --pkg gdk-3.0 --pkg gtk+-3.0 
 
 endif
 
 if OS_LINUX
 
+AM_VALAFLAGS += --define=OS_MACOS --pkg gdk-2.0 --pkg gtk+-2.0 
+
 ## Installing mime type data
 mimedir = $(datadir)/mime/packages
 mime_DATA = webprovisioning/moonshot.xml
index 7a433fe..551f8dc 100644 (file)
@@ -57,9 +57,13 @@ case "$host" in
 # TODO: Move to GTK+-3
 #            [gtk+-3.0 >= 2.0],
 #            [GTK_VERSION="gtk+-3.0"]
+
+#            [gtk+-2.0 >= 2.18],
+#            [GTK_VERSION="gtk+-2.0"]
+
     PKG_CHECK_MODULES([GTK],
-            [gtk+-2.0 >= 2.18],
-            [GTK_VERSION="gtk+-2.0"]
+            [gtk+-3.0 >= 2.0],
+            [GTK_VERSION="gtk+-3.0"]
     )
 
     ;;
index ba5477c..cdd995e 100644 (file)
--- a/mac/gtkrc
+++ b/mac/gtkrc
@@ -1,2 +1,2 @@
-gtk-icon-theme-name = "Tango"
-gtk-enable-mnemonics = 0
+gtk-icon-theme-name = "Gnome"
+gtk-enable-mnemonics = 1
index d92f9e5..0a001dd 100755 (executable)
@@ -29,9 +29,9 @@ export GTK_DATA_PREFIX="$bundle_res"
 export GTK_EXE_PREFIX="$bundle_res"
 export GTK_PATH="$bundle_res"
 
-export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
-export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
-export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
+export GTK2_RC_FILES="$bundle_etc/gtk-3.0/gtkrc"
+export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules"
+export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-3.0/gdk-pixbuf.loaders"
 export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
 
 APP=name
index ae0b2e7..5a8f85e 100644 (file)
 
     <!-- Not implemented: Optional runtime, could be python or mono
          for example.
-    -->
+    --> 
     <!-- runtime copy="yes">/usr/bin/python</runtime -->
     <!-- Indicate the active gtk version to use. This is needed only
          for gtk+-3.0 projects. -->
-    <gtk>gtk+-2.0</gtk>
+    <gtk>gtk+-3.0</gtk>
   </meta>
 
   <!-- The special macro "${project}" refers to the directory where
        to the correct library subdirectory for the specified gtk
        version.
   -->
+       <!--      ${prefix}/lib/${gtkdir}/modules/*.so -->
   <binary>
-     ${prefix}/lib/${gtkdir}/modules/*.so
+         ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/*.so
   </binary>
-
   <!-- Copy in GTK+ theme engines and print backends. Note the use of the
        "${pkg:module:variable}" macro, which evaluates to a pkg-config
        variable in the specified module. Note that any libraries that
        binaries link to are also copied in automatically.  Note also
        the included ${gtk} macro, which gets the correct package name
        to get. -->
-  <binary>
-    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/*.so
-  </binary>
+
   <binary>
     ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
   </binary>
 
-<!-- Starting with 2.24, gdk-pixbuf installs into its own directory. -->
-  <binary>
-    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/*.so
-  </binary>
 
   <!-- Translation filenames, one for each program or library that you
        want to copy in to the bundle. The "dest" attribute is
        optional, as usual. Bundler will find all translations of that
        library/program under the indicated directory and copy them.-->
-  <translations name="gtk20">
+  <translations name="gtk30">
     ${prefix}/share/locale
   </translations>
 
@@ -98,7 +92,7 @@
     ${prefix}/share/moonshot-ui
   </data -->
 
-  <!-- Copy in the themes data. You may want to trim this to save space
+  <!-- Copy in the themes data. You may want to trim this to save space 
        in your bundle. -->
   <data>
     ${prefix}/share/themes
        needed for the "hicolor" base theme.
   >-->
   <icon-theme icons="all">
+    Gnome
+  </icon-theme>
+  <icon-theme icons="auto">
     Tango
   </icon-theme>
-
 </app-bundle>
index 445cb80..19b3c47 100644 (file)
@@ -7,11 +7,11 @@
        <key>CFBundleExecutable</key>
        <string>moonshot-ui</string>
        <key>CFBundleGetInfoString</key>
-       <string>0.3, Copyright 2006-2007 Imendio AB</string>
+       <string>Copyright (c) 2011, JANET(UK)</string>
        <key>CFBundleIconFile</key>
        <string>Giggle.icns</string>
        <key>CFBundleIdentifier</key>
-       <string>com.imendio.Giggle</string>
+       <string>net.ja.moonshot-ui</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundlePackageType</key>
@@ -23,8 +23,8 @@
        <key>CFBundleVersion</key>
        <string>0.3</string>
        <key>NSHumanReadableCopyright</key>
-       <string>Copyright 2006-2007 Imendio AB, GNU General Public License.</string>
+       <string>Copyright (c) 2011, JANET(UK)</string>
        <key>LSMinimumSystemVersion</key>
-       <string>10.4</string>
+       <string>10.6</string>
 </dict>
 </plist>
index 390e934..59b6a50 100644 (file)
@@ -7,6 +7,7 @@ class IdentityManagerApp : Window {
     private const int WINDOW_WIDTH = 400;
     private const int WINDOW_HEIGHT = 500;
     public void show() {
+               if (view != null)
         view.show();    
     }
     public IdentityManagerApp () {
index 22981f5..222d9bc 100644 (file)
@@ -29,7 +29,8 @@ public class LocalFlatFileStore : Object, IIdentityCardStore {
         var key_file = new KeyFile ();
         var path = get_data_dir ();
         var filename = Path.build_filename (path, FILE_NAME);
-        
+  print("%s\n".printf(filename));
+      
         try {
             key_file.load_from_file (filename, KeyFileFlags.NONE);
         }