Merge lp:~davysson/daily/modebutton_gridcontent into lp:daily

Proposed by DavyS
Status: Merged
Approved by: Kenneth Malac
Approved revision: 6
Merged at revision: 6
Proposed branch: lp:~davysson/daily/modebutton_gridcontent
Merge into: lp:daily
Diff against target: 93 lines (+67/-0)
3 files modified
CMakeLists.txt (+1/-0)
src/GridContent.vala (+49/-0)
src/Main.vala (+17/-0)
To merge this branch: bzr merge lp:~davysson/daily/modebutton_gridcontent
Reviewer Review Type Date Requested Status
Kenneth Malac Approve
Review via email: mp+111707@code.launchpad.net

Description of the change

starting the implementation...

To post a comment you must log in.
Revision history for this message
Kenneth Malac (kennethm777-deactivatedaccount) wrote :

herder forgot to add file :)

review: Needs Fixing
6. By DavyS

some features

Revision history for this message
Kenneth Malac (kennethm777-deactivatedaccount) wrote :

yayay

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2012-06-23 02:36:35 +0000
3+++ CMakeLists.txt 2012-06-23 05:29:20 +0000
4@@ -32,6 +32,7 @@
5 include(ValaPrecompile)
6 vala_precompile(VALA_C
7 src/Main.vala
8+ src/GridContent.vala
9 src/Local/CompositedWindow.vala
10 src/Local/DecoratedWindow.vala
11 src/Local/LightWindow.vala
12
13=== added file 'src/GridContent.vala'
14--- src/GridContent.vala 1970-01-01 00:00:00 +0000
15+++ src/GridContent.vala 2012-06-23 05:29:20 +0000
16@@ -0,0 +1,49 @@
17+/*
18+ * Content.vala
19+ *
20+ * Copyright 2012 Davysson <davysson@Arch>
21+ *
22+ * This program is free software; you can redistribute it and/or modify
23+ * it under the terms of the GNU General Public License as published by
24+ * the Free Software Foundation; either version 2 of the License, or
25+ * (at your option) any later version.
26+ *
27+ * This program is distributed in the hope that it will be useful,
28+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
29+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30+ * GNU General Public License for more details.
31+ *
32+ * You should have received a copy of the GNU General Public License
33+ * along with this program; if not, write to the Free Software
34+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
35+ * MA 02110-1301, USA.
36+ *
37+ *
38+ */
39+
40+namespace Daily{
41+
42+ public class GridContent : Gtk.Grid{
43+
44+ public GridContent (){
45+
46+ this.border_width = 30;
47+ //this.column_homogeneous = true;
48+ //this.column_spacing = 12;
49+ //this.row_homogeneous = true;
50+ //this.row_spacing = 8;
51+
52+ }
53+
54+ public void add_content (Gtk.Image? img, string description){
55+
56+ var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
57+ box.pack_start (img);
58+ box.pack_end (new Gtk.Label (description));
59+ this.attach (box, 0, 1, 1, 1);
60+ }
61+
62+
63+ }
64+
65+}
66
67=== modified file 'src/Main.vala'
68--- src/Main.vala 2012-06-23 02:36:35 +0000
69+++ src/Main.vala 2012-06-23 05:29:20 +0000
70@@ -95,6 +95,23 @@
71 //window.icon_name = "";
72 window.set_default_size(800, 600);
73 window.destroy.connect (() => (Gtk.main_quit()));
74+
75+ var mode_button = new Granite.Widgets.ModeButton ();
76+ mode_button.append_icon ("view-list-icons-symbolic", Gtk.IconSize.MENU);
77+ mode_button.append_icon ("view-list-details-symbolic", Gtk.IconSize.MENU);
78+
79+ var content = new GridContent ();
80+ content.add_content (new Gtk.Image.from_stock (Gtk.Stock.ADD, Gtk.IconSize.DIALOG), "Add");
81+
82+ var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
83+ hbox.border_width = 10;
84+ hbox.pack_end (mode_button, false, false);
85+
86+ var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
87+ box.pack_start (content);
88+ box.pack_end (hbox, false, false);
89+ window.add (box);
90+
91 }
92 }
93 }

Subscribers

People subscribed via source and target branches

to all changes: