"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/OverwriteBox.cpp" between
xfe-1.41.tar.gz and xfe-1.42.tar.gz

About: Xfe (X File Explorer) is a file manager and browser (using the FOX toolkit).

OverwriteBox.cpp  (xfe-1.41):OverwriteBox.cpp  (xfe-1.42)
skipping to change at line 44 skipping to change at line 44
// Set message text with a maximum of MAX_MESSAGE_LENGTH characters per line // Set message text with a maximum of MAX_MESSAGE_LENGTH characters per line
FXString str = ::multiLines(text, MAX_MESSAGE_LENGTH); FXString str = ::multiLines(text, MAX_MESSAGE_LENGTH);
new FXLabel(info, str, NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|LAYOUT_TOP|LAYOUT _LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y); new FXLabel(info, str, NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|LAYOUT_TOP|LAYOUT _LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y);
FXHorizontalFrame* buttons = new FXHorizontalFrame(content, LAYOUT_TOP|LAYOU T_LEFT|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 10, 10); FXHorizontalFrame* buttons = new FXHorizontalFrame(content, LAYOUT_TOP|LAYOU T_LEFT|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 10, 10);
// Dialog with five options for multiple files // Dialog with five options for multiple files
if (type == OVWBOX_MULTIPLE_FILES) if (type == OVWBOX_MULTIPLE_FILES)
{ {
new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL
, FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, 0, H , BUTTON_INITIAL|BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|
ORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); LAYOUT_CENTER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("&Skip"), NULL, this, ID_CLICKED_SKIP, FR new FXButton(buttons, _("&Skip"), NULL, this, ID_CLICKED_SKIP, BU
AME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, 0, HORZ_ TTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0,
PAD, HORZ_PAD, VERT_PAD, VERT_PAD); 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("Skip A&ll"), NULL, this, ID_CLICKED_SKIP new FXButton(buttons, _("Skip A&ll"), NULL, this, ID_CLICKED_SKIP
_ALL, FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, _ALL, BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENT
0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); ER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("Yes for &All"), NULL, this, ID_CLICKED_O VERWRITE_ALL, FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0 , 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("Yes for &All"), NULL, this, ID_CLICKED_O VERWRITE_ALL, BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAY OUT_CENTER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
} }
// Dialog with two options for single file // Dialog with two options for single file
else else
{ {
new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL , FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, 0, H ORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL , BUTTON_INITIAL|BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT| LAYOUT_CENTER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
} }
} }
// Create message box with text, source and target size, source and target modif ied time // Create message box with text, source and target size, source and target modif ied time
OverwriteBox::OverwriteBox(FXWindow* win, const FXString& name, const FXString& text, FXString& srcsize, FXString& srcmtime, FXString& tgtsize, FXString& tgtmti me, FXuint type, FXuint opts, int x, int y) : OverwriteBox::OverwriteBox(FXWindow* win, const FXString& name, const FXString& text, FXString& srcsize, FXString& srcmtime, FXString& tgtsize, FXString& tgtmti me, FXuint type, FXuint opts, int x, int y) :
DialogBox(win, name, opts|DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE|DECOR_CLOSE, x, y, 0, 0) DialogBox(win, name, opts|DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE|DECOR_CLOSE, x, y, 0, 0)
{ {
FXVerticalFrame* content = new FXVerticalFrame(this, LAYOUT_FILL_X|LAYOUT_FI LL_Y); FXVerticalFrame* content = new FXVerticalFrame(this, LAYOUT_FILL_X|LAYOUT_FI LL_Y);
FXVerticalFrame* vframe = new FXVerticalFrame(content, LAYOUT_TOP|LAYOUT_LEF T|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0); FXVerticalFrame* vframe = new FXVerticalFrame(content, LAYOUT_TOP|LAYOUT_LEF T|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0);
skipping to change at line 93 skipping to change at line 93
new FXLabel(matrix, _("Target size:"), NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|L AYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y); new FXLabel(matrix, _("Target size:"), NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|L AYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y);
new FXLabel(matrix, tgtsize, NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|LAYOUT_TOP| LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y); new FXLabel(matrix, tgtsize, NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|LAYOUT_TOP| LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y);
new FXLabel(matrix, _("- Modified date:"), NULL, JUSTIFY_LEFT|ICON_BEFORE_TE XT|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y); new FXLabel(matrix, _("- Modified date:"), NULL, JUSTIFY_LEFT|ICON_BEFORE_TE XT|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y);
new FXLabel(matrix, tgtmtime, NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|LAYOUT_TOP |LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y); new FXLabel(matrix, tgtmtime, NULL, JUSTIFY_LEFT|ICON_BEFORE_TEXT|LAYOUT_TOP |LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y);
FXHorizontalFrame* buttons = new FXHorizontalFrame(content, LAYOUT_TOP|LAYOU T_LEFT|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 10, 10); FXHorizontalFrame* buttons = new FXHorizontalFrame(content, LAYOUT_TOP|LAYOU T_LEFT|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 10, 10);
// Dialog with five options for multiple files // Dialog with five options for multiple files
if (type == OVWBOX_MULTIPLE_FILES) if (type == OVWBOX_MULTIPLE_FILES)
{ {
new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL
, FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, 0, H , BUTTON_INITIAL|BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|
ORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); LAYOUT_CENTER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("&Skip"), NULL, this, ID_CLICKED_SKIP, FR new FXButton(buttons, _("&Skip"), NULL, this, ID_CLICKED_SKIP, BU
AME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, 0, HORZ_ TTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0,
PAD, HORZ_PAD, VERT_PAD, VERT_PAD); 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("Skip A&ll"), NULL, this, ID_CLICKED_SKIP new FXButton(buttons, _("Skip A&ll"), NULL, this, ID_CLICKED_SKIP
_ALL, FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, _ALL, BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENT
0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); ER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("Yes for &All"), NULL, this, ID_CLICKED_O VERWRITE_ALL, FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0 , 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("Yes for &All"), NULL, this, ID_CLICKED_O VERWRITE_ALL, BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAY OUT_CENTER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
} }
// Dialog with two options for single file // Dialog with two options for single file
else else
{ {
new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL , FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X, 0, 0, 0, 0, H ORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("&Cancel"), NULL, this, ID_CLICKED_CANCEL , BUTTON_INITIAL|BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT| LAYOUT_CENTER_X, 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD); new FXButton(buttons, _("&Yes"), NULL, this, ID_CLICKED_OVERWRITE , BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X , 0, 0, 0, 0, HORZ_PAD, HORZ_PAD, VERT_PAD, VERT_PAD);
} }
} }
// Close dialog // Close dialog
long OverwriteBox::onCmdClicked(FXObject*, FXSelector sel, void*) long OverwriteBox::onCmdClicked(FXObject*, FXSelector sel, void*)
{ {
getApp()->stopModal(this, OVWBOX_CLICKED_CANCEL+(FXSELID(sel)-ID_CLICKED_CAN CEL)); getApp()->stopModal(this, OVWBOX_CLICKED_CANCEL+(FXSELID(sel)-ID_CLICKED_CAN CEL));
hide(); hide();
return(1); return(1);
 End of changes. 6 change blocks. 
22 lines changed or deleted 22 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS