Changeset fe58e77 in git


Ignore:
Timestamp:
02/06/10 10:33:54 (9 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/survex-1_1, svn/tags/1.1.14, svn/tags/1.1.15, svn/tags/1.1.16, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/tags/v1_1_13, svn/trunk, travis-osx
Children:
2e4b8cd
Parents:
ca2611a
Message:

src/aboutdlg.cc,src/aboutdlg.h: Use standard button for "Copy" in
About dialog. Change "OK" button to "Close" since nothing is being
confirmed by clicking it. Call "Flush()" in wxTheClipboard to try
to make the copied text persist after aven is closed, though this
seems to currently do nothing on wxGTK at least.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3370 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rca2611a rfe58e77  
    11Wed Jun 02 09:28:37 GMT 2010  Olly Betts <olly@survex.com>
    22
    3         * ChangeLog,src/aboutdlg.cc,src/aboutdlg.h:
    4 
    5 
    6 Index: src/aboutdlg.h
    7 ===================================================================
    8 --- src/aboutdlg.h      (revision 3368)
    9 +++ src/aboutdlg.h      (working copy)
    10 @@ -27,8 +27,7 @@
    11  #include "wx.h"
    12  
    13  enum {
    14 -    about_TIMER = 1000,
    15 -    about_COPY
    16 +    about_TIMER = 1000
    17  };
    18  
    19  class AboutDlg : public wxDialog {
    20 @@ -36,6 +35,7 @@
    21      AboutDlg(wxWindow* parent, const wxString & icon_path);
    22      void OnTimer(wxTimerEvent &e);
    23      void OnCopy(wxCommandEvent &e);
    24 +    void OnClose(wxCommandEvent &e);
    25  
    26  private:
    27      wxBitmap bitmap, bitmap_icon;
    28 Index: src/aboutdlg.cc
    29 ===================================================================
    30 --- src/aboutdlg.cc     (revision 3368)
    31 +++ src/aboutdlg.cc     (working copy)
    32 @@ -36,7 +36,8 @@
    33  
    34  BEGIN_EVENT_TABLE(AboutDlg, wxDialog)
    35      EVT_TIMER(about_TIMER, AboutDlg::OnTimer)
    36 -    EVT_BUTTON(about_COPY, AboutDlg::OnCopy)
    37 +    EVT_BUTTON(wxID_COPY, AboutDlg::OnCopy)
    38 +    EVT_BUTTON(wxID_CLOSE, AboutDlg::OnClose)
    39  END_EVENT_TABLE()
    40  
    41  void
    42 @@ -53,9 +54,17 @@
    43      if (wxTheClipboard->Open()) {
    44         wxTheClipboard->SetData(new wxTextDataObject(info));
    45         wxTheClipboard->Close();
    46 +       // (Try to) make the selection persist after aven exits.
    47 +       (void)wxTheClipboard->Flush();
    48      }
    49  }
    50  
    51 +void
    52 +AboutDlg::OnClose(wxCommandEvent &e)
    53 +{
    54 +    Destroy();
    55 +}
    56 +
    57  AboutDlg::AboutDlg(wxWindow* parent, const wxString & icon_path_) :
    58      wxDialog(parent, 500, wxString::Format(wmsg(/*About %s*/205), APP_NAME)),
    59      icon_path(icon_path_), timer(this, about_TIMER)
    60 @@ -111,8 +120,6 @@
    61      } while (!l.empty());
    62  
    63      wxStaticText* licence = new wxStaticText(this, 504, licence_str);
    64 -    wxButton* ok = new wxButton(this, wxID_OK, _("OK"));
    65 -    ok->SetDefault();
    66  
    67      vert->Add(10, 5, 0, wxTOP, 5);
    68      vert->Add(title, 0, wxLEFT | wxRIGHT, 20);
    69 @@ -168,12 +175,14 @@
    70  
    71      wxBoxSizer* bottom = new wxBoxSizer(wxHORIZONTAL);
    72      bottom->Add(5, 5, 1);
    73 -    bottom->Add(new wxButton(this, about_COPY, _("Copy")), 0, wxRIGHT | wxBOTTOM, 6);
    74 -    bottom->Add(ok, 0, wxRIGHT | wxBOTTOM, 15);
    75 +    bottom->Add(new wxButton(this, wxID_COPY), 0, wxRIGHT | wxBOTTOM, 6);
    76 +    wxButton* close = new wxButton(this, wxID_CLOSE);
    77 +    bottom->Add(close, 0, wxRIGHT | wxBOTTOM, 15);
    78      vert->Add(bottom, 0, wxEXPAND | wxLEFT | wxRIGHT, 0);
    79      vert->SetMinSize(0, bitmap.GetHeight());
    80  
    81      SetSizer(horiz);
    82 +    close->SetDefault();
    83  
    84      horiz->Fit(this);
    85      horiz->SetSizeHints(this);
    86 Index: ChangeLog
    87 ===================================================================
    88 --- ChangeLog   (revision 0)
    89 +++ ChangeLog   (revision 0)
    90 @@ -0,0 +1,194 @@
    91 +Tue May 18 12:59:00 GMT 2010  Olly Betts <olly@survex.com>
    92 +
    93 +       * doc/HACKING.htm: Note jadetex needed.
    94 +         Note autoconf 2.64 works well.
    95 +
    96 +Tue May 18 02:06:00 GMT 2010  Olly Betts <olly@survex.com>
    97 +
    98 +       * src/fnt.cc: Remove now superfluous ().
    99 +
    100 +Mon May 17 14:33:00 GMT 2010  Olly Betts <olly@survex.com>
    101 +
    102 +       * debian/Makefile.am: Update EXTRA_DIST
    103 +
    104 +Mon May 17 05:38:00 GMT 2010  Olly Betts <olly@survex.com>
    105 +
    106 +       * src/cavernlog.cc: Fix small memory leak
    107 +
    108 +Mon May 17 05:33:00 GMT 2010  Olly Betts <olly@survex.com>
    109 +
    110 +       * src/img.c: Don't leak filename_opened member.
    111 +
    112 +Mon May 17 05:13:00 GMT 2010  Olly Betts <olly@survex.com>
    113 +
    114 +       * src/gfxcore.cc: Initialise all GfxCore's member variables so we
    115 +         don't use them uninitialised.
    116 +
    117 +Mon May 17 05:11:00 GMT 2010  Olly Betts <olly@survex.com>
    118 +
    119 +       * src/gfxcore.h: Declare constants with enum rather than #define so
    120 +         they automatically get allocated unique values, and so they show up
    121 +         in the debugger.
    122 +
    123 +Mon May 17 02:39:00 GMT 2010  Olly Betts <olly@survex.com>
    124 +
    125 +       * src/fnt.cc: Make the map array static const
    126 +
    127 +Mon May 17 02:30:00 GMT 2010  Olly Betts <olly@survex.com>
    128 +
    129 +       * src/fnt.cc: Set the font texture with GL_COLOR_INDEX so we can
    130 +         use a "byte format" font file without any translation, while a
    131 +         "bitmap format" font file needs a temporary array half the size.
    132 +
    133 +Mon May 17 00:56:00 GMT 2010  Olly Betts <olly@survex.com>
    134 +
    135 +       * src/gfxcore.cc: Initialise 3 flags when we load a survey to avoid
    136 +         using them potentially uninitialised.
    137 +
    138 +Sun May 16 14:39:00 GMT 2010  Olly Betts <olly@survex.com>
    139 +
    140 +       * src/mainfrm.cc: Fix cavern log window to behave if passed a .svx
    141 +         file on the command line.
    142 +
    143 +Sun May 16 14:27:00 GMT 2010  Olly Betts <olly@survex.com>
    144 +
    145 +       * configure.in: Update copyright years.
    146 +
    147 +Sun May 16 14:23:00 GMT 2010  Olly Betts <olly@survex.com>
    148 +
    149 +       * configure.in, src/aboutdlg.cc, src/aboutdlg.h, src/aven.cc,
    150 +         src/aven.h, src/avenprcore.cc, src/avenprcore.h,
    151 +         src/cavernlog.cc, src/cavernlog.h, src/export.cc, src/fnt.h,
    152 +         src/gfxcore.cc, src/gla-gl.cc, src/gla.h, src/guicontrol.cc,
    153 +         src/log.cc, src/mainfrm.cc, src/mainfrm.h, src/namecmp.h,
    154 +         src/printwx.cc, src/printwx.h:
    155 +         + Fix to build with a "unicode" build of wx.
    156 +         + Add "Copy" button to the About dialog to copy the system info
    157 +           to the clipboard.
    158 +         + List OpenGL extensions last, since there are usually lots of
    159 +           them with a modern gfx card.
    160 +         + When processing survey data, auto-scroll the log window until
    161 +           we've reported a warning or error.
    162 +         + Put the survey data log window in a splitter in the standard
    163 +           frame rather than having a separate frame for it.
    164 +
    165 +Sat Apr 17 12:13:00 GMT 2010  Olly Betts <olly@survex.com>
    166 +
    167 +       * src/aboutdlg.cc: Add case for "GTK+ >= 2.6".
    168 +
    169 +Sat Apr 17 12:12:00 GMT 2010  Olly Betts <olly@survex.com>
    170 +
    171 +       * src/aboutdlg.cc: Build string using preprocessor string
    172 +         concatenation rather than runtime appending, where possible.
    173 +
    174 +Sat Apr 17 12:00:00 GMT 2010  Olly Betts <olly@survex.com>
    175 +
    176 +       * src/aboutdlg.cc: Update (C) date.
    177 +
    178 +Sat Apr 17 11:59:00 GMT 2010  Olly Betts <olly@survex.com>
    179 +
    180 +       * src/aboutdlg.cc, src/aboutdlg.h: Use a wxTimer instead of idle
    181 +         events to avoid spinning on the CPU.
    182 +
    183 +Sat Apr 17 11:41:00 GMT 2010  Olly Betts <olly@survex.com>
    184 +
    185 +       * configure.in: New preferred env var for wx-config script is
    186 +         WX_CONFIG.  WXCONFIG still supported for compatibility.
    187 +
    188 +Tue Jul 28 08:16:00 GMT 2009  Olly Betts <olly@survex.com>
    189 +
    190 +       * src/mainfrm.cc: The presentation filename now defaults to using
    191 +         the basename of the currently loaded dataset, but we always prompt
    192 +         before we first save with such a name.
    193 +
    194 +Tue Jul 28 04:37:00 GMT 2009  Olly Betts <olly@survex.com>
    195 +
    196 +       * configure.in: Add comment to explain why we call wx-config twice.
    197 +
    198 +Tue Jul 28 04:36:00 GMT 2009  Olly Betts <olly@survex.com>
    199 +
    200 +       * src/datain.c: Use fputs(m, f) instead of fprintf(f, m) in case m
    201 +         contains '%' (m comes from the messages file, so this isn't
    202 +         exploitable by sending someone a "bad" .svx or .3d file).
    203 +
    204 +Mon Jul 27 03:29:00 GMT 2009  Olly Betts <olly@survex.com>
    205 +
    206 +       * src/mainfrm.cc: Fix to open rather than save when doing "open
    207 +         presentation" with wxmotif.
    208 +
    209 +Thu Mar 05 01:45:00 GMT 2009  Olly Betts <olly@survex.com>
    210 +
    211 +       * doc/3dformat.htm: Document that this is version 6 and when we
    212 +         started to use it.
    213 +
    214 +Mon Dec 15 10:34:00 GMT 2008  Olly Betts <olly@survex.com>
    215 +
    216 +       * src/gla-gl.cc: When saving a screenshot, perform the vertical
    217 +         flip of the image data in-place rather than using wxImage::Mirror()
    218 +         which creates a whole new wxImage object.
    219 +
    220 +Fri Dec 12 11:12:00 GMT 2008  Olly Betts <olly@survex.com>
    221 +
    222 +       * src/cad3d.c, src/export.cc: Fix export to SVG when a label
    223 +         contains a '%' character.
    224 +
    225 +Fri Dec 12 06:30:00 GMT 2008  Olly Betts <olly@survex.com>
    226 +
    227 +       * configure.in: Add AM_PROG_CC_C_O which newer autoreconf warns is
    228 +         needed.
    229 +
    230 +Fri Dec 12 06:28:00 GMT 2008  Olly Betts <olly@survex.com>
    231 +
    232 +       * configure.in: Remove AC_SUBST of CRLIB and CROBJX which are no
    233 +         longer set or used.
    234 +
    235 +Fri Dec 12 06:03:00 GMT 2008  Olly Betts <olly@survex.com>
    236 +
    237 +       * NEWS, buildmacosx.sh, configure.in, desc-aven.txt, doc/TODO.htm,
    238 +         doc/manual.sgml, doc/survex.ent, lib/messages.txt,
    239 +         src/aboutdlg.cc, src/aven.cc, src/aven.h, src/gfxcore.cc,
    240 +         src/mainfrm.cc, src/printwx.cc, src/printwx.h, src/wx.h: Say
    241 +         "wxWidgets" instead of "wxWindows" consistently.
    242 +         Require wxWidgets 2.6.0 or newer - 2.4 is really old now.
    243 +
    244 +Mon Mar 31 01:53:00 GMT 2008  Olly Betts <olly@survex.com>
    245 +
    246 +       * doc/3dformat.htm: Update for v6 format from Mike McCombe
    247 +
    248 +Fri Sep 07 18:29:00 GMT 2007  Olly Betts <olly@survex.com>
    249 +
    250 +       * src/gla-gl.cc: Calling glGetError() resets the error state, so we
    251 +         need to store the value in a variable rather than calling it twice!
    252 +
    253 +Fri Sep 07 13:54:00 GMT 2007  Olly Betts <olly@survex.com>
    254 +
    255 +       * src/gla-gl.cc: Add missing CHECK_GL_ERROR() calls and correct
    256 +         some which had the wrong descriptions.
    257 +         Use GL_POINT_SPRITE and GL_COORD_REPLACE instead of
    258 +         GL_POINT_SPRITE_ARB and GL_COORD_REPLACE_ARB.  They have the same
    259 +         numeric values, so the shorter (now official) names are better.
    260 +
    261 +Fri Sep 07 13:31:00 GMT 2007  Olly Betts <olly@survex.com>
    262 +
    263 +       * src/Makefile.am, src/gfxcore.cc, src/gfxcore.h, src/gla-gl.cc,
    264 +         src/gla.h, src/matrix4.cc, src/matrix4.h, src/quaternion.cc,
    265 +         src/quaternion.h: Just set the pan and tilt directly as OpenGL
    266 +         rotations rather than messing around setting up and then decoding a
    267 +         quaternion.  This fixes some glitches when tilting while looking
    268 +         east, and eliminates 2 source files and 2 headers!
    269 +
    270 +Sat Feb 10 13:56:00 GMT 2007  Olly Betts <olly@survex.com>
    271 +
    272 +       * NEWS, configure.in, src/aven.cc, src/wx.h:
    273 +         (Unix version): aven: Fix display of degree symbol in status bar and
    274 +         messages with accented characters in.
    275 +         (Mac OS X version): Require at least wxWidgets 2.5.1.
    276 +
    277 +Sat Feb 10 13:46:00 GMT 2007  Olly Betts <olly@survex.com>
    278 +
    279 +       * src/message.c: Test S_ISREG since that's what we use here
    280 +
    281 +Sat Feb 10 13:37:00 GMT 2007  Olly Betts <olly@survex.com>
    282 +
    283 +       * src/message.c: Always use utf-8 for aven on unix
    284 +
     3        * src/aboutdlg.cc,src/aboutdlg.h: Use standard button for "Copy" in
     4          About dialog.  Change "OK" button to "Close" since nothing is being
     5          confirmed by clicking it.  Call "Flush()" in wxTheClipboard to try
     6          to make the copied text persist after aven is closed, though this
     7          seems to currently do nothing on wxGTK at least.
    2858
    2869Tue May 18 12:59:00 GMT 2010  Olly Betts <olly@survex.com>
  • src/aboutdlg.cc

    rca2611a rfe58e77  
    3737BEGIN_EVENT_TABLE(AboutDlg, wxDialog)
    3838    EVT_TIMER(about_TIMER, AboutDlg::OnTimer)
    39     EVT_BUTTON(about_COPY, AboutDlg::OnCopy)
     39    EVT_BUTTON(wxID_COPY, AboutDlg::OnCopy)
     40    EVT_BUTTON(wxID_CLOSE, AboutDlg::OnClose)
    4041END_EVENT_TABLE()
    4142
     
    5455        wxTheClipboard->SetData(new wxTextDataObject(info));
    5556        wxTheClipboard->Close();
     57        // (Try to) make the selection persist after aven exits.
     58        (void)wxTheClipboard->Flush();
    5659    }
     60}
     61
     62void
     63AboutDlg::OnClose(wxCommandEvent &e)
     64{
     65    Destroy();
    5766}
    5867
     
    112121
    113122    wxStaticText* licence = new wxStaticText(this, 504, licence_str);
    114     wxButton* ok = new wxButton(this, wxID_OK, _("OK"));
    115     ok->SetDefault();
    116123
    117124    vert->Add(10, 5, 0, wxTOP, 5);
     
    169176    wxBoxSizer* bottom = new wxBoxSizer(wxHORIZONTAL);
    170177    bottom->Add(5, 5, 1);
    171     bottom->Add(new wxButton(this, about_COPY, _("Copy")), 0, wxRIGHT | wxBOTTOM, 6);
    172     bottom->Add(ok, 0, wxRIGHT | wxBOTTOM, 15);
     178    bottom->Add(new wxButton(this, wxID_COPY), 0, wxRIGHT | wxBOTTOM, 6);
     179    wxButton* close = new wxButton(this, wxID_CLOSE);
     180    bottom->Add(close, 0, wxRIGHT | wxBOTTOM, 15);
    173181    vert->Add(bottom, 0, wxEXPAND | wxLEFT | wxRIGHT, 0);
    174182    vert->SetMinSize(0, bitmap.GetHeight());
    175183
    176184    SetSizer(horiz);
     185    close->SetDefault();
    177186
    178187    horiz->Fit(this);
  • src/aboutdlg.h

    rca2611a rfe58e77  
    2828
    2929enum {
    30     about_TIMER = 1000,
    31     about_COPY
     30    about_TIMER = 1000
    3231};
    3332
     
    3736    void OnTimer(wxTimerEvent &e);
    3837    void OnCopy(wxCommandEvent &e);
     38    void OnClose(wxCommandEvent &e);
    3939
    4040private:
Note: See TracChangeset for help on using the changeset viewer.