Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-01-05 16:37:55

jenningsthecat
Member
Registered: 2012-05-02
Posts: 14

[Solved] Date format in file dialogs

Hi: I posted this question a year-and-a-half ago in general discussions and received no reply.

Currently I'm using XFCE4, version 4.10.1 under Debian Jessie. Whenever I open a File dialog in any program, the file entries don't adhere to the Thunar preferences I have set. I do my best, (and under Linux it seems to be an almost impossible task), to have all timestamps show the date as year-month-day, followed by the time in 24 hour format. I've configured Thunar for this format, and the format is correctly applied when I'm in the file manager. But the File dialogs in all programs show some weird date that, depending on the specific date in question, may show a time, a day of the week, or a date in numeric day/month/year format.

I really want ALL of my date and time formatting to be consistent according to my preferences, and I really want all of the files in a File dialog to show both the date and the time, regardless of whether they were modified today, yesterday, some other time this week, or a year ago. Is there some configuration screen I'm missing? Alternatively, is there some configuration file I can edit, or some package I can install, to make the date/time format consistent throughout the desktop environment?

Thanks in advance for any help you can provide.

Offline

#2 2014-01-05 19:47:21

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,060

Re: [Solved] Date format in file dialogs

Whenever I open a File dialog in any program, the file entries don't adhere to the Thunar preferences I have set.

If the program(s) in question are not Xfce programs, then there is no way that Xfce can directly effect the way those programs display the date/time. In fact, I don't see much consistency between Xfce programs in this manner anyways (as you have noted). It seems that only Thunar allows you to manually change the format.

I really want ALL of my date and time formatting to be consistent according to my preferences, and I really want all of the files in a File dialog to show both the date and the time, regardless of whether they were modified today, yesterday, some other time this week, or a year ago.

I might be able to help with the first part of this request. Date/time formats are actually controlled by locales and by "fiddling" with the locale settings on your system, you can create a new date/time format to display in your file chooser dialogs. Here is a link (http://ccollins.wordpress.com/2009/01/0 … on-ubuntu/) that describes a process whereby you create a custom locale, change the d_fmt variable, and point the LC_TIME variable to it and that will affect the display of the date stamps in the system. The article is a little dated, but I just tested it out and it worked on my Ubuntu+Xfce 13.10 install (I don't have a debian install handy). Since Ubuntu is based on Debian, the process should work.

The only thing that I was unable to change was the the time-only display (if the file was created on the current day) or the weekday name display (if the file was created during the past week). It would appear that this is a GTK+ setting/feature and I was unable to find how to disable it. I did some searching through the GTK documentation, specifically gtkfilechooser but was unable to find anything.

Hopefully this will get you pointed in the right direction.

Offline

#3 2014-01-06 02:14:11

jenningsthecat
Member
Registered: 2012-05-02
Posts: 14

Re: [Solved] Date format in file dialogs

Thanks very much for your prompt reply, ToZ. After I posted I discovered that gtkfilechooser was responsible for file dialogs in applications - I had always assumed that task fell to the file manager, as it does, (or at least did), in Windows. I looked into configuring the date format in gtkfilechooser - it seems that it's not possible, short of editing the source and re-compiling. People have been asking for configurable dates at least as far back as 8 years, but the folks in charge of gtk haven't addressed it yet...

I've created my own custom locale, and it worked well, (except for gtkfilechooser, which seems to ignore locales), until an upgrade somehow broke my system and I started getting error messages all over the place, even in terminal windows. I got my system cobbled back together so locale sorta works, and as I'm building a new system I'm reluctant to try a custom locale again, in case it breaks again on an upgrade.

I'm going to mark this as solved, since you've described the only viable path to getting part of the way to where I want to be. Thanks again for your help!

Offline

#4 2014-01-06 02:54:06

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,060

Re: [Solved] Date format in file dialogs

That's interesting. Creating the custom locale here works both with Xfce GTK apps (mousepad, squeeze, xfburn, ristretto) and non-Xfce GTK apps (firefox, gimp, pyspread). I just updated the system including a new kernel, rebooted, and everything still works okay. GtkFileChooser obeys the custom locale rule.

I'm not sure what might have gone wrong with your system. Again, I am running Xfce on Ubuntu minimal, but I don't think that should be an issue due to the similarity of the distros.

Offline

#5 2014-01-06 14:48:50

jenningsthecat
Member
Registered: 2012-05-02
Posts: 14

Re: [Solved] Date format in file dialogs

I have a bad habit of leaving my system for 6 months or more without any updates or upgrades, so I'm sure the upgrade in question really kept Aptitude on its toes. Perhaps that had something to do with my sudden locale problems. And thanks for doing the experiment - based on that I'll set up a custom locale on my new computer. I don't have anything important on it yet - I'm still at the stage where I'm playing with and evaluating different distros and DE's to see what I want to commit to for the next few years.

So far it looks as though I'll be sticking with Debian and XFCE. I tried LMDE with Mate, and it's really polished and slick; but I've read about people going through the whole custom locale exercise only to find that it had no effect at all. I'm avoiding the regular edition of Mint because I want to give Canonical a wide berth. And although KDE gives me a lot of things I can't get with other distros, I also find it gaudy, ugly, and foreign. (Maybe I'll install it in a VM now that I have the horsepower to do that).

Anyway, thanks again for your help, ToZ.!

Offline

Board footer

Powered by FluxBB