Gtk2

 view release on metacpan or  search on metacpan

ChangeLog.pre-git  view on Meta::CPAN

	Gtk2::Style::get_style_property an alias for Gtk2::Style::get.

2009-03-17  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* t/GtkCellView.t
	* t/GtkEntry.t
	* t/GtkIMContext.t
	* t/GtkImageMenuItem.t
	* t/GtkOrientable.t
	* t/GtkPrintSettings.t
	* t/GtkStatusIcon.t
	* t/GtkStyle.t
	* xs/GtkCellView.xs
	* xs/GtkEntry.xs
	* xs/GtkIMMulticontext.xs
	* xs/GtkImageMenuItem.xs
	* xs/GtkPrintOperation.xs
	* xs/GtkPrintSettings.xs
	* xs/GtkSelection.xs
	* xs/GtkStatusIcon.xs
	* xs/GtkStyle.xs: Change all versions checks to refer to stable
	releases only.

2009-03-08  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* Gtk2.pm
	* Makefile
	* NEWS
	* README: Unstable release 1.212.

MANIFEST  view on Meta::CPAN

t/GtkSelection.t
t/GtkSeparatorMenuItem.t
t/GtkSeparatorToolItem.t
t/GtkShow.t
t/GtkSimpleList.t
t/GtkSimpleMenu.t
t/GtkSizeGroup.t
t/GtkSpinButton.t
t/GtkSpinner.t
t/GtkStatusbar.t
t/GtkStatusIcon.t
t/GtkStock.t
t/GtkStyle.t
t/GtkTable.t
t/GtkTearoffMenuItem.t
t/GtkTextBuffer.t
t/GtkTextBufferRichText.t
t/GtkTextChildAnchor.t
t/GtkTextIter.t
t/GtkTextMark.t
t/GtkTextTag.t

t/GtkStatusIcon.t  view on Meta::CPAN

#!/usr/bin/perl
# vim: set ft=perl :

use strict;
use warnings;
use Gtk2::TestHelper
  tests => 37,
  at_least_version => [2, 10, 0, "Gtk2::StatusIcon is new in 2.10"];

# $Id$

my $icon;

$icon = Gtk2::StatusIcon -> new();
isa_ok($icon, "Gtk2::StatusIcon");
is($icon -> get_storage_type(), "empty");

like($icon -> get_size(), qr/^\d+$/);
$icon -> set_tooltip("bla");

$icon -> set_visible(TRUE);
is($icon -> get_visible(), TRUE);

$icon -> set_blinking(TRUE);
is($icon -> get_blinking(), TRUE);

ok(defined $icon -> is_embedded());

# --------------------------------------------------------------------------- #

my $pixbuf = Gtk2::Gdk::Pixbuf -> new("rgb", FALSE, 8, 10, 10);
$icon = Gtk2::StatusIcon -> new_from_pixbuf($pixbuf);
isa_ok($icon, "Gtk2::StatusIcon");
is($icon -> get_storage_type(), "pixbuf");

$icon -> set_from_pixbuf($pixbuf);
is($icon -> get_pixbuf(), $pixbuf);

# --------------------------------------------------------------------------- #

$icon = Gtk2::StatusIcon -> new_from_stock("gtk-ok");
isa_ok($icon, "Gtk2::StatusIcon");
is($icon -> get_storage_type(), "stock");

$icon -> set_from_stock("gtk-ok");
is($icon -> get_stock(), "gtk-ok");

# --------------------------------------------------------------------------- #

$icon = Gtk2::StatusIcon -> new_from_icon_name("gtk-ok");
isa_ok($icon, "Gtk2::StatusIcon");
is($icon -> get_storage_type(), "icon-name");

$icon -> set_from_icon_name("gtk-ok");
is($icon -> get_icon_name(), "gtk-ok");

# --------------------------------------------------------------------------- #

my $icon_theme = Gtk2::IconTheme -> get_default();
my $icon_info = $icon_theme -> lookup_icon('stock_edit', 24, 'use-builtin');

SKIP: {
	skip "new_from_file; theme icon not found", 2
		unless defined $icon_info;

	my $icon_file = $icon_info -> get_filename();

	$icon = Gtk2::StatusIcon -> new_from_file($icon_file);
	isa_ok($icon, "Gtk2::StatusIcon");
	is($icon -> get_storage_type(), "pixbuf");

	$icon -> set_from_file($icon_file);
}

# --------------------------------------------------------------------------- #

my $menu = Gtk2::Menu -> new();
$menu -> popup(undef, undef, \&Gtk2::StatusIcon::position_menu, $icon, 0, 0);
$menu -> popdown();

my $callback = sub {
	my ($menu, $x, $y, $icon) = @_;
	return Gtk2::StatusIcon::position_menu($menu, $x, $y, $icon);
};
$menu -> popup(undef, undef, $callback, $icon, 0, 0);
$menu -> popdown();

# Make sure the convenient way of calling works, too.
{ my @ret = Gtk2::StatusIcon::position_menu($menu, $icon);
  is (scalar @ret, 3);
  my ($x, $y, $pushed_in) = @ret;
  like($x, qr/^-?\d+$/);
  like($y, qr/^-?\d+$/);
  like($pushed_in, qr/^[01]$/); # boolean
}

# --------------------------------------------------------------------------- #

my ($screen, $area, $orientation) = $icon -> get_geometry();

xs_files-2.10  view on Meta::CPAN

xs/GtkPrintContext.xs
xs/GtkPrintOperation.xs
xs/GtkPrintOperationPreview.xs
xs/GtkPrintSettings.xs
xs/GtkRecentChooser.xs
xs/GtkRecentChooserDialog.xs
xs/GtkRecentChooserMenu.xs
xs/GtkRecentChooserWidget.xs
xs/GtkRecentFilter.xs
xs/GtkRecentManager.xs
xs/GtkStatusIcon.xs
xs/GtkTextBufferRichText.xs

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.941 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )