+2012-12-24 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Work around a GUI action scheduling instability.
+
+ * src/guimain.h (AppWindowMaker::UpdateDataSheet): Declare new method.
+ * src/pkgdata.cpp (AppWindowMaker::UpdateDataSheet): Implement it.
+ (AppWindowMaker::OnNotify): Use it.
+
+ * src/guiexec.cpp (AppWindowMaker::OnCommand) [IDD_REPO_APPLY]:
+ Don't refresh package list view in-place; clear and reload it instead.
+
2012-12-21 Keith Marshall <keithmarshall@users.sourceforge.net>
Update distribution build rules.
* actions schedule, remove all marker icons, and refresh
* the package list to reflect current status.
*/
+#if 0 /* FIXME: we'd like to just do this in place, but doing
+ * so seems to cause mingw-get to become unstable...
+ */
pkgListViewMaker pkglist( PackageListView );
pkglist.UpdateListView();
pkglist.MarkScheduledActions(
pkgData->ClearScheduledActions( ACTION_PRESERVE_FAILED )
);
-
+#else
+ /* ...so, for the time being, we must force a complete
+ * reload of the package list; (note that this has the
+ * side effect of clearing any residual action schedule,
+ * so we lose any potential record of failed actions).
+ */
+ ClearPackageList();
+ LoadPackageData( false );
+ UpdatePackageList();
+ UpdateDataSheet();
+#endif
/* Clearing the schedule of actions may also affect the
* validity of menu options; update accordingly.
*/
inline void ExecuteScheduledActions( void );
private:
- virtual long OnCreate();
+ virtual long OnCreate( void );
virtual long OnCommand( WPARAM );
virtual long OnNotify( WPARAM, LPARAM );
virtual long OnSize( WPARAM, int, int );
- virtual long OnClose();
+ virtual long OnClose( void );
int LayoutEngine( HWND, LPARAM );
static int CALLBACK LayoutController( HWND, LPARAM );
DataSheetMaker *DataSheet;
WTK::ChildWindowMaker *TabDataPane;
HWND PackageTabControl, PackageTabPane;
- void InitPackageTabControl();
+ void InitPackageTabControl( void );
+ void UpdateDataSheet( void );
};
inline long AppWindowMaker::DialogueResponse( int id, DLGPROC handler )
}
}
+void AppWindowMaker::UpdateDataSheet( void )
+{
+ /* Helper method, called when we wish to update the data sheet
+ * panel, to match the current list view and tab selection.
+ */
+ DataSheet->DisplayData( PackageTabControl, PackageListView );
+}
+
long AppWindowMaker::OnNotify( WPARAM client_id, LPARAM data )
{
/* Handler for notifiable events to be processed in the context
* pane to display its associated data sheet, and offers a
* pop-up menu of actions which may be performed on it.
*/
- DataSheet->DisplayData( PackageTabControl, PackageListView );
+ UpdateDataSheet();
SelectPackageAction( LVHT_ONITEMICON | LVHT_ONITEMLABEL );
break;
}
/* ...each of which may require the data sheet content
* to be updated, (to reflect a changed selection).
*/
- DataSheet->DisplayData( PackageTabControl, PackageListView );
+ UpdateDataSheet();
/* Additionally, for a left click on the package status
* icon within the list view, we present a pop-up menu