Merge lp:~vikoadi/pantheon-plugs/expand-color-panel into lp:~elementary-apps/pantheon-plugs/dynamic-gcc-plug-freya

Proposed by Viko Adi Rahmawan
Status: Merged
Merged at revision: 63
Proposed branch: lp:~vikoadi/pantheon-plugs/expand-color-panel
Merge into: lp:~elementary-apps/pantheon-plugs/dynamic-gcc-plug-freya
Diff against target: 37 lines (+17/-0)
1 file modified
plugs/Color/ColorPlug.vala (+17/-0)
To merge this branch: bzr merge lp:~vikoadi/pantheon-plugs/expand-color-panel
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+235688@code.launchpad.net

Description of the change

expand color panel treeview

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugs/Color/ColorPlug.vala'
--- plugs/Color/ColorPlug.vala 2014-04-14 17:14:38 +0000
+++ plugs/Color/ColorPlug.vala 2014-09-23 18:08:44 +0000
@@ -24,6 +24,7 @@
2424
25 private Cc.Panel panel;25 private Cc.Panel panel;
26 private Gtk.Grid main_grid;26 private Gtk.Grid main_grid;
27 private Gtk.TreeView tree;
2728
28 public Plug () {29 public Plug () {
29 Object (category: Category.HARDWARE,30 Object (category: Category.HARDWARE,
@@ -54,10 +55,26 @@
54 } else {55 } else {
55 panel = Object.new(GLib.Type.from_name ("CcColorPanel")) as Cc.Panel;56 panel = Object.new(GLib.Type.from_name ("CcColorPanel")) as Cc.Panel;
56 }57 }
58 //It's hacky but needed to have it looking good…
59 //needed so that the treeview expand
60 search_treeview ((Cc.Panel) panel);
61 if (tree != null)
62 tree.expand = true;
63
57 main_grid.attach (panel, 0, 1, 1, 1);64 main_grid.attach (panel, 0, 1, 1, 1);
58 main_grid.show_all ();65 main_grid.show_all ();
59 }66 }
6067
68 //find treeview and put it to tree variable
69 private void search_treeview (Gtk.Container bin) {
70 foreach (Gtk.Widget child in bin.get_children ()) {
71 if (child is Gtk.TreeView)
72 tree = (Gtk.TreeView) child;
73 else if (child is Gtk.Container)
74 search_treeview ((Gtk.Container)child);
75 }
76 }
77
61 public override void hidden () {78 public override void hidden () {
62 }79 }
6380

Subscribers

People subscribed via source and target branches