diff --git a/data/resources/eu.polonkai.gergely.SsbGtk.gresource.xml b/data/resources/eu.polonkai.gergely.SsbGtk.gresource.xml index cf828b4..9028635 100644 --- a/data/resources/eu.polonkai.gergely.SsbGtk.gresource.xml +++ b/data/resources/eu.polonkai.gergely.SsbGtk.gresource.xml @@ -2,5 +2,6 @@ ui/ssb-window.ui + ui/ssb-profile.ui diff --git a/data/resources/ui/ssb-profile.ui b/data/resources/ui/ssb-profile.ui new file mode 100644 index 0000000..831aed7 --- /dev/null +++ b/data/resources/ui/ssb-profile.ui @@ -0,0 +1,194 @@ + + + + + + diff --git a/data/resources/ui/ssb-window.ui b/data/resources/ui/ssb-window.ui index c3323b0..2319281 100644 --- a/data/resources/ui/ssb-window.ui +++ b/data/resources/ui/ssb-window.ui @@ -8,32 +8,237 @@ True False - Secure Scuttlebutt True + + + True + False + + + True + False + stack1 + + + False + True + 0 + + + + + True + True + True + + + True + False + edit-find-symbolic + + + + + False + True + 1 + + + + - + True False - + True False + + + True + True + True + + + True + False + + + True + False + list-add-symbolic + + + False + True + 0 + + + + + True + False + Join Pub + + + True + True + 1 + + + + + + + 0 + 0 + + + + + True + False + Active Channels + + + 0 + 1 + + + + + True + False + + + 0 + 2 + + + + + True + False + Connected Pubs + + + 0 + 3 + + + + + True + False + + + 0 + 4 + + + + + True + False + Who to Follow + + + 0 + 5 + + + + + True + False + + + 0 + 6 + + + + + True + True + False + GTK_INPUT_HINT_SPELLCHECK | GTK_INPUT_HINT_EMOJI | GTK_INPUT_HINT_NONE + + + 1 + 0 + + + + + True + False + + + 1 + 1 + 6 + + - 0 - 0 + Public - + + True + False + + + True + False + none + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + Private + 1 + + + + True False - 1 - 0 + Profile + 2 + + + + + True + False + + + Mentions + 3 diff --git a/ssb-gtk/meson.build b/ssb-gtk/meson.build index 3d9f83b..5cd57be 100644 --- a/ssb-gtk/meson.build +++ b/ssb-gtk/meson.build @@ -2,6 +2,7 @@ sources = [ 'main.c', 'ssb-app.c', 'ssb-window.c', + 'ssb-profile.c', 'sbot.c', ] diff --git a/ssb-gtk/ssb-profile.c b/ssb-gtk/ssb-profile.c new file mode 100644 index 0000000..b1f0bb5 --- /dev/null +++ b/ssb-gtk/ssb-profile.c @@ -0,0 +1,29 @@ +#include "ssb-profile.h" + +struct _SsbProfile { + GtkGrid parent_instance; +}; + +G_DEFINE_TYPE(SsbProfile, ssb_profile, GTK_TYPE_GRID); + +SsbProfile * +ssb_profile_new(void) +{ + SsbProfile *profile = g_object_new(SSB_TYPE_PROFILE, NULL); + + return profile; +} + +static void +ssb_profile_init(SsbProfile *profile) +{ + gtk_widget_init_template(GTK_WIDGET(profile)); +} + +static void +ssb_profile_class_init(SsbProfileClass *klass) +{ + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); + + gtk_widget_class_set_template_from_resource(widget_class, "/eu/polonkai/gergely/SsbGtk/ui/ssb-profile.ui"); +} diff --git a/ssb-gtk/ssb-profile.h b/ssb-gtk/ssb-profile.h new file mode 100644 index 0000000..d0d5951 --- /dev/null +++ b/ssb-gtk/ssb-profile.h @@ -0,0 +1,16 @@ +#ifndef __SSB_PROFILE_H__ +# define __SSB_PROFILE_H__ + +# include +# include + +# define SSB_TYPE_PROFILE ssb_profile_get_type() +G_DECLARE_FINAL_TYPE(SsbProfile, ssb_profile, SSB, PROFILE, GtkGrid) + +G_BEGIN_DECLS + +SsbProfile *ssb_profile_new(); + +G_END_DECLS + +#endif /* __SSB_PROFILE_H__ */ diff --git a/ssb-gtk/ssb-window.c b/ssb-gtk/ssb-window.c index 96c4488..c06ea7f 100644 --- a/ssb-gtk/ssb-window.c +++ b/ssb-gtk/ssb-window.c @@ -1,4 +1,5 @@ -#include "ssb-window.h"\ +#include "ssb-window.h" +#include "ssb-profile.h" struct _SsbWindow { GtkApplicationWindow parent_instance; @@ -20,6 +21,8 @@ ssb_window_new(SsbApp *app) static void ssb_window_init(SsbWindow *window) { + g_type_ensure(SSB_TYPE_PROFILE); + gtk_widget_init_template(GTK_WIDGET(window)); }