Skip to content

Commit

Permalink
Add a new simple icon for a Shelved indicator, and added the composite
Browse files Browse the repository at this point in the history
variants for the different combos.
  • Loading branch information
danieljennings committed Dec 19, 2019
1 parent 64639db commit f7cd13c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Source/gui/ImageList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ enum SrcImages

// more simple images
SI_OPENFOLDER,
SI_SHELVED,
};

// convert from CUSB enum flag to image index
Expand Down Expand Up @@ -243,6 +244,20 @@ void CP4ViewImageList::MakeBitmap(CP4Image &dst, CP4Image &src, COLORREF bg)
dst.BlendImage(i, src, CP4ViewImageList::VI_YOUROTHERCHANGE);
dst.BlendImage(i++, src, SI_NOT_SYNCED);

// create the pending with shelved files chglist ones
dst.BlendImage(i, src, CP4ViewImageList::VI_YOURCHANGE);
dst.BlendImage(i++, src, SI_SHELVED);
dst.BlendImage(i, src, CP4ViewImageList::VI_THEIRCHANGE);
dst.BlendImage(i++, src, SI_SHELVED);

// same, but for shelved + not synced case
dst.BlendImage(i, src, CP4ViewImageList::VI_YOURCHANGE);
dst.BlendImage(i, src, SI_SHELVED);
dst.BlendImage(i++, src, SI_NOT_SYNCED);
dst.BlendImage(i, src, CP4ViewImageList::VI_THEIRCHANGE);
dst.BlendImage(i, src, SI_SHELVED);
dst.BlendImage(i++, src, SI_NOT_SYNCED);

int x = i * 24;

// copy client, plus badges
Expand Down Expand Up @@ -278,7 +293,9 @@ bool CP4ViewImageList::Create()
3 + // sync states: none, synced, not synced
1 + // wierd ghost combo
1 + // open folder
2 ); // 2 unresolved pending chglists
2 + // 2 unresolved pending chglists
2 + // 2 unresolved + shelved pending changelists
2 ); // your/their change with shelved files

CDC dc;
dc.CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
Expand Down
4 changes: 4 additions & 0 deletions Source/gui/ImageList.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class CP4ViewImageList : public CP4ImageList
VI_OPENFOLDER,
VI_YOURCHGUNRES,
VI_YOUROTHERCHGUNRES,
VI_YOURCHANGE_SHELVED,
VI_THEIRCHANGE_SHELVED,
VI_YOURCHGUNRES_SHELVED,
VI_YOUROTHERCHGUNRES_SHELVED,
VI_CLIENT,
VI_CLIENT_CUR,
VI_CLIENT_DEF,
Expand Down
Binary file modified Source/gui/res/ViewIcons32.bmp
Binary file not shown.

1 comment on commit f7cd13c

@gorlak
Copy link
Owner

@gorlak gorlak commented on f7cd13c Dec 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a per-file icon change for the shelve state? I was thinking the same thing! 👍

Please sign in to comment.