Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » U++ with GTK backend is now able to use native GTK file chooser
Re: U++ with GTK backend is now able to use native GTK file chooser [message #40169 is a reply to message #39252] Wed, 26 June 2013 15:35 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
It seems it dosen't work on Kubuntu/Ubuntu. Can you check the code fragment with platform preprocesor? I have enclosed exemplary code that works on Linux (CtrlLib/CtrlUtil.h - line 339):

#ifdef PLATFORM_X11

#ifdef flagNOGTK
typedef FileSel FileSelector;
#else
class FileSelector {
	Vector<String> path;
	Vector< Tuple2<String, String> > type;
	
	String ipath;
	bool   confirm;
	bool   multi;
	bool   hidden;
	int    activetype;

public:
	bool   Execute(bool open, const char *title = NULL);
	bool   ExecuteOpen(const char *title = NULL)          { return Execute(true, title); }
	bool   ExecuteSaveAs(const char *title = NULL)        { return Execute(false, title); }

	String Get() const                                    { return path.GetCount() ? path[0] : String::GetVoid(); }
	operator String() const                               { return Get(); }
	String operator~() const                              { return Get(); }
	
	void   Set(const String& s)                           { ipath = s; }
	void   operator=(const String& s)                     { Set(s); }
	void   operator<<=(const String& s)                   { Set(s); }

	int    GetCount() const                               { return path.GetCount(); }
	const  String& operator[](int i) const                { return path[i]; }

	FileSelector& Type(const char *name, const char *ext) { type.Add(MakeTuple(String(name), String(ext))); return *this; }
	FileSelector& AllFilesType();
	FileSelector& Asking(bool b = true)                   { confirm = b; return *this; }
	FileSelector& NoAsking()                              { return Asking(false); }
	FileSelector& Multi(bool b = true)                    { multi = b; return *this; }
	FileSelector& ShowHidden(bool b = true)               { hidden = b; return *this; }
	FileSelector& ActiveDir(const String& dir)            { ipath = dir; return *this; }
	FileSelector& ActiveType(int i)                       { activetype = i; return *this; }

	FileSelector();
};
#endif

#endif


After that I have missing headers error and one small compilation error (after including headers) with following file: Gtk.cpp. Can you check it?

Here is the error message:
/home/klugier/upp/uppsrc/CtrlLib/Gtk.cpp:26:60: error: ‘class Upp::Ctrl’ has no member named ‘gtk’


Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Wed, 26 June 2013 19:42]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CtrlLib: Calendar, DropDate: Fixed issue with end of month clicks, WhenWeek
Next Topic: Debian repository
Goto Forum:
  


Current Time: Tue May 07 03:19:57 CEST 2024

Total time taken to generate the page: 0.02207 seconds