summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_GTK.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-16 08:37:15 +0000
committerManolo Gouy <Manolo>2016-04-16 08:37:15 +0000
commitf8104524e8e61b5288b162b92fe9d99036ff2418 (patch)
treebe71f5d36515919bb05c6bb54ddb04d4de46dfd1 /src/Fl_Native_File_Chooser_GTK.cxx
parent62a0bfb88a0518ee2211efac876a65f8d7d56449 (diff)
Use more consistent naming for derived classes of Fl_Native_File_Chooser_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Native_File_Chooser_GTK.cxx')
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
index 174a951c1..21fb69ece 100644
--- a/src/Fl_Native_File_Chooser_GTK.cxx
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -96,16 +96,16 @@ typedef void (*GClosureNotify)(gpointer data, GClosure *closure);
/* --------------------- End of Type definitions from GLIB and GTK --------------------- */
-class FL_EXPORT Fl_Native_File_Chooser_GTK_Driver : public Fl_Native_File_Chooser_FLTK_Driver {
+class FL_EXPORT Fl_GTK_Native_File_Chooser_Driver : public Fl_Native_File_Chooser_FLTK_Driver {
friend class Fl_Native_File_Chooser;
private:
static int have_looked_for_GTK_libs;
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkFileFilterInfo GtkFileFilterInfo;
struct pair {
- Fl_Native_File_Chooser_GTK_Driver* running; // the running Fl_GTK_File_Chooser
+ Fl_GTK_Native_File_Chooser_Driver* running; // the running Fl_GTK_File_Chooser
const char *filter; // a filter string of the chooser
- pair(Fl_Native_File_Chooser_GTK_Driver* c, const char *f) {
+ pair(Fl_GTK_Native_File_Chooser_Driver* c, const char *f) {
running = c;
filter = strdup(f);
};
@@ -121,8 +121,8 @@ private:
const char *previous_filter;
int fl_gtk_chooser_wrapper(); // method that wraps the GTK widget
- Fl_Native_File_Chooser_GTK_Driver(int val);
- virtual ~Fl_Native_File_Chooser_GTK_Driver();
+ Fl_GTK_Native_File_Chooser_Driver(int val);
+ virtual ~Fl_GTK_Native_File_Chooser_Driver();
static int did_find_GTK_libs;
static void probe_for_GTK_libs(void);
virtual void type(int);
@@ -134,12 +134,12 @@ private:
virtual int show();
void changed_output_type(const char *filter);
- static int custom_gtk_filter_function(const GtkFileFilterInfo*, Fl_Native_File_Chooser_GTK_Driver::pair*);
+ static int custom_gtk_filter_function(const GtkFileFilterInfo*, Fl_GTK_Native_File_Chooser_Driver::pair*);
static void free_pair(pair *p);
};
-int Fl_Native_File_Chooser_GTK_Driver::did_find_GTK_libs = 0;
+int Fl_GTK_Native_File_Chooser_Driver::did_find_GTK_libs = 0;
/* These are the GTK/GLib methods we want to load, but not call by name...! */
@@ -291,26 +291,26 @@ typedef void (*XX_gtk_toggle_button_set_active)(GtkToggleButton *, gboolean);
static XX_gtk_toggle_button_set_active fl_gtk_toggle_button_set_active = NULL;
-int Fl_Native_File_Chooser_GTK_Driver::have_looked_for_GTK_libs = 0;
+int Fl_GTK_Native_File_Chooser_Driver::have_looked_for_GTK_libs = 0;
Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) {
- if (Fl_Native_File_Chooser_GTK_Driver::have_looked_for_GTK_libs == 0) {
+ if (Fl_GTK_Native_File_Chooser_Driver::have_looked_for_GTK_libs == 0) {
// First Time here, try to find the GTK libs if they are installed
#if HAVE_DLSYM && HAVE_DLFCN_H
if (Fl::option(Fl::OPTION_FNFC_USES_GTK)) {
- Fl_Native_File_Chooser_GTK_Driver::probe_for_GTK_libs();
+ Fl_GTK_Native_File_Chooser_Driver::probe_for_GTK_libs();
}
#endif
- Fl_Native_File_Chooser_GTK_Driver::have_looked_for_GTK_libs = -1;
+ Fl_GTK_Native_File_Chooser_Driver::have_looked_for_GTK_libs = -1;
}
// if we found all the GTK functions we need, we will use the GtkFileChooserDialog
- if (Fl_Native_File_Chooser_GTK_Driver::did_find_GTK_libs) platform_fnfc = new Fl_Native_File_Chooser_GTK_Driver(val);
+ if (Fl_GTK_Native_File_Chooser_Driver::did_find_GTK_libs) platform_fnfc = new Fl_GTK_Native_File_Chooser_Driver(val);
else platform_fnfc = new Fl_Native_File_Chooser_FLTK_Driver(val);
}
-Fl_Native_File_Chooser_GTK_Driver::Fl_Native_File_Chooser_GTK_Driver(int val) : Fl_Native_File_Chooser_FLTK_Driver(-1)
+Fl_GTK_Native_File_Chooser_Driver::Fl_GTK_Native_File_Chooser_Driver(int val) : Fl_Native_File_Chooser_FLTK_Driver(-1)
{
gtkw_ptr = NULL; // used to hold a GtkWidget*
gtkw_slist = NULL; // will hold the returned file names in a multi-selection...
@@ -321,7 +321,7 @@ Fl_Native_File_Chooser_GTK_Driver::Fl_Native_File_Chooser_GTK_Driver(int val) :
previous_filter = NULL;
}
-Fl_Native_File_Chooser_GTK_Driver::~Fl_Native_File_Chooser_GTK_Driver()
+Fl_GTK_Native_File_Chooser_Driver::~Fl_GTK_Native_File_Chooser_Driver()
{
// Should free up resources taken for...
if(gtkw_ptr) {
@@ -345,15 +345,15 @@ Fl_Native_File_Chooser_GTK_Driver::~Fl_Native_File_Chooser_GTK_Driver()
gtkw_title = strfree(gtkw_title);
}
-void Fl_Native_File_Chooser_GTK_Driver::type(int val) {
+void Fl_GTK_Native_File_Chooser_Driver::type(int val) {
_btype = val;
}
-int Fl_Native_File_Chooser_GTK_Driver::count() const {
+int Fl_GTK_Native_File_Chooser_Driver::count() const {
return gtkw_count;
}
-const char *Fl_Native_File_Chooser_GTK_Driver::filename() const
+const char *Fl_GTK_Native_File_Chooser_Driver::filename() const
{
if(gtkw_ptr) {
if(fl_gtk_file_chooser_get_select_multiple((GtkFileChooser *)gtkw_ptr) == FALSE) {
@@ -368,7 +368,7 @@ const char *Fl_Native_File_Chooser_GTK_Driver::filename() const
return("");
}
-const char *Fl_Native_File_Chooser_GTK_Driver::filename(int i) const
+const char *Fl_GTK_Native_File_Chooser_Driver::filename(int i) const
{
if(fl_gtk_file_chooser_get_select_multiple((GtkFileChooser *)gtkw_ptr) == FALSE) {
return gtkw_filename;
@@ -383,19 +383,19 @@ const char *Fl_Native_File_Chooser_GTK_Driver::filename(int i) const
return("");
}
-void Fl_Native_File_Chooser_GTK_Driver::title(const char *val)
+void Fl_GTK_Native_File_Chooser_Driver::title(const char *val)
{
strfree(gtkw_title);
gtkw_title = strnew(val);
}
-const char* Fl_Native_File_Chooser_GTK_Driver::title() const
+const char* Fl_GTK_Native_File_Chooser_Driver::title() const
{
return gtkw_title;
}
/* changes the extension of the outfile in the chooser according to newly selected filter */
-void Fl_Native_File_Chooser_GTK_Driver::changed_output_type(const char *filter)
+void Fl_GTK_Native_File_Chooser_Driver::changed_output_type(const char *filter)
{
if ( !(options()&Fl_Native_File_Chooser::USE_FILTER_EXT) ) return;
if (strchr(filter, '(') || strchr(filter, '{') || strchr(filter+1, '*') || strncmp(filter, "*.", 2)) return;
@@ -413,7 +413,7 @@ void Fl_Native_File_Chooser_GTK_Driver::changed_output_type(const char *filter)
/* Filters files before display in chooser.
Also used to detect when the filter just changed */
-gboolean Fl_Native_File_Chooser_GTK_Driver::custom_gtk_filter_function(const GtkFileFilterInfo *info, Fl_Native_File_Chooser_GTK_Driver::pair* p)
+gboolean Fl_GTK_Native_File_Chooser_Driver::custom_gtk_filter_function(const GtkFileFilterInfo *info, Fl_GTK_Native_File_Chooser_Driver::pair* p)
{
if (p->running->previous_filter != p->filter) {
p->running->changed_output_type(p->filter);
@@ -422,7 +422,7 @@ gboolean Fl_Native_File_Chooser_GTK_Driver::custom_gtk_filter_function(const Gtk
return (gboolean)fl_filename_match(fl_filename_name(info->filename), p->filter);
}
-void Fl_Native_File_Chooser_GTK_Driver::free_pair(Fl_Native_File_Chooser_GTK_Driver::pair *p)
+void Fl_GTK_Native_File_Chooser_Driver::free_pair(Fl_GTK_Native_File_Chooser_Driver::pair *p)
{
delete p;
}
@@ -433,7 +433,7 @@ static void hidden_files_cb(GtkToggleButton *togglebutton, gpointer user_data)
fl_gtk_file_chooser_set_show_hidden((GtkFileChooser*)user_data, state);
}
-int Fl_Native_File_Chooser_GTK_Driver::show()
+int Fl_GTK_Native_File_Chooser_Driver::show()
{
// The point here is that after running a GTK dialog, the calling program's current locale is modified.
// To avoid that, we memorize the calling program's current locale, and the locale as modified
@@ -489,7 +489,7 @@ static void run_response_handler(GtkDialog *dialog, gint response_id, gpointer d
}
-int Fl_Native_File_Chooser_GTK_Driver::fl_gtk_chooser_wrapper()
+int Fl_GTK_Native_File_Chooser_Driver::fl_gtk_chooser_wrapper()
{
int result = 1;
static int have_gtk_init = 0;
@@ -586,9 +586,9 @@ int Fl_Native_File_Chooser_GTK_Driver::fl_gtk_chooser_wrapper()
char *q = strchr(p, ')'); *q = 0;
fl_gtk_file_filter_add_custom(filter_tab[count],
GTK_FILE_FILTER_FILENAME,
- (GtkFileFilterFunc)Fl_Native_File_Chooser_GTK_Driver::custom_gtk_filter_function,
- new Fl_Native_File_Chooser_GTK_Driver::pair(this, p),
- (GDestroyNotify)Fl_Native_File_Chooser_GTK_Driver::free_pair);
+ (GtkFileFilterFunc)Fl_GTK_Native_File_Chooser_Driver::custom_gtk_filter_function,
+ new Fl_GTK_Native_File_Chooser_Driver::pair(this, p),
+ (GDestroyNotify)Fl_GTK_Native_File_Chooser_Driver::free_pair);
fl_gtk_file_chooser_add_filter((GtkFileChooser *)gtkw_ptr, filter_tab[count]);
p = strtok(NULL, "\t");
count++;
@@ -714,7 +714,7 @@ static void* fl_dlopen(const char *filename1, const char *filename2)
* will allow us to create a GtkFileChooserDialog() on the fly,
* without linking to the GTK libs at compile time.
*/
-void Fl_Native_File_Chooser_GTK_Driver::probe_for_GTK_libs(void) {
+void Fl_GTK_Native_File_Chooser_Driver::probe_for_GTK_libs(void) {
#if HAVE_DLSYM && HAVE_DLFCN_H
void *ptr_glib = NULL;
void *ptr_gtk = NULL;