KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_git_new_tag.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
21
22#include <wx/settings.h>
23
24#include <confirm.h>
25
26
29{
30 OptOut( this );
31
32 m_hint->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
33
36}
37
38
40{
41 m_name = m_nameCtrl->GetValue();
42 m_name.Trim( true ).Trim( false );
43 m_message = m_messageCtrl->GetValue();
44
45 if( m_name.IsEmpty() )
46 {
47 DisplayInfoMessage( this, _( "Enter a name for the tag." ) );
48 m_nameCtrl->SetFocus();
49 return false;
50 }
51
52 return true;
53}
DIALOG_GIT_NEW_TAG_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Create Tag"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
DIALOG_GIT_NEW_TAG(wxWindow *aParent)
bool TransferDataFromWindow() override
void OptOut(wxWindow *aWindow)
Opt out of control state saving.
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...
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition confirm.cpp:245
This file is part of the common library.
#define _(s)