PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Gtk2 File Chooser Modification Time Display Sender: Linux 385


Your Ad Here

Your Ad Here

Well I experimented with setting the format string from %x to %c, which should show all file mtime info, but I was always getting 00:00 for HOURS:MINUTES. I looked into the function which is in GLib, that they used to set the date, and it appears to me that it ignores hours and minutes. BUT good news.....I managed to go back to plain old stftime, and below is a sub which works. No gaurantees as to what hidden ramifications it may have, as filechooser interacts with other objects, but it seems to work OK so far for me. So here is the modified sub, which returns a nice sortable time string for all files

* Tree column data callback for the file list; fetches the mtime of a file *static void listmtimedatafunc (GtkTreeViewColumn *treecolumn, GtkCellRenderer *cell, GtkTreeModel *treemodel, GtkTreeIter *iter, gpointer data) { GtkFileChooserDefault *impl; const GtkFileInfo *info; GtkFileTime timemtime; char buf216; struct tm *caltime; gboolean sensitive = TRUE;

impl = data; info = getlistfileinfo (impl, iter);

if (!info) { gobjectset (cell, "text", , "sensitive", TRUE, NULL); return; }

timemtime = gtkfileinfogetmodificationtime (info);

Reboot didn't work 386
Peterpan I have an sr1625nx with FC4 which has the same mobo and upgraded cpu, memory, and extras, so they should be similar. When I reboot from Linux, it, well...
Reboot didn't work 387
On Sat, 11 Feb 2006 15:01:38 -0800, Peterpan OK, let's start with the basics: Do you know what Usenet is? Do you know what a News Group is? How about a...

if (timemtime == 0) strcpy (buf, ("Unknown")); else { caltime = localtime(&timemtime); char *format;* format = "%y-%m-%d(%a) %H:%M"; Any other date * format = "%F %T";

* if (gdatestrftime(buf, sizeof (buf), format, &mtime) == 0) strcpy (buf, ("Unknown")); * strftime(buf, sizeof buf, format , caltime); }

Good Luck. I'm using Gtk+-2.8.11 zentara

-- I'm not really a human, but I play one on earth.



Your Ad Here

List | Previous | Next

Reboot didn't work 386

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Gtk2 File Chooser Modification Time Display Sender: Linux 384