libgeetk r10 - in trunk/geetk: gridview ribbon samples



Author: fzipp
Date: Thu Jul 24 16:55:32 2008
New Revision: 10
URL: http://svn.gnome.org/viewvc/libgeetk?rev=10&view=rev

Log:
Make gridviewdeo compile.



Added:
   trunk/geetk/samples/Makefile
Modified:
   trunk/geetk/gridview/gridview.vala
   trunk/geetk/ribbon/helpers.vala
   trunk/geetk/samples/gridviewdemo.c
   trunk/geetk/samples/ribbondemo.vala

Modified: trunk/geetk/gridview/gridview.vala
==============================================================================
--- trunk/geetk/gridview/gridview.vala	(original)
+++ trunk/geetk/gridview/gridview.vala	Thu Jul 24 16:55:32 2008
@@ -188,9 +188,7 @@
 			foreach (string prop in attrs.get_keys ()) {
 				// XXX-VALA parameter v should be out instead of ref
 				m.get_value (i, attrs.get (prop), ref v);
-				// XXX-VALA set_property () is missing in glib.vapi
-				// FIXME GEETK : Don't compile, missing set_property
-				//r.set_property(prop, v);
+				r.set_property(prop, v);
 			}
 
 			if (h && _hdf != null) {
@@ -612,7 +610,7 @@
 			return _columns.size;
 		}
 
-		public bool get_selectable (TreePath path, GridViewColumn col) {
+		public bool get_selectable (TreePath? path, GridViewColumn? col) {
 			TreeIter i;
 
 			return col != null &&
@@ -914,7 +912,7 @@
 			// XXX
 		}
 
-		private void on_style_set (GridView s) {
+		private void on_style_set (GridView s, Style? style) {
 			rebuild_dimensions ();
 		}
 
@@ -1165,7 +1163,7 @@
 			return false;
 		}
 
-		private void on_fda_style_set (DrawingArea da, Style style) {
+		private void on_fda_style_set (DrawingArea da, Style? style) {
 			if ((fda.get_flags () & WidgetFlags.REALIZED) != 0) {
 				fda.window.set_background (fda style  base[(int) fda.state]);
 			}
@@ -1477,7 +1475,7 @@
 
 // XXX-VALA: these are additional helper definitions for the Vala port
 
-namespace Gtk {
+namespace Geetk {
 
 	public struct RenderAttribute {
 

Modified: trunk/geetk/ribbon/helpers.vala
==============================================================================
--- trunk/geetk/ribbon/helpers.vala	(original)
+++ trunk/geetk/ribbon/helpers.vala	Thu Jul 24 16:55:32 2008
@@ -72,20 +72,6 @@
 	}
 }
 
-namespace Gtk {
-
-	public static ComboBox combo_box_from_entries (string[] entries) {
-		var combo = new ComboBox.with_model (new ListStore (1, typeof (string)));
-		var cell = new CellRendererText ();
-		combo.pack_start (cell, true);
-		combo.set_attributes (cell, "text", 0);
-		foreach (var entry in entries) {
-			combo.append_text (entry);
-		}
-		return combo;
-	}
-}
-
 public struct Color {
 
 	public double r;

Added: trunk/geetk/samples/Makefile
==============================================================================
--- (empty file)
+++ trunk/geetk/samples/Makefile	Thu Jul 24 16:55:32 2008
@@ -0,0 +1,11 @@
+all: gridviewdemo ribbondemo
+
+gridviewdemo: gridviewdemo.c
+	gcc gridviewdemo.c `pkg-config gtk+-2.0 --cflags --libs` `pkg-config geetk-1.0 --cflags --libs` -o gridviewdemo
+
+ribbondemo:
+	valac --pkg gtk+-2.0 --pkg geetk-1.0 --pkg gee-1.0 --disable-non-null ribbondemo.vala -o ribbondemo
+
+clean:
+	rm -f gridviewdemo
+	rm -f ribbondemo

Modified: trunk/geetk/samples/gridviewdemo.c
==============================================================================
--- trunk/geetk/samples/gridviewdemo.c	(original)
+++ trunk/geetk/samples/gridviewdemo.c	Thu Jul 24 16:55:32 2008
@@ -101,7 +101,7 @@
 
 	for (i = 0; i < n_columns; i++) {
 		GtkCellRenderer* renderer = gtk_cell_renderer_text_new ();
-		GtkRenderAttribute attrs[] = { {"text", i} };
+		GeetkRenderAttribute attrs[] = { {"text", i} };
 		geetk_grid_view_append_column_with_attributes (grid_view, renderer,
 		                                               attrs, 1);
 	}

Modified: trunk/geetk/samples/ribbondemo.vala
==============================================================================
--- trunk/geetk/samples/ribbondemo.vala	(original)
+++ trunk/geetk/samples/ribbondemo.vala	Thu Jul 24 16:55:32 2008
@@ -206,3 +206,17 @@
 	}
 }
 
+namespace Gtk {
+
+	public static ComboBox combo_box_from_entries (string[] entries) {
+		var combo = new ComboBox.with_model (new ListStore (1, typeof (string)));
+		var cell = new CellRendererText ();
+		combo.pack_start (cell, true);
+		combo.set_attributes (cell, "text", 0);
+		foreach (var entry in entries) {
+			combo.append_text (entry);
+		}
+		return combo;
+	}
+}
+



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