[SCM] gmusicbrowser/master: Refresh shimmer-layouts, partially applied upstream.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Tue Feb 7 22:49:20 UTC 2012


The following commit has been merged in the master branch:
commit cf2900af22205f0116e77479d6db418d677171b5
Author: Alessio Treglia <alessio at debian.org>
Date:   Tue Feb 7 23:49:27 2012 +0100

    Refresh shimmer-layouts, partially applied upstream.

diff --git a/debian/patches/shimmer-layouts b/debian/patches/shimmer-layouts
index 7345b48..f77b39e 100644
--- a/debian/patches/shimmer-layouts
+++ b/debian/patches/shimmer-layouts
@@ -3,12 +3,12 @@ Origin: other, https://github.com/shimmerproject/gmusicbrowser
 Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
 ---
  gmbrc.default           |   10 ++++++++
- gmusicbrowser.pl        |   54 ++++---------------------------------------
+ gmusicbrowser.pl        |   12 ++++-----
  gmusicbrowser_layout.pm |   15 +++++++++++-
  gmusicbrowser_list.pm   |   34 ++++++++++++++++++++++-----
  layouts/songtree.layout |   59 +++++++++++++++++++++++++++++++++++++++++++++---
  plugins/fetch_cover.pm  |    4 ++-
- 6 files changed, 117 insertions(+), 59 deletions(-)
+ 6 files changed, 117 insertions(+), 17 deletions(-)
 
 --- gmusicbrowser.orig/gmusicbrowser_list.pm
 +++ gmusicbrowser/gmusicbrowser_list.pm
@@ -57,7 +57,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  );
  my @cloudstats_menu=
  (	_("number of songs")	=> 'count',
-@@ -3213,7 +3215,7 @@ sub new
+@@ -3221,7 +3223,7 @@ sub new
  		my $BAlblist=::NewIconButton('gmb-playlist',undef,undef,'none');
  		$BAlblist->signal_connect(button_press_event => \&AlbumListButton_press_cb);
  		$BAlblist->set_tooltip_text(_"Choose Album From this Artist");
@@ -66,7 +66,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  	}
  
  	my $drgsrc=$aa eq 'album' ? ::DRAG_ALBUM : ::DRAG_ARTIST;
-@@ -4434,6 +4436,16 @@ sub button_press_cb
+@@ -4450,6 +4452,16 @@ sub button_press_cb
  		else	{ $self->{pressed}=1; }
  		return 0;
  	}
