Re: The path to 2.4 -- part 1



On 10 Feb 2003, Luca Ferretti wrote:

> OK guys, I've in mind to point here some stuff to fix/rearrange/enhance
> in future releases. Something like "hey, can't we do something better
> here?"
> 
> ------------------------------ 
> -- Note this file! --
> 
> Sometimes sidebar rocks, sometimes it sucks, but this is not the real
> trouble: unfortunately you can access to some feature only enabling it. 
> 
> For example file's notes: OK, there is the properties dialog, but there
> are no way to see if you add a note to a file or a folder until you open
> it in a nautilus window enabling the sidebar. Then you need
>         1. have and set a viewer.
>         2. show the sidebar anytime.
> in order to only see that the note exist.
> 
> So a cool, _useful_ and _unique_ feature like this became not
> used/useful. How many people use it? Personally don't: but only because
> there are no good a quick way to find noted files and folders.
> 
> IMHO a good way to manage a note is add something like an emblem to file
> and enable a tooltip with the note on mouseover.

Something like this? (it uses the cool emblem though)

Index: libnautilus-private/nautilus-file.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v
retrieving revision 1.310
diff -u -p -r1.310 nautilus-file.c
--- libnautilus-private/nautilus-file.c	10 Feb 2003 19:38:39 -0000	1.310
+++ libnautilus-private/nautilus-file.c	13 Feb 2003 11:10:46 -0000
@@ -1665,6 +1665,19 @@ compare_by_directory_name (NautilusFile 
 	return compare;
 }
 
+static gboolean
+file_has_note (NautilusFile *file)
+{
+	char *note;
+	gboolean res;
+
+	note = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_ANNOTATION, NULL);
+	res = note != NULL && note[0] != 0;
+	g_free (note);
+
+	return res;
+}
+
 static int
 get_automatic_emblems_as_integer (NautilusFile *file)
 {
@@ -1678,6 +1691,8 @@ get_automatic_emblems_as_integer (Nautil
 	integer <<= 1;
 	integer |= !nautilus_file_can_write (file);
 	integer <<= 1;
+	integer |= !file_has_note (file);
+	integer <<= 1;
 #if TRASH_IS_FAST_ENOUGH
 	integer |= nautilus_file_is_in_trash (file);
 #endif
@@ -1697,6 +1712,10 @@ prepend_automatic_emblem_names (Nautilus
 			(names, g_strdup (NAUTILUS_FILE_EMBLEM_NAME_TRASH));
 	}
 #endif
+	if (file_has_note (file)) {
+		names = g_list_prepend
+			(names, g_strdup ("cool"));
+	}
 	if (!nautilus_file_can_write (file)) {
 		names = g_list_prepend
 			(names, g_strdup (NAUTILUS_FILE_EMBLEM_NAME_CANT_WRITE));


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a sword-wielding native American astronaut with nothing left to lose. 
She's a psychotic cat-loving schoolgirl with a song in her heart and a spring 
in her step. They fight crime! 




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