nobody at rubyforge.org
2007-Mar-23 17:00 UTC
[Wxruby-development] [918] branches/wxruby2/wxwidgets_282/samples/aui/aui.rb: Fix a couple of little bugs and typos
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } #msg dt { float: left; width: 6em; font-weight: bold; } #msg dt:after { content:'':'';} #msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: bold} #msg dl a:link { color:#fc3; } #msg dl a:active { color:#ff0; } #msg dl a:visited { color:#cc6; } h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; } #msg ul, pre { overflow: auto; } #header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; } #patch { width: 100%; } #patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;} #patch .propset h4, #patch .binary h4 {margin:0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;} #patch .propset .diff, #patch .binary .diff {padding:10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[918] branches/wxruby2/wxwidgets_282/samples/aui/aui.rb: Fix a couple of little bugs and typos</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>918</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-03-23 13:00:12 -0400 (Fri, 23 Mar 2007)</dd> </dl> <h3>Log Message</h3> <pre>Fix a couple of little bugs and typos</pre> <h3>Modified Paths</h3> <ul> <li><a href="#brancheswxruby2wxwidgets_282samplesauiauirb">branches/wxruby2/wxwidgets_282/samples/aui/aui.rb</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="brancheswxruby2wxwidgets_282samplesauiauirb"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/samples/aui/aui.rb (917 => 918)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/samples/aui/aui.rb        2007-03-23 16:59:10 UTC (rev 917) +++ branches/wxruby2/wxwidgets_282/samples/aui/aui.rb        2007-03-23 17:00:12 UTC (rev 918) </span><span class="lines">@@ -226,35 +226,36 @@ </span><span class="cx"> </span><span class="cx"> def on_set_colour(event) </span><span class="cx"> dlg = Wx::ColourDialog.new(@frame) </span><del>- dlg.set_title("Cololur Picker") </del><ins>+ dlg.set_title("Colour Picker") </ins><span class="cx"> </span><span class="cx"> return unless dlg.show_modal == Wx::ID_OK </span><span class="cx"> </span><span class="cx"> var = nil </span><span class="cx"> case event.get_id() </span><del>- when ID_BackgroundColor </del><ins>+ when ID_BackgroundColour </ins><span class="cx"> var = Wx::AUI_DOCKART_BACKGROUND_COLOUR </span><del>- when ID_SashColor </del><ins>+ when ID_SashColour </ins><span class="cx"> var = Wx::AUI_DOCKART_SASH_COLOUR </span><del>- when ID_InactiveCaptionColor </del><ins>+ when ID_InactiveCaptionColour </ins><span class="cx"> var = Wx::AUI_DOCKART_INACTIVE_CAPTION_COLOUR </span><del>- when ID_InactiveCaptionGradientColor </del><ins>+ when ID_InactiveCaptionGradientColour </ins><span class="cx"> var = Wx::AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR </span><del>- when ID_InactiveCaptionTextColor </del><ins>+ when ID_InactiveCaptionTextColour </ins><span class="cx"> var = Wx::AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR </span><del>- when ID_ActiveCaptionColor </del><ins>+ when ID_ActiveCaptionColour </ins><span class="cx"> var = Wx::AUI_DOCKART_ACTIVE_CAPTION_COLOUR </span><del>- when ID_ActiveCaptionGradientColor </del><ins>+ when ID_ActiveCaptionGradientColour </ins><span class="cx"> var = Wx::AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR </span><del>- when ID_ActiveCaptionTextColor </del><ins>+ when ID_ActiveCaptionTextColour </ins><span class="cx"> var = Wx::AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR                  </span><del>- when ID_BorderColor </del><ins>+ when ID_BorderColour </ins><span class="cx"> var = Wx::AUI_DOCKART_BORDER_COLOUR </span><del>- when ID_GripperColor </del><ins>+ when ID_GripperColour </ins><span class="cx"> var = Wx::AUI_DOCKART_GRIPPER_COLOUR </span><span class="cx"> else </span><span class="cx"> return </span><del>- end </del><ins>+ end + </ins><span class="cx"> @frame.get_dock_art.set_colour(var, dlg.get_colour_data.get_colour ) </span><span class="cx"> @frame.do_update </span><span class="cx"> update_colours </span><span class="lines">@@ -288,7 +289,7 @@ </span><span class="cx"> sz = Wx::BoxSizer.new(Wx::HORIZONTAL) </span><span class="cx"> sz.add(1, 1, 1, Wx::EXPAND) </span><span class="cx"> sz.add( Wx::StaticText.new(self, Wx::ID_ANY, caption) ) </span><del>- sz.add(@cap_grad) </del><ins>+ sz.add(bmp_butt) </ins><span class="cx"> sz.add(1, 1, 1, Wx::EXPAND) </span><span class="cx"> sz.set_item_min_size(1, 180, 20) </span><span class="cx"> return bmp_butt, sz </span><span class="lines">@@ -532,7 +533,7 @@ </span><span class="cx"> evt_menu(ID_NoGradient) { | e | on_gradient(e) } </span><span class="cx"> evt_menu(ID_VerticalGradient) { | e | on_gradient(e) } </span><span class="cx"> evt_menu(ID_HorizontalGradient) { | e | on_gradient(e) } </span><del>- evt_menu(ID_Settings) { | e | p ''foo''; on_settings(e) } </del><ins>+ evt_menu(ID_Settings) { on_settings } </ins><span class="cx"> evt_menu(ID_GridContent) { | e | on_change_content_pane(e) } </span><span class="cx"> evt_menu(ID_TreeContent) { | e | on_change_content_pane(e) } </span><span class="cx"> evt_menu(ID_TextContent) { | e | on_change_content_pane(e) } </span><span class="lines">@@ -1012,7 +1013,7 @@ </span><span class="cx"> if event.get_pane.get_name == "test10" </span><span class="cx"> msg = "Are you sure you want to close/hide this pane?" </span><span class="cx"> dlg = Wx::MessageDialog.new(self, msg, "Wx::AUI", Wx::YES_NO) </span><del>- if dlg.show_modal !- Wx::YES </del><ins>+ if dlg.show_modal != Wx::ID_YES </ins><span class="cx"> return event.veto </span><span class="cx"> end </span><span class="cx"> end </span><span class="lines">@@ -1046,7 +1047,7 @@ </span><span class="cx"> if notebook.get_page(event.get_selection).kind_of?(Wx::HtmlWindow) </span><span class="cx"> msg = "Are you sure you want to close/hide this notebook page?" </span><span class="cx"> dlg = Wx::MessageDialog.new(self, msg, "Wx::AUI", Wx::YES_NO) </span><del>- if dlg.show_modal != Wx::YES </del><ins>+ if dlg.show_modal != Wx::ID_YES </ins><span class="cx"> event.veto </span><span class="cx"> else </span><span class="cx"> event.allow </span></span></pre> </div> </div> </body> </html>
Maybe Matching Threads
- [916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
- 'Are you sure?' custom dialog not exiting cleanly
- [736] trunk/wxruby2/samples/dialogs/dialogs.rb: Fixed crashing bug in on_paint and made the code style more Ruby like.
- [902] branches/wxruby2/wxwidgets_282/swig/classes/include/parents.rb: Parents for AUI GUI classes
- [962] branches/wxruby2/wxwidgets_282/doc/textile/xmlresource.txtl: Fixed the documentation for load_*_subclass, where * is [Dialog, Panel, Frame].