… | |
… | |
1742 | |
1742 | |
1743 | $r |
1743 | $r |
1744 | } |
1744 | } |
1745 | |
1745 | |
1746 | my %SORT_ORDER = ( |
1746 | my %SORT_ORDER = ( |
1747 | type => undef, |
1747 | type => sub { |
|
|
1748 | sort { $a->{type} <=> $b->{type} or $a->{name} cmp $b->{name} } @_ |
|
|
1749 | }, |
1748 | mtime => sub { |
1750 | mtime => sub { |
1749 | my $NOW = time; |
1751 | my $NOW = time; |
1750 | sort { |
1752 | sort { |
1751 | my $atime = $a->{mtime} - $NOW; $atime = $atime < 5 * 60 ? int $atime / 60 : 6; |
1753 | my $atime = $a->{mtime} - $NOW; $atime = $atime < 5 * 60 ? int $atime / 60 : 6; |
1752 | my $btime = $b->{mtime} - $NOW; $btime = $btime < 5 * 60 ? int $btime / 60 : 6; |
1754 | my $btime = $b->{mtime} - $NOW; $btime = $btime < 5 * 60 ? int $btime / 60 : 6; |
… | |
… | |
2242 | has_close_button => 1, |
2244 | has_close_button => 1, |
2243 | ; |
2245 | ; |
2244 | |
2246 | |
2245 | $METASERVER = metaserver_dialog; |
2247 | $METASERVER = metaserver_dialog; |
2246 | # the name is changed to not conflict with the older name as users could have hidden it |
2248 | # the name is changed to not conflict with the older name as users could have hidden it |
2247 | $MESSAGE_WINDOW = new DC::UI::Dockbar (name => "message_window2", title => 'Messages'); |
2249 | $MESSAGE_WINDOW = new DC::UI::Dockbar |
|
|
2250 | name => "message_window2", |
|
|
2251 | title => 'Messages', |
|
|
2252 | force_w => $::WIDTH * 0.6, |
|
|
2253 | force_h => $::HEIGHT * 0.25, |
|
|
2254 | ; |
|
|
2255 | |
2248 | $MESSAGE_DIST = new DC::MessageDistributor dockbar => $MESSAGE_WINDOW; |
2256 | $MESSAGE_DIST = new DC::MessageDistributor dockbar => $MESSAGE_WINDOW; |
2249 | |
2257 | |
2250 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new DC::UI::Notebook expand => 1, |
2258 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new DC::UI::Notebook expand => 1, |
2251 | filter => new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); |
2259 | filter => new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); |
2252 | |
2260 | |
… | |
… | |
2474 | pickup => 0, |
2482 | pickup => 0, |
2475 | inv_sort => "mtime", |
2483 | inv_sort => "mtime", |
2476 | default => "profile", # default profile |
2484 | default => "profile", # default profile |
2477 | show_tips => 1, |
2485 | show_tips => 1, |
2478 | logview_max_par => 1000, |
2486 | logview_max_par => 1000, |
|
|
2487 | shift_fire_stop => 0, |
2479 | ); |
2488 | ); |
2480 | |
2489 | |
2481 | while (my ($k, $v) = each %DEF_CFG) { |
2490 | while (my ($k, $v) = each %DEF_CFG) { |
2482 | $CFG->{$k} = $v unless exists $CFG->{$k}; |
2491 | $CFG->{$k} = $v unless exists $CFG->{$k}; |
2483 | } |
2492 | } |