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

« back to all changes in this revision

Viewing changes to pgadmin/dlg/dlgManageFavourites.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: dlgManageFavourites.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: dlgManageFavourites.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
// dlgManageFavourites.cpp - Manage favourites
9
9
//
149
149
 
150
150
void dlgManageFavourites::OnDelete(wxCommandEvent &ev)
151
151
{
 
152
        wxString msg;
 
153
 
152
154
        if (!trLocation->GetSelection().IsOk() ||
153
155
                trLocation->GetSelection() == trLocation->GetRootItem())
154
156
                return;
157
159
        if (!item)
158
160
                return;
159
161
 
160
 
        if (wxMessageDialog(this, wxString(_("Are you sure you want to delete the ")) + ((item->GetId()!=-2)?_("favourite"):_("folder")) + wxT(" '") + item->GetTitle() + wxT("'?"), _("Confirm delete"), wxYES_NO | wxICON_QUESTION).ShowModal() != wxID_YES)
 
162
        if (item->GetId() != -2)
 
163
                msg = wxString::Format(_("Are you sure you want to delete the favourite '%s'?"), item->GetTitle().c_str());
 
164
        else
 
165
                msg = wxString::Format(_("Are you sure you want to delete the folder '%s'?"), item->GetTitle().c_str());
 
166
        if (wxMessageDialog(this, msg, _("Confirm delete"), wxYES_NO | wxICON_QUESTION).ShowModal() != wxID_YES)
161
167
                return;
162
168
 
163
169
        if (favourites->DeleteTreeItem(trLocation->GetSelection()))