@@ -83,7 +83,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  	if ($but==3)
  	{	my ($i,$j,$key)=$self->coord_to_index($event->get_coords);
  		if (defined $key && !exists $self->{selected}{$key})
-@@ -5311,7 +5323,7 @@ sub new
+@@ -5327,7 +5339,7 @@ sub new
  	my $default= $::Options{"DefaultOptions_$name"} || {};
  
  	%$opt=( @DefaultOptions, %$default, %$opt );
@@ -92,7 +92,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  
  	#create widgets used to draw the songtree as a treeview, would be nice to do without but it's not possible currently
  	$self->{stylewidget}=Gtk2::TreeView->new;
-@@ -5382,6 +5394,16 @@ sub new
+@@ -5398,6 +5410,16 @@ sub new
  	$self->AddColumn($_) for split / +/,$opt->{cols};
  	unless ($self->{cells}) { $self->AddColumn('title'); } #to ensure there is at least 1 column
  
@@ -149,7 +149,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  	Year =>
  	{	class	=> 'Layout::Label',
  		group	=> 'Play',
-@@ -371,8 +381,10 @@ our %Widgets=
+@@ -372,8 +382,10 @@ our %Widgets=
  		group	=> 'Play',
  		aa	=> 'album',
  		oldopt1 => 'maxsize',
@@ -160,7 +160,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  		event	=> 'Picture_album',
  		update	=> \&Layout::AAPicture::Changed,
  		noinit	=> 1,
-@@ -386,6 +398,7 @@ our %Widgets=
+@@ -387,6 +399,7 @@ our %Widgets=
  		oldopt1 => 'maxsize',
  		schange	=> sub { my $key=(defined $_[1])? Songs::Get_gid($_[1],'artists') : undef ;$_[0]->set($key); },
  		click1	=> sub { ::PopupAA('artist'); },
@@ -168,7 +168,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  		event	=> 'Picture_artist',
  		update	=> \&Layout::AAPicture::Changed,
  		noinit	=> 1,
-@@ -1564,7 +1577,7 @@ use base 'Gtk2::Window';
+@@ -1590,7 +1603,7 @@ use base 'Gtk2::Window';
  
  sub new
  {	my ($class,$layout,%options)=@_;
@@ -198,7 +198,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  #Layout: Small player
 --- gmusicbrowser.orig/gmusicbrowser.pl
 +++ gmusicbrowser/gmusicbrowser.pl
-@@ -457,9 +457,9 @@ our @cMenuAA=
+@@ -480,9 +480,9 @@ our @cMenuAA=
  (	{ label => _"Lock",	code => sub { ToggleLock($_[0]{lockfield}); }, check => sub { $::TogLock && $::TogLock eq $_[0]{lockfield}}, mode => 'P',
  	  test	=> sub { $_[0]{field} eq $_[0]{lockfield} || $_[0]{gid} == Songs::Get_gid($::SongID,$_[0]{lockfield}); },
  	},
@@ -211,7 +211,7 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  	{ label => _"Filter",		code => sub { Select(filter => Songs::MakeFilterFromGID($_[0]{field},$_[0]{gid})); },	stockicon => 'gmb-filter', mode => 'P' },
  	{ label => \&SongsSubMenuTitle,		submenu => \&SongsSubMenu, },
  	{ label => sub {$_[0]{mode} eq 'P' ? _"Display Songs" : _"Filter"},	code => \&FilterOnAA,
-@@ -3131,7 +3131,7 @@ sub ChooseSongsTitle		#Songs with the sa
+@@ -3160,7 +3160,7 @@ sub ChooseSongsTitle		#Songs with the sa
  }
  
  sub ChooseSongsFromA	#FIXME limit the number of songs if HUGE number of songs (>100-200 ?)
@@ -220,65 +220,16 @@ Author: Simon Steinbeiß <simon.steinbeiss at elfenbeinturm.at>
  	return unless defined $album;
  	my $list= AA::GetIDs(album=>$album);
  	Songs::SortList($list,'disc track file');
-@@ -3146,7 +3146,7 @@ sub ChooseSongsFromA	#FIXME limit the nu
+@@ -3182,7 +3182,7 @@ sub ChooseSongsFromA	#FIXME limit the nu
  	}
- 	my $menu = ChooseSongs('%n %S', @$list);
+ 	my $menu = ChooseSongs($list, markup=>'%n %S<small>%V</small>');
  	$menu->show_all;
 -	if (1)
 +	if ($showcover)
  	{	my $h=$menu->size_request->height;
- 		my $picsize=$menu->size_request->width/$menu->{nbcols};
- 		$picsize=200 if $picsize<200;
-@@ -3174,48 +3174,6 @@ sub ChooseSongsFromA	#FIXME limit the nu
- 		#		$item->signal_connect(size_allocate => sub  {my ($self,$alloc)=@_;warn $alloc->width;return if $self->{busy};$self->{busy}=1;my $w=$self->get_toplevel;$w->set_size_request($w->size_request->width-$alloc->width+$picsize+20,-1);$alloc->width($picsize+20);$self->size_allocate($alloc);});
- 		}
- 	}
--	elsif ( my $pixbuf= AAPicture::pixbuf(album=>$album,undef,1) ) #TEST not used
--	{
--	 my $request=$menu->size_request;
--	 my $rwidth=$request->width;
--	 my $rheight=$request->height;
--	 my $w=200;
--	 #$w=500-$rwidth if $rwidth <300;
--	 $w=300-$rwidth if $rwidth <100;
--	 my $h=200;
--	 $h=$rheight if $rheight >$h;
--	 my $r= $pixbuf->get_width / $pixbuf->get_height;
--	 #warn "max $w $h   r=$r\n";
--	 if ($w>$h*$r)	{$w=int($h*$r);}
--	 else		{$h=int($w/$r);}
--	 my $h2=$rheight; $h2=$h if $h>$h2;
--	 #warn "=> $w $h\n";
--	 $pixbuf=$pixbuf->scale_simple($w,$h,'bilinear');
--#	 $menu->set_size_request(1000+$rwidth+$w,$h2);
--
--#	$menu->signal_connect(size_request => sub {my ($self,$req)=@_;warn $req->width;return if $self->{busy};$self->{busy}=1;my $rw=$self->get_toplevel->size_request->width;$self->get_toplevel->set_size_request($rw+$w,-1);$self->{busy}=undef;});
--
--	 $menu->signal_connect(size_allocate => sub
--		{	# warn join(' ', $_[1]->values);
--			my ($self,$alloc)=@_;
--			return if $self->{picture_added};
--			$self->{picture_added}=1;
--
--			my $window=$self->parent;
--			$window->remove($self);
--			my $hbox=Gtk2::HBox->new(0,0);
--			my $frame=Gtk2::Frame->new;
--			my $image=Gtk2::Image->new_from_pixbuf($pixbuf);
--			$frame->add($image);
--			$frame->set_shadow_type('out');
--			$hbox->pack_start($self,0,0,0);
--			$hbox->pack_start($frame,1,1,0);
--			$window->add($hbox);
--			$hbox->show_all;
--			#$window->set_size_request($rwidth+$w,$h2);
--			$self->set_size_request($rwidth,-1);
--		});
--	}
- 	if (defined wantarray)	{return $menu}
- 	my $event=Gtk2->get_current_event;
- 	$menu->popup(undef,undef,\&menupos,undef,$event->button,$event->time);
-@@ -3229,7 +3187,7 @@ sub ChooseSongs
+ 		my $w=$menu->size_request->width;
+ 		my $maxwidth= $menu->get_screen->get_width;
+@@ -3282,7 +3282,7 @@ sub ChooseSongs
  	my $activate_callback=sub
  	 {	return if $_[0]->get_submenu;
  		if ($_[0]{middle}) { Enqueue($_[1]); }

-- 
gmusicbrowser packaging



More information about the pkg-multimedia-commits mailing list