mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Add json support for linux.
Добавлена поддержка json формата для Linux. sysSetting поддерживает чтение/запись в файл расширенных настроек pgadmin3opt.json.
This commit is contained in:
parent
bebc9bee52
commit
b0e9e1bf84
12 changed files with 100 additions and 36 deletions
|
|
@ -7,8 +7,6 @@
|
|||
// Copyright: (c) 2007 Luciano Cattani
|
||||
// Licence: wxWidgets licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(NO_WXJSON_GIT)
|
||||
|
||||
#ifndef _WX_JSON_DEFS_H_
|
||||
#define _WX_JSON_DEFS_H_
|
||||
|
||||
|
|
@ -205,6 +203,3 @@
|
|||
|
||||
|
||||
#endif // _WX_JSON_DEFS_H_
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -7,15 +7,13 @@
|
|||
// Copyright: (c) 2007 Luciano Cattani
|
||||
// Licence: wxWidgets licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(NO_WXJSON_GIT)
|
||||
|
||||
#include "pgAdmin3.h"
|
||||
|
||||
#if !defined( _WX_JSONREADER_H )
|
||||
#define _WX_JSONREADER_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "jsonreader.h"
|
||||
//#pragma interface "jsonreader.h"
|
||||
#endif
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
|
||||
|
|
@ -145,5 +143,4 @@ protected:
|
|||
|
||||
|
||||
#endif // not defined _WX_JSONREADER_H
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -7,13 +7,12 @@
|
|||
// Copyright: (c) 2007 Luciano Cattani
|
||||
// Licence: wxWidgets licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(NO_WXJSON_GIT)
|
||||
|
||||
#if !defined( _WX_JSONVAL_H )
|
||||
#define _WX_JSONVAL_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "jsonval.h"
|
||||
//#pragma interface "jsonval.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
|
|
@ -437,5 +436,4 @@ public:
|
|||
|
||||
|
||||
#endif // not defined _WX_JSONVAL_H
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
// Copyright: (c) 2007 Luciano Cattani
|
||||
// Licence: wxWidgets licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(NO_WXJSON_GIT)
|
||||
|
||||
#include "pgAdmin3.h"
|
||||
|
||||
|
|
@ -16,7 +15,7 @@
|
|||
#define _WX_JSONWRITER_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "jsonwriter.h"
|
||||
//#pragma interface "jsonwriter.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
|
|
@ -117,7 +116,6 @@ private:
|
|||
|
||||
|
||||
#endif // not defined _WX_JSONWRITER_H
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#define SYSSETTINGS_H
|
||||
|
||||
#include "utils/sysLogger.h"
|
||||
|
||||
#include "utils/json/jsonval.h"
|
||||
// wxWindows headers
|
||||
#include <wx/wx.h>
|
||||
#include <wx/config.h>
|
||||
|
|
@ -894,6 +894,10 @@ public:
|
|||
bool WriteBool(const wxString &key, bool value);
|
||||
bool WritePoint(const wxString &key, const wxPoint &value);
|
||||
bool WriteSize(const wxString &key, const wxSize &value);
|
||||
bool WriteJsonObect(const wxString& key, wxJSONValue& value);
|
||||
bool WriteJsonFile();
|
||||
bool ReloadJsonFileIfNeed();
|
||||
bool ReadJsonObect(const wxString& key, wxJSONValue& value, wxJSONValue& defvalue);
|
||||
bool WriteSizePoint(const wxString &key, const wxSize &size, const wxPoint &point)
|
||||
{
|
||||
WritePoint(key, point);
|
||||
|
|
@ -934,6 +938,9 @@ private:
|
|||
|
||||
wxFileConfig *defaultSettings;
|
||||
wxString appName;
|
||||
wxJSONValue jsoncfg;
|
||||
bool jsonchange = false;
|
||||
wxDateTime jsonfilemod;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue