[kde-freebsd] Re: icon for optical disk

2011-03-14 Thread Alberto Villa
On Thursday 10 March 2011 14:58:36 Alberto Villa wrote:
> i think we should keep the patch running for some days before 
submitting
> it to gnome@

i decided to fix the real bug in solid (which also applied to devices 
descriptions) rather than adding a workaround to hal: committed to 
area51
-- 
Alberto Villa, FreeBSD committer 
http://people.FreeBSD.org/~avilla

She missed an invaluable opportunity to give him
a look that you could have poured on a waffle.


signature.asc
Description: This is a digitally signed message part.
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-10 Thread Alberto Villa
On Thursday 10 March 2011 14:45:52 Andriy Gapon wrote:
> Thanks a lot!  The patch works as expected and optical disc icon(s) do 
show
> up in kde now.

yes!
i think we should keep the patch running for some days before submitting 
it to gnome@
-- 
Alberto Villa, FreeBSD committer 
http://people.FreeBSD.org/~avilla

It is not enough to have a good mind.
The main thing is to use it well.
-- Rene Descartes


signature.asc
Description: This is a digitally signed message part.
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-10 Thread Andriy Gapon
on 10/03/2011 14:02 Alberto Villa said the following:
> On Thursday 10 March 2011 13:01:13 Alberto Villa wrote:
>> cd /usr/ports/sysutils/hal/files && patch < $attached_patch
> 
> ehm... patch attached

Thanks a lot!  The patch works as expected and optical disc icon(s) do show up 
in
kde now.

-- 
Andriy Gapon
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-10 Thread Andriy Gapon
on 10/03/2011 13:32 Alberto Villa said the following:
> On Thursday 10 March 2011 08:07:41 Andriy Gapon wrote:
>> The function expects that for optical disks "info.category" would be
>> "volume" and "info.capabilities" would contain "volume.disc".
>> But our hal gives "volume.disc" value in the info.category property as I
>> can see with lshal.  And thus the match fails and an empty icon name is
>> returned from the function.
>> I've just double-checked with OpenSUSE installation that I have and 
> their
>> hal supplies the values that the solid code expects.
> 
> i'm not sure if that is supposed to be correct. this is from doc/spec/hal-
> spec-properties.xml:
> 
> 
>   info.category (string)
> 
> example: storage.cdrom
> No
> The prominent capability describing what the device is
> 
> googling for info.category examples, though, reveals only simple words 
> for it on linux (volume, storage...). a linuxism, maybe?
> 
> i'll try to get our hal behave as in linux, and we'll see

Well, an example is not a definitive specification.
And I thought that the hal was one big linuxism :-)

Anyway, thanks a lot for the patch, I will test it.

-- 
Andriy Gapon
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-10 Thread Alberto Villa
On Thursday 10 March 2011 13:01:13 Alberto Villa wrote:
> cd /usr/ports/sysutils/hal/files && patch < $attached_patch

ehm... patch attached
-- 
Alberto Villa, FreeBSD committer 
http://people.FreeBSD.org/~avilla

You are standing on my toes.
Index: files/patch-hald_freebsd_probing_probe-volume.c
===
RCS file: /home/pcvs/ports/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c,v
retrieving revision 1.3
diff -u -r1.3 patch-hald_freebsd_probing_probe-volume.c
--- files/patch-hald_freebsd_probing_probe-volume.c	10 May 2010 21:18:40 -	1.3
+++ files/patch-hald_freebsd_probing_probe-volume.c	10 Mar 2011 11:51:08 -
@@ -1,6 +1,15 @@
 hald/freebsd/probing/probe-volume.c.orig	2009-12-23 14:06:53.0 -0500
-+++ hald/freebsd/probing/probe-volume.c	2009-12-23 14:07:01.0 -0500
-@@ -574,6 +574,7 @@ main (int argc, char **argv)
+--- hald/freebsd/probing/probe-volume.c.orig	2009-09-17 15:45:09.0 +0200
 hald/freebsd/probing/probe-volume.c	2011-03-10 12:45:48.293506507 +0100
