[gnome-builder] libide: wip on styling



commit 720cfcf097231538f749d1eaec3c9107946970bc
Author: Christian Hergert <chergert redhat com>
Date:   Wed Nov 11 01:58:03 2015 -0800

    libide: wip on styling

 data/theme/Adwaita-shared.css          |   22 +++++++++++-----------
 data/theme/shared.css                  |    6 +++---
 data/ui/ide-layout.ui                  |    8 ++++----
 libide/editor/ide-editor-perspective.c |    7 +++++++
 libide/ide-layout-pane.c               |    2 ++
 libide/ide-layout.c                    |    2 ++
 libide/ide-workbench.c                 |   15 +++++++++++++++
 libide/ide.h                           |    2 ++
 plugins/Makefile.am                    |    1 +
 9 files changed, 47 insertions(+), 18 deletions(-)
---
diff --git a/data/theme/Adwaita-shared.css b/data/theme/Adwaita-shared.css
index bdf62fd..9d112d1 100644
--- a/data/theme/Adwaita-shared.css
+++ b/data/theme/Adwaita-shared.css
@@ -40,8 +40,8 @@ GbViewStack.focused > GtkBox.vertical > GtkBox.header.notebook,
 GbViewStack.backdrop.focused > GtkBox.vetical > GtkBox.header.notebook {
     background-color: shade (@theme_bg_color, 0.90);
 }
-GbWorkspacePane.focused > GtkBox.vertical > GtkBox.horizontal.notebook.header,
-GbWorkspacePane.focused > GtkBox.vertical > GtkBox.horizontal.notebook.header.backdrop {
+layoutpane.focused > GtkBox.vertical > GtkBox.horizontal.notebook.header,
+layoutpane.focused > GtkBox.vertical > GtkBox.horizontal.notebook.header.backdrop {
     background-color: shade (@theme_bg_color, 0.90);
 }
 GbViewStack > GtkBox.vertical > GtkBox.header.notebook.horizontal > GtkEventBox > GtkBox.horizontal > button,
@@ -65,7 +65,7 @@ GbViewStack > GtkBox.vertical > GtkBox.header.notebook.horizontal > GtkEventBox
   opacity: 0.55;
   padding: 6px 4px;
 }
