KiCad PCB EDA Suite
dialog_pcm.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2021 Andrew Lutsenko, anlutsenko at gmail dot com
5 * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21// kicad_curl_easy.h **must be** included before any wxWidgets header to avoid conflicts
22// at least on Windows/msys2
24
25#include "bitmaps.h"
27#include "dialog_pcm.h"
28#include "grid_tricks.h"
29#include "ki_exception.h"
30#include "pcm_task_manager.h"
31#include "pgm_base.h"
34#include "thread"
35#include "widgets/wx_grid.h"
36
37#include <fstream>
38#include <launch_ext.h>
39#include <sstream>
40#include <vector>
41#include <wx/filedlg.h>
42#include <wx/msgdlg.h>
43
44
45#define GRID_CELL_MARGIN 4
46
47// Notes: These strings are static, so wxGetTranslation must be called to display the
48// transalted text
49static std::vector<std::pair<PCM_PACKAGE_TYPE, wxString>> PACKAGE_TYPE_LIST = {
50 { PT_PLUGIN, _( "Plugins (%d)" ) },
51 { PT_LIBRARY, _( "Libraries (%d)" ) },
52 { PT_COLORTHEME, _( "Color themes (%d)" ) },
53};
54
55
56DIALOG_PCM::DIALOG_PCM( wxWindow* parent, std::shared_ptr<PLUGIN_CONTENT_MANAGER> pcm ) :
57 DIALOG_PCM_BASE( parent ),
58 m_pcm( pcm )
59{
61
62 m_pcm->SetDialogWindow( this );
63 m_pcm->StopBackgroundUpdate();
64
65 m_gridPendingActions->PushEventHandler( new GRID_TRICKS( m_gridPendingActions ) );
66
68 m_panelPending->Layout();
69
70 m_actionCallback = [this]( const PACKAGE_VIEW_DATA& aData, PCM_PACKAGE_ACTION aAction,
71 const wxString& aVersion )
72 {
73 if( aAction == PPA_UPDATE && m_pcm->IsPackagePinned( aData.package.identifier ) )
74 {
75 if( wxMessageBox( wxString::Format( _( "Are you sure you want to update pinned package "
76 "from version %s to %s?" ),
77 aData.current_version, aVersion ),
78 _( "Confirm update" ), wxICON_QUESTION | wxYES_NO, this )
79 == wxNO )
80 {
81 return;
82 }
83 }
84
85 m_gridPendingActions->Freeze();
86
87 PCM_PACKAGE_STATE new_state;
88
89 m_gridPendingActions->AppendRows();
90 int row = m_gridPendingActions->GetNumberRows() - 1;
91
92 m_gridPendingActions->SetCellValue( row, PENDING_COL_NAME, aData.package.name );
94
95 switch( aAction )
96 {
97 default:
98 case PPA_INSTALL:
99 m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Install" ) );
100 m_gridPendingActions->SetCellValue( row, PENDING_COL_VERSION, aVersion );
101 new_state = PPS_PENDING_INSTALL;
102 break;
103
104 case PPA_UPDATE:
105 m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Update" ) );
106 m_gridPendingActions->SetCellValue(
108 wxString::Format( wxT( "%s \u279C %s" ), aData.current_version, aVersion ) );
109 new_state = PPS_PENDING_UPDATE;
110 break;
111
112 case PPA_UNINSTALL:
113 m_gridPendingActions->SetCellValue( row, PENDING_COL_ACTION, _( "Uninstall" ) );
114 m_gridPendingActions->SetCellValue(
116 m_pcm->GetInstalledPackageVersion( aData.package.identifier ) );
117 new_state = PPS_PENDING_UNINSTALL;
118 break;
119 }
120
121 m_pendingActions.emplace_back( aAction, aData.repository_id, aData.package, aVersion );
122
123 m_gridPendingActions->Thaw();
124
126
127 updatePackageState( aData.package.identifier, new_state );
128 };
129
131 [this]( const wxString& aPackageId, const PCM_PACKAGE_STATE aState, const bool aPinned )
132 {
133 m_pcm->SetPinned( aPackageId, aPinned );
134
135 updatePackageState( aPackageId, aState );
136 };
137
140 m_panelInstalledHolder->GetSizer()->Add( m_installedPanel, 1, wxEXPAND );
141 m_panelInstalledHolder->Layout();
142
143 for( const std::pair<PCM_PACKAGE_TYPE, wxString>& entry : PACKAGE_TYPE_LIST )
144 {
147 wxString label = wxGetTranslation( entry.second );
148 m_contentNotebook->AddPage( panel, wxString::Format( label, 0 ) );
149 m_repositoryContentPanels.insert( { entry.first, panel } );
150 }
151
152 m_dialogNotebook->SetPageText( 0, wxString::Format( _( "Repository (%d)" ), 0 ) );
153
156
157 m_dialogNotebook->SetSelection( 0 );
158
159 SetupStandardButtons( { { wxID_OK, _( "Close" ) },
160 { wxID_APPLY, _( "Apply Pending Changes" ) },
161 { wxID_CANCEL, _( "Discard Pending Changes" ) } } );
162
163 Bind( wxEVT_CLOSE_WINDOW, &DIALOG_PCM::OnCloseWindow, this );
164 m_sdbSizer1Cancel->Bind( wxEVT_UPDATE_UI, &DIALOG_PCM::OnUpdateEventButtons, this );
165 m_sdbSizer1Apply->Bind( wxEVT_UPDATE_UI, &DIALOG_PCM::OnUpdateEventButtons, this );
166
168
169 for( int col = 0; col < m_gridPendingActions->GetNumberCols(); col++ )
170 {
171 const wxString& heading = m_gridPendingActions->GetColLabelValue( col );
172 int headingWidth = GetTextExtent( heading ).x + 2 * GRID_CELL_MARGIN;
173
174 // Set the minimal width to the column label size.
175 m_gridPendingActions->SetColMinimalWidth( col, headingWidth );
176 }
177
178 // fix sizers now widgets are set.
180}
181
182
184{
185 m_pcm->SaveInstalledPackages();
186 m_pcm->SetDialogWindow( nullptr );
187 m_pcm->RunBackgroundUpdate();
188
189 m_gridPendingActions->PopEventHandler( true );
190}
191
192
193void DIALOG_PCM::OnUpdateEventButtons( wxUpdateUIEvent& event )
194{
195 event.Enable( !m_pendingActions.empty() );
196}
197
198
199void DIALOG_PCM::OnCloseClicked( wxCommandEvent& event )
200{
201 if( m_pendingActions.size() == 0
202 || wxMessageBox( _( "Are you sure you want to close the package manager "
203 "and discard pending changes?" ),
204 _( "Plugin and Content Manager" ), wxICON_QUESTION | wxYES_NO, this )
205 == wxYES )
206 {
207 EndModal( wxID_OK );
208 }
209}
210
211
212void DIALOG_PCM::OnCloseWindow( wxCloseEvent& aEvent )
213{
214 wxCommandEvent dummy;
215
217}
218
219
220void DIALOG_PCM::OnManageRepositoriesClicked( wxCommandEvent& event )
221{
223
224 std::vector<std::pair<wxString, wxString>> dialog_data;
225 std::vector<std::tuple<wxString, wxString, wxString>> repo_list = m_pcm->GetRepositoryList();
226
227 for( const std::tuple<wxString, wxString, wxString>& repo : repo_list )
228 dialog_data.push_back( std::make_pair( std::get<1>( repo ), std::get<2>( repo ) ) );
229
230 dialog->SetData( dialog_data );
231
232 if( dialog->ShowModal() == wxID_SAVE )
233 {
234 dialog_data = dialog->GetData();
235 m_pcm->SetRepositoryList( dialog_data );
236
237 SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
238 KICAD_SETTINGS* app_settings = mgr.GetAppSettings<KICAD_SETTINGS>();
239
240 app_settings->m_PcmRepositories = std::move( dialog_data );
241
243 }
244
245 dialog->Destroy();
246}
247
248
250{
251 std::vector<std::tuple<wxString, wxString, wxString>> repositories = m_pcm->GetRepositoryList();
252
253 m_choiceRepository->Clear();
254
255 for( const std::tuple<wxString, wxString, wxString>& entry : repositories )
256 {
257 m_choiceRepository->Append( std::get<1>( entry ),
258 new wxStringClientData( std::get<0>( entry ) ) );
259 }
260
261 if( repositories.size() > 0 )
262 {
263 m_choiceRepository->SetSelection( 0 );
264 m_selectedRepositoryId = std::get<0>( repositories[0] );
266 }
267 else
268 {
270 }
271}
272
273
274void DIALOG_PCM::OnRefreshClicked( wxCommandEvent& event )
275{
276 m_pcm->DiscardRepositoryCache( m_selectedRepositoryId );
278}
279
280
281void DIALOG_PCM::OnInstallFromFileClicked( wxCommandEvent& event )
282{
283 wxFileDialog open_file_dialog( this, _( "Choose package file" ), wxEmptyString, wxEmptyString,
284 wxT( "Zip files (*.zip)|*.zip" ),
285 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
286
287 if( open_file_dialog.ShowModal() == wxID_CANCEL )
288 return;
289
290 PCM_TASK_MANAGER task_manager( m_pcm );
291 task_manager.InstallFromFile( this, open_file_dialog.GetPath() );
292
294
295 if( !m_selectedRepositoryId.IsEmpty() )
297
298 if( task_manager.ColorSettingsChanged() )
299 Pgm().GetSettingsManager().ReloadColorSettings();
300}
301
302
303void DIALOG_PCM::OnRepositoryChoice( wxCommandEvent& event )
304{
305 wxStringClientData* data = static_cast<wxStringClientData*>(
306 m_choiceRepository->GetClientObject( m_choiceRepository->GetSelection() ) );
307
308 m_selectedRepositoryId = data->GetData();
309
311}
312
313
314void DIALOG_PCM::setRepositoryData( const wxString& aRepositoryId )
315{
316 if( m_pcm->CacheRepository( aRepositoryId ) )
317 {
318 for( const auto& [ packageType, packagesView ] : m_repositoryContentPanels )
319 packagesView->ClearData();
320
321 m_packageBitmaps = m_pcm->GetRepositoryPackageBitmaps( aRepositoryId );
322
323 const std::vector<PCM_PACKAGE> packages = m_pcm->GetRepositoryPackages( aRepositoryId );
324
325 std::unordered_map<PCM_PACKAGE_TYPE, std::vector<PACKAGE_VIEW_DATA>> data;
326
327 for( const PCM_PACKAGE& pkg : packages )
328 {
329 PACKAGE_VIEW_DATA package_data( pkg );
330
331 if( m_packageBitmaps.count( package_data.package.identifier ) > 0 )
332 package_data.bitmap = &m_packageBitmaps.at( package_data.package.identifier );
333 else
334 package_data.bitmap = &m_defaultBitmap;
335
336 package_data.state = m_pcm->GetPackageState( aRepositoryId, pkg.identifier );
337
338 if( package_data.state == PPS_INSTALLED || package_data.state == PPS_UPDATE_AVAILABLE )
339 {
340 package_data.current_version = m_pcm->GetInstalledPackageVersion( pkg.identifier );
341 package_data.pinned = m_pcm->IsPackagePinned( pkg.identifier );
342 }
343
344 if( package_data.state == PPS_UPDATE_AVAILABLE )
345 package_data.update_version = m_pcm->GetPackageUpdateVersion( pkg );
346
347
348 for( const PENDING_ACTION& action : m_pendingActions )
349 {
350 if( action.package.identifier != pkg.identifier )
351 continue;
352
353 switch( action.action )
354 {
355 case PPA_INSTALL: package_data.state = PPS_PENDING_INSTALL; break;
356 case PPA_UPDATE: package_data.state = PPS_PENDING_UPDATE; break;
357 case PPA_UNINSTALL: package_data.state = PPS_PENDING_UNINSTALL; break;
358 }
359
360 break;
361 }
362
363 package_data.repository_id = aRepositoryId;
364 package_data.repository_name = m_choiceRepository->GetStringSelection();
365
366 data[pkg.type].emplace_back( package_data );
367 }
368
369 for( size_t i = 0; i < PACKAGE_TYPE_LIST.size(); i++ )
370 {
371 PCM_PACKAGE_TYPE type = PACKAGE_TYPE_LIST[i].first;
372 const wxString& label = PACKAGE_TYPE_LIST[i].second;
373 m_repositoryContentPanels[type]->SetData( data[type] );
374 m_contentNotebook->SetPageText( i, wxString::Format( wxGetTranslation( label ),
375 (int) data[type].size() ) );
376 }
377
378 m_dialogNotebook->SetPageText( 0, wxString::Format( _( "Repository (%d)" ),
379 (int) packages.size() ) );
380 }
381}
382
383
385{
386 m_gridPendingActions->ClearSelection();
387 m_gridPendingActions->SelectRow( event.GetRow() );
388}
389
390
392{
393 m_dialogNotebook->SetPageText( 2, wxString::Format( _( "Pending (%d)" ),
394 (int) m_pendingActions.size() ) );
395
396 for( int col = 0; col < m_gridPendingActions->GetNumberCols(); col++ )
397 {
398 // Set the width to see the full contents
400 }
401}
402
403
405{
407
408 const std::vector<PCM_INSTALLATION_ENTRY> installed = m_pcm->GetInstalledPackages();
409 std::vector<PACKAGE_VIEW_DATA> package_list;
410
411 m_installedBitmaps = m_pcm->GetInstalledPackageBitmaps();
412
413 for( const PCM_INSTALLATION_ENTRY& entry : installed )
414 {
415 PACKAGE_VIEW_DATA package_data( entry );
416
417 if( m_installedBitmaps.count( package_data.package.identifier ) > 0 )
418 package_data.bitmap = &m_installedBitmaps.at( package_data.package.identifier );
419 else
420 package_data.bitmap = &m_defaultBitmap;
421
422 package_data.state = m_pcm->GetPackageState( entry.repository_id,
423 entry.package.identifier );
424
425 if( package_data.state == PPS_UPDATE_AVAILABLE )
426 package_data.update_version = m_pcm->GetPackageUpdateVersion( entry.package );
427
428 package_list.emplace_back( package_data );
429 }
430
431 m_installedPanel->SetData( package_list );
432
433 m_dialogNotebook->SetPageText( 1, wxString::Format( _( "Installed (%d)" ),
434 (int) package_list.size() ) );
435}
436
437
438void DIALOG_PCM::OnApplyChangesClicked( wxCommandEvent& event )
439{
440 if( m_pendingActions.size() == 0 )
441 return;
442
443 m_sdbSizer1OK->Disable();
444 m_sdbSizer1Apply->Disable();
445 m_sdbSizer1Cancel->Disable();
446
447 PCM_TASK_MANAGER task_manager( m_pcm );
448
449 for( const PENDING_ACTION& action : m_pendingActions )
450 {
451 if( action.action == PPA_UNINSTALL )
452 {
453 task_manager.Uninstall( action.package );
454 }
455 else
456 {
457 bool isUpdate = action.action == PPA_UPDATE;
458 task_manager.DownloadAndInstall( action.package, action.version, action.repository_id,
459 isUpdate );
460 }
461 }
462
463 task_manager.RunQueue( this );
464
465 m_sdbSizer1OK->Enable();
466 m_sdbSizer1Apply->Enable();
467 m_sdbSizer1Cancel->Enable();
468
470 wxCommandEvent dummy;
472
473 if( !m_selectedRepositoryId.IsEmpty() )
475
476 if( task_manager.ColorSettingsChanged() )
477 Pgm().GetSettingsManager().ReloadColorSettings();
478}
479
480
481void DIALOG_PCM::OnDiscardChangesClicked( wxCommandEvent& event )
482{
483 m_gridPendingActions->Freeze();
484
485 for( int i = m_pendingActions.size() - 1; i >= 0; i-- )
486 discardAction( i );
487
489 m_gridPendingActions->Thaw();
490}
491
492
493void DIALOG_PCM::OnDiscardActionClicked( wxCommandEvent& event )
494{
495 wxArrayInt rows = m_gridPendingActions->GetSelectedRows();
496
497 std::sort( rows.begin(), rows.end(),
498 []( const int& a, const int& b )
499 {
500 return a > b;
501 } );
502
503 m_gridPendingActions->Freeze();
504
505 for( int row : rows )
506 discardAction( row );
507
509 m_gridPendingActions->Thaw();
510}
511
512
514{
515 m_gridPendingActions->DeleteRows( aIndex );
516
517 PENDING_ACTION action = m_pendingActions[aIndex];
518
519 PCM_PACKAGE_STATE state = m_pcm->GetPackageState( action.repository_id,
520 action.package.identifier );
521
522 updatePackageState( action.package.identifier, state );
523
524 m_pendingActions.erase( m_pendingActions.begin() + aIndex );
525}
526
527
528void DIALOG_PCM::updatePackageState( const wxString& aPackageId, const PCM_PACKAGE_STATE aState )
529{
530 bool pinned = m_pcm->IsPackagePinned( aPackageId );
531
532 m_installedPanel->SetPackageState( aPackageId, aState, pinned );
533
534 for( const auto& [ packageType, packagesView ] : m_repositoryContentPanels )
535 packagesView->SetPackageState( aPackageId, aState, pinned );
536}
537
538
539void DIALOG_PCM::OnOpenPackageDirClicked( wxCommandEvent& event )
540{
541 LaunchExternal( m_pcm->Get3rdPartyPath() );
542}
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
Implementing DIALOG_MANAGE_REPOSITORIES_BASE.
std::vector< std::pair< wxString, wxString > > GetData()
void SetData(const std::vector< std::pair< wxString, wxString > > &aData)
Class DIALOG_PCM_BASE.
wxChoice * m_choiceRepository
wxNotebook * m_contentNotebook
WX_GRID * m_gridPendingActions
wxButton * m_sdbSizer1OK
wxButton * m_sdbSizer1Cancel
wxBitmapButton * m_discardActionButton
wxNotebook * m_dialogNotebook
wxButton * m_sdbSizer1Apply
wxPanel * m_panelInstalledHolder
wxPanel * m_panelPending
ActionCallback m_actionCallback
Definition: dialog_pcm.h:100
void OnDiscardChangesClicked(wxCommandEvent &event) override
Switches to another repository.
Definition: dialog_pcm.cpp:481
std::unordered_map< wxString, wxBitmap > m_installedBitmaps
Definition: dialog_pcm.h:106
std::unordered_map< wxString, wxBitmap > m_packageBitmaps
Definition: dialog_pcm.h:105
void OnManageRepositoriesClicked(wxCommandEvent &event) override
Discards current repo cache, fetches it anew and displays.
Definition: dialog_pcm.cpp:220
void updatePackageState(const wxString &aPackageId, const PCM_PACKAGE_STATE aState)
Discards specified pending action.
Definition: dialog_pcm.cpp:528
void OnApplyChangesClicked(wxCommandEvent &event) override
Discards all pending changes.
Definition: dialog_pcm.cpp:438
void OnDiscardActionClicked(wxCommandEvent &event) override
Handles modification of the buttons' status.
Definition: dialog_pcm.cpp:493
void OnUpdateEventButtons(wxUpdateUIEvent &event)
Definition: dialog_pcm.cpp:193
std::unordered_map< PCM_PACKAGE_TYPE, PANEL_PACKAGES_VIEW * > m_repositoryContentPanels
Definition: dialog_pcm.h:103
void OnOpenPackageDirClicked(wxCommandEvent &event) override
Enqueues current pending actions in PCM_TASK_MANAGER and runs the queue.
Definition: dialog_pcm.cpp:539
PinCallback m_pinCallback
Definition: dialog_pcm.h:101
DIALOG_PCM(wxWindow *parent, std::shared_ptr< PLUGIN_CONTENT_MANAGER > pcm)
Constructor.
Definition: dialog_pcm.cpp:56
void updatePendingActionsTab()
Gets installed packages list from PCM and displays it on installed tab.
Definition: dialog_pcm.cpp:391
std::vector< PENDING_ACTION > m_pendingActions
Definition: dialog_pcm.h:123
void setRepositoryListFromPcm()
Updates pending actions tab caption and content-fits the grid.
Definition: dialog_pcm.cpp:249
void OnInstallFromFileClicked(wxCommandEvent &event) override
Opens local directory where packages are installed in file manager.
Definition: dialog_pcm.cpp:281
@ PENDING_COL_NAME
Definition: dialog_pcm.h:128
@ PENDING_COL_REPOSITORY
Definition: dialog_pcm.h:130
@ PENDING_COL_VERSION
Definition: dialog_pcm.h:129
@ PENDING_COL_ACTION
Definition: dialog_pcm.h:127
void OnCloseWindow(wxCloseEvent &aEvent)
Opens repository management dialog, saves changes to PCM.
Definition: dialog_pcm.cpp:212
std::shared_ptr< PLUGIN_CONTENT_MANAGER > m_pcm
Definition: dialog_pcm.h:99
void OnRepositoryChoice(wxCommandEvent &event) override
Selects the whole row in the grid if a cell is clicked.
Definition: dialog_pcm.cpp:303
wxString m_selectedRepositoryId
Definition: dialog_pcm.h:104
PANEL_PACKAGES_VIEW * m_installedPanel
Definition: dialog_pcm.h:102
~DIALOG_PCM()
Closes the window, asks user confirmation if there are pending actions.
Definition: dialog_pcm.cpp:183
void setInstalledPackages()
Reflects new state of the package in all panels where it is displayed.
Definition: dialog_pcm.cpp:404
void OnPendingActionsCellClicked(wxGridEvent &event) override
Discards selected pending actions.
Definition: dialog_pcm.cpp:384
void setRepositoryData(const wxString &aRepositoryId)
Gets package data from PCM and displays it on repository tab.
Definition: dialog_pcm.cpp:314
void discardAction(int aIndex)
Definition: dialog_pcm.cpp:513
wxBitmap m_defaultBitmap
Definition: dialog_pcm.h:107
void OnRefreshClicked(wxCommandEvent &event) override
Opens file selection dialog and installs selected package archive.
Definition: dialog_pcm.cpp:274
void OnCloseClicked(wxCommandEvent &event) override
Definition: dialog_pcm.cpp:199
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Definition: grid_tricks.h:61
std::vector< std::pair< wxString, wxString > > m_PcmRepositories
void ClearData()
Selects full row of the clicked cell.
void SetData(const std::vector< PACKAGE_VIEW_DATA > &aPackageData)
Recreates package panels and displays data.
void SetPackageState(const wxString &aPackageId, const PCM_PACKAGE_STATE aState, const bool aPinned)
Set the state of package.
Helper class that handles package (un)installation.
void InstallFromFile(wxWindow *aParent, const wxString &aFilePath)
Installs package from an archive file on disk.
void Uninstall(const PCM_PACKAGE &aPackage)
Enqueue package uninstallation.
void DownloadAndInstall(const PCM_PACKAGE &aPackage, const wxString &aVersion, const wxString &aRepositoryId, const bool isUpdate)
Enqueue package download and installation.
void RunQueue(wxWindow *aParent)
Run queue of pending actions.
bool ColorSettingsChanged() const
T * GetAppSettings(bool aLoadNow=true)
Returns a handle to the a given settings by type If the settings have already been loaded,...
int GetVisibleWidth(int aCol, bool aHeader=true, bool aContents=true, bool aKeep=false)
Calculates the specified column based on the actual size of the text on screen.
Definition: wx_grid.cpp:520
#define GRID_CELL_MARGIN
Definition: dialog_pcm.cpp:45
static std::vector< std::pair< PCM_PACKAGE_TYPE, wxString > > PACKAGE_TYPE_LIST
Definition: dialog_pcm.cpp:49
#define _(s)
bool LaunchExternal(const wxString &aPath)
Launches the given file or folder in the host OS.
Definition: launch_ext.cpp:25
PCM_PACKAGE_STATE
Definition: pcm.h:55
@ PPS_INSTALLED
Definition: pcm.h:58
@ PPS_PENDING_UPDATE
Definition: pcm.h:62
@ PPS_UPDATE_AVAILABLE
Definition: pcm.h:61
@ PPS_PENDING_UNINSTALL
Definition: pcm.h:60
@ PPS_PENDING_INSTALL
Definition: pcm.h:59
PCM_PACKAGE_ACTION
Definition: pcm.h:68
@ PPA_UNINSTALL
Definition: pcm.h:70
@ PPA_UPDATE
Definition: pcm.h:71
@ PPA_INSTALL
Definition: pcm.h:69
PCM_PACKAGE_TYPE
< Supported package types
Definition: pcm_data.h:41
@ PT_COLORTHEME
Definition: pcm_data.h:45
@ PT_PLUGIN
Definition: pcm_data.h:43
@ PT_LIBRARY
Definition: pcm_data.h:44
see class PGM_BASE
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:111
std::vector< FAB_LAYER_COLOR > dummy
< Collection of data relevant to the package display panel Callback for (un)install button
Definition: panel_package.h:31
wxString update_version
Definition: panel_package.h:39
wxString repository_id
Definition: panel_package.h:36
wxString current_version
Definition: panel_package.h:38
const PCM_PACKAGE package
Definition: panel_package.h:32
wxString repository_name
Definition: panel_package.h:37
wxBitmap * bitmap
Definition: panel_package.h:33
PCM_PACKAGE_STATE state
Definition: panel_package.h:34
Definition: pcm_data.h:138
Repository reference to a resource.
Definition: pcm_data.h:95
wxString identifier
Definition: pcm_data.h:99
wxString name
Definition: pcm_data.h:96