~ubuntu-branches/debian/sid/filezilla/sid

« back to all changes in this revision

Viewing changes to src/interface/context_control.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adrien Cunin
  • Date: 2010-04-20 09:25:39 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100420092539-10d1003e0nm4zfyp
Tags: 3.3.2.1-1
* New upstream release
   - Really fixes previously mentioned bugs (the patches for them were not
     included in upstream 3.3.1)
* Added libgtk2.0-dev to build-deps
* Added libtinyxml-dev to build-deps, so that the system libtinyxml is used
* Added debian/README.source saying that dpatch is used
* Updated Standards-Version, no change needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "FileZilla.h"
 
1
#include <filezilla.h>
2
2
#include "commandqueue.h"
3
3
#include "context_control.h"
4
4
#include "filelist_statusbar.h"
10
10
#include "recursive_operation.h"
11
11
#include "RemoteListView.h"
12
12
#include "RemoteTreeView.h"
 
13
#include "sitemanager.h"
13
14
#include "splitter.h"
14
15
#include "view.h"
15
16
#include "viewheader.h"
25
26
EVT_MENU(XRCID("ID_TABCONTEXT_NEW"), CContextControl::OnTabContextNew)
26
27
END_EVENT_TABLE()
27
28
 
28
 
CContextControl::CContextControl(CMainFrame* pMainFrame, wxWindow *parent)
29
 
        : wxSplitterWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER),
30
 
        CStateEventHandler(0),
 
29
CContextControl::CContextControl(CMainFrame* pMainFrame)
 
30
        : CStateEventHandler(0),
31
31
        m_tabs(0), m_right_clicked_tab(-1), m_pMainFrame(pMainFrame)
32
32
{
33
33
        m_current_context_controls = -1;
42
42
{
43
43
}
44
44
 
 
45
void CContextControl::Create(wxWindow *parent)
 
46
{
 
47
        wxSplitterWindow::Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER);
 
48
}
 
49
 
45
50
void CContextControl::CreateTab()
46
51
{
47
52
        Freeze();
116
121
                        m_tabs = new wxAuiNotebookEx();
117
122
 
118
123
                        wxSize splitter_size = m_context_controls[m_current_context_controls].pViewSplitter->GetSize();
119
 
                        m_tabs->Create(this, wxID_ANY, initial_position, splitter_size, wxNO_BORDER | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ALL_TABS);
 
124
                        m_tabs->Create(this, wxID_ANY, initial_position, splitter_size, wxNO_BORDER | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_WINDOWLIST_BUTTON | wxAUI_NB_CLOSE_ON_ALL_TABS);
120
125
                        m_tabs->SetExArtProvider();
121
126
                        m_tabs->SetSelectedFont(*wxNORMAL_FONT);
122
127
                        m_tabs->SetMeasuringFont(*wxNORMAL_FONT);
269
274
                context_controls.tab_index = 0;
270
275
                context_controls.site_bookmarks = new CContextControl::_context_controls::_site_bookmarks;
271
276
                
 
277
                context_controls.site_bookmarks->path = COptions::Get()->GetOption(OPTION_LAST_CONNECTED_SITE);
 
278
                CSiteManager::GetBookmarks(context_controls.site_bookmarks->path,
 
279
                        context_controls.site_bookmarks->bookmarks);
 
280
 
272
281
                Initialize(context_controls.pViewSplitter);
273
282
        }
274
283
 
523
532
        if (i < 0)
524
533
                return false;
525
534
 
 
535
        if (!m_tabs)
 
536
        {
 
537
                if (i != 0)
 
538
                        return false;
 
539
 
 
540
                return true;
 
541
        }
 
542
 
526
543
        if ((int)m_tabs->GetPageCount() <= i)
527
544
                return false;
528
545
 
531
548
        return true;
532
549
}
533
550
 
 
551
void CContextControl::AdvanceTab(bool forward)
 
552
{
 
553
        if (!m_tabs)
 
554
                return;
 
555
 
 
556
        m_tabs->AdvanceTab(forward);
 
557
}
 
558
 
534
559
void CContextControl::OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString& data, const void* data2)
535
560
{
536
561
        if (notification == STATECHANGE_CHANGEDCONTEXT)