-GbWorkspacePane > GtkBox.vertical > GtkBox.notebook.header > GtkStackSwitcher > button {
+layoutpane > GtkBox.vertical > GtkBox.notebook.header > stackswitcher > button {
   background-image: none;
   border-bottom: 1px solid transparent;
   border-radius: 0px;
@@ -75,13 +75,13 @@ GbWorkspacePane > GtkBox.vertical > GtkBox.notebook.header > GtkStackSwitcher >
   opacity: 0.55;
   padding: 3px 0px 3px;
 }
-GbWorkspacePane > GtkBox.vertical > GtkBox.horizontal.notebook.header > GtkStackSwitcher button:checked,
+layoutpane > GtkBox.vertical > GtkBox.horizontal.notebook.header > stackswitcher button:checked,
 GbViewStack > GtkBox.vertical > GtkBox.header.notebook.horizontal > GtkEventBox > GtkBox.horizontal > GtkBox 
GtkBox > button:checked,
 GbViewStack > GtkBox.vertical > GtkBox.header.notebook.horizontal > GtkEventBox > GtkBox.horizontal > 
button:checked {
   box-shadow: 0px 2px 0px @theme_fg_color;
   color: @theme_fg_color;
 }
-GbWorkspacePane > GtkBox.vertical > GtkBox.notebook.header.horizontal > GtkStackSwitcher > button:hover,
+layoutpane > GtkBox.vertical > GtkBox.notebook.header.horizontal > stackswitcher > button:hover,
 GbViewStack > GtkBox.vertical > GtkBox.header.notebook.horizontal > GtkEventBox > GtkBox.horizontal > 
GtkBox.navigation > button:hover,
 GbViewStack > GtkBox.vertical > GtkBox.header.notebook.horizontal > GtkEventBox > GtkBox.horizontal > 
button:hover,
 GbViewStack > GtkBox.vertical > GtkBox.header.notebook.horizontal > GtkEventBox > GtkBox.horizontal > GtkBox 
GtkBox > button:hover {
@@ -109,16 +109,16 @@ GbNewProjectDialog button.linked-on-right button {
 
 
 /*
- * Workspace pane header styling.
+ * layout pane header styling.
  */
-GbWorkspacePane GtkBox.header.notebook {
+layoutpane GtkBox.header.notebook {
   border-bottom: 1px solid @borders;
 }
-GbWorkspacePane:not(.focused) GtkBox.header.notebook
+layoutpane:not(.focused) GtkBox.header.notebook
 {
   background-color: shade (@theme_bg_color, 0.95);
 }
-GbWorkspacePane GtkStackSwitcher button {
+layoutpane stackswitcher button {
   border: none;
   box-shadow: none;
   background: none;
@@ -127,10 +127,10 @@ GbWorkspacePane GtkStackSwitcher button {
   border-top: 1px solid transparent;
   border-bottom: 1px solid transparent;
 }
-GbWorkspacePane GtkStackSwitcher button:checked {
+layoutpane stackswitcher button:checked {
   opacity: 1.0;
 }
-GbWorkspacePane GbViewStack GtkBox.header.notebook GtkSeparator.vertical {
+layoutpane GbViewStack GtkBox.header.notebook GtkSeparator.vertical {
   opacity: 0.75;
 }
 
diff --git a/data/theme/shared.css b/data/theme/shared.css
index e36eecd..1792bd6 100644
--- a/data/theme/shared.css
+++ b/data/theme/shared.css
@@ -127,11 +127,11 @@ greeter > GtkBox.vertical > scrolledwindow > viewport.frame {
 }
 
 
-GbWorkspacePane {
-  -GbWorkspacePane-handle-size: 1;
+layoutpane {
+  -IdeLayoutPane-handle-size: 1;
   -gtk-icon-source: none;
 }
-GbWorkspacePane .pane-separator {
+layoutpane .pane-separator {
   background-color: @borders;
 }
 
diff --git a/data/ui/ide-layout.ui b/data/ui/ide-layout.ui
index 09f2813..ca31c0f 100644
--- a/data/ui/ide-layout.ui
+++ b/data/ui/ide-layout.ui
@@ -3,25 +3,25 @@
   <!-- interface-requires gtk+ 3.8 -->
   <template class="IdeLayout" parent="GtkOverlay">
     <child type="overlay">
-      <object class="GbWorkspacePane" id="left_pane">
+      <object class="IdeLayoutPane" id="left_pane">
         <property name="position">left</property>
         <property name="visible">true</property>
       </object>
     </child>
     <child type="overlay">
-      <object class="GbWorkspacePane" id="right_pane">
+      <object class="IdeLayoutPane" id="right_pane">
         <property name="position">right</property>
         <property name="visible">true</property>
       </object>
     </child>
     <child type="overlay">
-      <object class="GbWorkspacePane" id="bottom_pane">
+      <object class="IdeLayoutPane" id="bottom_pane">
         <property name="position">bottom</property>
         <property name="visible">true</property>
       </object>
     </child>
     <child type="overlay">
-      <object class="GbWorkspacePane" id="content_pane">
+      <object class="IdeLayoutPane" id="content_pane">
         <property name="position">top</property>
         <property name="visible">true</property>
       </object>
diff --git a/libide/editor/ide-editor-perspective.c b/libide/editor/ide-editor-perspective.c
index 387b592..7334c4c 100644
--- a/libide/editor/ide-editor-perspective.c
+++ b/libide/editor/ide-editor-perspective.c
@@ -112,9 +112,16 @@ ide_editor_perspective_get_icon_name (IdePerspective *perspective)
   return g_strdup ("text-editor-symbolic");
 }
 
+static gchar *
+ide_editor_perspective_get_id (IdePerspective *perspective)
+{
+  return g_strdup ("editor");
+}
+
 static void
 ide_perspective_iface_init (IdePerspectiveInterface *iface)
 {
+  iface->get_id = ide_editor_perspective_get_id;
   iface->get_title = ide_editor_perspective_get_title;
   iface->get_titlebar = ide_editor_perspective_get_titlebar;
   iface->get_icon_name = ide_editor_perspective_get_icon_name;
diff --git a/libide/ide-layout-pane.c b/libide/ide-layout-pane.c
index 2ab0fcd..abb794c 100644
--- a/libide/ide-layout-pane.c
+++ b/libide/ide-layout-pane.c
@@ -276,6 +276,8 @@ ide_layout_pane_class_init (IdeLayoutPaneClass *klass)
   widget_class->hierarchy_changed = ide_layout_pane_hierarchy_changed;
   widget_class->size_allocate = ide_layout_pane_size_allocate;
 
+  gtk_widget_class_set_css_name (widget_class, "layoutpane");
+
   /**
    * IdeLayoutPane:position:
    *
diff --git a/libide/ide-layout.c b/libide/ide-layout.c
index 40e3230..f5c1092 100644
--- a/libide/ide-layout.c
+++ b/libide/ide-layout.c
@@ -1067,6 +1067,8 @@ ide_layout_class_init (IdeLayoutClass *klass)
   widget_class->size_allocate = ide_layout_size_allocate;
   widget_class->grab_focus = ide_layout_grab_focus;
 
+  gtk_widget_class_set_css_name (widget_class, "layout");
+
   container_class->get_child_property = ide_layout_get_child_property;
   container_class->set_child_property = ide_layout_set_child_property;
 
diff --git a/libide/ide-workbench.c b/libide/ide-workbench.c
index beb058e..907b0e3 100644
--- a/libide/ide-workbench.c
+++ b/libide/ide-workbench.c
@@ -534,3 +534,18 @@ ide_workbench_set_visible_perspective_name (IdeWorkbench *self,
   if (perspective != NULL)
     ide_workbench_set_visible_perspective (self, perspective);
 }
+
+void
+ide_workbench_open_async (IdeWorkbench         *self,
+                          GFile               **files,
+                          gint                  n_files,
+                          GCancellable         *cancellable,
+                          GAsyncReadyCallback   callback,
+                          gpointer              user_data)
+{
+  g_return_if_fail (IDE_IS_WORKBENCH (self));
+  g_return_if_fail (n_files > 0);
+  g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+  /* TODO */
+}
diff --git a/libide/ide.h b/libide/ide.h
index 8d86215..2a991c4 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -98,9 +98,11 @@ G_BEGIN_DECLS
 #include "ide-types.h"
 #include "ide-unsaved-file.h"
 #include "ide-unsaved-files.h"
+#include "ide-view.h"
 #include "ide-vcs.h"
 #include "ide-vcs-uri.h"
 #include "ide-workbench.h"
+#include "ide-workbench-addin.h"
 
 #include "directory/ide-directory-vcs.h"
 #include "doap/ide-doap-person.h"
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 1caa43c..cd47b23 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -12,6 +12,7 @@ SUBDIRS = \
        html-completion \
        html-preview \
        jedi \
+       project-tree \
        python-gi-imports-completion \
        mingw \
        python-pack \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]