Merge lp:~christriant/scratch/fix-1258291 into lp:~elementary-apps/scratch/scratch

Proposed by Chris Triantafillis
Status: Rejected
Rejected by: Cody Garver
Proposed branch: lp:~christriant/scratch/fix-1258291
Merge into: lp:~elementary-apps/scratch/scratch
Diff against target: 62 lines (+9/-7)
1 file modified
plugins/browser-preview/browser-preview.vala (+9/-7)
To merge this branch: bzr merge lp:~christriant/scratch/fix-1258291
Reviewer Review Type Date Requested Status
Mario Guerriero (community) Needs Fixing
Review via email: mp+210661@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mario Guerriero (mefrio-g) wrote :

it does not work. Browser preview is always shown.

review: Needs Fixing

Unmerged revisions

1255. By Chris Triantafillis

Fixed lp:1258291

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/browser-preview/browser-preview.vala'
2--- plugins/browser-preview/browser-preview.vala 2013-11-30 22:43:00 +0000
3+++ plugins/browser-preview/browser-preview.vala 2014-03-12 18:08:24 +0000
4@@ -29,6 +29,7 @@
5 WebView? view = null;
6 Gtk.ScrolledWindow? scrolled = null;
7 Scratch.Services.Document? doc = null;
8+ Gtk.Paned pane = null;
9
10 Scratch.Services.Interface plugins;
11 public Object object { owned get; construct; }
12@@ -40,11 +41,12 @@
13 plugins = (Scratch.Services.Interface) object;
14
15 plugins.hook_document.connect ((d) => {
16+ pane.show_all();
17 this.doc = d;
18 });
19-
20+
21 plugins.hook_split_view.connect (on_hook_split_view);
22-
23+
24 plugins.hook_notebook_context.connect (on_hook_context);
25
26 plugins.hook_toolbar.connect (on_hook_toolbar);
27@@ -58,7 +60,7 @@
28 scrolled.destroy ();
29
30 }
31-
32+
33 void on_hook_split_view (Scratch.Widgets.SplitView view) {
34 this.tool_button.visible = ! view.is_empty ();
35 this.tool_button.no_show_all = view.is_empty ();
36@@ -71,7 +73,7 @@
37 this.tool_button.no_show_all = false;
38 });
39 }
40-
41+
42 void on_hook_toolbar (Scratch.Widgets.Toolbar toolbar) {
43 if (tool_button != null)
44 return;
45@@ -110,8 +112,8 @@
46 scrolled.add (view);
47
48 notebook.append_page (scrolled, new Gtk.Label (_("Web preview")));
49-
50- scrolled.show_all ();
51+ pane = notebook.parent as Gtk.Paned;
52+ //scrolled.show_all ();
53 }
54
55 }
56@@ -121,4 +123,4 @@
57 var objmodule = module as Peas.ObjectModule;
58 objmodule.register_extension_type (typeof (Peas.Activatable),
59 typeof (Scratch.Plugins.BrowserPreview));
60-}
61+}
62\ No newline at end of file

Subscribers

People subscribed via source and target branches