libgeetk r8 - in trunk: . geetk/gridview geetk/samples



Author: fzipp
Date: Wed Jul 23 09:29:00 2008
New Revision: 8
URL: http://svn.gnome.org/viewvc/libgeetk?rev=8&view=rev

Log:
Namespace update; fix libgeetk.pc.in; remove gridview.c and gridview.h


Removed:
   trunk/geetk/gridview/gridview.c
   trunk/geetk/gridview/gridview.h
Modified:
   trunk/geetk-1.0.pc.in
   trunk/geetk/gridview/gridview.vala
   trunk/geetk/samples/gridviewdemo.c
   trunk/geetk/samples/ribbondemo.vala

Modified: trunk/geetk-1.0.pc.in
==============================================================================
--- trunk/geetk-1.0.pc.in	(original)
+++ trunk/geetk-1.0.pc.in	Wed Jul 23 09:29:00 2008
@@ -6,9 +6,9 @@
 datadir= datadir@
 
 Name: libgeetk
-Description: A library that gather various Gtk+ widgets written in vala pretty much ala libsexy. 
+Description: A library that gathers various Gtk+ widgets written in Vala pretty much à la libsexy. 
 Version: @VERSION@
-Requires: glib-2.0 gobject-2.0 gtk-2.0
+Requires: glib-2.0 gobject-2.0 gtk+-2.0
 Libs: -L${libdir} -lgeetk
 Cflags: -I${includedir}/geetk-1.0
 

Modified: trunk/geetk/gridview/gridview.vala
==============================================================================
--- trunk/geetk/gridview/gridview.vala	(original)
+++ trunk/geetk/gridview/gridview.vala	Wed Jul 23 09:29:00 2008
@@ -28,7 +28,7 @@
 using Gdk;
 using Gtk;
 
-namespace Gtk {
+namespace Geetk {
 
 	public class GridSelection : GLib.Object {
 
@@ -643,10 +643,10 @@
 						rect.width > fvp.allocation.width)
 					{
 						adj.value -= adj.value - rect.x;
-					} else if (Gdk.Rect.right (rect) >
+					} else if (Rect.right (rect) >
 					           fvp.allocation.width + adj.value)
 					{
-						adj.value = Gdk.Rect.right (rect)
+						adj.value = Rect.right (rect)
 						          - fvp.allocation.width;
 					}
 				}
@@ -664,10 +664,10 @@
 					    rect.height > fvp.allocation.height)
 					{
 						adj.value -= adj.value - rect.y;
-					} else if (Gdk.Rect.bottom (rect) >
+					} else if (Rect.bottom (rect) >
 							   fvp.allocation.height + adj.value)
 					{
-						adj.value = Gdk.Rect.bottom (rect)
+						adj.value = Rect.bottom (rect)
 						          - fvp.allocation.height;
 					}
 				}
@@ -768,7 +768,7 @@
 			cda.size_allocate (wa);
 			cda.queue_draw ();
 
-			wa.x = Gdk.Rect.right ((Rectangle) cda.allocation);
+			wa.x = Rect.right ((Rectangle) cda.allocation);
 			wa.y = a.y;
 			wa.width = a.width - this.left_width - (int) this.border_width -
 			                    (_vbar_span != ScrollbarSpan.HEADER_OVERLAP ?
@@ -778,7 +778,7 @@
 			tvp.queue_draw ();
 
 			wa.x = a.x;
-			wa.y = Gdk.Rect.bottom ((Rectangle) cda.allocation);
+			wa.y = Rect.bottom ((Rectangle) cda.allocation);
 			wa.width = this.left_width;
 			wa.height = a.height - this.top_height - (int) this.border_width -
 			                    (_hbar_span != ScrollbarSpan.HEADER_OVERLAP ?
@@ -800,7 +800,7 @@
 			if (hbar.visible) {
 				gap = _hbar_span == ScrollbarSpan.FULL ? 0 : this.left_width;
 				wa.x = a.x + gap;
-				wa.y = Gdk.Rect.bottom ((Rectangle) a) - hbar_r.height;
+				wa.y = Rect.bottom ((Rectangle) a) - hbar_r.height;
 				wa.width = a.width - gap - vbar_r.width;
 				wa.height = hbar_r.height;
 				hbar.size_allocate (wa);
@@ -808,7 +808,7 @@
 
 			if (vbar.visible) {
 				gap = _vbar_span == ScrollbarSpan.FULL ? 0 : this.top_height;
-				wa.x = Gdk.Rect.right ((Rectangle) a) - vbar_r.width;
+				wa.x = Rect.right ((Rectangle) a) - vbar_r.width;
 				wa.y = a.y + gap;
 				wa.width = vbar_r.width;
 				wa.height = a.height - gap - hbar_r.height;
@@ -1377,7 +1377,7 @@
 
 			/* stretch the rightmost cell to fill the allocation */
 			if (x == _widths.size - 1) {
-				rect.width = Gdk.Rect.right ((Rectangle) fda.allocation) - rect.x;
+				rect.width = Rect.right ((Rectangle) fda.allocation) - rect.x;
 			}
 
 			return rect;
@@ -1457,11 +1457,11 @@
 			}
 
 			Gdk.draw_line (w.window, w.style.bg_gc [w.state],
-			               rect.x, Gdk.Rect.bottom (rect) - 1,
-			               Gdk.Rect.right (rect), Gdk.Rect.bottom (rect) - 1);
+			               rect.x, Rect.bottom (rect) - 1,
+			               Rect.right (rect), Rect.bottom (rect) - 1);
 			Gdk.draw_line (w.window, w.style.bg_gc [w.state],
-			               Gdk.Rect.right (rect) - 1, rect.y,
-			               Gdk.Rect.right (rect) - 1, Gdk.Rect.bottom (rect));
+			               Rect.right (rect) - 1, rect.y,
+			               Rect.right (rect) - 1, Rect.bottom (rect));
 
 			TreeIter i;
 			bool header = path.get_indices () [0] < c_span;

Modified: trunk/geetk/samples/gridviewdemo.c
==============================================================================
--- trunk/geetk/samples/gridviewdemo.c	(original)
+++ trunk/geetk/samples/gridviewdemo.c	Wed Jul 23 09:29:00 2008
@@ -1,6 +1,5 @@
 #include <gtk/gtk.h>
-
-#include "gridview.h"
+#include <geetk/gridview.h>
 
 static const char* DEMO_DATA = "OpenVista is a cost-effective, open, trusted "
 	"and complete EHR which enhances patient safety, increases clinical and "
@@ -20,16 +19,16 @@
 
 static const gint n_columns = 5;
 
-GtkGridView* grid_view = NULL;
+GeetkGridView* grid_view = NULL;
 
 static void on_orientation_combo_box_changed (GtkComboBox* s)
 {
 	g_return_if_fail (s == NULL || GTK_IS_COMBO_BOX (s));
 
-	gtk_grid_view_set_orientation (grid_view,
-	                               (gtk_combo_box_get_active (s) == 0)
-	                                 ? GTK_ORIENTATION_VERTICAL
-	                                 : GTK_ORIENTATION_HORIZONTAL);
+	geetk_grid_view_set_orientation (grid_view,
+	                                 (gtk_combo_box_get_active (s) == 0)
+	                                   ? GTK_ORIENTATION_VERTICAL
+	                                   : GTK_ORIENTATION_HORIZONTAL);
 }
 
 
@@ -37,8 +36,8 @@
 {
 	g_return_if_fail (s == NULL || GTK_IS_SPIN_BUTTON (s));
 
-	gtk_grid_view_set_n_row_headers (grid_view,
-	                                 gtk_spin_button_get_value_as_int (s));
+	geetk_grid_view_set_n_row_headers (grid_view,
+	                                   gtk_spin_button_get_value_as_int (s));
 }
 
 
@@ -46,8 +45,8 @@
 {
 	g_return_if_fail (s == NULL || GTK_IS_SPIN_BUTTON (s));
 
-	gtk_grid_view_set_n_col_headers (grid_view,
-	                                 gtk_spin_button_get_value_as_int (s));
+	geetk_grid_view_set_n_col_headers (grid_view,
+	                                   gtk_spin_button_get_value_as_int (s));
 }
 
 
@@ -95,19 +94,19 @@
 		}
 	}
 
-	grid_view = gtk_grid_view_new ();
-	gtk_grid_view_set_hscrollbar_policy (grid_view, GTK_POLICY_AUTOMATIC);
-	gtk_grid_view_set_vscrollbar_policy (grid_view, GTK_POLICY_AUTOMATIC);
+	grid_view = geetk_grid_view_new ();
+	geetk_grid_view_set_hscrollbar_policy (grid_view, GTK_POLICY_AUTOMATIC);
+	geetk_grid_view_set_vscrollbar_policy (grid_view, GTK_POLICY_AUTOMATIC);
 	gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (grid_view), TRUE, TRUE, 0);
 
 	for (i = 0; i < n_columns; i++) {
 		GtkCellRenderer* renderer = gtk_cell_renderer_text_new ();
 		GtkRenderAttribute attrs[] = { {"text", i} };
-		gtk_grid_view_append_column_with_attributes (grid_view, renderer,
-		                                             attrs, 1);
+		geetk_grid_view_append_column_with_attributes (grid_view, renderer,
+		                                               attrs, 1);
 	}
 
-	gtk_grid_view_set_model (grid_view, GTK_TREE_MODEL (store));
+	geetk_grid_view_set_model (grid_view, GTK_TREE_MODEL (store));
 	gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (gtk_hseparator_new ()),
 	                    FALSE, FALSE, 0);
 	hbox = gtk_hbox_new (FALSE, 6);
@@ -134,7 +133,7 @@
 	           gtk_spin_button_new_with_range (0.0, (double) n_columns, 1.0);
 
 	gtk_spin_button_set_value (row_headers_spin_button,
-	                   (double) gtk_grid_view_get_n_row_headers (grid_view));
+	                   (double) geetk_grid_view_get_n_row_headers (grid_view));
 
 	g_signal_connect (GTK_EDITABLE (row_headers_spin_button), "changed",
 	                  G_CALLBACK (on_row_headers_spin_button_value_changed),
@@ -152,7 +151,7 @@
 	    1.0);
 
 	gtk_spin_button_set_value (col_headers_spin_button,
-	                     (double) gtk_grid_view_get_n_col_headers (grid_view));
+	                   (double) geetk_grid_view_get_n_col_headers (grid_view));
 
 	g_signal_connect (GTK_EDITABLE (col_headers_spin_button), "changed",
 	                  G_CALLBACK (on_col_headers_spin_button_value_changed),

Modified: trunk/geetk/samples/ribbondemo.vala
==============================================================================
--- trunk/geetk/samples/ribbondemo.vala	(original)
+++ trunk/geetk/samples/ribbondemo.vala	Wed Jul 23 09:29:00 2008
@@ -1,6 +1,7 @@
 using GLib;
 using Cairo;
 using Gtk;
+using Geetk;
 
 public class Sample : SyntheticWindow {
 



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