kopia lustrzana https://gitlab.com/Zwarf/picplanner
create overview-view files
rodzic
781510fab8
commit
850e5d1c74
|
@ -1,7 +1,6 @@
|
|||
#include "calculations_transformations.h"
|
||||
|
||||
|
||||
|
||||
/* Convert degree to radiant */
|
||||
float
|
||||
calc_deg_to_rad (float deg)
|
||||
|
|
|
@ -24,8 +24,10 @@ struct _PicplannerApplication
|
|||
GtkApplication parent_instance;
|
||||
};
|
||||
|
||||
|
||||
G_DEFINE_TYPE (PicplannerApplication, picplanner_application, GTK_TYPE_APPLICATION)
|
||||
|
||||
|
||||
PicplannerApplication *
|
||||
picplanner_application_new (gchar *application_id,
|
||||
GApplicationFlags flags)
|
||||
|
@ -36,28 +38,26 @@ picplanner_application_new (gchar *application_id,
|
|||
NULL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
picplanner_application_finalize (GObject *object)
|
||||
{
|
||||
PicplannerApplication *self = (PicplannerApplication *)object;
|
||||
|
||||
G_OBJECT_CLASS (picplanner_application_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
picplanner_application_activate (GApplication *app)
|
||||
{
|
||||
GtkWindow *window;
|
||||
|
||||
/* It's good practice to check your parameters at the beginning of the
|
||||
* function. It helps catch errors early and in development instead of
|
||||
* by your users.
|
||||
*/
|
||||
g_assert (GTK_IS_APPLICATION (app));
|
||||
|
||||
/* Get the current window or create one if necessary. */
|
||||
window = gtk_application_get_active_window (GTK_APPLICATION (app));
|
||||
|
||||
if (window == NULL)
|
||||
window = g_object_new (PICPLANNER_TYPE_WINDOW,
|
||||
"application", app,
|
||||
|
@ -76,7 +76,6 @@ picplanner_application_class_init (PicplannerApplicationClass *klass)
|
|||
GApplicationClass *app_class = G_APPLICATION_CLASS (klass);
|
||||
|
||||
object_class->finalize = picplanner_application_finalize;
|
||||
|
||||
/*
|
||||
* We connect to the activate callback to create a window when the application
|
||||
* has been launched. Additionally, this callback notifies us when the user
|
||||
|
@ -86,6 +85,7 @@ picplanner_application_class_init (PicplannerApplicationClass *klass)
|
|||
app_class->activate = picplanner_application_activate;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
picplanner_application_show_about (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
|
|
|
@ -36,7 +36,7 @@ picplanner_window_class_init (PicplannerWindowClass *klass)
|
|||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/de/zwarf/picplanner/picplanner-window.ui");
|
||||
//gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, header_bar);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, header_bar);
|
||||
//gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, label);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define PICPLANNER_TYPE_WINDOW (picplanner_window_get_type())
|
||||
#define PICPLANNER_TYPE_WINDOW picplanner_window_get_type()
|
||||
|
||||
G_DECLARE_FINAL_TYPE (PicplannerWindow, picplanner_window, PICPLANNER, WINDOW, GtkApplicationWindow)
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<object class="GtkStackPage" id="overview-page">
|
||||
<property name="name">page1</property>
|
||||
<property name="title">Overview</property>
|
||||
<property name="child">
|
||||
|
@ -57,7 +57,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<object class="GtkStackPage" id="sun-page">
|
||||
<property name="name">page2</property>
|
||||
<property name="title">Sun</property>
|
||||
<property name="child">
|
||||
|
@ -68,7 +68,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<object class="GtkStackPage" id="moon-page">
|
||||
<property name="name">page3</property>
|
||||
<property name="title">Moon</property>
|
||||
<property name="child">
|
||||
|
@ -79,7 +79,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<object class="GtkStackPage" id="milky-way-page">
|
||||
<property name="name">page4</property>
|
||||
<property name="title">Milky Way</property>
|
||||
<property name="child">
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="OverviewBox" parent="GtkBox">
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Test from seperate file</property>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
Ładowanie…
Reference in New Issue