aboutsummaryrefslogtreecommitdiff
path: root/audio/gmusicbrowser/shimmer-layouts
blob: a90023f9840e14fe2a1ba0cfea4d229aa7e84546 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
From acc72078ea6db95174726ebc6f720abf96baca7c Mon Sep 17 00:00:00 2001
From: Sean Davis <smd.seandavis@gmail.com>
Date: Wed, 28 Aug 2013 19:14:00 -0400
Subject: [PATCH] shimmer-layouts update

---
 gmbrc.default           |   10 ++++++++
 gmusicbrowser.pl        |    6 ++--
 gmusicbrowser_layout.pm |   15 +++++++++++-
 gmusicbrowser_list.pm   |   34 ++++++++++++++++++++++-----
 layouts/songtree.layout |   59 +++++++++++++++++++++++++++++++++++++++++++++---
 plugins/fetch_cover.pm  |    4 ++-
 6 files changed, 114 insertions(+), 14 deletions(-)

Index: gmusicbrowser/gmbrc.default
===================================================================
--- gmusicbrowser.orig/gmbrc.default
+++ gmusicbrowser/gmbrc.default
@@ -10,8 +10,17 @@
 PLUGIN_LYRICS: 1
 PLUGIN_FETCHCOVER: 1
 PLUGIN_AUTOSAVE: 1
+PLUGIN_ARTISTINFO: 1
 PLUGIN_MPRIS2: 1
 
+UseTray: 0
+
+Layout: Shimmer Desktop
+IconTheme: elementary
+LayoutT: Shimmer Traytip
+LayoutF: Shimmer Party
+
+
 # default player layout
 #Layout: Small player
 # default browser layout
Index: gmusicbrowser/gmusicbrowser.pl
===================================================================
--- gmusicbrowser.orig/gmusicbrowser.pl
+++ gmusicbrowser/gmusicbrowser.pl
@@ -626,9 +626,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}); },
 	},
-	{ label => _"Lookup in AMG",	code => sub { AMGLookup( $_[0]{mainfield}, $_[0]{aaname} ); },
-	  test => sub { $_[0]{mainfield} =~m/^album$|^artist$|^title$/; },
-	},
+	#{ label => _"Lookup in AMG",	code => sub { AMGLookup( $_[0]{mainfield}, $_[0]{aaname} ); },
+	#  test => sub { $_[0]{mainfield} =~m/^album$|^artist$|^title$/; },
+	#},
 	{ 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,
Index: gmusicbrowser/gmusicbrowser_layout.pm
===================================================================
--- gmusicbrowser.orig/gmusicbrowser_layout.pm
+++ gmusicbrowser/gmusicbrowser_layout.pm
@@ -7,6 +7,7 @@
 
 use strict;
 use warnings;
+use utf8;
 
 package Layout;
 
@@ -260,6 +261,7 @@ our %Widgets=
 	{	class	=> 'Layout::Label',
 		group	=> 'Play',
 		minsize	=> 20,
+		options => 'showcover',
 		markup	=> '<b><big>%S</big></b>%V',
 		markup_empty => '<b><big>&lt;'._("Playlist Empty").'&gt;</big></b>',
 		click1	=> \&PopupSongsFromAlbum,
@@ -283,6 +285,10 @@ our %Widgets=
 		dragsrc => [::DRAG_ARTIST,\&DragCurrentArtist],
 		cursor	=> 'hand2',
 	},
+	ArtistBreadcrumb =>
+	{	parent	=> 'Artist',
+		click1	=> sub { my $ID=::GetSelID($_[0]); ::PopupAA( 'album', format=> ::__x( _"<big><b>{album}</b></big>\n{year}  /  {songs}", album => "%a", year => "%y", songs => "%s"), from=> Songs::Get_gid($ID,'artists')) if defined $ID; },
+	},
 	Album =>
 	{	class	=> 'Layout::Label',
 		group	=> 'Play',
@@ -293,6 +299,10 @@ our %Widgets=
 		dragsrc => [::DRAG_ALBUM,\&DragCurrentAlbum],
 		cursor	=> 'hand2',
 	},
+	AlbumBreadcrumb =>
+	{	parent	=> 'Album',
+		click1	=> \&PopupSongsFromAlbum,
+	},
 	Year =>
 	{	class	=> 'Layout::Label',
 		group	=> 'Play',
@@ -387,6 +397,7 @@ our %Widgets=
 		group	=> 'Play',
 		aa	=> 'album',
 		oldopt1 => 'maxsize',
+		options	=> 'showcover',
 		schange	=> sub { my $key=(defined $_[1])? Songs::Get_gid($_[1],'album') : undef ; $_[0]->set($key); },
 		click1	=> \&PopupSongsFromAlbum,
 		click3	=> sub { my $ID=::GetSelID($_[0]); ::PopupAAContextMenu({self =>$_[0], field=>'album', ID=>$ID, gid=>Songs::Get_gid($ID,'album'), mode => 'P'}) if defined $ID; },
@@ -403,6 +414,7 @@ our %Widgets=
 		oldopt1 => 'maxsize',
 		schange	=> sub { my $key=(defined $_[1])? Songs::Get_gid($_[1],'artists') : undef ;$_[0]->set($key); },
 		click1	=> sub { ::PopupAA('artist'); },
+		click3	=> sub { my $ID=::GetSelID($_[0]); ::PopupAAContextMenu({self =>$_[0], field=>'artist', ID=>$ID, gid=>Songs::Get_gid($ID,'artist'), mode => 'P'}) if defined $ID; },
 		event	=> 'Picture_artist',
 		update	=> \&Layout::AAPicture::Changed,
 		noinit	=> 1,
@@ -1670,7 +1682,7 @@ use base 'Gtk2::Window';
 sub new
 {	my ($class,$layout,%options)=@_;
 	my @original_args=@_;
-	my $fallback=delete $options{fallback} || 'Lists, Library & Context';
+	my $fallback=delete $options{fallback} || 'Shimmer Desktop';
 	my $opt0={};
 	if (my $opt= $layout=~m/^[^(]+\(.*=/)
 	{	($layout,$opt0)= $layout=~m/^([^(]+)\((.*)\)$/; #separate layout id and options
Index: gmusicbrowser/gmusicbrowser_list.pm
===================================================================
--- gmusicbrowser.orig/gmusicbrowser_list.pm
+++ gmusicbrowser/gmusicbrowser_list.pm
@@ -196,8 +196,8 @@ sub Update
 	if (!$array)	{ $tip=$text=_"error"; }
 	else		{ $text.= ::CalcListLength($array,$self->{format}); }
 	my $format= $self->{size} ? '<span size="'.$self->{size}.'">%s</span>' : '%s';
-	$self->child->set_markup_with_format($format,$text);
-	$self->set_tooltip_text($tip);
+	if ($self->{mode} eq "filter") { $self->child->set_markup_with_format($format,$text); $self->set_tooltip_text($tip); }
+	else	{	$self->child->set_markup_with_format($format,$tip); $self->set_tooltip_text($text); }
 	$self->{needupdate}=0;
 }
 
@@ -225,7 +225,7 @@ sub filter_Update
 {	my $self=shift;
 	my $filter=::GetFilter($self);
 	my $array=$filter->filter;
-	return _("Filter : "), $array, $filter->explain;
+	return _("Filter : "), $array, ("Filter: ".$filter->explain);
 }
 
 ### list functions
@@ -244,7 +244,7 @@ sub list_SongArray_changed
 sub list_Update
 {	my $self=shift;
 	my $array=::GetSongArray($self) || return;
-	return _("Listed : "), $array,  ::__n('%d song','%d songs',scalar@$array);
+	return _("Listed : "), $array,  ::__n('%d song listed','%d songs listed',scalar@$array);
 }
 
 ### selected functions
@@ -1593,6 +1593,7 @@ our %Pages=
 our @MenuMarkupOptions=
 (	"%a",
 	"<b>%a</b>%Y\n<small>%s <small>%l</small></small>",
+	"<b>%a</b>%Y\n<small>%x / %s / <small>%l</small></small>",
 	"<b>%a</b>%Y\n<small>%b</small>",
 	"<b>%a</b>%Y\n<small>%b</small>\n<small>%s <small>%l</small></small>",
 	"<b>%y %a</b>",
@@ -1609,6 +1610,7 @@ my @mpicsize_menu=
 	_("medium size")	=> 64,
 	_("big size")		=> 96,
 	_("huge size")		=> 128,
+	_("giant size")		=> 256,
 );
 my @cloudstats_menu=
 (	_("number of songs")	=> 'count',
@@ -3360,7 +3362,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");
-		$buttonbox->pack_start($BAlblist, ::FALSE, ::FALSE, 0);
+		$buttonbox->pack_start($_, ::FALSE, ::FALSE, 0) for $BAlblist;
 	}
 
 	my $drgsrc=$aa eq 'album' ? ::DRAG_ALBUM : ::DRAG_ARTIST;
@@ -4701,6 +4703,16 @@ sub button_press_cb
 		else	{ $self->{pressed}=1; }
 		return 0;
 	}
+	if ($but==2)
+	{	my ($i,$j,$key)=$self->coord_to_index($event->get_coords);
+		if (defined $key && !exists $self->{selected}{$key})
+		{	$self->key_selected($event,$i,$j);
+		}
+		my $menu = ::ChooseSongsFromA($key);
+		my $event = Gtk2->get_current_event;
+		$menu->show_all;
+		$menu->popup(undef,undef,undef,undef,$event->button,$event->time);
+	}
 	if ($but==3)
 	{	my ($i,$j,$key)=$self->coord_to_index($event->get_coords);
 		if (defined $key && !exists $self->{selected}{$key})
@@ -5624,7 +5636,7 @@ sub new
 	my $default= $::Options{"DefaultOptions_$name"} || {};
 
 	%$opt=( @DefaultOptions, %$default, %$opt );
-	$self->{$_}=$opt->{$_} for qw/headclick songxpad songypad no_typeahead grouping/;
+	$self->{$_}=$opt->{$_} for qw/headclick songxpad songypad no_typeahead grouping showbb/;
 
 	#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;
@@ -5687,6 +5699,16 @@ sub new
 	$self->AddColumn($_) for split / +/,$opt->{cols};
 	unless ($self->{cells}) { $self->AddColumn('title'); } #to ensure there is at least 1 column
 
+	if ($self->{showbb}) { # show queue actions in QueueList if option showbb is set
+		my $qactions = Layout::NewWidget("QueueActions");
+		my $clearb = ::NewIconButton('gtk-clear',"",\&::ClearQueue,"none","Clear Queue");
+		my $shuffleb = ::NewIconButton('gmb-shuffle',"",\&::ShuffleQueue,"none","Shuffle Queue");
+		my $bbox = Gtk2::HBox->new(0,0);
+		$bbox->pack_start($qactions,0,0,0);
+		$bbox->pack_end($clearb,0,0,0);
+		$bbox->pack_end($shuffleb,0,0,0);
+		$vbox->pack_end($bbox,0,0,0);
+	}
 	$self->{selected}='';
 	$self->{lastclick}=$self->{startgrow}=-1;
 	$self->set_head_columns;
Index: gmusicbrowser/layouts/songtree.layout
===================================================================
--- gmusicbrowser.orig/layouts/songtree.layout
+++ gmusicbrowser/layouts/songtree.layout
@@ -1,6 +1,37 @@
 #SongTree Group & Columns definitions
 #####################################
 
+{Group Compact}
+title=Compact
+head=pic:h
+tail=25
+vcollapse=head
+vmin=pic:y+pic:h+25
+title:	text(markup='<b><big>'.pesc($album).'</big></b>'. if($year,'\n'.pesc($year)) . '\n'.pesc($artist),pad=2,x=pic:w)
+pic:	aapic(y=title:y,picsize=picsize,ypad=2,xpad=1,aa='album')
+picsize : OptionNumber(default=50,min=20,max=1000,step=10)
+
+{Group discleft}
+title=disc on the left side
+head=3
+left=width
+vcollapse=head+title:h+line:h+2
+title:	text(markup='<b><big>'.pesc($title).'</big></b>'.if(!$_expanded,'<big><b>»</b></big>'),pad=2,w=left))
+width:	OptionNumber(default=15,min=10,max=100,step=1)
+line: line(x1=1,y1=1,x2=$_w,y2=1,color='#ccc',width=1)
+
+{Group artistalbum_breadcrumbs}
+title=album and artist breadcrumbs
+head=title:h
+tail=25
+vcollapse=head
+vmin=pic:y+pic:h+25
+left=pic:w+2
+title:	text(markup='<b><big>'.pesc($album).'</big></b>'. if($year,'  <big><b>«</b></big>  '.pesc($year)) . '  <big><b>«</b></big>  '.pesc($artist),pad=2)
+pic:	+aapic(y=title:h+title:y,picsize=picsize,ypad=2,xpad=1,aa='album')
+picsize : OptionNumber(default=100,min=20,max=1000,step=10)
+picstars : picture(file=ratingpic($rating_avrg),x=(picsize/2)-(picstars:w/2),y=pic:y+pic:h,hide=$rating_avrg==50 || picsize < 80)
+
 {Group pic}
 title= _"with picture"
 head=title:h
@@ -33,6 +64,14 @@ pic:	aapic(y=title:y + title:h +2, picsi
 width:	OptionNumber(default=200,min=20,max=1000,step=10)
 picsize : OptionNumber(default=100,min=20,max=1000,step=10)
 
+{Column RhythmboxQueue}
+menutitle = _"Rhythmbox 2nd queue column"
+title = _"Queue"
+hreq=text:h
+width=200
+sort= title:i
+text : text(markup=pesc($title).'\n<small>by <i>'.pesc($artist).'</i>\non <i>'.pesc($album).'</i></small>',pad=2)
+
 {Column testtitleandprogress}
 title= _"Title & progress"
 sort=album:i title:i
@@ -42,6 +81,20 @@ hreq=text:h
 progress: pbar( fill=$progress, hide=!$playing,y=1,h=-2)
 text: text(markup=playmarkup(pesc($title)))
 
+{Column queuenumber}
+menutitle = Queue-Item Number
+title = #
+width = 20
+text: text(markup=$queued, x=-text:w)
+
+{Column playandqueueandtrack}
+menutitle = Playing/Queue Icon or Track
+title = #
+width = 20
+sort = track
+ico:	icon(pad=2,icon=$playicon, hide= !$playing && !$queued)
+text:	text(markup=pesc($track.' '.$queued), hide= $playing || $queued)
+
 {Column playandqueue}
 menutitle = _"Playing and queue icons"
 width = 20
@@ -82,9 +135,9 @@ title = _"Rating"
 menutitle = _"Rating (picture)"
 sort = rating
 width=100
-#hreq = pic:h
-#pic : picture(file=ratingpic($rating),init_file=ratingpic(0))
-pic : picture(file=ratingpic($rating),h=$_h,w=$_w,resize='ratio',init_file=ratingpic(0))
+hreq = pic:h
+pic : picture(file=ratingpic($rating),init_file=ratingpic(0),x=pic:w)
+#pic : picture(file=ratingpic($rating),h=$_h,w=$_w,resize='ratio',init_file=ratingpic(0))
 
 {Column right_aligned_folder}
 menutitle = _"Folder (right-aligned)"
Index: gmusicbrowser/plugins/fetch_cover.pm
===================================================================
--- gmusicbrowser.orig/plugins/fetch_cover.pm
+++ gmusicbrowser/plugins/fetch_cover.pm
@@ -48,15 +48,17 @@ my %Sites=
 );
 
 my %menuitem=
-(	label => _"Search for a picture on internet",					#label of the menu item
+(	label => _"Search Picture",					#label of the menu item
 	code => sub { Fetch($_[0]{mainfield},$_[0]{gid},$_[0]{ID}); },			#when menu item selected
 	test => sub {$_[0]{mainfield} eq 'album' || $_[0]{mainfield} eq 'artist'},	#the menu item is displayed if returns true
+	stockicon => 'gtk-find',
 );
 my %fpane_menuitem=
 (	label=> _"Search for a picture on internet",
 	code => sub { Fetch($_[0]{field},$_[0]{gidlist}[0]); },
 	onlyone=> 'gidlist',	#menu item is hidden if more than one album/artist is selected
 	istrue => 'aa',		#menu item is hidden for non artist/album (aa) FPanes
+	stockicon => 'gtk-find',
 );
 
 ::SetDefaultOptions(OPT, USEFILE => 1, COVERFILE => 'cover', PictureSite_artist => 'googlei', PictureSite_album => 'googlei');