27
27
ent_library = TkEntry.new(base, :width=>50, :textvariable=>@library)
28
28
ent_groups = TkEntry.new(base, :width=>50, :textvariable=>@groups)
30
btn_browse = TkButton.new(base, :text=>'Browse',
30
btn_browse = TkButton.new(base, :text=>'Browse',
31
31
:command=>method(:select_icons))
32
32
btn_view = TkButton.new(base, :text=>'View',
33
33
:command=>method(:display_icons))
38
@column_btns[i] = TkButton.new(columns,
39
:text=>i.to_s, :width=>2,
38
@column_btns[i] = TkButton.new(columns,
39
:text=>i.to_s, :width=>2,
40
40
:command=>proc{set_columns(i)}
41
41
).pack(:side=>:left)
92
92
def _create_info_window
93
@info_window = TkToplevel.new(:background=>'lightyellow', :borderwidth=>1,
93
@info_window = TkToplevel.new(:background=>'lightyellow', :borderwidth=>1,
94
94
:relief=>:solid){|w|
95
lbl_name = TkLabel.new(w, :text=>'Name', :background=>'lightyellow',
96
:font=>@boldfont, :justify=>:left)
97
lbl_grps = TkLabel.new(w, :text=>'Groups', :background=>'lightyellow',
98
:font=>@boldfont, :justify=>:left)
99
lbl_type = TkLabel.new(w, :text=>'Type', :background=>'lightyellow',
100
:font=>@boldfont, :justify=>:left)
101
lbl_size = TkLabel.new(w, :text=>'Size', :background=>'lightyellow',
95
lbl_name = TkLabel.new(w, :text=>'Name', :background=>'lightyellow',
96
:font=>@boldfont, :justify=>:left)
97
lbl_grps = TkLabel.new(w, :text=>'Groups', :background=>'lightyellow',
98
:font=>@boldfont, :justify=>:left)
99
lbl_type = TkLabel.new(w, :text=>'Type', :background=>'lightyellow',
100
:font=>@boldfont, :justify=>:left)
101
lbl_size = TkLabel.new(w, :text=>'Size', :background=>'lightyellow',
102
102
:font=>@boldfont, :justify=>:left)
104
104
lbl_name.grid(:row=>0, :column=>0, :sticky=>:w)
242
242
TkClipboard.append(@command)
244
244
if Tk::PLATFORM['platform'] == 'unix'
245
TkSelection.handle(Tk.root, method(:primary_transfer),
245
TkSelection.handle(Tk.root, method(:primary_transfer),
246
246
:selection=>'PRIMARY')
247
TkSelection.set_owner(Tk.root, :selection=>'PRIMARY',
247
TkSelection.set_owner(Tk.root, :selection=>'PRIMARY',
248
248
:command=>method(:lost_selection))
256
256
bbox = @icons_window.bbox('all')
257
257
width = @controls.winfo_width - @icons_window.yscrollbar.winfo_width - 8
259
@icons_window.configure(:width=>width, :scrollregion=>bbox,
260
:xscrollincrement=>'0.1i',
259
@icons_window.configure(:width=>width, :scrollregion=>bbox,
260
:xscrollincrement=>'0.1i',
261
261
:yscrollincrement=>'0.1i')
265
new_lib = Tk.getOpenFile(:initialdir=>@initial_dir,
266
:initialfile=>'tkIcons',
267
:title=>'Select Icon Library',
265
new_lib = Tk.getOpenFile(:initialdir=>@initial_dir,
266
:initialfile=>'tkIcons',
267
:title=>'Select Icon Library',
269
['Icon Libraries', ['tkIcons*']],
269
['Icon Libraries', ['tkIcons*']],
270
270
['All Files', ['*']]
282
282
unless File.exist?(@library.value)
283
Tk.messageBox(:icon=>'warning', :message=>'File does not exist',
283
Tk.messageBox(:icon=>'warning', :message=>'File does not exist',
284
284
:title=>'viewIcons')