Skip to content

Commit

Permalink
GUI: added About dialog
Browse files Browse the repository at this point in the history
git-svn-id: https://freearc.svn.sourceforge.net/svnroot/freearc@67 3a4f7f31-9599-433d-91b1-573e8b61252c
  • Loading branch information
bulatz committed Feb 10, 2009
1 parent 087998b commit 758c382
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Documentation/History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
Tools: Wizard (���� ������� �����), Protect, Comment, Convert to EXE, Encrypt, Add Recovery record, Repair
Options: Configuration, Save settings, Load settings, View log, Clear log
Help: ���������� ��� Help, Goto Homepage (� / ��� Check for update), About
-if you test an archiv, there is no message given back, there should be some kind of "archiv OK" at the end of the test
-if you test an archiv, there is no message given back, there should be some kind of "Archive OK" at the end of the test
an additional progressbar for big files, like in Winrar
DoubleClick->Run inside archive
��� ������ ������ �� ������� ������, ��� ".."
Expand Down
2 changes: 1 addition & 1 deletion FileManPanel.hs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ chdir fm' filename' = do
fm <- val fm'
let title | isFM_Archive fm = takeFileName (fm_arcname fm) </> fm_arcdir fm
| otherwise = takeFileName (fm_dir fm) ||| fm_dir fm
set (fm_window fm) [windowTitle := title++" - FreeArc"]
set (fm_window fm) [windowTitle := title++" - "++aARC_NAME]


-- |Äîáàâèòü action â ñïèñîê îïåðàöèé, âûïîëíÿåìûõ ïðè ïåðåõîäå â äðóãîé êàòàëîã/àðõèâ
Expand Down
15 changes: 15 additions & 0 deletions FileManager.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ uiDef =
" <menuitem name=\"Settings\" action=\"SettingsAction\" />"++
" </menu>"++
" <menu name=\"Help\" action=\"HelpAction\">"++
" <menuitem name=\"About\" action=\"AboutAction\" />"++
" </menu>"++
" </menubar>"++
" <toolbar>"++
Expand Down Expand Up @@ -144,6 +145,7 @@ myGUI run args = do
toSfxAct <- anew "9999 Convert to SFX" "9999 Convert archive to EXE" (Nothing) "<Alt>S"
encryptAct <- anew "9999 Encrypt" "9999 Encrypt archive contents" (Nothing) ""
addRrAct <- anew "9999 Protect" "9999 Add Recovery record to archive" (Nothing) "<Alt>P"
aboutAct <- anew "9999 About" "9999 About" (Nothing) ""

selectAllAct<- anew "9999 Select all" "9999 Select all files" (Nothing) "<Ctrl>A"
selectAct <- anew "0037 Select" "0047 Select files" (Just stockAdd) "KP_Add"
Expand Down Expand Up @@ -377,6 +379,19 @@ myGUI run args = do
settingsAct `onActionActivate` do
settingsDialog fm'

-- Äèàëîã About
aboutAct `onActionActivate` do
bracketCtrlBreak aboutDialogNew widgetDestroy $ \dialog -> do
dialog `set` [aboutDialogName := aARC_NAME
,aboutDialogVersion := aARC_VERSION
,aboutDialogCopyright := "(c) "++aARC_EMAIL
,aboutDialogComments := "High-performance archiver"
,aboutDialogWebsite := aARC_WEBSITE
-- ,aboutDialogAuthors := [aARC_EMAIL]
]
dialogRun dialog
return ()

-- Ïðè íàæàòèè çàãîëîâêà ñòîëáöà â ñïèñêå ôàéëîâ - ñîðòèðîâàòü ïî ýòîìó ñòîëáöó
-- (ïðè ïîâòîðíîì íàæàòèè - ñîðòèðîâàòü â îáðàòíîì ïîðÿäêå)
onColumnTitleClicked =: \column -> do
Expand Down
16 changes: 12 additions & 4 deletions Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,22 @@ cmdType _ = ADD_CMD
aARCHIVE_VERSION = make4byte 0 0 4 9

{-# NOINLINE aARC_HEADER #-}
{-# NOINLINE aARC_VERSION #-}
{-# NOINLINE aARC_AUTHOR #-}
{-# NOINLINE aARC_EMAIL #-}
{-# NOINLINE aARC_WEBSITE #-}
-- |Краткое наименование программы, выводимое в начале работы
aARC_HEADER = aARC_NAME++" 0.50 alpha ("++aARC_DATE++") "
aARC_DATE = "Feb 8 2009"
aARC_NAME = "FreeArc"
aARC_HEADER = aARC_NAME++" "++aARC_VERSION++" "
aARC_VERSION = "0.50 alpha ("++aARC_DATE++")"
aARC_DATE = "Feb 8 2009"
aARC_NAME = "FreeArc"
aARC_AUTHOR = "Bulat Ziganshin"
aARC_EMAIL = "Bulat.Ziganshin@gmail.com"
aARC_WEBSITE = "http://freearc.org"

{-# NOINLINE aHELP #-}
-- |HELP, выводимый при вызове программы без параметров
aHELP = aARC_HEADER++" http://freearc.org "++aARC_DATE++"\n"++
aHELP = aARC_HEADER++" "++aARC_WEBSITE++" "++aARC_DATE++"\n"++
"Usage: Arc command [options...] archive [files... @listfiles...]\n" ++
joinWith "\n " ("Commands:":commandsList) ++ "\nOptions:\n" ++ optionsHelp

Expand Down

0 comments on commit 758c382

Please sign in to comment.