[cheese/three-point-oh] Scrolling works in thumbnails. Added wrapper for eog-thumbnav.



commit 30b8a6272319ccd690a45194fb0828a4e53ef41f
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date:   Tue Jun 1 03:58:38 2010 +0530

    Scrolling works in thumbnails. Added wrapper for eog-thumbnav.

 data/cheese-main-window.ui    |    3 +--
 valasrc/Makefile.am           |    2 ++
 valasrc/cheese-window.vala    |    8 ++++++--
 valasrc/vapi/eogthumbnav.vapi |   13 +++++++++++++
 4 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/data/cheese-main-window.ui b/data/cheese-main-window.ui
index c409a63..1cc101a 100644
--- a/data/cheese-main-window.ui
+++ b/data/cheese-main-window.ui
@@ -143,8 +143,7 @@
 	  </object>
 	</child>
 	<child>
-	  <object class="GtkScrolledWindow" id="thumbnails">
-	    <property name="width_request">140</property>
+	  <object class="GtkFrame" id="thumbnails">
 	    <child>
 	      <placeholder />
 	    </child>
diff --git a/valasrc/Makefile.am b/valasrc/Makefile.am
index 0f59120..0bff714 100644
--- a/valasrc/Makefile.am
+++ b/valasrc/Makefile.am
@@ -7,6 +7,8 @@ VALAFLAGS = \
 	--pkg clutter-1.0 \
 	--pkg clutter-gtk-0.10 \
 	--pkg gconf-2.0 \
+	--pkg eogthumbnav \
+	--pkg cheesethumbview
 
 
 AM_CPPFLAGS = \
diff --git a/valasrc/cheese-window.vala b/valasrc/cheese-window.vala
index 48e4186..fa8361d 100644
--- a/valasrc/cheese-window.vala
+++ b/valasrc/cheese-window.vala
@@ -3,6 +3,7 @@ using Gdk;
 using GtkClutter;
 using Clutter;
 using Config;
+using Eog;
 
 const int DEFAULT_WINDOW_WIDTH = 600;
 const int DEFAULT_WINDOW_HEIGHT = 450;
@@ -59,8 +60,11 @@ public class Cheese.MainWindow : Gtk.Window {
 					
 		viewport.show_all();
 		Cheese.ThumbView tv = new Cheese.ThumbView();
-		Gtk.Frame tf = (Gtk.Frame) builder.get_object("thumbnails");
-		tf.add(tv);
+		Eog.ThumbNav tnav = new Eog.ThumbNav(tv, false);
+		tv.set_columns(1);
+		tnav.set_vertical(true);
+		Gtk.Frame tf = (Gtk.Frame) builder.get_object("thumbnails");		
+		tf.add(tnav);
 		this.add(main_vbox);
 			
 	}
diff --git a/valasrc/vapi/eogthumbnav.vapi b/valasrc/vapi/eogthumbnav.vapi
new file mode 100644
index 0000000..fb3ed9b
--- /dev/null
+++ b/valasrc/vapi/eogthumbnav.vapi
@@ -0,0 +1,13 @@
+using Gtk;
+namespace Eog{
+	[CCode (cheader_filename="thumbview/eog-thumb-nav.h")]
+	public class ThumbNav : Gtk.HBox {
+		public ThumbNav (Gtk.Widget thumbview, bool show_buttons);
+		public bool get_show_buttons();
+		public void set_show_buttons(bool show_buttons);
+		public bool is_vertical();
+		public void set_vertical(bool vertical);
+		public void set_policy(Gtk.PolicyType hscrollbar_policy,
+							   Gtk.PolicyType vscrollbar_policy);
+	}
+}
\ No newline at end of file



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