monotone

monotone Commit Details

Date:2008-06-06 23:56:10 (11 years 2 months ago)
Author:Tony Cooper
Branch:net.venge.monotone.contrib.mtn-browse
Commit:949ced02d485ffa53a8714bf1651bbe8abc3a018
Parents: 2762e3b1c9f55b58e00ab3336d6c4082dd346ee6
Message:- Implemented a faster event filter.

- Added some events to the `what to filter out' list.
- Implemented the hide_find_text routine and now use it to hide fid text windows
when the related browser window is dismissed.
Changes:
MFindText.pm (2 diffs)
MWindowManager.pm (2 diffs)
Mmtn-browse (1 diff)

File differences

FindText.pm
5656
5757
5858
59
5960
6061
6162
......
167168
168169
169170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
170199
171200
172201
sub disable_find_text($$);
sub find_text($$);
sub hide_find_text($);
sub reset_find_text($);
# Private routines.
#
##############################################################################
#
# Routine - hide_find_text
#
# Description - Hides the find text window associated with the specified
# textview widget.
#
# Data - $text_view : The textview widget to which the find text
# window is associated.
#
##############################################################################
sub hide_find_text($)
{
my($text_view, $disable) = @_;
my $instance;
# Simply hide the found find text window.
$instance->{window}->hide()
if (defined($instance = find_current_window($text_view)));
}
#
##############################################################################
#
# Routine - find_button_clicked_cb
#
# Description - Callback routine called when the user clicks on the find
WindowManager.pm
5959
6060
6161
62
62
6363
64
65
66
67
64
65
66
67
68
69
70
6871
6972
7073
......
586589
587590
588591
589
590
591
592
593
594
595
596
597
598
592
593
594
595
599596
600597
601598
# ***** GLOBAL DATA DECLARATIONS *****
# A list of event types that are to be filtered out when updating a busy GUI.
# A hash of event types that are to be filtered out when updating a busy GUI.
my @filtered_events = ("button-press",
"button-release",
"key-press",
"key-release");
my %filtered_events = ("button-press" => 1,
"2button-press" => 1,
"3button-press" => 1,
"button-release" => 1,
"key-press" => 1,
"key-release" => 1,
"scroll" => 1);
# The singleton object.
my $this = $client_data->{singleton};
my $type = $event->type();
if (! $this->{allow_input})
{
foreach my $filter_type (@filtered_events)
{
return
if ($type eq $filter_type
&& (! defined($grab_widget)
|| Gtk2->get_event_widget($event) != $grab_widget));
}
}
return if (! $this->{allow_input}
&& exists($filtered_events{$type})
&& (! defined($grab_widget)
|| $grab_widget != Gtk2->get_event_widget($event)));
Gtk2->main_do_event($event);
}
mtn-browse
13881388
13891389
13901390
1391
13911392
13921393
13931394
return;
});
hide_find_text($browser->{file_view_sv});
$browser->{window}->hide();
$browser->{mtn} = undef;
$browser->{branch_combo_details}->{preset} = 0;

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status