app: gained --date option

GcalWindow loads the date from GcalApplication.
This commit is contained in:
Erick Pérez Castellanos
2014-12-09 15:36:01 -05:00
parent 738bb89d94
commit 83345b2fb4
3 changed files with 52 additions and 25 deletions
+4 -14
View File
@@ -1286,26 +1286,16 @@ gcal_window_state_event (GtkWidget *widget,
/* Public API */
GtkWidget*
gcal_window_new_with_view (GcalApplication *app,
GcalWindowViewType view_type)
gcal_window_new_with_view_and_date (GcalApplication *app,
GcalWindowViewType view_type,
icaltimetype *date)
{
GcalWindow *win;
GcalManager *manager;
icaltimetype date;
manager = gcal_application_get_manager (GCAL_APPLICATION (app));
/* FIXME: here read the initial date from somewehere */
date = icaltime_current_time_with_zone (gcal_manager_get_system_timezone (manager));
date = icaltime_set_timezone (&date,
gcal_manager_get_system_timezone (manager));
win = g_object_new (GCAL_TYPE_WINDOW,
"application",
GTK_APPLICATION (app),
"active-date",
&date,
"manager",
manager,
win = g_object_new (GCAL_TYPE_WINDOW, "application", GTK_APPLICATION (app), "active-date", date, "manager", manager,
NULL);
/* loading size */