[gnome-builder/wip/chergert/layout] editor: bring over more bits from previous tweak widget
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/layout] editor: bring over more bits from previous tweak widget
- Date: Thu, 6 Jul 2017 09:09:06 +0000 (UTC)
commit 7ff871dede49a45b79b24c30086973fb15af8ffd
Author: Christian Hergert <chergert redhat com>
Date: Thu Jul 6 02:08:56 2017 -0700
editor: bring over more bits from previous tweak widget
This brings over a bit of UI and restructures some things. Still needs
work and planning, but let's me playaround with stuff in the mean time.
libide/editor/ide-editor-perspective.c | 18 ++-
libide/editor/ide-editor-perspective.ui | 10 ++
libide/editor/ide-editor-properties.ui | 213 ++++++++++++++++++++++++++++++-
3 files changed, 234 insertions(+), 7 deletions(-)
---
diff --git a/libide/editor/ide-editor-perspective.c b/libide/editor/ide-editor-perspective.c
index 7ee7e67..49ebd00 100644
--- a/libide/editor/ide-editor-perspective.c
+++ b/libide/editor/ide-editor-perspective.c
@@ -25,6 +25,7 @@
#include "diagnostics/ide-source-location.h"
#include "editor/ide-editor-perspective.h"
#include "editor/ide-editor-private.h"
+#include "editor/ide-editor-properties.h"
#include "editor/ide-editor-sidebar.h"
#include "editor/ide-editor-view.h"
#include "workbench/ide-perspective.h"
@@ -33,15 +34,16 @@
struct _IdeEditorPerspective
{
- IdeLayout parent_instance;
+ IdeLayout parent_instance;
/* Template widgets */
- IdeLayoutGrid *grid;
- IdeEditorSidebar *sidebar;
+ IdeLayoutGrid *grid;
+ IdeEditorSidebar *sidebar;
+ IdeEditorProperties *properties;
/* State before entering focus mode */
- guint prefocus_had_left : 1;
- guint prefocus_had_bottom : 1;
+ guint prefocus_had_left : 1;
+ guint prefocus_had_bottom : 1;
};
typedef struct
@@ -81,10 +83,13 @@ ide_editor_perspective_class_init (IdeEditorPerspectiveClass *klass)
container_class->add = ide_editor_perspective_add;
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/builder/ui/ide-editor-perspective.ui");
+ gtk_widget_class_set_template_from_resource (widget_class,
+ "/org/gnome/builder/ui/ide-editor-perspective.ui");
gtk_widget_class_bind_template_child (widget_class, IdeEditorPerspective, grid);
+ gtk_widget_class_bind_template_child (widget_class, IdeEditorPerspective, properties);
gtk_widget_class_bind_template_child (widget_class, IdeEditorPerspective, sidebar);
+ g_type_ensure (IDE_TYPE_EDITOR_PROPERTIES);
g_type_ensure (IDE_TYPE_EDITOR_SIDEBAR);
g_type_ensure (IDE_TYPE_LAYOUT_GRID);
}
@@ -446,6 +451,7 @@ ide_editor_perspective_restore_panel_state (IdeEditorPerspective *self)
reveal = g_settings_get_boolean (settings, "right-visible");
position = g_settings_get_int (settings, "right-position");
dzl_dock_revealer_set_position (DZL_DOCK_REVEALER (pane), position);
+ set_reveal_child_without_transition (DZL_DOCK_REVEALER (pane), FALSE);
pane = dzl_dock_bin_get_bottom_edge (DZL_DOCK_BIN (self));
reveal = g_settings_get_boolean (settings, "bottom-visible");
diff --git a/libide/editor/ide-editor-perspective.ui b/libide/editor/ide-editor-perspective.ui
index 511c72e..616b2e0 100644
--- a/libide/editor/ide-editor-perspective.ui
+++ b/libide/editor/ide-editor-perspective.ui
@@ -14,6 +14,16 @@
<object class="IdeLayoutPane">
<!-- This is a transient panel -->
<property name="reveal-child">false</property>
+ <child>
+ <object class="DzlDockWidget">
+ <property name="visible">true</property>
+ <child>
+ <object class="IdeEditorProperties" id="properties">
+ <property name="visible">true</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
<child>
diff --git a/libide/editor/ide-editor-properties.ui b/libide/editor/ide-editor-properties.ui
index 126b510..af0d563 100644
--- a/libide/editor/ide-editor-properties.ui
+++ b/libide/editor/ide-editor-properties.ui
@@ -3,8 +3,219 @@
<template class="IdeEditorProperties" parent="GtkBin">
<child>
<object class="GtkBox">
- <property name="orientation">vertical</property>
<property name="visible">true</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">true</property>
+ <property name="margin">12</property>
+ <property name="spacing">6</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">Display</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">true</property>
+ <property name="text" translatable="yes">Show line numbers</property>
+ <property name="role">check</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.show-line-numbers</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">true</property>
+ <property name="text" translatable="yes">Show right margin</property>
+ <property name="role">check</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.show-right-margin</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">true</property>
+ <property name="text" translatable="yes">Highlight current line</property>
+ <property name="role">check</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.highlight-current-line</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">Behavior</property>
+ <property name="margin-top">12</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">true</property>
+ <property name="text" translatable="yes">Auto indent</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.auto-indent</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">true</property>
+ <property name="text" translatable="yes">Smart Backspace</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.smart-backspace</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">Indentation</property>
+ <property name="margin-top">12</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">true</property>
+ <property name="orientation">vertical</property>
+ <property name="halign">center</property>
+ <property name="spacing">12</property>
+ <style>
+ <class name="indentation"/>
+ </style>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">true</property>
+ <property name="orientation">horizontal</property>
+ <property name="halign">center</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkToggleButton">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">Spaces</property>
+ <property name="focus-on-click">false</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.use-spaces</property>
+ <property name="action-target">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="tabs_button">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">Tabs</property>
+ <property name="focus-on-click">false</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.use-spaces</property>
+ <property name="action-target">false</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">true</property>
+ <property name="orientation">horizontal</property>
+ <property name="halign">center</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkToggleButton">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">2</property>
+ <property name="focus-on-click">false</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.tab-width</property>
+ <property name="action-target">2</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">3</property>
+ <property name="focus-on-click">false</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.tab-width</property>
+ <property name="action-target">3</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">4</property>
+ <property name="focus-on-click">false</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.tab-width</property>
+ <property name="action-target">4</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">8</property>
+ <property name="focus-on-click">false</property>
+ <property name="halign">fill</property>
+ <property name="action-name">view.tab-width</property>
+ <property name="action-target">8</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">true</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">true</property>
+ <property name="expand">true</property>
+ <property name="shadow-type">none</property>
+ <property name="propagate-natural-height">true</property>
+ <child>
+ <object class="GtkListBox" id="list_box">
+ <property name="visible">true</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSearchEntry" id="entry">
+ <property name="visible">true</property>
+ <property name="placeholder-text" translatable="yes">Search highlight modeā¦</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]