! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Show MIME type of file
Status:
RESOLVED: FIXED
Severity:
enhancement

Comments

Description Mathias Brodala 2006-09-30 14:53:37 CEST
User-Agent:       Opera/9.02 (X11; Linux i686; U; de)
Build Identifier: 

It would be useful if Thunar would show the exact MIME type of a file, as the „Type“ currently shown is sometimes not accurate enough.

Reproducible: Always
Comment 1 Benedikt Meurer editbugs 2006-10-01 11:35:00 CEST
Where? I could add that as tooltip to the "Kind" label in the properties dialog.
Comment 2 Mathias Brodala 2006-10-01 11:36:59 CEST
If you don’t want to clutter the interface, then that’s a good solution, yes.
Comment 3 Benedikt Meurer editbugs 2006-10-01 12:30:19 CEST
Created attachment 810 
Possible patch
Comment 4 Mathias Brodala 2006-10-01 12:39:12 CEST
The patch could not be applied successfully. I’ll attach the .rej file.
Comment 5 Mathias Brodala 2006-10-01 12:39:53 CEST
Created attachment 811 
rejected changes from patch
Comment 6 Benedikt Meurer editbugs 2006-10-01 12:42:27 CEST
Created attachment 812 
The new source file

Weird. Don't you run the latest SVN?

Anyway here's the new source file, just override your current one.
Comment 7 Mathias Brodala 2006-10-01 13:00:23 CEST
> Weird. Don't you run the latest SVN?

No, I’m using the sources from my Debian repository.

> Anyway here's the new source file, just override your current one.

Since this one is newer I’m getting problems with compiling now:

Thunar-thunar-properties-dialog.o: In function `thunar_properties_dialog_update':
/home/ashura/Archive/deb/xfce/Thunar/thunar-0.4.0rc1/thunar/thunar-properties-dialog.c:805: undefined reference to `thunar_file_is_desktop_file'
Thunar-thunar-properties-dialog.o: In function `thunar_properties_dialog_icon_button_clicked':
/home/ashura/Archive/deb/xfce/Thunar/thunar-0.4.0rc1/thunar/thunar-properties-dialog.c:702: undefined reference to `thunar_file_set_custom_icon'
collect2: ld returned 1 exit status

Do you have a solution for this or do I really have to get the SVN snapshot, make it compatible with my packaging system and possibly break existing patches? (As I don’t know how to modify the latter so that they work on modified sources.)
Comment 8 Benedikt Meurer editbugs 2006-10-01 13:02:00 CEST
Ah. Yes, Debian should be somewhat behind. I'll just apply the patch and you'll have to wait for the debian maintainers to update. In the meantime, tho, you could merge the patch with your older version if you want.
Comment 9 Mathias Brodala 2006-10-01 13:05:12 CEST
> Ah. Yes, Debian should be somewhat behind. I'll just apply the patch and you'll have to wait for the debian maintainers to update.

I’m fine with that, as this is no grave functionality.

> In the meantime, tho, you could merge the patch with your older version if you want.

You mean by manually editing the .c file, right? OK, I’ll try that. (The patch doesn’t seem that big.)
Comment 10 Benedikt Meurer editbugs 2006-10-01 13:12:08 CEST
Committed with revision 23254.

2006-10-01	Benedikt Meurer <benny@xfce.org>

	* thunar/thunar-properties-dialog.c: Display the real mime type as
	  tooltip for the "Kind" label. Bug #2369.

Comment 11 Mathias Brodala 2006-10-01 13:22:24 CEST
OK, the tooltip appears and shows the MIME type now. But instead of the normal filetype there is only a grey bar now. (Screenshot attached.)
Comment 12 Mathias Brodala 2006-10-01 13:23:06 CEST
Created attachment 813 
Broken file type display in properties dialog
Comment 13 Benedikt Meurer editbugs 2006-10-01 13:26:21 CEST
I guess you forgot to add the kind_label to the kind_ebox and show it.
Comment 14 Mathias Brodala 2006-10-01 13:36:48 CEST
> I guess you forgot to add the kind_label to the kind_ebox and show it.

The problem was that I had let myself being confused with the one code block which appears several times. (Guess I just had to look at the line numbers more precisely.)

Now the filetype and MIME type are being shown, but the background of the filetype is still as grey as in my screenshot. (It should be white instead.)

Since the following line seems to be responsible for this („fill“ ...), is it really alright to remove it?

gtk_table_attach (GTK_TABLE (table), dialog->kind_label, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3);
Comment 15 Benedikt Meurer editbugs 2006-10-01 13:38:53 CEST
No, "fill" is about layouting, not style.

The problem is with the event box. You need to make the event box' window input-only and above its children:

gtk_event_box_set_above_child (GTK_EVENT_BOX (dialog->kind_ebox), TRUE);
gtk_event_box_set_visible_window (GTK_EVENT_BOX (dialog->kind_ebox), FALSE);
Comment 16 Mathias Brodala 2006-10-01 13:47:33 CEST
> The problem is with the event box. You need to make the event box' window
input-only and above its children:

Great! Now everything works as I wished it to.

Thanks for your quick help.
Comment 17 Mathias Brodala 2010-09-02 22:35:08 CEST
Seems like this has been lost with the 1.1.x line of Thunar. I’d be nice to see it implemented like before again.
Comment 18 Jannis Pohlmann editbugs 2010-09-03 10:16:09 CEST
This has indeed slipped into the GIO port. It is now fixed in master:

commit 9180b7ad1a57c49b1e06a81cb337cf9a0a4f89ef
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Fri Sep 3 12:13:48 2010 +0200

    Display content type in the file properties dialog tooltip (bug #2369).
Comment 19 Mathias Brodala 2010-09-03 10:32:42 CEST
(In reply to comment #18)
> This has indeed slipped into the GIO port. It is now fixed in master:

Thanks. :-)

Bug #2369

Reported by:
Mathias Brodala
Reported on: 2006-09-30
Last modified on: 2010-09-03

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
0.4.0rc1

Attachments

Possible patch (2.14 KB, patch)
2006-10-01 12:30 CEST , Benedikt Meurer
no flags
rejected changes from patch (1.44 KB, application/octet-stream)
2006-10-01 12:39 CEST , Mathias Brodala
no flags
The new source file (38.80 KB, text/x-csrc)
2006-10-01 12:42 CEST , Benedikt Meurer
no flags
Broken file type display in properties dialog (5.16 KB, image/png)
2006-10-01 13:23 CEST , Mathias Brodala
no flags

Additional information