Commit 8ae6a235 authored by Zander Brown's avatar Zander Brown Committed by Guido Gunther
Browse files

overview: Add app-grid

parent 7c046af7
......@@ -14,6 +14,7 @@
#include "overview.h"
#include "activity.h"
#include "app-grid.h"
#include "app-grid-button.h"
#include "shell.h"
#include "util.h"
......@@ -299,6 +300,9 @@ phosh_overview_class_init (PhoshOverviewClass *klass)
widget_class->size_allocate = phosh_overview_size_allocate;
gtk_widget_class_set_css_name (widget_class, "phosh-overview");
/* ensure used custom types */
PHOSH_TYPE_APP_GRID;
gtk_widget_class_set_template_from_resource (widget_class,
"/sm/puri/phosh/ui/overview.ui");
......@@ -307,6 +311,8 @@ phosh_overview_class_init (PhoshOverviewClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, PhoshOverview, evbox_running_activities);
gtk_widget_class_bind_template_child_private (widget_class, PhoshOverview, box_running_activities);
gtk_widget_class_bind_template_callback (widget_class, evbox_button_press_event_cb);
signals[ACTIVITY_LAUNCHED] = g_signal_new ("activity-launched",
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL,
NULL, G_TYPE_NONE, 0);
......@@ -319,6 +325,8 @@ phosh_overview_class_init (PhoshOverviewClass *klass)
signals[ACTIVITY_CLOSED] = g_signal_new ("activity-closed",
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL,
NULL, G_TYPE_NONE, 0);
gtk_widget_class_set_css_name (widget_class, "phosh-favorites");
}
......
......@@ -97,6 +97,39 @@
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK</property>
<signal name="button-press-event" handler="evbox_button_press_event_cb" object="PhoshFavorites" swapped="yes"/>
<child>
<object class="PhoshAppGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment