ui: integrated GcalDayView in GcalWindow
Initial work. Added option to GcalApplication action.
This commit is contained in:
@@ -296,9 +296,10 @@ gcal_application_set_app_menu (GApplication *app)
|
||||
g_action_map_add_action ( G_ACTION_MAP (app), G_ACTION (priv->view));
|
||||
|
||||
view_as = g_menu_new ();
|
||||
g_menu_append (view_as, _("Weeks"), "app.view::week");
|
||||
g_menu_append (view_as, _("Months"), "app.view::month");
|
||||
g_menu_append (view_as, _("Years"), "app.view::year");
|
||||
g_menu_append (view_as, _("Day"), "app.view::day");
|
||||
g_menu_append (view_as, _("Week"), "app.view::week");
|
||||
g_menu_append (view_as, _("Month"), "app.view::month");
|
||||
g_menu_append (view_as, _("Year"), "app.view::year");
|
||||
|
||||
g_menu_append_section (app_menu, _("View as"), G_MENU_MODEL (view_as));
|
||||
|
||||
|
||||
+6
-4
@@ -22,10 +22,11 @@
|
||||
#include "gcal-nav-bar.h"
|
||||
#include "gcal-manager.h"
|
||||
#include "gcal-floating-container.h"
|
||||
#include "gcal-year-view.h"
|
||||
#include "gcal-view.h"
|
||||
#include "gcal-day-view.h"
|
||||
#include "gcal-month-view.h"
|
||||
#include "gcal-week-view.h"
|
||||
#include "gcal-view.h"
|
||||
#include "gcal-year-view.h"
|
||||
#include "gcal-event-widget.h"
|
||||
#include "gcal-edit-dialog.h"
|
||||
#include "gcal-enum-types.h"
|
||||
@@ -318,8 +319,6 @@ gcal_window_constructed (GObject *object)
|
||||
|
||||
/* overlay */
|
||||
priv->views_overlay = gtk_overlay_new ();
|
||||
gtk_widget_set_hexpand (priv->views_overlay, TRUE);
|
||||
gtk_widget_set_vexpand (priv->views_overlay, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (priv->main_box), priv->views_overlay);
|
||||
|
||||
/* stack widget for holding views */
|
||||
@@ -593,6 +592,9 @@ gcal_window_set_active_view (GcalWindow *window,
|
||||
{
|
||||
switch (view_type)
|
||||
{
|
||||
case GCAL_WINDOW_VIEW_DAY:
|
||||
priv->views[GCAL_WINDOW_VIEW_DAY] = gcal_day_view_new ();
|
||||
break;
|
||||
case GCAL_WINDOW_VIEW_WEEK:
|
||||
priv->views[GCAL_WINDOW_VIEW_WEEK] = gcal_week_view_new ();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user