[tracker/needle: 18/45] tracker-needle: Fixed whitespace issues



commit 215fed0ac08072bf3f6b750a73d8b3d9e9a4f5e9
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Jul 5 21:13:03 2010 +0100

    tracker-needle: Fixed whitespace issues

 src/tracker-needle/tracker-needle.vala |   38 +++---
 src/tracker-needle/tracker-stats.vala  |  208 ++++++++++++++++----------------
 2 files changed, 123 insertions(+), 123 deletions(-)
---
diff --git a/src/tracker-needle/tracker-needle.vala b/src/tracker-needle/tracker-needle.vala
index 8c1cc10..003930d 100644
--- a/src/tracker-needle/tracker-needle.vala
+++ b/src/tracker-needle/tracker-needle.vala
@@ -49,8 +49,8 @@ public class TrackerNeedle {
 	private IconView iconview;
 	private uint last_search_id = 0;
 	private ListStore store;
-    static bool current_view = true;
-    static bool current_find_in = true;
+	static bool current_view = true;
+	static bool current_find_in = true;
 
 	private const int secs_per_day = 60 * 60 * 24;
 
@@ -143,7 +143,7 @@ public class TrackerNeedle {
 		                       typeof (string),      // File size
 		                       typeof (string));     // Tooltip
 		treeview.set_model (store);
-        treeview.set_tooltip_column (7);
+		treeview.set_tooltip_column (7);
 
 		var col = new Gtk.TreeViewColumn ();
 
@@ -343,9 +343,9 @@ public class TrackerNeedle {
 	}
 
 	private void view_toggled () {
-	    if (current_view == view_list.active) {
-	        return;	    
-	    }
+		if (current_view == view_list.active) {
+			return;
+		}
 
 		if (view_list.active) {
 			sw_iconview.hide ();
@@ -360,11 +360,11 @@ public class TrackerNeedle {
 		current_view = view_list.active;
 	}
 
-	private void find_in_toggled () {    
-	    if (current_find_in == find_in_contents.active) {
-	        return;	    
-	    }
-	    
+	private void find_in_toggled () {
+		if (current_find_in == find_in_contents.active) {
+			return;
+		}
+
 		if (find_in_contents.active) {
 			debug ("Find in toggled to 'contents'");
 			search_run ();
@@ -372,7 +372,7 @@ public class TrackerNeedle {
 			debug ("Find in toggled to 'titles'");
 			search_run ();
 		}
-		
+
 		current_find_in = find_in_contents.active;
 	}
 
@@ -387,15 +387,15 @@ public class TrackerNeedle {
 
 		debug ("Selected uri:'%s'", uri);
 
-        try {
-            AppInfo.launch_default_for_uri (uri, null);
-        } catch (GLib.Error e) {
-            warning ("Could not launch application: " + e.message);
-        }
+		try {
+			AppInfo.launch_default_for_uri (uri, null);
+		} catch (GLib.Error e) {
+			warning ("Could not launch application: " + e.message);
+		}
 	}
-	
+
 	private void show_stats_clicked () {
-	    debug ("Showing stats dialog");
+		debug ("Showing stats dialog");
 		TrackerStats s = new TrackerStats ();
 		s.show ();
 	}
diff --git a/src/tracker-needle/tracker-stats.vala b/src/tracker-needle/tracker-stats.vala
index bdaa315..6ac3001 100644
--- a/src/tracker-needle/tracker-stats.vala
+++ b/src/tracker-needle/tracker-stats.vala
@@ -30,24 +30,24 @@ interface Statistics : GLib.Object {
 public class TrackerStats : Dialog {
 	private Statistics tracker;
 
-    public TrackerStats () {
-        this.title = "Statistics";
-        this.has_separator = false;
-        this.border_width = 12;
-        this.resizable = false;
-    
-        setup_dbus ();
-        setup_ui ();
-    }
+	public TrackerStats () {
+		this.title = "Statistics";
+		this.has_separator = false;
+		this.border_width = 12;
+		this.resizable = false;
+
+		setup_dbus ();
+		setup_ui ();
+	}
 
 	private void setup_dbus () {
-	    debug ("Setting up statistics D-Bus connection");
-	    
+		debug ("Setting up statistics D-Bus connection");
+
 		try {
 			var conn = DBus.Bus.get (DBus.BusType.SESSION);
 			tracker = (Statistics) conn.get_object ("org.freedesktop.Tracker1",
-			                                       "/org/freedesktop/Tracker1/Statistics",
-			                                       "org.freedesktop.Tracker1.Statistics");
+			                                        "/org/freedesktop/Tracker1/Statistics",
+			                                        "org.freedesktop.Tracker1.Statistics");
 		} catch (DBus.Error e) {
 			var msg = new MessageDialog (null,
 			                             DialogFlags.MODAL,
@@ -60,111 +60,111 @@ public class TrackerStats : Dialog {
 		}
 	}
 
-    private void setup_ui () {
-	    debug ("Setting up statistics UI");
+	private void setup_ui () {
+		debug ("Setting up statistics UI");
 
-        // Spacing between major units
-        this.vbox.spacing = 18;
-        this.vbox.border_width = 0;
+		// Spacing between major units
+		this.vbox.spacing = 18;
+		this.vbox.border_width = 0;
 
-        // Label for dialog
-        var label = new Label ("The statistics represented here do not reflect their availability, rather the total data stored:");
-        label.set_line_wrap (true);
-		label.set_alignment (0.0f, 0.5f);			
-        this.vbox.pack_start (label, true, true, 0);
+		// Label for dialog
+		var label = new Label ("The statistics represented here do not reflect their availability, rather the total data stored:");
+		label.set_line_wrap (true);
+		label.set_alignment (0.0f, 0.5f);
+		this.vbox.pack_start (label, true, true, 0);
 
-        // Size group to line up labels
-        var sizegroup = new SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
+		// Size group to line up labels
+		var sizegroup = new SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
 
-   		try {
+		try {
 			var result = tracker.Get ();
 
-			for (int i = 0; i < result.length[0]; i++) { 
-			    var key = result[i,0];
-			    var val = result[i,1];
-			    string key_used;
-			    
+			for (int i = 0; i < result.length[0]; i++) {
+				var key = result[i,0];
+				var val = result[i,1];
+				string key_used;
+
 				debug ("--> %s = %s", key, val);
 
-                switch (key) {
-                case "nao:Tag":
-                    key_used = ngettext ("Tag", "Tags", val.to_int ());
-                    break;
-                case "nco:Contact":
-                    key_used = ngettext ("Contact", "Contacts", val.to_int ());
-                    break;
-                case "nfo:Audio":
-                    key_used = ngettext ("Audio", "Audios", val.to_int ());
-                    break;
-                case "nfo:Document":
-                    key_used = ngettext ("Document", "Documents", val.to_int ());
-                    break;
-                case "nfo:FileDataObject":
-                    key_used = ngettext ("File", "Files", val.to_int ());
-                    break;
-                case "nfo:Folder":
-                    key_used = ngettext ("Folder", "Folders", val.to_int ());
-                    break;
-                case "nfo:Image":
-                    key_used = ngettext ("Image", "Images", val.to_int ());
-                    break;
-                case "nfo:SoftwareApplication":
-                    key_used = ngettext ("Application", "Applications", val.to_int ());
-                    break;
-                case "nfo:Video":
+				switch (key) {
+				case "nao:Tag":
+					key_used = ngettext ("Tag", "Tags", val.to_int ());
+					break;
+				case "nco:Contact":
+					key_used = ngettext ("Contact", "Contacts", val.to_int ());
+					break;
+				case "nfo:Audio":
+					key_used = ngettext ("Audio", "Audios", val.to_int ());
+					break;
+				case "nfo:Document":
+					key_used = ngettext ("Document", "Documents", val.to_int ());
+					break;
+				case "nfo:FileDataObject":
+					key_used = ngettext ("File", "Files", val.to_int ());
+					break;
+				case "nfo:Folder":
+					key_used = ngettext ("Folder", "Folders", val.to_int ());
+					break;
+				case "nfo:Image":
+					key_used = ngettext ("Image", "Images", val.to_int ());
+					break;
+				case "nfo:SoftwareApplication":
+					key_used = ngettext ("Application", "Applications", val.to_int ());
+					break;
+				case "nfo:Video":
 //                case "nmm:Video":
-                    key_used = ngettext ("Video", "Videos", val.to_int ());
-                    break;
-                case "nmm:MusicAlbum":
-                    key_used = ngettext ("Album", "Albums", val.to_int ());
-                    break;
-                case "nmm:MusicPiece":
-                    key_used = ngettext ("Music Track", "Music Tracks", val.to_int ());
-                    break;
-                case "nmm:Photo":
-                    key_used = ngettext ("Photo", "Photos", val.to_int ());
-                    break;
-                case "nmm:Playlist":
-                    key_used = ngettext ("Playlist", "Playlists", val.to_int ());
-                    break;
-                default:
-                    continue;
-                }
-                
-                var hbox = new HBox (false, 12);
-			    var label_key = new Label (key_used);
-                var label_val = new Label (val);
-				
-				label_key.set_alignment (0.0f, 0.5f);			
+					key_used = ngettext ("Video", "Videos", val.to_int ());
+					break;
+				case "nmm:MusicAlbum":
+					key_used = ngettext ("Album", "Albums", val.to_int ());
+					break;
+				case "nmm:MusicPiece":
+					key_used = ngettext ("Music Track", "Music Tracks", val.to_int ());
+					break;
+				case "nmm:Photo":
+					key_used = ngettext ("Photo", "Photos", val.to_int ());
+					break;
+				case "nmm:Playlist":
+					key_used = ngettext ("Playlist", "Playlists", val.to_int ());
+					break;
+				default:
+					continue;
+				}
+
+				var hbox = new HBox (false, 12);
+				var label_key = new Label (key_used);
+				var label_val = new Label (val);
+
+				label_key.set_alignment (0.0f, 0.5f);
 				label_val.set_alignment (0.0f, 0.5f);
-		        hbox.pack_start (label_key, true, true, 0);
-                hbox.pack_start (label_val, false, true, 0);
-				
+				hbox.pack_start (label_key, true, true, 0);
+				hbox.pack_start (label_val, false, true, 0);
+
 				sizegroup.add_widget (label_key);
-				
-                this.vbox.pack_start (hbox, true, true, 0);
+
+				this.vbox.pack_start (hbox, true, true, 0);
 			}
 		} catch (DBus.Error e) {
 			warning ("Could not get Tracker statistics: " + e.message);
 		}
 
-        // Layout widgets       
-        this.vbox.spacing = 10;
-
-        // Add buttons to button area at the bottom
-        add_button (STOCK_CLOSE, ResponseType.CLOSE);
-
-        // Connect signals
-        this.response.connect (on_response);
-
-        show_all ();
-    }
-    
-    private void on_response (Dialog source, int response_id) {
-        switch (response_id) {
-        case ResponseType.CLOSE:
-            destroy ();
-            break;
-        }
-    }
+		// Layout widgets
+		this.vbox.spacing = 10;
+
+		// Add buttons to button area at the bottom
+		add_button (STOCK_CLOSE, ResponseType.CLOSE);
+
+		// Connect signals
+		this.response.connect (on_response);
+
+		show_all ();
+	}
+
+	private void on_response (Dialog source, int response_id) {
+		switch (response_id) {
+		case ResponseType.CLOSE:
+			destroy ();
+			break;
+		}
+	}
 }



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