Commit 1ebc6328 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix a not shown dialog (sheet pin dialog editor) under XFCE and Unity. Make...

Fix a not shown dialog (sheet pin dialog editor) under XFCE and Unity. Make "display hotkeys list" window not modal.
As usual, fix a few minor coverity warnings
parents efe5658a 3c4f76ab
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -419,6 +419,8 @@ int KeyCodeFromKeyName( const wxString& keyname )
 * Displays the current hotkey list
 * aList = a EDA_HOTKEY_CONFIG list(Null terminated)
 */
#include <html_messagebox.h>

void DisplayHotkeyList( EDA_BASE_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescList )
{
    wxString     keyname;
@@ -453,7 +455,17 @@ void DisplayHotkeyList( EDA_BASE_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescL
    }

    msg += wxT( "</table></html></body>" );

#if 0   // Set to 1 to create a modal dialog (blocking)
    DisplayHtmlInfoMessage( aFrame, _( "Hotkeys List" ), msg, wxSize( 340, 750 ) );
#else
    // Create a non modal dialog, which shows the list of hotkeys until dismissed
    // but does not block the parent window
    HTML_MESSAGE_BOX *dlg = new HTML_MESSAGE_BOX( aFrame, _( "Hotkeys List" ),
                                        wxDefaultPosition, wxSize( 340, 750 ) );
    dlg->AddHTML_Text( msg );
    dlg->Show( true );
#endif
}


+7 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
 * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
 * Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
@@ -46,5 +46,10 @@ DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN( wxWindow* parent ) :

    m_choiceConnectionType->SetSelection( 0 );
    m_textName->SetFocus();
    m_sdbSizer2OK->SetDefault();
    m_sdbSizerOK->SetDefault();

    // On some windows manager (Unity, XFCE), this dialog is
    // not always raised, depending on this dialog is run.
    // Force it to be raised
    Raise();
}
+16 −9
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// C++ code generated with wxFormBuilder (version Jun  5 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -9,7 +9,7 @@

///////////////////////////////////////////////////////////////////////////

DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 350,-1 ), wxDefaultSize );
	
@@ -30,6 +30,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent
	fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 6 );
	
	m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_textName->SetMaxLength( 0 ); 
	fgSizer1->Add( m_textName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 6 );
	
	
@@ -40,6 +41,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent
	fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
	
	m_textHeight = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_textHeight->SetMaxLength( 0 ); 
	fgSizer1->Add( m_textHeight, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
	
	m_staticHeightUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -51,6 +53,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent
	fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
	
	m_textWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_textWidth->SetMaxLength( 0 ); 
	fgSizer1->Add( m_textWidth, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
	
	m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -69,20 +72,24 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent
	
	fgSizer1->Add( 0, 0, 1, wxEXPAND, 6 );
	
	
	m_nameSizer->Add( fgSizer1, 1, wxEXPAND, 6 );
	
	
	m_mainSizer->Add( m_nameSizer, 1, wxALL|wxEXPAND, 6 );
	
	
	m_mainSizer->Add( 0, 0, 0, wxALL|wxEXPAND, 3 );
	
	m_sdbSizer2 = new wxStdDialogButtonSizer();
	m_sdbSizer2OK = new wxButton( this, wxID_OK );
	m_sdbSizer2->AddButton( m_sdbSizer2OK );
	m_sdbSizer2Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer2->AddButton( m_sdbSizer2Cancel );
	m_sdbSizer2->Realize();
	m_mainSizer->Add( m_sdbSizer2, 0, wxALL|wxEXPAND, 6 );
	m_sdbSizer = new wxStdDialogButtonSizer();
	m_sdbSizerOK = new wxButton( this, wxID_OK );
	m_sdbSizer->AddButton( m_sdbSizerOK );
	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer->AddButton( m_sdbSizerCancel );
	m_sdbSizer->Realize();
	
	m_mainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 6 );
	
	
	this->SetSizer( m_mainSizer );
	this->Layout();
+327 −31

File changed.

Preview size limit exceeded, changes collapsed.

+13 −12
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// C++ code generated with wxFormBuilder (version Jun  5 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#ifndef __dialog_sch_edit_sheet_pin_base__
#define __dialog_sch_edit_sheet_pin_base__
#ifndef __DIALOG_SCH_EDIT_SHEET_PIN_BASE_H__
#define __DIALOG_SCH_EDIT_SHEET_PIN_BASE_H__

#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;

#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
@@ -28,14 +32,13 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_SCH_EDIT_SHEET_PIN_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public wxDialog 
class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public DIALOG_SHIM
{
	private:
	
	protected:
		wxStaticText* m_staticText1;
		wxTextCtrl* m_textName;
		
		wxStaticText* m_staticText2;
		wxTextCtrl* m_textHeight;
		wxStaticText* m_staticHeightUnits;
@@ -44,11 +47,9 @@ class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public wxDialog
		wxStaticText* m_staticWidthUnits;
		wxStaticText* m_staticText3;
		wxChoice* m_choiceConnectionType;
		
		
		wxStdDialogButtonSizer* m_sdbSizer2;
		wxButton* m_sdbSizer2OK;
		wxButton* m_sdbSizer2Cancel;
		wxStdDialogButtonSizer* m_sdbSizer;
		wxButton* m_sdbSizerOK;
		wxButton* m_sdbSizerCancel;
	
	public:
		
@@ -57,4 +58,4 @@ class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public wxDialog
	
};

#endif //__dialog_sch_edit_sheet_pin_base__
#endif //__DIALOG_SCH_EDIT_SHEET_PIN_BASE_H__
Loading