Tk Source Code

Artifact [096567a1]
Login

Artifact 096567a1f206b287f440865cc717f5f95a8dd998:

Ticket change [096567a1] - Ticket [1520742f] Windows-style Open and Save file dialog on Unix status still Open with 8 other changes by dkf 2013-11-03 12:44:10.
D 2013-11-03T12:44:10.235
J closer nobody
J comment Email:[email protected]\r\nAn\sattachment\swith\sthe\snecessary\ssource\sfiles\sis\s\r\nattached.\r\n\r\nThe\stk_getOpenFile\sand\stk_getSaveFile\shave\sbeen\s\r\ngreatly\simproved\sto\sfunction\smuch\slike\sa\swindows\s\r\ndialog\staken\sfrom\sWindows\s2000,\swhen\sthe\sdefault\s\r\ndialogs\sare\soverridden.\r\nThis\sis\smost\suseful\son\sUnix\ssystems\swhere\sthe\s\r\napplication\sis\swanted\sto\shave\sa\sWindows-like\s\r\nappearance,\sbut\sit\swill\salso\sfunction\son\sWindows.\r\nI\shave\snot\sbeen\sable\sto\stest\son\sMacintosh.\r\nThis\salso\saffects\stk_chooseDirectory\swhen\sthe\sdefault\s\r\ndialogs\sare\soverridden\ssince\sit\sruns\soff\sof\s\r\ntkfbox.tcl.\r\n\r\nThe\sdialogs\swill\swork\swithout\sthe\sBWidget\spackage,\s\r\nbut\sit\swill\shave\smore\sfunctionality\sand\slook\smore\s\r\nlike\sa\swindows\sdialog\sif\sBWidgets\sare\sincluded.\r\nThe\sonly\sthing\sit\sreally\sneeds\sfrom\sBWidgets\sis\sthe\s\r\nComboBox\swidget.\s\sIf\sthis\swere\sincluded\sin\sregular\s\r\nTk,\sthen\sBWidgets\swould\snot\sbe\sneeded.\r\nIt\salso\suses\sthe\sballoon\smessages\sof\sthe\s"Button"\s\r\nwidget\sfrom\sBWidgets.\r\n\r\nThis\snew\sfile\sdialog\swidget\srequires\stwo\sof\sthe\snew\s\r\nwidgets\sincluded\s--\sResizeButs\sand\stk_fileProperties.\r\nI\sadded\sthese\slines\sto\sthe\sfile\s"tclIndex"\sto\sget\sit\s\r\nto\sfind\sthese\scommands:\r\nset\sauto_index(ResizeButs)\s[list\ssource\s[file\sjoin\s\r\n$dir\sResizeButs.tcl]]\r\nset\sauto_index(tk_fileProperties)\s[list\ssource\s[file\s\r\njoin\s$dir\stkfprops.tcl]]\r\n\r\nThe\stwo\stcl\sfiles\sthat\sdefine\sthese\swidgets\sare\s\r\nincluded\s(ResizeButs.tcl\sand\stkfprops.tcl),\salong\s\r\nwith\sdocumentation\son\seach\sone.\r\n\r\nThe\sfile\schoosedir.tcl\sis\salso\sincluded.\s\sIt\sis\s\r\nneeded\sto\swork\swith\sthe\smodified\stkfbox.tcl.\r\n\r\n\r\nAdded\sfunctionality\sof\sthe\sfile\sdialog:\r\n\s\s\s\s\s\s1.\sBack\sdirectory\sbutton\r\n\s\s\s\s\s\s2.\sCreate\sdirectory\sbutton\r\n\s\s\s\s\s\s3.\sDetails\sbutton\r\n\s\s\s\s\s\s4.\sDelete\sbutton\r\n\s\s\s\s\s\s5.\sYou\scan\stype\sthe\sdirectory\spath\sat\sthe\stop\s\r\n(requires\sBWidgets).\s\sSelecting\s"desktop"\sexpands\s\r\nwhat's\savailable\son\sthe\sdesktop\sif\sused\son\sWindows.\r\n\s\s\s\s\s\sRight\smouse\sclicking\son\sa\sfile\sgives\sthese\s\r\noptions:\r\n\s\s\s\s\s\s\s\s\s\s\s\s1.\s\sCut\r\n\s\s\s\s\s\s\s\s\s\s\s\s2.\s\sCopy\r\n\s\s\s\s\s\s\s\s\s\s\s\s3.\s\sDelete\r\n\s\s\s\s\s\s\s\s\s\s\s\s4.\s\sRename\r\n\s\s\s\s\s\s\s\s\s\s\s\s5.\s\sProperties\s(uses\stk_fileProperties\s\r\nwidget)\r\n\s\s\s\s\s\sRight\smouse\sclicking\sin\sopen\swhite\sspace\sgives\s\r\nthese\soptions:\r\n\s\s\s\s\s\s\s\s\s\s\s\s1.\s\sView\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s1.\sList\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s2.\sDetails\r\n\s\s\s\s\s\s\s\s\s\s\s\s2.\s\sArrange\sIcons\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s1.\sBy\sName\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s2.\sBy\sSize\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s3.\sBy\sType\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s4.\sBy\sDate\r\n\s\s\s\s\s\s\s\s\s\s\s\s3.\s\sRefresh\r\n\s\s\s\s\s\s\s\s\s\s\s\s4.\s\sPaste\s(ungreys\sif\sCut\sor\sCopy\swere\s\r\npreviously\sselected\son\sfiles)\r\n\s\s\s\s\s\s\s\s\s\s\s\s5.\s\sNew\sFolder\r\n\s\s\s\s\s\s\s\s\s\s\s\s6.\s\sProperties\s(uses\stk_fileProperties\s\r\nwidget)\r\n\s\s\s\s\s\s6.\sRecent\sselected\sfiles\scan\sbe\sshown\sby\s\r\npressing\sthe\sdown\sarrow\sin\sthe\sentry\sfield\sof\sthe\s\r\nselected\sfile\sname\s(requires\sBWidgets).\s\sRecent\sfile\s\r\nnames\sare\ssaved\sto\sa\sfile\snamed\s\r\n\r\n.tk_recent_selections\sin\sthe\susers\shome\sdirectory.\r\n\s\s\s\s\s\s7.\sBox\sselecting\sof\sfiles\scan\sbe\sdone\swith\s\r\nthe\s"multiple\s1"\soption.\s\sLeft\smouse\sclick\sand\shold\s\r\nand\sdrag\sa\sbox\sover\sfiles.\r\n\s\s\s\s\s\s8.\sThe\sbusy\swas\simproved\sto\sactually\sblock\s\r\nmouse\sclicks\sinstead\sof\sjust\sshowing\san\shourglass\s\r\nwidget.\r\n\s\s\s\s\s\s9.\sPopup\sbutton\sdescriptions.\s(requires\s\r\nBWidgets)\r\n\s\s\s\s\s\s10.\sIcons\sshade\sas\swell\sas\stext\swhen\sselected.\r\n\r\nDetails\sview\r\n\s\s\s\s\s\sThe\sDetails\sbutton\sgrids\s4\scolumns\s(name,\sfile\s\r\ntype,\ssize,\sand\smodified\sdate).\s(uses\sResizeButs\s\r\nwidget)\r\n\s\s\s\s\s\sMoving\sthe\smouse\sover\sthe\sborder\sbetween\stwo\s\r\nbuttons\sof\sthe\stop\scolumn\sheadings\sand\sleft\smouse\s\r\nclicking\swhile\sdragging\swill\sallow\sthe\suser\sto\schange\s\r\nthe\ssize\sof\sthe\scolumns.\r\n\s\s\s\s\s\sPressing\sone\sof\sthe\sheading\sbuttons\schanges\sthe\s\r\norder\sof\sthe\sdata\sbetween\sincreasing\sand\sdecreasing\s\r\nand\sdisplays\sa\striangle\sin\sthe\sbutton\sto\sindicate\sthe\s\r\norder.\r\n\r\nAdditional\sArguments\sto\sthe\stk_getOpenFile\sand\s\r\ntk_getSaveFile\scommands\r\n\s\s\s\s\s\sThe\sdir_leaf\sarguments\sallow\sa\sfolder\sto\sbe\s\r\nselected\sas\sa\sfile\sto\sselect\sit\sas\sa\sproject.\s\s\r\nProviding\sa\s-dir_leaf_check\sprocedure\sdefines\sthe\s\r\nfile\sdialog\sas\sa\sspecial\stype\sthat\sonly\s\r\n\r\nlists\sfolders,\sbut\sthe\sfolder\sthat\spasses\sthe\s-\r\ndir_leaf_check\sprocedure\scan\sbe\sselected\sas\sa\sfile.\r\n\s\s\s\s\s\s1.\s-dir_leaf_check\s--\sThis\sis\sthe\sname\sof\sa\s\r\nprocedure\swhich\schecks\sif\sthe\sdirectory\squalifies\sas\s\r\nthe\skind\sthat\scan\sbe\sselected\sas\sa\sproject\sfile.\sIt\s\r\nreturns\sa\snon-zero\snumber\sif\sit\s\r\n\r\nqualifies,\sotherwise\sit\sreturns\szero.\sThe\sdirectory\s\r\nname\sto\scheck\swill\sbe\sappended\sas\san\sargument\sto\sthe\s\r\nprocedure.\r\n\s\s\s\s\s\s2.\s-dir_leaf_image\s--\san\simage\sto\suse\sfor\sthe\s\r\nfolder\stypes\sthat\swill\sbe\streated\sas\sfiles.\s\sIt\s\r\nshould\sbe\san\simage\screated\swith\s"image\screate\sphoto"\r\n\s\s\s\s\s\s3.\s-dir_leaf_label\s--\stext\sthat\sappears\sat\sthe\s\r\nleft\sof\sthe\sentry\sfor\sthe\sselected\sfile\swhen\sthe\s\r\ndialog\sis\sdefined\sas\sa\sproject\sfolder\sselection\stype\s\r\n(when\sthe\s-dir_leaf_check\s\r\n\r\nprocedure\sis\sdefined).
J icomment Dropping\spriority.\sNeeds:\r\n<ul><li>Committing\sto\sa\sbranch,\sASAP<li>Significant\swork\sbefore\smerging\sto\sany\smainline\sversion</ul>\r\nAlas.
J login dkf
J mimetype text/html
J priority 8
J severity Minor
J username dkf
K 1520742fffffffffffffffffffffffffffffffff
U dkf
Z c6ca7bdea0766c0f84223db12b0d209a