~ubuntu-branches/ubuntu/maverick/wxwidgets2.8/maverick-proposed

« back to all changes in this revision

Viewing changes to src/unix/taskbarx11.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Devid Filoni
  • Date: 2007-11-06 18:25:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071106182513-809agqds6igh7mqo
Tags: 2.8.6.1-0ubuntu1
* New upstream version, based on the upstream tarball
  wxPython-src-2.8.6.1.tar.bz2, renamed debian to debian-upstream.
* Provide a get-orig-source target to do the repackaging.
* Fix "substvar-source-version-is-deprecated" lintian warnings.
* Remove duplicate Description field in debian/control.
* Add "\" at the end of line 8 in debian/python-wxtools.menu to fix
  "bad-test-in-menu-item" lintian error.
* Provide .xpm icons to fix "menu-icon-not-in-xpm-format" lintian errors,
  changed Icon field in debian/python-wxtools.menu.
* Fix "wrong-name-for-upstream-changelog" lintian warnings.
* Remove "Application;" from Categories field in debian/pycrust.desktop,
  debian/pyshell.desktop, debian/xrced.desktop.
* Switch "Apps" to "Applications" in debian/python-wxtools.menu to fix
  "menu-item-uses-apps-section" lintian warnings.
* Drop the icon extension from debian/pycrust.desktop,
  debian/pyshell.desktop, debian/xrced.desktop.
* Add dpatch support.
* Add "WX_CONFIG" patch.
* debian/rules:
  - added .xpm icons to install-gtk-py-tools target
  - added "docs/changes.txt" to dh_installchangelogs in binary-common target
  - added "\" at the end of "install-examples install-msw-dev
    install-msw-dbg install-headers-msw" line in .PHONY

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Author:      Vaclav Slavik
5
5
// Modified by:
6
6
// Created:     04/04/2003
7
 
// RCS-ID:      $Id: taskbarx11.cpp,v 1.26 2006/11/16 14:02:14 VZ Exp $
 
7
// RCS-ID:      $Id: taskbarx11.cpp 48556 2007-09-04 13:47:54Z RR $
8
8
// Copyright:   (c) Vaclav Slavik, 2003
9
9
// Licence:     wxWindows licence
10
10
/////////////////////////////////////////////////////////////////////////
126
126
wxTaskBarIconArea::wxTaskBarIconArea(wxTaskBarIcon *icon, const wxBitmap &bmp)
127
127
    : wxTaskBarIconAreaBase(), m_icon(icon), m_pos(0,0)
128
128
{
 
129
#if defined(__WXGTK20__) && defined(TASKBAR_ICON_AREA_BASE_INCLUDED)
 
130
    m_invokingWindow = icon;
 
131
#endif
 
132
 
 
133
    // Set initial size to bitmap size (tray manager may and often will
 
134
    // change it):
 
135
    SetClientSize(wxSize(bmp.GetWidth(), bmp.GetHeight()));
 
136
 
 
137
    SetTrayIcon(bmp);
 
138
 
129
139
    if (!IsProtocolSupported())
130
140
    {
131
141
        wxLogTrace(_T("systray"),
132
142
                   _T("using legacy KDE1,2 and GNOME 1.2 methods"));
133
143
        SetLegacyWMProperties();
134
144
    }
135
 
 
136
 
#if defined(__WXGTK20__) && defined(TASKBAR_ICON_AREA_BASE_INCLUDED)
137
 
    m_invokingWindow = icon;
138
 
#endif
139
 
 
140
 
    // Set initial size to bitmap size (tray manager may and often will
141
 
    // change it):
142
 
    SetSize(wxSize(bmp.GetWidth(), bmp.GetHeight()));
143
 
 
144
 
    SetTrayIcon(bmp);
145
145
}
146
146
 
147
147
void wxTaskBarIconArea::SetTrayIcon(const wxBitmap& bmp)
149
149
    m_bmp = bmp;
150
150
 
151
151
    // determine suitable bitmap size:
152
 
    wxSize winsize(GetSize());
 
152
    wxSize winsize(GetClientSize());
153
153
    wxSize bmpsize(m_bmp.GetWidth(), m_bmp.GetHeight());
154
154
    wxSize iconsize(wxMin(winsize.x, bmpsize.x), wxMin(winsize.y, bmpsize.y));
155
155