diff --git a/src/window/overview-page/overview-view.c b/src/window/overview-page/overview-view.c index 454a7cd..30ca661 100644 --- a/src/window/overview-page/overview-view.c +++ b/src/window/overview-page/overview-view.c @@ -39,6 +39,10 @@ struct _PicplannerOverview GtkWidget *switch_moon; GtkWidget *switch_milky_way; + GtkWidget *switch_to_sun_stack; + GtkWidget *switch_to_moon_stack; + GtkWidget *switch_to_milky_way_stack; + GtkWidget *label_sun_rise; GtkWidget *label_sun_set; GtkWidget *label_moon_rise; @@ -82,6 +86,20 @@ struct _PicplannerOverview G_DEFINE_TYPE (PicplannerOverview, picplanner_overview, GTK_TYPE_BOX) + +/* + * Catch all signals from the buttons and emit a signal which can be used by + * picplanner-window to change the stack page. + */ +void +change_stack_page (GtkButton *self, + gpointer user_data) +{ + + +} + + static gboolean input_rebounce_reset_signal (gpointer user_data) { @@ -745,6 +763,15 @@ picplanner_overview_init (PicplannerOverview *overview) G_CALLBACK (shumate_map_metric_imperial_scale), overview); + /* + * Register the button presses to switch the few + */ + + g_signal_connect (G_OBJECT (overview->switch_to_sun_stack), + "clicked", + G_CALLBACK (change_stack_page), + overview); + /* * Initialisation of values needed to detect when a user input ends @@ -769,6 +796,9 @@ picplanner_overview_class_init (PicplannerOverviewClass *class) gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, switch_sun); gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, switch_moon); gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, switch_milky_way); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, switch_to_sun_stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, switch_to_moon_stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, switch_to_milky_way_stack); gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, label_sun_rise); gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, label_sun_set); gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, label_moon_rise); diff --git a/src/window/overview-page/overview-view.ui b/src/window/overview-page/overview-view.ui index 5b1ef34..7ddf559 100644 --- a/src/window/overview-page/overview-view.ui +++ b/src/window/overview-page/overview-view.ui @@ -40,199 +40,28 @@ vertical - - - Sun - sun_switch_button - - - true - fill - true - fill - - - - horizontal - true - fill - true - fill - 12 - 12 - 12 - 12 - - - - vertical - - - start - Information1 - 5 - - - - - start - Information1 - - - - - - - - - true - end - go-next-symbolic - - - - - - - - - - - Moon - moon_switch_button - - - true - fill - true - fill - - - - horizontal - true - fill - true - fill - 12 - 12 - 12 - 12 - - - - vertical - - - start - Information1 - 5 - - - - - start - Information1 - - - - - - - - - true - end - go-next-symbolic - - - - - - - - - - - - - - Milky Way - milky_way_switch_button - - - true - fill - true - fill - - - - horizontal - true - fill - true - fill - 12 - 12 - 12 - 12 - - - - vertical - - - start - Information1 - 5 - - - - - start - Information1 - - - - - - - - - true - end - go-next-symbolic - - - - - - - - - - - - - - false + true + false - false - center + false + true + fill 12 10 - 5 - 5 + 8 + 8 + 8 + 8 true + Show sun 0 1 @@ -242,6 +71,7 @@ true + Show moon 0 2 @@ -251,6 +81,7 @@ true + Show milky way 0 3 @@ -258,9 +89,10 @@ - + Sun - start + fill + true 1 1 @@ -268,35 +100,33 @@ - + Moon - start + fill + true 1 2 - - - - + Milky Way - start + fill + true 1 3 - - - daytime-sunrise-symbolic 24 + true + Rise 2 0 @@ -307,6 +137,8 @@ daytime-sunset-symbolic 24 + true + Set 3 0 @@ -372,6 +204,8 @@ elevation-symbolic GTK_ICON_SIZE_LARGE + true + Elevation 4 0 @@ -382,6 +216,8 @@ azimuth-symbolic GTK_ICON_SIZE_LARGE + true + Azimuth 5 0 diff --git a/src/window/picplanner-window.ui b/src/window/picplanner-window.ui index a26347a..e244028 100644 --- a/src/window/picplanner-window.ui +++ b/src/window/picplanner-window.ui @@ -44,12 +44,6 @@ - - - view-sidebar-start-symbolic - - - edit-find-symbolic @@ -187,63 +181,36 @@ - - True - True - True - True - - - True - vertical - - - - True - stack - 200 - - + + 360 + + + Overview + emoji-recent-symbolic + overview_box - - - - - - - 360 - - - Overview - emoji-recent-symbolic - overview_box - - - - - Sun - weather-clear-symbolic - sun_box - - - - - Moon - weather-clear-night-symbolic - moon_box - - - - - Milky Way - milky-way-symbolic - milky_way_box - - + + + + Sun + weather-clear-symbolic + sun_box - + + + + Moon + weather-clear-night-symbolic + moon_box + + + + + Milky Way + milky-way-symbolic + milky_way_box + +