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
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-06-23 02:36:35 +0000
+++ CMakeLists.txt 2012-06-23 05:29:20 +0000
@@ -32,6 +32,7 @@
32include(ValaPrecompile)32include(ValaPrecompile)
33vala_precompile(VALA_C33vala_precompile(VALA_C
34 src/Main.vala34 src/Main.vala
35 src/GridContent.vala
35 src/Local/CompositedWindow.vala36 src/Local/CompositedWindow.vala
36 src/Local/DecoratedWindow.vala37 src/Local/DecoratedWindow.vala
37 src/Local/LightWindow.vala38 src/Local/LightWindow.vala
3839
=== added file 'src/GridContent.vala'
--- src/GridContent.vala 1970-01-01 00:00:00 +0000
+++ src/GridContent.vala 2012-06-23 05:29:20 +0000
@@ -0,0 +1,49 @@
1/*
2 * Content.vala
3 *
4 * Copyright 2012 Davysson <davysson@Arch>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 *
21 *
22 */
23
24namespace Daily{
25
26 public class GridContent : Gtk.Grid{
27
28 public GridContent (){
29
30 this.border_width = 30;
31 //this.column_homogeneous = true;
32 //this.column_spacing = 12;
33 //this.row_homogeneous = true;
34 //this.row_spacing = 8;
35
36 }
37
38 public void add_content (Gtk.Image? img, string description){
39
40 var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
41 box.pack_start (img);
42 box.pack_end (new Gtk.Label (description));
43 this.attach (box, 0, 1, 1, 1);
44 }
45
46
47 }
48
49}
050
=== modified file 'src/Main.vala'
--- src/Main.vala 2012-06-23 02:36:35 +0000
+++ src/Main.vala 2012-06-23 05:29:20 +0000
@@ -95,6 +95,23 @@
95 //window.icon_name = "";95 //window.icon_name = "";
96 window.set_default_size(800, 600);96 window.set_default_size(800, 600);
97 window.destroy.connect (() => (Gtk.main_quit()));97 window.destroy.connect (() => (Gtk.main_quit()));
98
99 var mode_button = new Granite.Widgets.ModeButton ();
100 mode_button.append_icon ("view-list-icons-symbolic", Gtk.IconSize.MENU);
101 mode_button.append_icon ("view-list-details-symbolic", Gtk.IconSize.MENU);
102
103 var content = new GridContent ();
104 content.add_content (new Gtk.Image.from_stock (Gtk.Stock.ADD, Gtk.IconSize.DIALOG), "Add");
105
106 var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
107 hbox.border_width = 10;
108 hbox.pack_end (mode_button, false, false);
109
110 var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
111 box.pack_start (content);
112 box.pack_end (hbox, false, false);
113 window.add (box);
114
98 }115 }
99 } 116 }
100}117}

Subscribers

People subscribed via source and target branches

to all changes: