~ubuntu-branches/debian/sid/pgadmin3/sid

« back to all changes in this revision

Viewing changes to pgadmin/ctl/ctlListView.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2009-07-30 12:27:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730122716-fddbh42on721bbs2
Tags: 1.10.0-1
* New upstream release.
* Adjusted watch file to match release candidates.
* Updated to Standards-Version 3.8.2:
  - Moved to Section: database.
  - Add DEB_BUILD_OPTIONS support for parallel building.
  - Move from findstring to filter suggestion for DEB_BUILD_OPTIONS parsing.
* pgagent got split into its own separate source package by upstream.
* Exclude Docs.vcproj from installation.
* Move doc-base.enus from pgadmin3 to pgadmin3-data package, the files are
  in there too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// pgAdmin III - PostgreSQL Tools
4
 
// RCS-ID:      $Id: ctlListView.cpp 6930 2008-01-02 00:10:01Z dpage $
5
 
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
6
 
// This software is released under the Artistic Licence
 
4
// RCS-ID:      $Id: ctlListView.cpp 7758 2009-03-26 20:49:59Z dpage $
 
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
 
6
// This software is released under the BSD Licence
7
7
//
8
8
// ctlListView.cpp - enhanced listview control
9
9
//
45
45
 
46
46
void ctlListView::AddColumn(const wxChar *text, int size, int format)
47
47
{
48
 
    InsertColumn(GetColumnCount(), text, format, ConvertDialogToPixels(wxPoint(size,0)).x);
 
48
    if (size == wxLIST_AUTOSIZE || size == wxLIST_AUTOSIZE_USEHEADER)
 
49
    {
 
50
        InsertColumn(GetColumnCount(), text, format, size);
 
51
    }
 
52
    else
 
53
    {
 
54
        InsertColumn(GetColumnCount(), text, format, ConvertDialogToPixels(wxPoint(size,0)).x);
 
55
    }
49
56
}
50
57
 
51
58
 
52
 
long ctlListView::AppendItem(int icon, const wxChar *val, const wxChar *val2, const wxChar *val3)
 
59
long ctlListView::AppendItem(int icon, const wxChar *val, const wxChar *val2, const wxChar *val3, const wxChar *val4)
53
60
{
54
61
    long pos=InsertItem(GetItemCount(), val, icon);
55
62
    if (val2 && *val2)
56
63
        SetItem(pos, 1, val2);
57
64
    if (val3 && *val3)
58
65
        SetItem(pos, 2, val3);
 
66
    if (val4 && *val4)
 
67
        SetItem(pos, 3, val4);
59
68
 
60
69
    return pos;
61
70
}
66
75
    int rightSize;
67
76
    if (leftSize < 0)
68
77
    {
69
 
        leftSize = rightSize = GetClientSize().GetWidth()/2;
 
78
#ifdef __WXMAC__
 
79
        leftSize = rightSize = (GetParent()->GetSize().GetWidth() - 20)/2;
 
80
#else
 
81
        leftSize = rightSize = GetSize().GetWidth()/2;
 
82
#endif
70
83
    }
71
84
    else
72
85
    {
73
86
        if (leftSize)
74
87
            leftSize = ConvertDialogToPixels(wxPoint(leftSize, 0)).x;
 
88
 
 
89
#ifdef __WXMAC__
 
90
        rightSize = (GetParent()->GetSize().GetWidth() - 20) - leftSize;
 
91
#else
75
92
        rightSize = GetClientSize().GetWidth()-leftSize;
 
93
#endif
76
94
    }
77
95
    if (!leftSize)
78
96
    {