cheese r646 - in branches/cheese-vala: . src



Author: jhaitsma
Date: Sat Apr 12 23:01:19 2008
New Revision: 646
URL: http://svn.gnome.org/viewvc/cheese?rev=646&view=rev

Log:
more

Modified:
   branches/cheese-vala/   (props changed)
   branches/cheese-vala/src/cheese-thumb-view.vala
   branches/cheese-vala/src/cheese-window.vala

Modified: branches/cheese-vala/src/cheese-thumb-view.vala
==============================================================================
--- branches/cheese-vala/src/cheese-thumb-view.vala	(original)
+++ branches/cheese-vala/src/cheese-thumb-view.vala	Sat Apr 12 23:01:19 2008
@@ -24,10 +24,12 @@
 using Gdk;
 
 public class Cheese.ThumbView : IconView {
+	const int THUMB_VIEW_HEIGHT = 120;
+
 	ListStore store;
 	FileMonitor file_monitor;
-
-	const int THUMB_VIEW_HEIGHT = 120;
+	
+	public string media_path {get; construct;}
 
 
 	construct {
@@ -38,4 +40,7 @@
 		set_pixbuf_column (0);
 		set_columns (int.MAX);
 	} 
+	public ThumbView (string media_path) {
+		this.media_path = media_path;
+	}
 }

Modified: branches/cheese-vala/src/cheese-window.vala
==============================================================================
--- branches/cheese-vala/src/cheese-window.vala	(original)
+++ branches/cheese-vala/src/cheese-window.vala	Sat Apr 12 23:01:19 2008
@@ -40,6 +40,7 @@
 
 	bool recording = false;
 
+	string media_path;
   	string video_filename;
   	string photo_filename;
 
@@ -68,6 +69,10 @@
 	Widget countdown_frame;
 	Widget countdown;
 
+	Container thumb_container;
+	ThumbView thumb_view;
+	Widget thumb_view_popup_menu;
+
 	Button button_effects;
 	ToggleButton button_photo;
 	ToggleButton button_video;
@@ -78,9 +83,6 @@
 	Label label_take_photo;
 	Label label_video;
 
-	Widget thumb_scrollwindow;
-	Widget thumb_view;
-	Widget thumb_view_popup_menu;
 
 	Widget screen;
 	Button take_picture;
@@ -286,6 +288,8 @@
 
 
 	public void setup () {
+		media_path = Path.build_filename (Environment.get_home_dir(), ".local", "share", "cheese", "media");
+		DirUtils.create_with_parents (media_path, 0775);
 		setup_ui ();
 	}
 
@@ -308,7 +312,7 @@
 			notebook_bar = (Widget) get_object ("notebook_bar");
 			screen = (Widget) get_object ("video_screen");
 			take_picture = (Button) get_object ("take_picture");
-			thumb_scrollwindow = (Widget) get_object ("thumb_scrollwindow");
+			thumb_container = (Container) get_object ("thumb_scrollwindow");
 			throbber_frame = (Widget) get_object ("throbber_frame");
 			countdown_frame = (Widget) get_object ("countdown_frame");
 			effect_frame = (Widget) get_object ("effect_frame");
@@ -318,9 +322,10 @@
 
 			take_picture.set_sensitive (false);
 
+			thumb_view = new ThumbView (media_path);
+			thumb_container.add (thumb_view);			
+
 /*
-  cheese_window->thumb_view = cheese_thumb_view_new ();
-  gtk_container_add (GTK_CONTAINER (cheese_window->thumb_scrollwindow), cheese_window->thumb_view);
 
   char *gconf_effects;
   g_object_get (cheese_window->gconf, "gconf_prop_selected_effects", &gconf_effects, null);



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