[gtk/matthiasc/for-master] docs: Add GtkCalendar to the gallery
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] docs: Add GtkCalendar to the gallery
- Date: Mon, 26 Oct 2020 04:31:49 +0000 (UTC)
commit dffe6b87e447e053de65b5dbae1fc2eb4e1aeb97
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 25 22:32:27 2020 -0400
docs: Add GtkCalendar to the gallery
It has been missing far too long.
docs/reference/gtk/images/calendar.png | Bin 0 -> 16807 bytes
docs/reference/gtk/meson.build | 1 +
docs/reference/gtk/visual_index.xml | 1 +
docs/tools/widgets.c | 20 ++++++++++++++++++++
4 files changed, 22 insertions(+)
---
diff --git a/docs/reference/gtk/images/calendar.png b/docs/reference/gtk/images/calendar.png
new file mode 100644
index 0000000000..7c1f63ffcf
Binary files /dev/null and b/docs/reference/gtk/images/calendar.png differ
diff --git a/docs/reference/gtk/meson.build b/docs/reference/gtk/meson.build
index 9f6d915a05..b00bdb5285 100644
--- a/docs/reference/gtk/meson.build
+++ b/docs/reference/gtk/meson.build
@@ -244,6 +244,7 @@ images = [
'images/box-packing.png',
'images/builder-shortcuts.png',
'images/button.png',
+ 'images/calendar.png',
'images/capture-bubble.png',
'images/check-button.png',
'images/checks.png',
diff --git a/docs/reference/gtk/visual_index.xml b/docs/reference/gtk/visual_index.xml
index 2ad288451b..990c322838 100644
--- a/docs/reference/gtk/visual_index.xml
+++ b/docs/reference/gtk/visual_index.xml
@@ -18,6 +18,7 @@
<link linkend="GtkSeparator"><inlinegraphic fileref="separator.png" format="PNG"></inlinegraphic></link>
<link linkend="GtkTextView"><inlinegraphic fileref="multiline-text.png"
format="PNG"></inlinegraphic></link>
<link linkend="GtkScale"><inlinegraphic fileref="scales.png" format="PNG"></inlinegraphic></link>
+ <link linkend="GtkCalendar"><inlinegraphic fileref="calendar.png" format="PNG"></inlinegraphic></link>
<link linkend="GtkGLArea"><inlinegraphic fileref="glarea.png" format="PNG"></inlinegraphic></link>
<link linkend="GtkVideo"><inlinegraphic fileref="video.png" format="PNG"></inlinegraphic></link>
<link linkend="GtkMediaControls"><inlinegraphic fileref="media-controls.png"
format="PNG"></inlinegraphic></link>
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index f324f4fb42..04c6882140 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -1536,6 +1536,25 @@ create_window_controls (void)
return new_widget_info ("windowcontrols", vbox, SMALL);
}
+static WidgetInfo *
+create_calendar (void)
+{
+ GtkWidget *widget;
+ GtkWidget *vbox;
+
+ widget = gtk_calendar_new ();
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+ gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+ gtk_box_append (GTK_BOX (vbox), widget);
+ gtk_box_append (GTK_BOX (vbox), gtk_label_new ("Calendar"));
+
+ add_margin (vbox);
+
+ return new_widget_info ("calendar", vbox, MEDIUM);
+}
+
GList *
get_all_widgets (void)
{
@@ -1602,6 +1621,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_editable_label ());
retval = g_list_prepend (retval, create_drop_down ());
retval = g_list_prepend (retval, create_window_controls ());
+ retval = g_list_prepend (retval, create_calendar ());
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]