+@@ -407,7 +407,7 @@
+   int type;
+   guint64 capacity;
+ 
+-  libhal_device_set_property_string(hfp_ctx, hfp_udi, "info.category", "volume.disc", &hfp_error);
++  libhal_device_set_property_string(hfp_ctx, hfp_udi, "info.category", "volume", &hfp_error);
+   libhal_device_add_capability(hfp_ctx, hfp_udi, "volume.disc", &hfp_error);
+ 
+   libhal_device_set_property_bool(hfp_ctx, hfp_udi, "volume.disc.has_audio", has_audio, &hfp_error);
+@@ -574,6 +574,7 @@
  
  	  snprintf(ufsid, sizeof(ufsid), "%08x%08x", ufsdisk.d_fs.fs_id[0], ufsdisk.d_fs.fs_id[1]);
  	  libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.freebsd.ufsid", ufsid, &hfp_error);
@@ -8,7 +17,7 @@
  	  ufs_devs = libhal_manager_find_device_string_match(hfp_ctx,
  			   "volume.freebsd.ufsid",
  			 ufsid,
-@@ -582,16 +583,17 @@ main (int argc, char **argv)
+@@ -582,16 +583,17 @@
  	  dbus_error_free(&hfp_error);
  	  for (i = 0; i < num_udis; i++)
  {
Index: files/patch-hald_hf-storage.c
===
RCS file: /home/pcvs/ports/sysutils/hal/files/patch-hald_hf-storage.c,v
retrieving revision 1.8
diff -u -r1.8 patch-hald_hf-storage.c
--- files/patch-hald_hf-storage.c	29 Aug 2010 17:51:18 -	1.8
+++ files/patch-hald_hf-storage.c	10 Mar 2011 11:51:08 -
@@ -1,5 +1,5 @@
 hald/freebsd/hf-storage.c.orig	2009-08-24 08:42:29.0 -0400
-+++ hald/freebsd/hf-storage.c	2010-08-29 12:22:03.0 -0400
+--- hald/freebsd/hf-storage.c.orig	2009-08-24 14:42:29.0 +0200
 hald/freebsd/hf-storage.c	2011-03-10 12:46:39.123394874 +0100
 @@ -30,6 +30,7 @@
  #include 
  #include 
@@ -8,7 +8,7 @@
  #include 
  #include 
  #include 
-@@ -418,10 +419,41 @@ hf_storage_parse_conftxt (const char *co
+@@ -418,10 +419,41 @@
  	  continue;
  	}
  
@@ -50,7 +50,7 @@
geom_obj->type = -1;	/* We use -1 here to denote a missing type. */
geom_obj->hash = hash;
  
-@@ -589,11 +621,18 @@ hf_storage_devd_notify (const char *syst
+@@ -589,11 +621,18 @@
char *conftxt;
GSList *new_disks;
  
@@ -70,7 +70,7 @@
new_disks = hf_storage_parse_conftxt(conftxt);
g_free(conftxt);
  
-@@ -669,7 +708,7 @@ hf_storage_conftxt_timeout_cb (gpointer 
+@@ -669,7 +708,7 @@
if (hf_is_waiting)
  return TRUE;
  
@@ -79,3 +79,12 @@
  
return TRUE;
  }
+@@ -743,7 +782,7 @@
+   g_return_if_fail(HAL_IS_DEVICE(device));
+ 
+   hal_device_add_capability(device, "storage.cdrom");
+-  hal_device_property_set_string(device, "info.category", "storage.cdrom");
++  hal_device_property_set_string(device, "info.category", "storage");
+   hal_device_property_set_string(device, "storage.drive_type", "cdrom");
+   hal_device_property_set_bool(device, "storage.removable", TRUE);
+   /* enable media checks */


signature.asc
Description: This is a digitally signed message part.
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-10 Thread Alberto Villa
On Thursday 10 March 2011 12:32:02 Alberto Villa wrote:
> googling for info.category examples, though, reveals only simple 
words
> for it on linux (volume, storage...). a linuxism, maybe?

yes, both linux and solaris backends don't set volume.disc and 
storage.cdrom, then it might be safe to do the same on freebsd (which 
is the only system where that happens). apparently freebsd does the 
right thing, but linux developers all over the world have sticked to the 
linux convention breaking software here and there. i don't think that 
this kde issue is the only one in the world, so, who knows, we might end 
up fixing other small issues

anyway, apart from net.* stuff (which works like this on linux too), no 
other categories contain more than one word

> i'll try to get our hal behave as in linux, and we'll see

cd /usr/ports/sysutils/hal/files && patch < $attached_patch
then, reinstall hal and restart its service
-- 
Alberto Villa, FreeBSD committer 
http://people.FreeBSD.org/~avilla

You will attract cultured and artistic people to your home.


signature.asc
Description: This is a digitally signed message part.
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-10 Thread Alberto Villa
On Thursday 10 March 2011 08:07:41 Andriy Gapon wrote:
> The function expects that for optical disks "info.category" would be
> "volume" and "info.capabilities" would contain "volume.disc".
> But our hal gives "volume.disc" value in the info.category property as I
> can see with lshal.  And thus the match fails and an empty icon name is
> returned from the function.
> I've just double-checked with OpenSUSE installation that I have and 
their
> hal supplies the values that the solid code expects.

i'm not sure if that is supposed to be correct. this is from doc/spec/hal-
spec-properties.xml:


  info.category (string)

example: storage.cdrom
No
The prominent capability describing what the device is

googling for info.category examples, though, reveals only simple words 
for it on linux (volume, storage...). a linuxism, maybe?

i'll try to get our hal behave as in linux, and we'll see
-- 
Alberto Villa, FreeBSD committer 
http://people.FreeBSD.org/~avilla

At work, the authority of a person is inversely proportional to the
number of pens that person is carrying.


signature.asc
Description: This is a digitally signed message part.
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-09 Thread Max Brazhnikov
On Thu, 10 Mar 2011 09:07:41 +0200, Andriy Gapon wrote:
> on 26/02/2011 18:33 Andriy Gapon said the following:
> > Very minor issue really.
> > Whatever kind of optical disk I insert KDE 4 just shows its label, but
> > never a nice-looking icon.
> > Examples with a CD-RW disk:
> > http://people.freebsd.org/~avg/cd-noicon.png
> > http://people.freebsd.org/~avg/cd-noicon1.png
> > "TRANT r" is a label of an ISO filesystem on the disk.
> > 
> > Am I alone with this issue?
> 
> I guess that I wasn't but everyone is too busy (embarassed?) to discuss
> this issue :)

I can't remember when I used cd last time, so I just don't bother about this.

> So it seems that the problem is between the solid library and our hal.
> In kdelibs4, in the file solid/solid/backends/hal/haldevice.cpp, there is
> the function 'QString HalDevice::icon() const' that returns an icon name
> based on information that hal provides about a device.
> The function expects that for optical disks "info.category" would be
> "volume" and "info.capabilities" would contain "volume.disc".
> But our hal gives "volume.disc" value in the info.category property as I
> can see with lshal.  And thus the match fails and an empty icon name is
> returned from the function.
> I've just double-checked with OpenSUSE installation that I have and their
> hal supplies the values that the solid code expects.
> 
> BTW, the similar mismatch exists also for an optical drive itself.  With
> linux hal info.category is "storage" and info.capabilities contains
> "storage.cdrom", but with our hal info.category is "storage.cdrom".
> 
> Not sure if the upcoming KDE 4.6.1 will be affected (i.e. if it still uses
> hal backend).  But I think that our hal is still worth fixing.

yes, Solid will continue to use hal backend on FreeBSD.
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] Re: icon for optical disk

2011-03-09 Thread Andriy Gapon
on 26/02/2011 18:33 Andriy Gapon said the following:
> 
> Very minor issue really.
> Whatever kind of optical disk I insert KDE 4 just shows its label, but never a
> nice-looking icon.
> Examples with a CD-RW disk:
> http://people.freebsd.org/~avg/cd-noicon.png
> http://people.freebsd.org/~avg/cd-noicon1.png
> "TRANT r" is a label of an ISO filesystem on the disk.
> 
> Am I alone with this issue?

I guess that I wasn't but everyone is too busy (embarassed?) to discuss this
issue :)

So it seems that the problem is between the solid library and our hal.
In kdelibs4, in the file solid/solid/backends/hal/haldevice.cpp, there is the
function 'QString HalDevice::icon() const' that returns an icon name based on
information that hal provides about a device.
The function expects that for optical disks "info.category" would be "volume"
and "info.capabilities" would contain "volume.disc".
But our hal gives "volume.disc" value in the info.category property as I can see
with lshal.  And thus the match fails and an empty icon name is returned from
the function.
I've just double-checked with OpenSUSE installation that I have and their hal
supplies the values that the solid code expects.

BTW, the similar mismatch exists also for an optical drive itself.  With linux
hal info.category is "storage" and info.capabilities contains "storage.cdrom",
but with our hal info.category is "storage.cdrom".

Not sure if the upcoming KDE 4.6.1 will be affected (i.e. if it still uses hal
backend).  But I think that our hal is still worth fixing.

Thanks!
-- 
Andriy Gapon
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information