• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Installation Manager Tool


Commit MetaInfo

Revision9769479dcadbd4865e46bca58e4633ee70535c7e (tree)
Time2012-12-25 05:45:33
AuthorKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Log Message

Work around a GUI action scheduling instability.

Change Summary

Incremental Difference

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
1+2012-12-24 Keith Marshall <keithmarshall@users.sourceforge.net>
2+
3+ Work around a GUI action scheduling instability.
4+
5+ * src/guimain.h (AppWindowMaker::UpdateDataSheet): Declare new method.
6+ * src/pkgdata.cpp (AppWindowMaker::UpdateDataSheet): Implement it.
7+ (AppWindowMaker::OnNotify): Use it.
8+
9+ * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]:
10+ Don't refresh package list view in-place; clear and reload it instead.
11+
112 2012-12-21 Keith Marshall <keithmarshall@users.sourceforge.net>
213
314 Update distribution build rules.
--- a/src/guiexec.cpp
+++ b/src/guiexec.cpp
@@ -697,6 +697,9 @@ long AppWindowMaker::OnCommand( WPARAM cmd )
697697 * actions schedule, remove all marker icons, and refresh
698698 * the package list to reflect current status.
699699 */
700+#if 0 /* FIXME: we'd like to just do this in place, but doing
701+ * so seems to cause mingw-get to become unstable...
702+ */
700703 pkgListViewMaker pkglist( PackageListView );
701704 pkglist.UpdateListView();
702705
@@ -708,7 +711,17 @@ long AppWindowMaker::OnCommand( WPARAM cmd )
708711 pkglist.MarkScheduledActions(
709712 pkgData->ClearScheduledActions( ACTION_PRESERVE_FAILED )
710713 );
711-
714+#else
715+ /* ...so, for the time being, we must force a complete
716+ * reload of the package list; (note that this has the
717+ * side effect of clearing any residual action schedule,
718+ * so we lose any potential record of failed actions).
719+ */
720+ ClearPackageList();
721+ LoadPackageData( false );
722+ UpdatePackageList();
723+ UpdateDataSheet();
724+#endif
712725 /* Clearing the schedule of actions may also affect the
713726 * validity of menu options; update accordingly.
714727 */
--- a/src/guimain.h
+++ b/src/guimain.h
@@ -184,11 +184,11 @@ class AppWindowMaker: public WTK::MainWindowMaker
184184 inline void ExecuteScheduledActions( void );
185185
186186 private:
187- virtual long OnCreate();
187+ virtual long OnCreate( void );
188188 virtual long OnCommand( WPARAM );
189189 virtual long OnNotify( WPARAM, LPARAM );
190190 virtual long OnSize( WPARAM, int, int );
191- virtual long OnClose();
191+ virtual long OnClose( void );
192192
193193 int LayoutEngine( HWND, LPARAM );
194194 static int CALLBACK LayoutController( HWND, LPARAM );
@@ -212,7 +212,8 @@ class AppWindowMaker: public WTK::MainWindowMaker
212212 DataSheetMaker *DataSheet;
213213 WTK::ChildWindowMaker *TabDataPane;
214214 HWND PackageTabControl, PackageTabPane;
215- void InitPackageTabControl();
215+ void InitPackageTabControl( void );
216+ void UpdateDataSheet( void );
216217 };
217218
218219 inline long AppWindowMaker::DialogueResponse( int id, DLGPROC handler )
--- a/src/pkgdata.cpp
+++ b/src/pkgdata.cpp
@@ -1176,6 +1176,14 @@ void AppWindowMaker::SelectPackageAction( unsigned mode )
11761176 }
11771177 }
11781178
1179+void AppWindowMaker::UpdateDataSheet( void )
1180+{
1181+ /* Helper method, called when we wish to update the data sheet
1182+ * panel, to match the current list view and tab selection.
1183+ */
1184+ DataSheet->DisplayData( PackageTabControl, PackageListView );
1185+}
1186+
11791187 long AppWindowMaker::OnNotify( WPARAM client_id, LPARAM data )
11801188 {
11811189 /* Handler for notifiable events to be processed in the context
@@ -1198,7 +1206,7 @@ long AppWindowMaker::OnNotify( WPARAM client_id, LPARAM data )
11981206 * pane to display its associated data sheet, and offers a
11991207 * pop-up menu of actions which may be performed on it.
12001208 */
1201- DataSheet->DisplayData( PackageTabControl, PackageListView );
1209+ UpdateDataSheet();
12021210 SelectPackageAction( LVHT_ONITEMICON | LVHT_ONITEMLABEL );
12031211 break;
12041212 }
@@ -1212,7 +1220,7 @@ long AppWindowMaker::OnNotify( WPARAM client_id, LPARAM data )
12121220 /* ...each of which may require the data sheet content
12131221 * to be updated, (to reflect a changed selection).
12141222 */
1215- DataSheet->DisplayData( PackageTabControl, PackageListView );
1223+ UpdateDataSheet();
12161224
12171225 /* Additionally, for a left click on the package status
12181226 * icon within the list view, we present a pop-up menu