lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] sequence input editor -- how to get accepted keywords


From: Vaclav Slavik
Subject: Re: [lmi] sequence input editor -- how to get accepted keywords
Date: Sun, 27 Jun 2010 08:52:57 +0200

On Sat, 2010-06-26 at 14:13 +0000, Greg Chicares wrote:
> No. Commenting out each use of wxWindowUpdateLocker fixes it.
...
> No. I see no flicker. Everything looks fine. 

Good, I just removed it, then. I also fixed 2.9.0 compilation less
verbosely and added the better gcc warnings fix:


diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index 19b07b9..35261a7 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -155,6 +155,8 @@ bool DurationModeChoice::needs_number() const
         case e_maturity:
             return false;
         }
+
+    throw "Unreachable";
 }
 
 
@@ -249,7 +251,7 @@ class InputSequenceEditor
     bool keywords_only_;
 
     int rows_count_;
-    wxFlexGridSizer* sizer_;
+    wxSizer* sizer_;
     wxButton* last_button_;
     typedef std::map<wxWindowID, int> id_to_row_map;
     id_to_row_map id_to_row_;
@@ -275,7 +277,7 @@ InputSequenceEditor::InputSequenceEditor(wxWindow* parent, 
wxString const& title
 {
     wxSizer *top = new(wx) wxBoxSizer(wxVERTICAL);
 
-    sizer_ = new(wx) wxFlexGridSizer(Col_Max, wxSize(5, 5));
+    sizer_ = new(wx) wxFlexGridSizer(Col_Max, /*vgap=*/5, /*hgap=*/5);
     top->Add(sizer_, wxSizerFlags(1).Expand().DoubleBorder());
 
     wxStdDialogButtonSizer *buttons = new(wx) wxStdDialogButtonSizer();
@@ -449,10 +451,6 @@ void InputSequenceEditor::insert_row(int row)
 {
     int insert_pos = Col_Max * row;
 
-#ifdef __WXMSW__
-    wxWindowUpdateLocker no_updates(this);
-#endif
-
     int const prev_row = rows_count_ - 1;
     int const new_row =  rows_count_;
 
@@ -572,10 +570,6 @@ void InputSequenceEditor::insert_row(int row)
 
 void InputSequenceEditor::remove_row(int row)
 {
-#ifdef __WXMSW__
-    wxWindowUpdateLocker no_updates(this);
-#endif
-
     duration_scalars_.erase(duration_scalars_.begin() + row);
     rows_count_--;
 
@@ -608,10 +602,6 @@ void InputSequenceEditor::remove_row(int row)
 
 void InputSequenceEditor::update_row(int row)
 {
-#ifdef __WXMSW__
-    wxWindowUpdateLocker no_updates(this);
-#endif
-
     bool const is_last_row = (row == rows_count_ - 1);
 
     // update duration_scalars_ to reflect current UI state
@@ -709,6 +699,8 @@ wxString InputSequenceEditor::format_from_text(int row)
             return "";
             }
         }
+
+    throw "Unreachable";
 }
 
 template<typename T>
@@ -770,6 +762,8 @@ int InputSequenceEditor::compute_duration_scalar(int row)
             return 0;
             }
         }
+
+    throw "Unreachable";
 }
 
 void InputSequenceEditor::adjust_duration_num(int row)
diff --git a/objects.make b/objects.make
index 6c3b42d..74b527f 100644
--- a/objects.make
+++ b/objects.make
@@ -377,6 +377,7 @@ gpt_objects := \
   data_directory.o \
   database.o \
   datum_base.o \
+  datum_sequence.o \
   datum_string.o \
   dbdict.o \
   dbnames.o \


The ReviewBoard topic is updated too (old version that the above diff is
against is at http://review.bakefile.org/r/210/diff/4/).

Regards,
Vaclav




reply via email to

[Prev in Thread] Current Thread [Next in Thread]