Re: [Thunar-dev] How to use the eject function

2008-01-09 Thread Tino Keitel
On Wed, Dec 12, 2007 at 09:36:04 +0100, Benedikt Meurer wrote:
 Yves-Alexis Perez wrote:
  I can confirm that I have no Eject button in the shortcuts pane
  without the patch, and and Eject button with the patch.
  Committed. Bug Brian to fix xfdesktop as well.
  
  Are there patches against 4.4.2?
 
 http://thunar.xfce.org/download/sources/Thunar/0.9.0/Thunar-0.9.0-use-eject-where-necessary.patch

I think that Yves-Alexis asked for an official patch for xfdesktop4. My
version can be found here:

http://bugzilla.xfce.org/show_bug.cgi?id=3738

Brian already commented it[1], and I use it for several weeks now on 2
computers.

Regards,
Tino

[1] http://www.mail-archive.com/thunar-dev@xfce.org/msg03506.html
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2008-01-09 Thread Tino Keitel
On Wed, Jan 09, 2008 at 18:36:27 +0100, Yves-Alexis Perez wrote:
 On Wed, Jan 09, 2008 at 01:22:34PM +, Tino Keitel wrote:
  On Wed, Dec 12, 2007 at 09:36:04 +0100, Benedikt Meurer wrote:
   Yves-Alexis Perez wrote:
I can confirm that I have no Eject button in the shortcuts pane
without the patch, and and Eject button with the patch.
Committed. Bug Brian to fix xfdesktop as well.

Are there patches against 4.4.2?
   
   http://thunar.xfce.org/download/sources/Thunar/0.9.0/Thunar-0.9.0-use-eject-where-necessary.patch
  
  I think that Yves-Alexis asked for an official patch for xfdesktop4. My
  version can be found here:
  
  http://bugzilla.xfce.org/show_bug.cgi?id=3738
  
  Brian already commented it[1], and I use it for several weeks now on 2
  computers.
  
 You'll be glad, Simon Huggins just uploaded an xfdesktop with your patch :)
 
 By the way (and this is a new thread I guess), for some devices it's ok to
 have eject and umount. The only one I'm thinking of is RW CD/DVD where if the

I noticed that xfdesktop4 and thunar behaved differently in this case
and asked what I should implement, see
http://www.mail-archive.com/thunar-dev@xfce.org/msg03504.html and
Brian's reply.

Changing both to show Eject _and_ Unmount is easy, though.

Regards,
Tino

___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2008-01-09 Thread Tino Keitel
On Wed, Jan 09, 2008 at 19:40:22 +0100, Tino Keitel wrote:
 On Wed, Jan 09, 2008 at 18:36:27 +0100, Yves-Alexis Perez wrote:
  On Wed, Jan 09, 2008 at 01:22:34PM +, Tino Keitel wrote:
   On Wed, Dec 12, 2007 at 09:36:04 +0100, Benedikt Meurer wrote:
Yves-Alexis Perez wrote:
 I can confirm that I have no Eject button in the shortcuts pane
 without the patch, and and Eject button with the patch.
 Committed. Bug Brian to fix xfdesktop as well.
 
 Are there patches against 4.4.2?

http://thunar.xfce.org/download/sources/Thunar/0.9.0/Thunar-0.9.0-use-eject-where-necessary.patch
   
   I think that Yves-Alexis asked for an official patch for xfdesktop4. My
   version can be found here:
   
   http://bugzilla.xfce.org/show_bug.cgi?id=3738
   
   Brian already commented it[1], and I use it for several weeks now on 2
   computers.
   
  You'll be glad, Simon Huggins just uploaded an xfdesktop with your patch :)
  
  By the way (and this is a new thread I guess), for some devices it's ok to
  have eject and umount. The only one I'm thinking of is RW CD/DVD where if 
  the
 
 I noticed that xfdesktop4 and thunar behaved differently in this case
 and asked what I should implement, see
 http://www.mail-archive.com/thunar-dev@xfce.org/msg03504.html and

Wrong mail. I mean this one:

http://www.mail-archive.com/thunar-dev@xfce.org/msg03496.html

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2008-01-09 Thread Brian J. Tarricone
Yves-Alexis Perez wrote:

 By the way (and this is a new thread I guess), for some devices it's ok to
 have eject and umount. The only one I'm thinking of is RW CD/DVD where if the
 cd is mounted you can't blank it. Now you want to unmount it but you can only
 eject it, so you do that and reinsert it. Now you have activated automounting,
 and hop, restart the loop.

