Merge lp:~vikoadi/pantheon-photos/slideshow-toolbutton into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Viko Adi Rahmawan
Status: Merged
Approved by: Cody Garver
Approved revision: 2573
Merged at revision: 2577
Proposed branch: lp:~vikoadi/pantheon-photos/slideshow-toolbutton
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 67 lines (+21/-4)
3 files modified
src/CollectionPage.vala (+6/-2)
src/PhotoPage.vala (+14/-1)
src/direct/DirectPhotoPage.vala (+1/-1)
To merge this branch: bzr merge lp:~vikoadi/pantheon-photos/slideshow-toolbutton
Reviewer Review Type Date Requested Status
Cody Garver (community) Needs Fixing
Robert Roth (community) code style Needs Fixing
Review via email: mp+230144@code.launchpad.net

Commit message

Move Slideshow menuitem into Toolbar in PhotoPage and CollectionPage

Description of the change

Move Slideshow menuitem into Toolbar in PhotoPage and CollectionPage

To post a comment you must log in.
Revision history for this message
Robert Roth (evfool) wrote :

Code looks fine, not tested though. I'm pretty sure there will be merge conflicts though, as the codebase has been reformatted according to the elementary code style guidelines, so I suggest merging from trunk again.

review: Needs Fixing (code style)
2570. By Viko Adi Rahmawan

merge trunk, fix codestyle

Revision history for this message
Viko Adi Rahmawan (vikoadi) wrote :

Done

2571. By Viko Adi Rahmawan

use large icon

Revision history for this message
Cody Garver (codygarver) wrote :

The play icon should be the first (far left) icon in the toolbar

review: Needs Fixing
2572. By Viko Adi Rahmawan

move slideshow button to be first in the toolbar

2573. By Viko Adi Rahmawan

merge trunk

Revision history for this message
Viko Adi Rahmawan (vikoadi) wrote :

Moved to far left.
I guess i should never ever improvise :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CollectionPage.vala'
2--- src/CollectionPage.vala 2014-08-10 22:31:33 +0000
3+++ src/CollectionPage.vala 2014-08-14 11:43:06 +0000
4@@ -60,6 +60,12 @@
5 MediaPage.ZoomSliderAssembly zoom_slider_assembly = create_zoom_slider_assembly ();
6 connect_slider (zoom_slider_assembly);
7 get_toolbar ().insert (zoom_slider_assembly, -1);
8+
9+ Gtk.Image start_image = new Gtk.Image.from_icon_name ("media-playback-start", Gtk.IconSize.LARGE_TOOLBAR);
10+ Gtk.ToolButton slideshow_button = new Gtk.ToolButton (start_image, _("S_lideshow"));
11+ slideshow_button.set_tooltip_text (_("Play a slideshow"));
12+ slideshow_button.clicked.connect (on_slideshow);
13+ get_toolbar ().insert (slideshow_button, 0);
14 }
15
16 return toolbar;
17@@ -88,8 +94,6 @@
18 InjectionGroup group = new InjectionGroup ("/MediaViewMenu/ViewExtrasFullscreenSlideshowPlaceholder");
19
20 group.add_menu_item ("Fullscreen", "CommonFullscreen");
21- group.add_separator ();
22- group.add_menu_item ("Slideshow");
23
24 return group;
25 }
26
27=== modified file 'src/PhotoPage.vala'
28--- src/PhotoPage.vala 2014-08-10 22:06:21 +0000
29+++ src/PhotoPage.vala 2014-08-14 11:43:06 +0000
30@@ -2346,6 +2346,19 @@
31 LibraryPhoto.global.items_altered.disconnect (on_metadata_altered);
32 }
33
34+ public override Gtk.Toolbar get_toolbar () {
35+ if (toolbar == null) {
36+ base.get_toolbar ();
37+
38+ Gtk.Image start_image = new Gtk.Image.from_icon_name ("media-playback-start", Gtk.IconSize.LARGE_TOOLBAR);
39+ Gtk.ToolButton slideshow_button = new Gtk.ToolButton (start_image, _("S_lideshow"));
40+ slideshow_button.set_tooltip_text (_("Play a slideshow"));
41+ slideshow_button.clicked.connect (on_slideshow);
42+ get_toolbar ().insert (slideshow_button, 0);
43+ }
44+ return toolbar;
45+ }
46+
47 public bool not_trashed_view_filter (DataView view) {
48 return ! ((MediaSource) view.get_source ()).is_trashed ();
49 }
50@@ -3432,4 +3445,4 @@
51 get_command_manager ().execute (new ModifyTagsCommand (photo, new_tags));
52 }
53
54-}
55+}
56\ No newline at end of file
57
58=== modified file 'src/direct/DirectPhotoPage.vala'
59--- src/direct/DirectPhotoPage.vala 2014-08-08 21:13:09 +0000
60+++ src/direct/DirectPhotoPage.vala 2014-08-14 11:43:06 +0000
61@@ -599,4 +599,4 @@
62 // direct.ui.
63 ui_filenames.add ("direct_context.ui");
64 }
65-}
66+}
67\ No newline at end of file

Subscribers

People subscribed via source and target branches