aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/data/v310/plupload.php
blob: 69367f86a92ad8d997da7e916548729ca2b01e2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/

namespace phpbb\db\migration\data\v310;

class plupload extends \phpbb\db\migration\migration
{
	public function effectively_installed()
	{
		return isset($this->config['plupload_last_gc']) &&
			isset($this->config['plupload_salt']);
	}

	static public function depends_on()
	{
		return array('\phpbb\db\migration\data\v310\dev');
	}

	public function update_data()
	{
		return array(
			array('config.add', array('plupload_last_gc', 0)),
			array('config.add', array('plupload_salt', unique_id())),
		);
	}
}
l/mouse.pm?id=c93f2bfb683e280ea949758e34d169282228f6be'>patch) tree08dd07581b830bbe6bdf34391a6cf2c096ed0fbd /perl-install/mouse.pm parent7427e6d01fbc73c49b0ec5c0b576e718de761ac2 (diff)downloaddrakx-c93f2bfb683e280ea949758e34d169282228f6be.tar
drakx-c93f2bfb683e280ea949758e34d169282228f6be.tar.gz
drakx-c93f2bfb683e280ea949758e34d169282228f6be.tar.bz2
drakx-c93f2bfb683e280ea949758e34d169282228f6be.tar.xz
drakx-c93f2bfb683e280ea949758e34d169282228f6be.zip
mouse test worked
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm46
1 files changed, 32 insertions, 14 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 75516c507..25be44262 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -432,7 +432,12 @@ sub test_mouse_install {
);
$okcancel->set_uposition(7, $height-23);
Gtk->timeout_add(2000, sub { gtkset_sensitive($okcancel, 1) });
- test_mouse($mouse, $w, $darea, $width, $height, $vbox_grab);
+ test_mouse($mouse, $w, $darea, $width, $height);
+ $w->sync; # HACK
+ Gtk::Gdk->pointer_grab($darea->window, 1,
+ [ 'pointer_motion_mask'],
+ $darea->window, undef ,0);
+ $w->main;
}
sub test_mouse_standalone {
@@ -451,16 +456,19 @@ sub test_mouse_standalone {
}
sub test_mouse {
- my ($mouse, $w, $darea, $width, $height, $vbox_grab) = @_;
+ my ($mouse, $w, $darea, $width, $height) = @_;
$darea->realize();
+ my $wait = 0;
my ($m3_image, $m3_mask) = gtkcreate_xpm($darea, 'mouse_3b.xpm');
my ($m3_imagep, $m3_maskp) = gtkcreate_xpm($darea, 'mouse_3b+.xpm');
my ($m3_left, $m3_left_mask) = gtkcreate_xpm($darea, 'mouse_left.xpm');
my ($m3_right, $m3_right_mask) = gtkcreate_xpm($darea, 'mouse_right.xpm');
my ($m3_middle, $m3_middle_mask) = gtkcreate_xpm($darea, 'mouse_middle.xpm');
+ my ($aru, $aru_mask) = gtkcreate_xpm($darea, 'arrow_up.xpm');
+ my ($ard, $ard_mask) = gtkcreate_xpm($darea, 'arrow_down.xpm');
my $image = $m3_image;
- $mouse->{nbuttons} > 3 and $image = $m3_imagep;
+ $mouse->{nbuttons} > 3 || 1 and $image = $m3_imagep;
my $draw_text = sub {
my ($t, $y) = @_;
my $font = $darea->style->font;
@@ -497,15 +505,30 @@ sub test_mouse {
($darea->allocation->[2]-$width)/2+98, ($darea->allocation->[3]-$height)/2 + 67,
13, 62);
} else {
- $darea->window->draw_arc ( $darea->style->black_gc,
- 1, ($darea->allocation->[2]-$width)/2 + $x, ($darea->allocation->[3]-$height)/2 + 90, 20, 25,
- 0, 360*64);
+#############
+ $wait=1;
+ $darea->window->draw_pixmap ($darea->style->bg_gc('normal'),
+ $m3_middle, 0, 0,
+ ($darea->allocation->[2]-$width)/2+98, ($darea->allocation->[3]-$height)/2 + 67,
+ 13, 62);
+ Gtk->timeout_add(200, sub { $wait = 0 });
+#############
+
+# $darea->window->draw_arc ( $darea->style->black_gc,
+# 1, ($darea->allocation->[2]-$width)/2 + $x, ($darea->allocation->[3]-$height)/2 + 90, 20, 25,
+# 0, 360*64);
}
} elsif ($nb == 4) {
+ $wait=1;
+ $darea->window->draw_pixmap ($darea->style->bg_gc('normal'),
+ $aru, 0, 0,
+ ($darea->allocation->[2]-$width)/2+102, ($darea->allocation->[3]-$height)/2 + 57,
+ 6, 8);
$darea->window->draw_pixmap ($darea->style->bg_gc('normal'),
$m3_middle, 0, 0,
($darea->allocation->[2]-$width)/2+98, ($darea->allocation->[3]-$height)/2 + 67,
- 13, 62)
+ 13, 62);
+ Gtk->timeout_add(200, sub { $wait = 0 });
} elsif ($nb == 5) {
$darea->window->draw_pixmap ($darea->style->bg_gc('normal'),
$m3_middle, 0, 0,
@@ -517,15 +540,10 @@ sub test_mouse {
my $b = $_[1]{button};
$paintButton->($b - 1);
});
- $darea->signal_connect(button_release_event => sub {
+ $darea->signal_connect(button_release_event => sub {
+ while ($wait) { my_gtk::flush() }
$drawarea->()
});
$darea->signal_connect(expose_event => sub { $drawarea->() });
$darea->size($width, $height);
- $darea->set_events([ 'button_press_mask', 'button_release_mask' ]);
- $w->sync; # HACK
- $vbox_grab and Gtk::Gdk->pointer_grab($darea->window, 1,
- [ 'pointer_motion_mask'],
- $darea->window, undef ,0);
- $w->main;
}