Home » Developing U++ » UppHub » More new functions
More new functions [message #18804] |
Wed, 22 October 2008 23:25  |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Hello all
I propose you some new functions tested in GNU/Linux Ubuntu (Gnome), XP and Vista.
Please give me your feedback and feel free to fix everything:
String GetExtExecutable(const char *ext);
// GetExtExecutable("pdf") will return the name of the program
// that by default open pdf files.
// In XP/Vista it will return the program with the full path
bool LaunchFile(const String& file);
// LaunchFile("Sheet.xls") will open the file with the
// program asigned by default to open xls files
int LaunchCommand(const char *cmd, void (*readCallBack)(String &));
// LaunchCommand("mplayer myclip.avi", MyCallback) will launch
// the command line program with args without opening a window, and
// all the output will be sent to MyCallback(String &) function
int LaunchCommand(const char *cmd, String &ret);
// LaunchCommand("mplayer myclip.avi",str) will do the same
// but sending the output to String str
String GetDesktopFolder();
String GetProgramsFolder();
String GetAppDataFolder();
String GetMusicFolder();
String GetPicturesFolder();
String GetVideoFolder();
String GetPersonalFolder();
String GetTemplatesFolder();
String GetDownloadFolder();
// These functions return the folder assigned for Desktop,
// Program Files, etc.
// (from now please do not do this:
// AppendFileName(GetHomeFolder(), "Desktop");
// to refer to the Desktop folder or using
// "C:\\Program Files" ...
// in many languages is wrong
// It does not handle firefox download folder as it has been
// impossible for me to know where it is (until now)
bool FileCat(const char *file, const char *appendFile);
// FileCat("FirstFile", "SecondFile") just append SecondFile
// from the end of FirstFile
As you may see some of them use in Linux Portland XdgUtils in the background.
I think it is a strong portable widespread source of information.
If somebody is interested I have a small class that works like
LaunchCommand but opening a command window that handles \r and
\n properly (to be used for example with mencoder).
Best regards
Koldo
Best regards
IƱaki
|
|
|
 |
|
More new functions
By: koldo on Wed, 22 October 2008 23:25
|
 |
|
Re: More new functions
By: tojocky on Thu, 23 October 2008 07:35
|
 |
|
Re: More new functions
By: captainc on Fri, 24 October 2008 01:22
|
 |
|
Re: More new functions
By: koldo on Fri, 24 October 2008 08:11
|
 |
|
Re: More new functions
By: captainc on Fri, 24 October 2008 14:05
|
 |
|
Re: More new functions
By: mrjt on Fri, 24 October 2008 15:28
|
 |
|
Re: More new functions
By: koldo on Sun, 26 October 2008 01:19
|
 |
|
Re: More new functions
By: captainc on Sun, 26 October 2008 02:03
|
 |
|
Re: More new functions
By: koldo on Sun, 26 October 2008 10:19
|
 |
|
Re: More new functions
By: koldo on Thu, 30 October 2008 08:24
|
 |
|
Re: More new functions
By: mirek on Fri, 31 October 2008 13:34
|
 |
|
Re: More new functions
By: cocob on Fri, 31 October 2008 10:44
|
 |
|
Re: More new functions
By: koldo on Fri, 31 October 2008 13:25
|
 |
|
Re: More new functions
By: koldo on Fri, 31 October 2008 15:51
|
 |
|
Re: More new functions
|
 |
|
Re: More new functions
By: koldo on Thu, 13 November 2008 09:15
|
 |
|
Re: More new functions
By: koldo on Wed, 19 November 2008 08:09
|
 |
|
Re: More new functions
By: koldo on Wed, 19 November 2008 17:44
|
 |
|
Re: More new functions
By: tojocky on Thu, 20 November 2008 10:35
|
 |
|
Re: More new functions
By: koldo on Thu, 20 November 2008 14:18
|
 |
|
Re: More new functions
By: tojocky on Fri, 21 November 2008 07:40
|
 |
|
Re: More new functions
By: koldo on Fri, 21 November 2008 08:17
|
 |
|
Re: More new functions
By: tojocky on Fri, 21 November 2008 13:25
|
 |
|
Re: More new functions
By: koldo on Fri, 21 November 2008 16:13
|
 |
|
Re: More new functions
By: koldo on Fri, 21 November 2008 22:24
|
 |
|
Re: More new functions
By: tojocky on Sat, 22 November 2008 08:32
|
 |
|
Re: More new functions
By: koldo on Sat, 22 November 2008 23:24
|
 |
|
Re: More new functions
By: tojocky on Sun, 23 November 2008 07:58
|
 |
|
Re: More new functions
By: mirek on Sun, 23 November 2008 10:45
|
 |
|
Re: More new functions
By: koldo on Sun, 23 November 2008 16:20
|
 |
|
Re: More new functions
By: mirek on Sun, 23 November 2008 18:23
|
 |
|
Re: More new functions
By: koldo on Sun, 23 November 2008 20:08
|
 |
|
Re: More new functions
By: koldo on Mon, 24 November 2008 00:28
|
 |
|
Re: More new functions
By: koldo on Wed, 03 December 2008 09:30
|
 |
|
Re: More new functions
By: mirek on Mon, 15 December 2008 10:07
|
 |
|
Re: More new functions
By: koldo on Wed, 17 December 2008 08:33
|
 |
|
Re: More new functions
By: koldo on Sat, 17 January 2009 22:32
|
 |
|
Re: More new functions
|
 |
|
Re: More new functions
By: koldo on Sat, 25 December 2010 10:05
|
Goto Forum:
Current Time: Wed May 07 16:06:50 CEST 2025
Total time taken to generate the page: 0.04202 seconds
|