void FOOTPRINT_EDIT_FRAME::ProcessPreferences( wxCommandEvent& event )
{
    int id = event.GetId();

    switch( id )
    {
    // Hotkey IDs
    case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
        // Display current hotkey list for the footprint editor.
        DisplayHotkeyList( this, g_Module_Editor_Hotkeys_Descr );
        break;

    case ID_PCB_LIB_TABLE_EDIT:
        InvokePcbLibTableEditor( &Kiway(), this );
        break;

    case wxID_PREFERENCES:
        ShowPreferences( g_Pcbnew_Editor_Hotkeys_Descr, g_Module_Editor_Hotkeys_Descr,
                         wxT( "pcbnew" ) );
        break;

    default:
        DisplayError( this, "FOOTPRINT_EDIT_FRAME::ProcessPreferences error" );
    }
}
Exemplo n.º 2
0
/* Handles the selection of tools, menu, and popup menu commands.
 */
void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event )
{
    wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
    cmd.SetEventObject( this );

    switch( event.GetId() )
    {
    case wxID_PREFERENCES:
        ShowPreferences( PlEditorHotkeysDescr, PlEditorHotkeysDescr, wxT( "pl_editor" ) );
        break;

    case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
        DisplayHotkeyList( this, PlEditorHotkeysDescr );
        break;

    case ID_SELECT_PAGE_NUMBER:
    {
        KIGFX::VIEW* view = GetGalCanvas()->GetView();
        view->SetLayerVisible( LAYER_WORKSHEET_PAGE1, m_pageSelectBox->GetSelection() == 0 );
        view->SetLayerVisible( LAYER_WORKSHEET_PAGEn, m_pageSelectBox->GetSelection() == 1 );
        m_canvas->Refresh();
    }
        break;

    default:
        wxMessageBox( wxT( "PL_EDITOR_FRAME::Process_Special_Functions error" ) );
        break;
    }
}
Exemplo n.º 3
0
void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
{
    if( ShowPreferences( g_Eeschema_Hotkeys_Descr, g_Schematic_Hotkeys_Descr, wxT( "eeschema" ) ) )
    {
        SaveSettings( config() );  // save values shared by eeschema applications.
        m_canvas->Refresh( true );
    }
}
Exemplo n.º 4
0
void KICAD_MANAGER_FRAME::OnPreferences( wxCommandEvent& aEvent )
{
    ShowPreferences( m_manager_Hotkeys_Descr, m_manager_Hotkeys_Descr, wxT( "kicad" ) );
}
Exemplo n.º 5
0
void gtkShow(int type, char *param)
{
    switch (type) {
    case evEqualizer:
        ShowEqualizer();
        gtkSetLayer(Equalizer);
        break;

    case evSkinBrowser:
        ShowSkinBrowser();

//        gtk_clist_clear(GTK_CLIST(SkinList));
        if (FillSkinList(sbSkinDirInHome) &&
            FillSkinList(sbSkinDirInData)) {
            gtkSelectInCList(SkinList, param);
            gtk_clist_sort(GTK_CLIST(SkinList));
            gtk_widget_show(SkinBrowser);
            gtkSetLayer(SkinBrowser);
        } else {
            gtk_widget_destroy(SkinBrowser);
            gtkMessageBox(MSGBOX_ERROR, "Skin dirs not found ... Please install skins.");
        }

        break;

    case evPreferences:
        ShowPreferences();
        break;

    case evPlaylist:
        ShowPlaylist();
        gtkSetLayer(Playlist);
        break;

    case evLoad:
        ShowFileSelector(FILESELECT_VIDEO_AUDIO);
        gtkSetLayer(FileSelector);
        break;

    case evLoadSubtitle:
        ShowFileSelector(FILESELECT_SUBTITLE);
        gtkSetLayer(FileSelector);
        break;

    case evLoadAudioFile:
        ShowFileSelector(FILESELECT_AUDIO);
        gtkSetLayer(FileSelector);
        break;

    case evPlayImage:
        ShowFileSelector(FILESELECT_IMAGE);
        gtkSetLayer(FileSelector);
        break;

    case evAbout:
        ShowAbout();
        gtkSetLayer(About);
        break;

    case ivShowPopUpMenu:
        gtkPopupMenu      = evNone;
        gtkPopupMenuParam = 0;

        if (PopUpMenu) {
            gtk_widget_hide(PopUpMenu);
            gtk_widget_destroy(PopUpMenu);
        }

        PopUpMenu = CreatePopUpMenu();
        gtk_menu_popup(GTK_MENU(PopUpMenu), NULL, NULL, NULL, NULL, 0, 0);
        break;

    case ivHidePopUpMenu:

        if (PopUpMenu) {
            gtk_widget_hide(PopUpMenu);
            gtk_widget_destroy(PopUpMenu);
            PopUpMenu = NULL;
        }

        break;

    case evLoadURL:
        ShowURLDialog();
        gtkSetLayer(URLDialog);
        break;
    }
}