1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
|
/*
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 1, or (at your option)
** any later version.
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Author : Alexandre Parenteau <aubonbeurre@hotmail.com> --- February 2000
*/
/*
*
*/
#include "stdafx.h"
#include "UCvsToolbar.h"
#include "UCvsCommands.h"
UIMPLEMENT_DYNAMIC(UCvsToolbar, UToolbar)
UBEGIN_MESSAGE_MAP(UCvsToolbar, UToolbar)
ON_UDESTROY(UCvsToolbar)
ON_UCREATE(UCvsToolbar)
UEND_MESSAGE_MAP()
UCvsToolbar::UCvsToolbar() : UToolbar(kUCvsToolbarID)
{
}
UCvsToolbar::~UCvsToolbar()
{
}
void UCvsToolbar::OnDestroy(void)
{
delete this;
}
void UCvsToolbar::OnCreate(void)
{
}
void CreateMainToolbar(void)
{
UTB_INIT init;
init.widthbtn = 16;
init.heightbtn = 16;
init.title = "Main Toolbar";
UEventSendMessage(kUCvsToolbarID, EV_TB_INIT, 0, &init);
UTB_BUTTON updtBtn = {
"update.xpm",
cmdUPDATE,
DDV_NONE,
DDD_NONE,
"Update the selected items, changes your disk only\nUpdate selected"
};
UTB_BUTTON commitBtn = {
"commit.xpm",
cmdCOMMIT,
DDV_NONE,
DDD_NONE,
"Commit the selected items, changes the remote repository\nCommit selected"
};
UTB_BUTTON stopBtn = {
"stop.xpm",
cmdSTOPCVS,
DDV_NONE,
DDD_NONE,
"Stop when cvs is running...\nStop cvs..."
};
UTB_BUTTON ignoreBtn = {
"ignore.xpm",
cmdIGNORE,
DDV_NONE,
DDD_NONE,
"View or hide the cvs ignored files/folders\nIgnore switch"
};
UTB_BUTTON reloadBtn = {
"reload.xpm",
cmdRELOAD,
DDV_NONE,
DDD_NONE,
"Refresh the views, updating the contents\nRefresh view"
};
UTB_BUTTON exploreBtn = {
"explore.xpm",
cmdEXPLORE,
DDV_NONE,
DDD_NONE,
"Open an explorer window for this selection\nExplore selection"
};
UTB_BUTTON upBtn = {
"upfolder.xpm",
cmdUPFOLDER,
DDV_NONE,
DDD_NONE,
"Go to the upper folder and refresh\nUp one level"
};
UTB_BUTTON diffBtn = {
"diff.xpm",
cmdDIFF,
DDV_NONE,
DDD_NONE,
"Print the differences with the CVS remote repository\nDiff selected"
};
UTB_BUTTON logBtn = {
"log.xpm",
cmdLOG,
DDV_NONE,
DDD_NONE,
"Print the history of the selected files\nLog selected"
};
UTB_BUTTON statusBtn = {
"status.xpm",
cmdSTATUS,
DDV_NONE,
DDD_NONE,
"Print the current status of the selected files\nStatus selected"
};
UTB_BUTTON graphBtn = {
"graph.xpm",
cmdGRAPH,
DDV_NONE,
DDD_NONE,
"Print the history as a graph of the selected files\nGraph selected"
};
UTB_BUTTON trashBtn = {
"trash.xpm",
cmdTRASH,
DDV_NONE,
DDD_NONE,
"Erase the selection from your disk\nErase selected"
};
UTB_BUTTON addBtn = {
"add.xpm",
cmdADD,
DDV_NONE,
DDD_NONE,
"Add the selected items to the remote CVS repository\nAdd selected"
};
UTB_BUTTON addbBtn = {
"addb.xpm",
cmdADDB,
DDV_NONE,
DDD_NONE,
"Add the selected binary items to the remote CVS repository\nAdd selected binary"
};
UTB_BUTTON rmvBtn = {
"remove.xpm",
cmdRMV,
DDV_NONE,
DDD_NONE,
"Remove the selected items to the remote CVS repository\nRemove selected"
};
UTB_BUTTON tagBtn = {
"tag.xpm",
cmdTAGNEW,
DDV_NONE,
DDD_NONE,
"Create/move a tag on the selection\nTag selection"
};
UTB_BUTTON untagBtn = {
"untag.xpm",
cmdTAGDELETE,
DDV_NONE,
DDD_NONE,
"Remove a tag on the selection\nUntag selection"
};
UTB_BUTTON branchBtn = {
"branch.xpm",
cmdTAGBRANCH,
DDV_NONE,
DDD_NONE,
"Open (fork) a branch on the selection\nFork selection"
};
UTB_BUTTON lockBtn = {
"lock.xpm",
cmdLOCKF,
DDV_NONE,
DDD_NONE,
"Lock the selected file on the remote repository until next commit\nLock selection"
};
UTB_BUTTON unlockBtn = {
"unlock.xpm",
cmdUNLOCKF,
DDV_NONE,
DDD_NONE,
"Unlock the selected file on the remote repository\nUnlock selection"
};
UTB_BUTTON watchBtn = {
"watch.xpm",
cmdWATCHON,
DDV_NONE,
DDD_NONE,
"Put a watch on the selected files\nWatch selection"
};
UTB_BUTTON unwatchBtn = {
"unwatch.xpm",
cmdWATCHOFF,
DDV_NONE,
DDD_NONE,
"Release a watch on the selected files\nRelease watch selection"
};
UTB_BUTTON editBtn = {
"edit.xpm",
cmdEDIT,
DDV_NONE,
DDD_NONE,
"Edit the selected files\nEdit selection"
};
UTB_BUTTON uneditBtn = {
"unedit.xpm",
cmdUNEDIT,
DDV_NONE,
DDD_NONE,
"Unedit the selected files\nUnedit selection"
};
UTB_BUTTON releaseBtn = {
"release.xpm",
cmdRELEASE,
DDV_NONE,
DDD_NONE,
"Release the selected files\nRelease selection"
};
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &updtBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &commitBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &stopBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &addbBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &rmvBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_CHECKBTN, 0, &ignoreBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &reloadBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &exploreBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &upBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &diffBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &logBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &statusBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &graphBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &trashBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &tagBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &untagBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &branchBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &lockBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unlockBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &watchBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &unwatchBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &editBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &uneditBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_SEPARATOR, 0, 0L);
UEventSendMessage(kUCvsToolbarID, EV_TB_BUTTON, 0, &releaseBtn);
UEventSendMessage(kUCvsToolbarID, EV_TB_END, 0, 0L);
}
|