No no no no no.  The program (GUI program, presumably) that handles the 
CD blanking should know how to unmount the CD if necessary.  This is a 
useless implementation detail, and there's zero reason to expose this in 
the user interface.  If the user is going to use a CLI program to do the 
blanking, they're certainly capable of unmounting the CD manually (or, 
hell, the CLI program should do it for you).  IMO 'Unmount' should 
*never* be in a user interface that most users see[1].

-brian

[1] Obviously an advanced GUI disk partitioning/formating/etc. utility 
type application might have an unmount action, but that's different.

___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-12 Thread Benedikt Meurer
Yves-Alexis Perez wrote:
 I can confirm that I have no Eject button in the shortcuts pane
 without the patch, and and Eject button with the patch.
 Committed. Bug Brian to fix xfdesktop as well.
 
 Are there patches against 4.4.2?

http://thunar.xfce.org/download/sources/Thunar/0.9.0/Thunar-0.9.0-use-eject-where-necessary.patch

Benedikt
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-12 Thread Jean-François Wauthy

On Wed, 2007-12-12 at 01:18 +0100, Tino Keitel wrote:

 Btw., the 4.4.2 version is missing in Bugzilla.
 

It's there now.
-- 
Jean-François Wauthy [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-12 Thread Tino Keitel
On Wed, Dec 12, 2007 at 01:18:46 +0100, Tino Keitel wrote:
 On Tue, Dec 11, 2007 at 15:44:36 -0800, Brian J. Tarricone wrote:
  Tino Keitel wrote:
   On Tue, Dec 11, 2007 at 20:31:34 +0100, Benedikt Meurer wrote:
   Tino Keitel wrote:
   I can confirm that I have no Eject button in the shortcuts pane
   without the patch, and and Eject button with the patch.
   Committed. Bug Brian to fix xfdesktop as well.
   
   I patched xfdesktop in a minimal way (see the attachment), which lead
   to the following inconsistency:
   
   In thunar, either Eject or Unmount is shown in the menu, depending
   on thunar_vfs_volume_is_ejectable(). In xfdesktop, both Eject and
   Unmount are shown when thunar_vfs_volume_is_ejectable() returns
   true.
   
   What behaviour should be preferred?
  
  Eject.  Feel free to cook up a patch, open a bug on bugzilla, and attach it.
 
 Done.

Hi Brian,

what do you think about the patch? It does not hurry for Xfce itself,
but the Debian maintainers wait for a comment to decide if this fix can
be included in the 4.4.2 build for Debian.

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-12 Thread Tino Keitel
On Wed, Dec 12, 2007 at 10:16:11 -0800, Brian J. Tarricone wrote:

[...]

 P.S.  Also, what happens for the Floppy Drive icon?  Sounds pretty 
 confusing to have an Eject menu item that -- physically -- appears to 
 do nothing (unless you're on an old Mac).

When your floppy device HAL entry contains requires_eject, then
Thunar will create an Eject menu entry. So when the hardware doesn't
support eject, but HAL reports it, then HAL is wrong, not Xfce. :-)

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-12 Thread Brian J. Tarricone
Tino Keitel wrote:

 Hi Brian,
 
 what do you think about the patch? It does not hurry for Xfce itself,
 but the Debian maintainers wait for a comment to decide if this fix can
 be included in the 4.4.2 build for Debian.

Functionally it looks ok (haven't tested it; just glanced at the patch).

I do have issues with using the term Eject here.  It makes sense for 
optical or tape drives, but not really for (e.g.) USB flash drives. 
I've seen discussion about this elsewhere, but I don't remember where, 
or what the conclusions were, and I don't have a better word or phrase 
to use in its place.  It appears that both WinXP (right click on a USB 
drive in Explorer) and MacOS X (right click [or control-click] on USB 
drive in the shortcuts pane in Finder) use the Eject terminology, so 
at least it's not without precedent...

-brian

P.S.  Also, what happens for the Floppy Drive icon?  Sounds pretty 
confusing to have an Eject menu item that -- physically -- appears to 
do nothing (unless you're on an old Mac).
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-12 Thread Yves-Alexis Perez
On mer, 2007-12-12 at 10:16 -0800, Brian J. Tarricone wrote:
 I do have issues with using the term Eject here.  It makes sense
 for 
 optical or tape drives, but not really for (e.g.) USB flash drives. 

Somebody just told me that vfat fs are not totally sync()ed at umount,
that you needed to send and eject so everything is clean properly. I
don't have any source but it may be a good idea to provide this :)

Cheers,
-- 
Yves-Alexis

___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


[Thunar-dev] How to use the eject function

2007-12-11 Thread Tino Keitel
Hi,

the changelog for Thunar 0.9.0 mentions this:

---
Use the correct HAL property to determine whether a given volume or
device requires eject (Bug #3119).
---

As I wasn't aware that #3119 was already fixed in SVN, I opened #3466
and created my own fix. It asks HAL for the eject flag:

+  /* an eject menu entry is shown if this returns true */
+  volume_hal-eject = libhal_drive_requires_eject (hd);

The SVN changeset for revision 25647 shows that Benny did it in the
same way:

+  /* check if the drive requires eject */
+  volume_hal-requires_eject = libhal_drive_requires_eject (hd);

However, all the devices that previously had an eject button in the
context menu don't have it anymore with 4.4.2. I checked the lshal
output and the eject property is still there for the device:

storage.requires_eject = true  (bool)

I noticed that the changes done by Benny use a function
thunar_vfs_volume_is_ejectable(), whereas I just modified
thunar_vfs_volume_is_disc() to return true for devices with the eject
flag.

I assume that the new eject feature in 4.4.2 is tested and working, I
just don't know _how_ it works. Can anyone enlighten me what I have to
do to get the eject button back for my iPod, card reader etc.?

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Benedikt Meurer
Tino Keitel wrote:
 Hi,
 
 the changelog for Thunar 0.9.0 mentions this:
 
 ---
 Use the correct HAL property to determine whether a given volume or
 device requires eject (Bug #3119).
 ---
 
 As I wasn't aware that #3119 was already fixed in SVN, I opened #3466
 and created my own fix. It asks HAL for the eject flag:
 
 +  /* an eject menu entry is shown if this returns true */
 +  volume_hal-eject = libhal_drive_requires_eject (hd);
 
 The SVN changeset for revision 25647 shows that Benny did it in the
 same way:
 
 +  /* check if the drive requires eject */
 +  volume_hal-requires_eject = libhal_drive_requires_eject (hd);
 
 However, all the devices that previously had an eject button in the
 context menu don't have it anymore with 4.4.2. I checked the lshal
 output and the eject property is still there for the device:
 
 storage.requires_eject = true  (bool)
 
 I noticed that the changes done by Benny use a function
 thunar_vfs_volume_is_ejectable(), whereas I just modified
 thunar_vfs_volume_is_disc() to return true for devices with the eject
 flag.
 
 I assume that the new eject feature in 4.4.2 is tested and working, I
 just don't know _how_ it works. Can anyone enlighten me what I have to
 do to get the eject button back for my iPod, card reader etc.?

Hm, there seems to be an error in thunar-shortcuts-view.c. The Eject
Volume action is only added for discs. Try the attached patch.

 Regards,
 Tino

Benedikt
Index: thunar-shortcuts-view.c
===
--- thunar-shortcuts-view.c	(revision 26428)
+++ thunar-shortcuts-view.c	(working copy)
@@ -834,13 +834,12 @@
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   gtk_widget_show (item);
 
-  /* check if the volume is a disc */
-  if (thunar_vfs_volume_is_disc (volume))
+  /* check if the volume is ejectable */
+  if (thunar_vfs_volume_is_ejectable (volume))
 {
   /* append the Eject Volume menu action */
   item = gtk_image_menu_item_new_with_mnemonic (_(E_ject Volume));
   g_signal_connect_swapped (G_OBJECT (item), activate, G_CALLBACK (thunar_shortcuts_view_eject), view);
-  gtk_widget_set_sensitive (item, thunar_vfs_volume_is_ejectable (volume));
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   gtk_widget_show (item);
 }
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Tino Keitel
On Tue, Dec 11, 2007 at 09:29:24 +0100, Benedikt Meurer wrote:

[...]

 Hm, there seems to be an error in thunar-shortcuts-view.c. The Eject
 Volume action is only added for discs. Try the attached patch.

Thanks for the quick reply, I'll try the patch and report back.

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Tino Keitel
On Tue, Dec 11, 2007 at 09:29:24 +0100, Benedikt Meurer wrote:

[...]

 Hm, there seems to be an error in thunar-shortcuts-view.c. The Eject
 Volume action is only added for discs. Try the attached patch.

While looking at the source, I wondered if the same patch is necessary
for thunar-tree-view.c, too.

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Benedikt Meurer
Tino Keitel wrote:
 On Tue, Dec 11, 2007 at 09:29:24 +0100, Benedikt Meurer wrote:
 
 [...]
 
 Hm, there seems to be an error in thunar-shortcuts-view.c. The Eject
 Volume action is only added for discs. Try the attached patch.
 
 While looking at the source, I wondered if the same patch is necessary
 for thunar-tree-view.c, too.

Of course, but first, let's see if that works for the shortcuts pane.

 Regards,
 Tino

Benedikt
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Benedikt Meurer
Tino Keitel wrote:
 I can confirm that I have no Eject button in the shortcuts pane
 without the patch, and and Eject button with the patch.

Committed. Bug Brian to fix xfdesktop as well.

 Regards,
 Tino

Benedikt
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Tino Keitel
On Tue, Dec 11, 2007 at 20:31:34 +0100, Benedikt Meurer wrote:
 Tino Keitel wrote:
  I can confirm that I have no Eject button in the shortcuts pane
  without the patch, and and Eject button with the patch.
 
 Committed. Bug Brian to fix xfdesktop as well.

I patched xfdesktop in a minimal way (see the attachment), which lead
to the following inconsistency:

In thunar, either Eject or Unmount is shown in the menu, depending
on thunar_vfs_volume_is_ejectable(). In xfdesktop, both Eject and
Unmount are shown when thunar_vfs_volume_is_ejectable() returns
true.

What behaviour should be preferred?

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Tino Keitel
On Wed, Dec 12, 2007 at 00:38:55 +0100, Tino Keitel wrote:
 On Tue, Dec 11, 2007 at 20:31:34 +0100, Benedikt Meurer wrote:
  Tino Keitel wrote:
   I can confirm that I have no Eject button in the shortcuts pane
   without the patch, and and Eject button with the patch.
  
  Committed. Bug Brian to fix xfdesktop as well.
 
 I patched xfdesktop in a minimal way (see the attachment), which lead

Forgot the attachment.

Here it is.

Regards,
Tino
diff -ru xfdesktop4-4.4.2.orig/src/xfdesktop-volume-icon.c xfdesktop4-4.4.2/src/xfdesktop-volume-icon.c
--- xfdesktop4-4.4.2.orig/src/xfdesktop-volume-icon.c	2007-11-17 20:31:41.0 +0100
+++ xfdesktop4-4.4.2/src/xfdesktop-volume-icon.c	2007-12-11 22:14:46.005592273 +0100
@@ -573,8 +573,7 @@
  icon);
 }
 
-if(thunar_vfs_volume_is_disc(volume)
-thunar_vfs_volume_is_ejectable(volume))
+if(thunar_vfs_volume_is_ejectable(volume))
 {
 mi = gtk_image_menu_item_new_with_mnemonic(_(E_ject Volume));
 gtk_widget_show(mi);
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Brian J. Tarricone
Tino Keitel wrote:
 On Tue, Dec 11, 2007 at 20:31:34 +0100, Benedikt Meurer wrote:
 Tino Keitel wrote:
 I can confirm that I have no Eject button in the shortcuts pane
 without the patch, and and Eject button with the patch.
 Committed. Bug Brian to fix xfdesktop as well.
 
 I patched xfdesktop in a minimal way (see the attachment), which lead
 to the following inconsistency:
 
 In thunar, either Eject or Unmount is shown in the menu, depending
 on thunar_vfs_volume_is_ejectable(). In xfdesktop, both Eject and
 Unmount are shown when thunar_vfs_volume_is_ejectable() returns
 true.
 
 What behaviour should be preferred?

Eject.  Feel free to cook up a patch, open a bug on bugzilla, and attach it.

-brian
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Tino Keitel
On Tue, Dec 11, 2007 at 15:44:36 -0800, Brian J. Tarricone wrote:
 Tino Keitel wrote:
  On Tue, Dec 11, 2007 at 20:31:34 +0100, Benedikt Meurer wrote:
  Tino Keitel wrote:
  I can confirm that I have no Eject button in the shortcuts pane
  without the patch, and and Eject button with the patch.
  Committed. Bug Brian to fix xfdesktop as well.
  
  I patched xfdesktop in a minimal way (see the attachment), which lead
  to the following inconsistency:
  
  In thunar, either Eject or Unmount is shown in the menu, depending
  on thunar_vfs_volume_is_ejectable(). In xfdesktop, both Eject and
  Unmount are shown when thunar_vfs_volume_is_ejectable() returns
  true.
  
  What behaviour should be preferred?
 
 Eject.  Feel free to cook up a patch, open a bug on bugzilla, and attach it.

Done.

Btw., the 4.4.2 version is missing in Bugzilla.

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] How to use the eject function

2007-12-11 Thread Tino Keitel
On Wed, Dec 12, 2007 at 01:18:46 +0100, Tino Keitel wrote:
 Done.

It's bug #3738.
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev