[gitg/vala] Reorganize UI logic in Gitg.Window
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/vala] Reorganize UI logic in Gitg.Window
- Date: Tue, 17 Jul 2012 07:58:02 +0000 (UTC)
commit 3356bba704ad0ee92932efcb730c564d5c4c46b0
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Tue Jul 17 09:56:23 2012 +0200
Reorganize UI logic in Gitg.Window
The view/panel logic is now generically implemented in a new class
Gitg.UIElements which manages multiple GitgExt.UIElement from
an extension set. This makes the overall logic much more simple and
clearer.
gitg/Makefile.am | 4 +-
gitg/gitg-autohide-frame.vala | 47 +++++
gitg/gitg-ui-elements.vala | 328 ++++++++++++++++++++++++++++++++
gitg/gitg-window.vala | 388 ++++++++------------------------------
gitg/resources/ui/gitg-window.ui | 22 ++-
5 files changed, 469 insertions(+), 320 deletions(-)
---
diff --git a/gitg/Makefile.am b/gitg/Makefile.am
index 7126604..c06f940 100644
--- a/gitg/Makefile.am
+++ b/gitg/Makefile.am
@@ -31,7 +31,9 @@ VALASOURCES = \
gitg-window.vala \
gitg-resource.vala \
gitg-application.vala \
- gitg-plugins-engine.vala
+ gitg-plugins-engine.vala \
+ gitg-ui-elements.vala \
+ gitg-autohide-frame.vala
BUILT_SOURCES = \
gitg-resources.c \
diff --git a/gitg/gitg-autohide-frame.vala b/gitg/gitg-autohide-frame.vala
new file mode 100644
index 0000000..943be0e
--- /dev/null
+++ b/gitg/gitg-autohide-frame.vala
@@ -0,0 +1,47 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2012 - Jesse van den Kieboom
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace Gitg
+{
+
+class AutohideFrame : Gtk.Frame
+{
+ public override void add(Gtk.Widget widget)
+ {
+ base.add(widget);
+
+ update_visibility();
+ }
+
+ public override void remove(Gtk.Widget widget)
+ {
+ base.remove(widget);
+
+ update_visibility();
+ }
+
+ private void update_visibility()
+ {
+ visible = get_child() != null;
+ }
+}
+
+}
+
+// vi:ts=4
diff --git a/gitg/gitg-ui-elements.vala b/gitg/gitg-ui-elements.vala
new file mode 100644
index 0000000..7236f62
--- /dev/null
+++ b/gitg/gitg-ui-elements.vala
@@ -0,0 +1,328 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2012 - Jesse van den Kieboom
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace Gitg
+{
+
+public class UIElements<T>
+{
+ private class ActiveUIElement
+ {
+ public GitgExt.UIElement element;
+ public Gtk.RadioToolButton? navigation_button;
+
+ public ActiveUIElement(GitgExt.UIElement e)
+ {
+ element = e;
+ }
+ }
+
+ private Peas.ExtensionSet d_extensions;
+ private HashTable<string, ActiveUIElement> d_available_elements;
+ private HashTable<string, GitgExt.UIElement> d_elements;
+ private Gtk.Toolbar? d_toolbar;
+ private ActiveUIElement? d_current;
+ private Gtk.Bin d_container;
+
+ public signal void activated(GitgExt.UIElement element);
+
+ private Gtk.RadioToolButton? create_toolbar_button(GitgExt.UIElement e)
+ {
+ if (d_toolbar == null)
+ {
+ return null;
+ }
+
+ Icon? icon = e.icon;
+
+ if (icon == null)
+ {
+ return null;
+ }
+
+ var img = new Gtk.Image.from_gicon(icon, d_toolbar.get_icon_size());
+ img.show();
+
+ Gtk.RadioToolButton button;
+
+ if (d_toolbar.get_n_items() != 0)
+ {
+ var ic = d_toolbar.get_nth_item(0);
+ button = new Gtk.RadioToolButton.from_widget(ic as Gtk.RadioToolButton);
+ }
+ else
+ {
+ button = new Gtk.RadioToolButton(null);
+ }
+
+ button.set_icon_widget(img);
+ button.set_label(e.display_name);
+
+ button.show();
+
+ return button;
+ }
+
+ public T? current
+ {
+ get
+ {
+ if (d_current != null)
+ {
+ return (T)d_current.element;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ set
+ {
+ if (value != null)
+ {
+ set_current_impl((GitgExt.UIElement)value);
+ }
+ }
+ }
+
+ public void update()
+ {
+ // Update active elements based on availability
+ d_extensions.foreach((extset, info, obj) => {
+ var elem = obj as GitgExt.UIElement;
+
+ var wasavail = d_available_elements.lookup(elem.id);
+ bool isavail = elem.is_available();
+
+ if (wasavail != null && !isavail)
+ {
+ remove_available(elem);
+ }
+ else if (wasavail == null && isavail)
+ {
+ // Note that this will also set elem to current if needed
+ add_available(elem);
+ }
+ else if (wasavail != null && wasavail.navigation_button != null)
+ {
+ if (!wasavail.element.is_enabled() && d_current == wasavail)
+ {
+ d_current = null;
+ }
+ else if (wasavail.element.is_enabled() && d_current == null)
+ {
+ set_current_impl(wasavail.element);
+ }
+
+ wasavail.navigation_button.set_sensitive(wasavail.element.is_enabled());
+ }
+ });
+ }
+
+ public T? lookup(string id)
+ {
+ return (T)d_elements.lookup(id);
+ }
+
+ private void set_current_impl(GitgExt.UIElement element)
+ {
+ if (!element.is_available() ||
+ !element.is_enabled() ||
+ (d_current != null && d_current.element == element))
+ {
+ return;
+ }
+
+ ActiveUIElement? el = d_available_elements.lookup(element.id);
+
+ if (el != null)
+ {
+ if (d_current != null)
+ {
+ if (d_current.navigation_button != null)
+ {
+ d_current.navigation_button.active = false;
+ }
+ }
+
+ d_current = el;
+
+ if (el.navigation_button != null)
+ {
+ el.navigation_button.active = true;
+ }
+
+ if (d_container != null)
+ {
+ var child = d_container.get_child();
+
+ if (child != null)
+ {
+ d_container.remove(child);
+ }
+
+ var widget = el.element.widget;
+
+ if (widget != null)
+ {
+ widget.show();
+ }
+
+ d_container.add(widget);
+ d_container.show();
+ }
+
+ activated(el.element);
+ }
+ }
+
+ private void remove_available(GitgExt.UIElement e)
+ {
+ ActiveUIElement ae;
+
+ if (d_available_elements.lookup_extended(e.id, null, out ae))
+ {
+ if (ae.navigation_button != null)
+ {
+ ae.navigation_button.destroy();
+ }
+
+ if (ae == d_current)
+ {
+ d_current = null;
+ }
+
+ d_available_elements.remove(e.id);
+ }
+ }
+
+ private void add_available(GitgExt.UIElement e)
+ {
+ Gtk.RadioToolButton? button = create_toolbar_button(e);
+ ActiveUIElement ae = new ActiveUIElement(e);
+
+ ae.navigation_button = button;
+
+ if (button != null)
+ {
+ button.set_sensitive(e.is_enabled());
+
+ d_toolbar.add(button);
+ }
+
+ button.toggled.connect((b) => {
+ if (b.active)
+ {
+ set_current_impl(ae.element);
+ }
+ });
+
+ d_available_elements.insert(e.id, ae);
+
+ if (d_current == null && e.is_enabled())
+ {
+ set_current_impl(ae.element);
+ }
+ }
+
+ private void add_ui_element(GitgExt.UIElement e)
+ {
+ d_elements.insert(e.id, e);
+
+ if (e.is_available())
+ {
+ add_available(e);
+ }
+ }
+
+ private void remove_ui_element(GitgExt.UIElement e)
+ {
+ remove_available(e);
+ d_elements.remove(e.id);
+ }
+
+ private void extension_added(Peas.ExtensionSet s,
+ Peas.PluginInfo info,
+ Object obj)
+ {
+ add_ui_element(obj as GitgExt.UIElement);
+ }
+
+ private void extension_removed(Peas.ExtensionSet s,
+ Peas.PluginInfo info,
+ Object obj)
+ {
+ remove_ui_element(obj as GitgExt.UIElement);
+ }
+
+ private void on_toolbar_add_remove(Gtk.Widget toolbar,
+ Gtk.Widget item)
+ {
+ update_visibility();
+ }
+
+ private void update_visibility()
+ {
+ d_toolbar.visible = (d_toolbar.get_n_items() > 1);
+ }
+
+ public delegate bool ForeachUIElementFunc(GitgExt.UIElement element);
+
+ public void foreach(ForeachUIElementFunc func)
+ {
+ var vals = d_available_elements.get_values();
+
+ foreach (var val in vals)
+ {
+ if (!func(val.element))
+ {
+ break;
+ }
+ }
+ }
+
+ public UIElements(Peas.ExtensionSet extensions,
+ Gtk.Bin? container = null,
+ Gtk.Toolbar? toolbar = null)
+ {
+ d_extensions = extensions;
+ d_toolbar = toolbar;
+ d_container = container;
+
+ d_available_elements = new HashTable<string, ActiveUIElement>(str_hash, str_equal);
+ d_elements = new HashTable<string, GitgExt.UIElement>(str_hash, str_equal);
+
+ if (d_toolbar != null)
+ {
+ d_toolbar.add.connect(on_toolbar_add_remove);
+ d_toolbar.remove.connect(on_toolbar_add_remove);
+
+ update_visibility();
+ }
+
+ // Add all the extensions
+ d_extensions.foreach(extension_added);
+ d_extensions.extension_added.connect(extension_added);
+ d_extensions.extension_removed.connect(extension_removed);
+ }
+}
+
+}
+
+// ex:ts=4 noet
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 03e88fd..fcced2a 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -22,39 +22,28 @@ namespace Gitg
public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.Buildable
{
- private class ActiveView
- {
- public GitgExt.View view;
- public Gtk.RadioToolButton? navigation_button;
-
- public ActiveView(GitgExt.View v)
- {
- view = v;
- }
- }
-
private Repository? d_repository;
private GitgExt.MessageBus d_message_bus;
- private Peas.ExtensionSet d_extensions_view;
- private Peas.ExtensionSet d_extensions_navigation;
- private GitgExt.View? d_current_view;
- private HashTable<string, GitgExt.View> d_view_map;
private GitgExt.ViewAction d_action;
- private HashTable<string, ActiveView> d_active_views;
+ private UIElements<GitgExt.View> d_views;
+ private UIElements<GitgExt.Panel> d_panels;
// Widgets
- private Gtk.Toolbar d_topnav;
- private Gtk.Toolbar d_subnav;
- private Gtk.Paned d_paned;
- private Gtk.Paned d_panels;
- private Gtk.Notebook d_notebook_panels;
+ private Gtk.Toolbar d_toolbar_views;
+ private Gtk.Toolbar d_toolbar_panels;
+
+ private Gtk.Paned d_paned_views;
+ private Gtk.Paned d_paned_panels;
+
+ private Gtk.Frame d_frame_view;
+ private Gtk.Frame d_frame_panel;
+
private GitgExt.NavigationTreeView d_navigation;
- private Gtk.Frame d_main_frame;
public GitgExt.View? current_view
{
- owned get { return d_current_view; }
+ owned get { return d_views.current; }
}
public GitgExt.MessageBus message_bus
@@ -67,236 +56,70 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
owned get { return d_repository; }
}
- private Gtk.RadioToolButton? create_topnav_button(GitgExt.View v)
+ private void parser_finished(Gtk.Builder builder)
{
- Icon? icon = v.icon;
+ // Extract widgets from the builder
+ d_toolbar_views = builder.get_object("toolbar_views") as Gtk.Toolbar;
+ d_paned_views = builder.get_object("paned_views") as Gtk.Paned;
- if (icon == null)
- {
- return null;
- }
+ d_toolbar_panels = builder.get_object("toolbar_panels") as Gtk.Toolbar;
+ d_paned_panels = builder.get_object("paned_panels") as Gtk.Paned;
- var img = new Gtk.Image.from_gicon(icon, d_topnav.get_icon_size());
- img.show();
+ d_frame_view = builder.get_object("frame_view") as Gtk.Frame;
+ d_frame_panel = builder.get_object("frame_panel") as Gtk.Frame;
- Gtk.RadioToolButton button;
-
- if (d_topnav.get_n_items() != 0)
- {
- var ic = d_topnav.get_nth_item(0);
- button = new Gtk.RadioToolButton.from_widget(ic as Gtk.RadioToolButton);
- }
- else
- {
- button = new Gtk.RadioToolButton(null);
- }
-
- button.set_icon_widget(img);
- button.set_label(v.display_name);
-
- button.show();
+ d_navigation = builder.get_object("tree_view_navigation") as GitgExt.NavigationTreeView;
- return button;
+ base.parser_finished(builder);
}
- private void add_view(GitgExt.View v)
+ private void on_view_activated(UIElements elements,
+ GitgExt.UIElement element)
{
- // Add a navigation button if needed
- Gtk.RadioToolButton? button = create_topnav_button(v);
- ActiveView av = new ActiveView(v);
-
- av.navigation_button = button;
-
- if (button != null)
- {
- d_topnav.add(button);
- }
-
- button.toggled.connect((b) => {
- if (b.active)
- {
- set_view(v);
- }
- });
-
- d_active_views.insert(v.id, av);
- }
-
- private void set_view(GitgExt.View v)
- {
- /* This function updates the view to @v. The following steps are
- * involved:
- *
- * 1) Clear navigation tree
- * 2) Remove all panels and panel navigation widgets
- * 3) Remove main view widget
- * 3) Hide panels and panel navigation
- * 4) Set the current view to @v
- * 5) Fill the navigation model with navigation from @v (if needed)
- * 6) Query nagivation extensions to fill the navigation model
- */
-
- if (d_current_view == v)
- {
- return;
- }
+ GitgExt.View? view = (GitgExt.View?)element;
+ // 1) Clear the navigation tree
d_navigation.model.clear();
- // Remove panel widgets
- while (d_notebook_panels.get_n_pages() > 0)
- {
- d_notebook_panels.remove_page(0);
- }
-
- // Remove panel navigation buttons
- while (d_subnav.get_n_items() > 0)
- {
- d_subnav.remove(d_subnav.get_nth_item(0));
- }
-
- var child = d_main_frame.get_child();
- if (child != null)
- {
- d_main_frame.remove(child);
- }
-
- // Hide panel note book and panel navigation toolbar
- d_notebook_panels.hide();
- d_subnav.hide();
-
- if (d_current_view != null)
- {
- var av = d_active_views.lookup(d_current_view.id);
-
- if (av != null)
- {
- av.navigation_button.set_active(false);
- }
- }
-
- // Set the current view
- d_current_view = v;
-
- // Populate navigation from the view first
- GitgExt.Navigation? nav = v.navigation;
-
- if (nav != null)
+ if (view != null)
{
- d_navigation.model.populate(nav);
- }
-
- // Populate navigation from the extensions
- d_extensions_navigation.foreach((s, info, obj) => {
- nav = obj as GitgExt.Navigation;
-
- if (nav.available)
- {
- d_navigation.model.populate(nav);
- }
- });
-
- // Expand all the navigation by default
- d_navigation.expand_all();
-
- // Select the first item of the navigation list
- d_navigation.select_first();
+ // 2) Populate the navigation tree for this view
+ d_navigation.model.populate(view.navigation);
+ d_navigation.expand_all();
- // Set the main widget
- var widget = v.widget;
-
- if (widget != null)
- {
- widget.show();
- d_main_frame.add(widget);
+ d_navigation.select_first();
}
- var av = d_active_views.lookup(v.id);
-
- if (av.navigation_button != null)
- {
-
- av.navigation_button.set_active(true);
- }
+ // Update panels
+ d_panels.update();
}
- private void remove_view(GitgExt.View v, bool update_current)
+ private void on_panel_activated(UIElements elements,
+ GitgExt.UIElement element)
{
- ActiveView av;
-
- if (d_active_views.lookup_extended(v.id, null, out av))
- {
- av.navigation_button.destroy();
+ }
- d_view_map.remove(v.id);
- d_active_views.remove(v.id);
+ private void activate_default_view()
+ {
+ d_views.foreach((element) => {
+ GitgExt.View view = (GitgExt.View)element;
- if (av.view == d_current_view)
+ if (view.is_default_for(d_action))
{
- d_current_view = null;
-
- if (update_current)
+ if (d_views.current == view)
{
- activate_default_view();
+ on_view_activated(d_views, view);
+ }
+ else
+ {
+ d_views.current = view;
}
- }
- }
- }
-
- private void extension_view_added(Peas.ExtensionSet s,
- Peas.PluginInfo info,
- Object obj)
- {
- GitgExt.View v = obj as GitgExt.View;
-
- d_view_map.insert(v.id, v);
-
- if (v.is_available())
- {
- add_view(v);
- }
- }
-
- private void extension_view_removed(Peas.ExtensionSet s,
- Peas.PluginInfo info,
- Object obj)
- {
- remove_view(obj as GitgExt.View, true);
- }
-
- private void update_nav_visibility(Gtk.Toolbar tb)
- {
- tb.visible = (tb.get_n_items() > 1);
- }
-
- private void parser_finished(Gtk.Builder builder)
- {
- d_topnav = builder.get_object("toolbar_topnav") as Gtk.Toolbar;
- d_subnav = builder.get_object("toolbar_subnav") as Gtk.Toolbar;
- d_paned = builder.get_object("paned_main") as Gtk.Paned;
- d_panels = builder.get_object("paned_panel") as Gtk.Paned;
- d_main_frame = builder.get_object("frame_main") as Gtk.Frame;
-
- d_navigation = builder.get_object("tree_view_navigation") as GitgExt.NavigationTreeView;
- d_notebook_panels = builder.get_object("notebook_panels") as Gtk.Notebook;
-
- d_topnav.add.connect((t, widget) => {
- update_nav_visibility(d_topnav);
- });
-
- d_topnav.remove.connect((t, widget) => {
- update_nav_visibility(d_topnav);
- });
- d_subnav.add.connect((t, widget) => {
- update_nav_visibility(d_subnav);
- });
+ return false;
+ }
- d_subnav.remove.connect((t, widget) => {
- update_nav_visibility(d_subnav);
+ return true;
});
-
- base.parser_finished(builder);
}
private bool init(Cancellable? cancellable)
@@ -307,27 +130,25 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
// Initialize peas extensions set for views
var engine = PluginsEngine.get_default();
- d_extensions_view = new Peas.ExtensionSet(engine,
- typeof(GitgExt.View),
- "application",
- this);
+ d_views = new UIElements<GitgExt.View>(new Peas.ExtensionSet(engine,
+ typeof(GitgExt.View),
+ "application",
+ this),
+ d_frame_view,
+ d_toolbar_views);
- d_extensions_navigation = new Peas.ExtensionSet(engine,
- typeof(GitgExt.Navigation),
- "application",
- this);
+ d_views.activated.connect(on_view_activated);
- d_view_map = new HashTable<string, GitgExt.View>(str_hash, str_equal);
- d_active_views = new HashTable<string, ActiveView>(str_hash, str_equal);
+ d_panels = new UIElements<GitgExt.Panel>(new Peas.ExtensionSet(engine,
+ typeof(GitgExt.Panel),
+ "application",
+ this),
+ d_frame_panel,
+ d_toolbar_panels);
- // Add all the extensions
- d_extensions_view.foreach(extension_view_added);
-
- d_extensions_view.extension_added.connect(extension_view_added);
- d_extensions_view.extension_removed.connect(extension_view_removed);
+ d_panels.activated.connect(on_panel_activated);
activate_default_view();
-
return true;
}
@@ -351,79 +172,24 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
return ret;
}
- private void activate_default_view()
- {
- GitgExt.View? def = null;
-
- // Activate the default view
- d_extensions_view.foreach((s, info, obj) => {
- GitgExt.View v = obj as GitgExt.View;
-
- if (d_active_views.lookup_extended(v.id, null, null))
- {
- if (v.is_default_for(d_action))
- {
- set_view(v);
- def = null;
- return;
- }
- else if (def == null)
- {
- def = v;
- }
- }
- });
-
- if (def != null)
- {
- set_view(def);
- }
- }
-
- private void update_views()
- {
- /* This method is called after some state has changed and thus a new
- * set of views needs to be computed. Currently the only state change
- * is opening or closing a repository.
- */
-
- // Now see if new views became available
- d_extensions_view.foreach((s, info, obj) => {
- GitgExt.View v = obj as GitgExt.View;
-
- bool isavail = v.is_available();
- bool isactive = d_active_views.lookup_extended(v.id, null, null);
-
- if (isavail == isactive)
- {
- return;
- }
-
- if (isactive)
- {
- // should be inactive
- remove_view(v, false);
- }
- else
- {
- add_view(v);
- }
- });
-
- activate_default_view();
- }
-
/* public API implementation of GitgExt.Application */
public GitgExt.View? view(string id)
{
- GitgExt.View v;
+ GitgExt.View? v = d_views.lookup(id);
- if (d_view_map.lookup_extended(id, null, out v))
+ if (v != null)
{
- set_view(v);
+ d_views.current = v;
}
- return null;
+ if (d_views.current == v)
+ {
+ return v;
+ }
+ else
+ {
+ return null;
+ }
}
public void open(File path)
@@ -442,7 +208,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
}
catch
{
- // TODO
+ // TODO: make error thingie
return;
}
@@ -457,7 +223,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
}
catch {}
- update_views();
+ d_views.update();
}
public void create(File path)
diff --git a/gitg/resources/ui/gitg-window.ui b/gitg/resources/ui/gitg-window.ui
index 9e642e5..8366527 100644
--- a/gitg/resources/ui/gitg-window.ui
+++ b/gitg/resources/ui/gitg-window.ui
@@ -110,7 +110,7 @@
</object>
</child>
<child>
- <object class="GtkPaned" id="paned_main">
+ <object class="GtkPaned" id="paned_views">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
@@ -126,7 +126,7 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<child>
- <object class="GtkToolbar" id="toolbar_topnav">
+ <object class="GtkToolbar" id="toolbar_views">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@@ -172,7 +172,7 @@
</packing>
</child>
<child>
- <object class="GtkToolbar" id="toolbar_subnav">
+ <object class="GtkToolbar" id="toolbar_panels">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@@ -202,12 +202,13 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="orientation">vertical</property>
+ <property name="position">300</property>
<child>
<object class="GtkEventBox" id="frame_background">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkFrame" id="frame_main">
+ <object class="GitgAutohideFrame" id="frame_view">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
@@ -219,17 +220,22 @@
</child>
</object>
<packing>
- <property name="resize">False</property>
+ <property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
<child>
- <object class="GtkNotebook" id="notebook_panels">
+ <object class="GitgAutohideFrame" id="frame_panel">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="resize">True</property>
+ <property name="resize">False</property>
<property name="shrink">True</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]