[gnome-builder/wip/chergert/layout] editor: remove the new-document button from headerbar
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/layout] editor: remove the new-document button from headerbar
- Date: Wed, 5 Jul 2017 06:58:57 +0000 (UTC)
commit e9f6680a1aa925b58fe13d8a00e13e4bf2ef41bf
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 4 23:58:01 2017 -0700
editor: remove the new-document button from headerbar
This is no longer part of the design, and you can access it
from other places like in the layout stack header.
libide/editor/ide-editor-workbench-addin.c | 29 ++++-----------------------
1 files changed, 5 insertions(+), 24 deletions(-)
---
diff --git a/libide/editor/ide-editor-workbench-addin.c b/libide/editor/ide-editor-workbench-addin.c
index d94d3cf..ace00ef 100644
--- a/libide/editor/ide-editor-workbench-addin.c
+++ b/libide/editor/ide-editor-workbench-addin.c
@@ -46,7 +46,6 @@ struct _IdeEditorWorkbenchAddin
/* Borrowed references */
IdeWorkbench *workbench;
IdeEditorPerspective *perspective;
- GtkButton *new_document_button;
GtkBox *panels_box;
};
@@ -134,20 +133,6 @@ ide_editor_workbench_addin_add_buttons (IdeEditorWorkbenchAddin *self,
g_assert (IDE_IS_EDITOR_WORKBENCH_ADDIN (self));
g_assert (IDE_IS_WORKBENCH_HEADER_BAR (header));
- self->new_document_button = g_object_new (GTK_TYPE_BUTTON,
- "action-name", "editor.new-file",
- "child", g_object_new (GTK_TYPE_IMAGE,
- "visible", TRUE,
- "icon-name", "document-new-symbolic",
- NULL),
- NULL);
- g_signal_connect (self->new_document_button,
- "destroy",
- G_CALLBACK (gtk_widget_destroyed),
- &self->new_document_button);
- dzl_gtk_widget_add_style_class (GTK_WIDGET (self->new_document_button), "image-button");
- ide_workbench_header_bar_insert_left (header, GTK_WIDGET (self->new_document_button), GTK_PACK_START, 0);
-
self->panels_box = g_object_new (GTK_TYPE_BOX,
"visible", TRUE,
NULL);
@@ -235,12 +220,11 @@ ide_editor_workbench_addin_unload (IdeWorkbenchAddin *addin,
g_assert (IDE_IS_WORKBENCH (workbench));
dzl_signal_group_set_target (self->buffer_manager_signals, NULL);
- gtk_widget_destroy (GTK_WIDGET (self->new_document_button));
+
gtk_widget_destroy (GTK_WIDGET (self->perspective));
- g_clear_object (&self->manager);
+ gtk_widget_destroy (GTK_WIDGET (self->panels_box));
- g_assert (self->new_document_button == NULL);
- g_assert (self->perspective == NULL);
+ g_clear_object (&self->manager);
self->workbench = NULL;
}
@@ -426,14 +410,11 @@ ide_editor_workbench_addin_perspective_set (IdeWorkbenchAddin *addin,
IdePerspective *perspective)
{
IdeEditorWorkbenchAddin *self = (IdeEditorWorkbenchAddin *)addin;
- gboolean visible;
g_assert (IDE_IS_EDITOR_WORKBENCH_ADDIN (self));
- visible = IDE_IS_EDITOR_PERSPECTIVE (perspective);
-
- gtk_widget_set_visible (GTK_WIDGET (self->new_document_button), visible);
- gtk_widget_set_visible (GTK_WIDGET (self->panels_box), visible);
+ gtk_widget_set_visible (GTK_WIDGET (self->panels_box),
+ IDE_IS_EDITOR_PERSPECTIVE (perspective));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]