FilenameWidgetWithoutHistory.st
author Jan Vrany <jan.vrany@labware.com>
Fri, 02 Sep 2022 11:25:39 +0100
branchjv
changeset 6261 9b7eb7159d29
parent 3939 a8452ed1ef52
permissions -rw-r--r--
Fix loong standing bug with some menus not being translated / resolved This has happened with browser "View" menu when sometimes it had the slice resolved and sometimes not. It turned out that it was because the code disabled resources (and therefore slices) resolution when processing shortcuts, so the menu was created and cached unresolved. This fixes the issue. eXept apparently run into the same problem.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3939
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2007 by eXept Software AG
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libwidg2' }"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
FilenameWidgetWithHistory subclass:#FilenameWidgetWithoutHistory
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Views-Interactors'
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!FilenameWidgetWithoutHistory class methodsFor:'documentation'!
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
copyright
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
 COPYRIGHT (c) 2007 by eXept Software AG
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
              All Rights Reserved
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 hereby transferred.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
documentation
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
    A Filename InputField with a browse-button, which opens a file dialog.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    Q&D hack.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    [author:]
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
        Claus Gittinger
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    [see also:]
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
        ComboBoxView
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
        FilenameEditField
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
        FilenameComboBoxView
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
        FilenameWidgetWithHistory
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
!
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
examples
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
                                                                        [exBegin]
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
     |top b|
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
     top := StandardSystemView new.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
     top extent:(300 @ 200).
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
     b := FilenameWidgetWithoutHistory in:top.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
     b origin:(0.0 @ 0.0) corner:(1.0 @ 0.0).
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
     b bottomInset:(b preferredExtent y negated).
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
     top open.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
                                                                        [exEnd]
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
! !
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
!FilenameWidgetWithoutHistory methodsFor:'initialization'!
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
initializeFilenameField
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    fileNameEntryField := FilenameEditField in:self.
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    "Created: / 19-10-2010 / 16:21:05 / cg"
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
! !
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
!FilenameWidgetWithoutHistory class methodsFor:'documentation'!
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
version_CVS
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
    ^ '$Header: /cvs/stx/stx/libwidg2/FilenameWidgetWithoutHistory.st,v 1.1 2010-10-19 15:04:45 cg Exp $'
a8452ed1ef52 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
! !