[gnome-builder/document-manager] build: remove legacy tab design
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/document-manager] build: remove legacy tab design
- Date: Wed, 10 Dec 2014 23:14:57 +0000 (UTC)
commit 718ecd1b8489b1853277b8e6946005c230987629
Author: Christian Hergert <christian hergert me>
Date: Wed Dec 10 15:14:52 2014 -0800
build: remove legacy tab design
src/devhelp/gb-devhelp-tab.c | 153 ----
src/devhelp/gb-devhelp-tab.h | 58 --
src/editor/gb-editor-navigation-item.c | 89 +--
src/editor/gb-editor-navigation-item.h | 2 -
src/editor/gb-editor-tab-private.h | 53 --
src/editor/gb-editor-tab.c | 719 ----------------
src/editor/gb-editor-tab.h | 74 --
src/editor/gb-editor-workspace-private.h | 2 -
src/editor/gb-editor-workspace.c | 1 -
src/gnome-builder.mk | 20 -
src/markdown/gb-markdown-tab.c | 198 -----
src/markdown/gb-markdown-tab.h | 56 --
src/resources/gnome-builder.gresource.xml | 6 -
src/resources/ui/gb-devhelp-tab.ui | 18 -
src/resources/ui/gb-editor-tab.ui | 82 --
src/tabs/gb-multi-notebook.c | 1301 -----------------------------
src/tabs/gb-multi-notebook.h | 75 --
src/tabs/gb-notebook.c | 189 -----
src/tabs/gb-notebook.h | 62 --
src/tabs/gb-tab-grid.c | 938 ---------------------
src/tabs/gb-tab-grid.h | 74 --
src/tabs/gb-tab-label-private.h | 32 -
src/tabs/gb-tab-label.c | 255 ------
src/tabs/gb-tab-label.h | 61 --
src/tabs/gb-tab-stack.c | 664 ---------------
src/tabs/gb-tab-stack.h | 75 --
src/tabs/gb-tab.c | 363 --------
src/tabs/gb-tab.h | 75 --
28 files changed, 5 insertions(+), 5690 deletions(-)
---
diff --git a/src/editor/gb-editor-navigation-item.c b/src/editor/gb-editor-navigation-item.c
index ef3df8f..aeb6070 100644
--- a/src/editor/gb-editor-navigation-item.c
+++ b/src/editor/gb-editor-navigation-item.c
@@ -22,7 +22,6 @@
#include "gb-editor-navigation-item.h"
#include "gb-log.h"
-#include "gb-notebook.h"
#include "gb-workbench.h"
struct _GbEditorNavigationItemPrivate
@@ -30,7 +29,6 @@ struct _GbEditorNavigationItemPrivate
GFile *file;
guint line;
guint line_offset;
- GbEditorTab *tab;
};
G_DEFINE_TYPE_WITH_PRIVATE (GbEditorNavigationItem, gb_editor_navigation_item,
@@ -61,42 +59,6 @@ gb_editor_navigation_item_new (GFile *file,
NULL);
}
-GbEditorTab *
-gb_editor_navigation_item_get_tab (GbEditorNavigationItem *item)
-{
- g_return_val_if_fail (GB_IS_EDITOR_NAVIGATION_ITEM (item), NULL);
-
- return item->priv->tab;
-}
-
-static void
-gb_editor_navigation_item_set_tab (GbEditorNavigationItem *item,
- GbEditorTab *tab)
-{
- GbEditorNavigationItemPrivate *priv;
-
- g_return_if_fail (GB_IS_EDITOR_NAVIGATION_ITEM (item));
- g_return_if_fail (!tab || GB_IS_EDITOR_TAB (tab));
-
- priv = item->priv;
-
- if (priv->tab)
- {
- g_object_remove_weak_pointer (G_OBJECT (priv->tab),
- (gpointer *)&priv->tab);
- priv->tab = NULL;
- }
-
- if (tab)
- {
- priv->tab = tab;
- g_object_add_weak_pointer (G_OBJECT (priv->tab),
- (gpointer *)&priv->tab);
- }
-
- g_object_notify_by_pspec (G_OBJECT (item), gParamSpecs [PROP_TAB]);
-}
-
GFile *
gb_editor_navigation_item_get_file (GbEditorNavigationItem *item)
{
@@ -165,33 +127,11 @@ gb_editor_navigation_item_activate (GbNavigationItem *item)
g_return_if_fail (GB_IS_EDITOR_NAVIGATION_ITEM (self));
- if (self->priv->tab)
- {
- GtkWidget *parent;
- guint page;
-
- parent = gtk_widget_get_parent (GTK_WIDGET (self->priv->tab));
-
- if (GB_IS_NOTEBOOK (parent))
- {
- gtk_container_child_get (GTK_CONTAINER (parent),
- GTK_WIDGET (self->priv->tab),
- "position", &page,
- NULL);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (parent), page);
- gb_editor_tab_scroll_to_line (self->priv->tab,
- self->priv->line,
- self->priv->line_offset);
- gtk_widget_grab_focus (GTK_WIDGET (self->priv->tab));
- }
- }
- else
- {
- /*
- * TODO: We will need to implement this once we handle closing files
- * properly as well as saving state between application loads.
- */
- }
+ /*
+ * TODO: Load document from document manager.
+ * Focus document.
+ * Restore line/column
+ */
EXIT;
}
@@ -228,10 +168,6 @@ gb_editor_navigation_item_get_property (GObject *object,
g_value_set_uint (value, gb_editor_navigation_item_get_line_offset (self));
break;
- case PROP_TAB:
- g_value_set_object (value, gb_editor_navigation_item_get_tab (self));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -259,10 +195,6 @@ gb_editor_navigation_item_set_property (GObject *object,
gb_editor_navigation_item_set_line_offset (self, g_value_get_uint (value));
break;
- case PROP_TAB:
- gb_editor_navigation_item_set_tab (self, g_value_get_object (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -316,17 +248,6 @@ gb_editor_navigation_item_class_init (GbEditorNavigationItemClass *klass)
G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_LINE_OFFSET,
gParamSpecs [PROP_LINE_OFFSET]);
-
- gParamSpecs [PROP_TAB] =
- g_param_spec_object ("tab",
- _("Tab"),
- _("The editor tab."),
- GB_TYPE_EDITOR_TAB,
- (G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_STRINGS));
- g_object_class_install_property (object_class, PROP_TAB,
- gParamSpecs [PROP_TAB]);
}
static void
diff --git a/src/editor/gb-editor-navigation-item.h b/src/editor/gb-editor-navigation-item.h
index 97ec7af..f7ced6f 100644
--- a/src/editor/gb-editor-navigation-item.h
+++ b/src/editor/gb-editor-navigation-item.h
@@ -21,7 +21,6 @@
#include <gio/gio.h>
-#include "gb-editor-tab.h"
#include "gb-navigation-item.h"
G_BEGIN_DECLS
@@ -54,7 +53,6 @@ struct _GbEditorNavigationItemClass
GFile *gb_editor_navigation_item_get_file (GbEditorNavigationItem *item);
guint gb_editor_navigation_item_get_line (GbEditorNavigationItem *item);
guint gb_editor_navigation_item_get_line_offset (GbEditorNavigationItem *item);
-GbEditorTab *gb_editor_navigation_item_get_tab (GbEditorNavigationItem *item);
GType gb_editor_navigation_item_get_type (void) G_GNUC_CONST;
GbNavigationItem *gb_editor_navigation_item_new (GFile *file,
guint line,
diff --git a/src/editor/gb-editor-workspace-private.h b/src/editor/gb-editor-workspace-private.h
index a63be58..9f30b16 100644
--- a/src/editor/gb-editor-workspace-private.h
+++ b/src/editor/gb-editor-workspace-private.h
@@ -22,8 +22,6 @@
#include <gtk/gtk.h>
#include "gb-document-grid.h"
-#include "gb-editor-tab.h"
-#include "gb-notebook.h"
G_BEGIN_DECLS
diff --git a/src/editor/gb-editor-workspace.c b/src/editor/gb-editor-workspace.c
index 58ffc4f..f13a158 100644
--- a/src/editor/gb-editor-workspace.c
+++ b/src/editor/gb-editor-workspace.c
@@ -221,7 +221,6 @@ gb_editor_workspace_class_init (GbEditorWorkspaceClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GbEditorWorkspace, paned);
gtk_widget_class_bind_template_child_private (widget_class, GbEditorWorkspace, document_grid);
- g_type_ensure (GB_TYPE_EDITOR_TAB);
g_type_ensure (GB_TYPE_DOCUMENT_GRID);
g_type_ensure (GB_TYPE_TREE);
}
diff --git a/src/gnome-builder.mk b/src/gnome-builder.mk
index 5203e06..ab9ae15 100644
--- a/src/gnome-builder.mk
+++ b/src/gnome-builder.mk
@@ -45,8 +45,6 @@ libgnome_builder_la_SOURCES = \
src/devhelp/gb-devhelp-document.h \
src/devhelp/gb-devhelp-view.c \
src/devhelp/gb-devhelp-view.h \
- src/devhelp/gb-devhelp-tab.c \
- src/devhelp/gb-devhelp-tab.h \
src/documents/gb-document.c \
src/documents/gb-document.h \
src/documents/gb-document-grid.c \
@@ -76,9 +74,6 @@ libgnome_builder_la_SOURCES = \
src/editor/gb-editor-navigation-item.h \
src/editor/gb-editor-settings-widget.c \
src/editor/gb-editor-settings-widget.h \
- src/editor/gb-editor-tab.c \
- src/editor/gb-editor-tab.h \
- src/editor/gb-editor-tab-private.h \
src/editor/gb-editor-view.c \
src/editor/gb-editor-view.h \
src/editor/gb-editor-workspace.c \
@@ -112,8 +107,6 @@ libgnome_builder_la_SOURCES = \
src/markdown/gs-markdown.h \
src/markdown/gb-markdown-preview.c \
src/markdown/gb-markdown-preview.h \
- src/markdown/gb-markdown-tab.c \
- src/markdown/gb-markdown-tab.h \
src/navigation/gb-navigation-list.h \
src/navigation/gb-navigation-list.c \
src/navigation/gb-navigation-item.h \
@@ -159,19 +152,6 @@ libgnome_builder_la_SOURCES = \
src/log/gb-log.h \
src/nautilus/nautilus-floating-bar.c \
src/nautilus/nautilus-floating-bar.h \
- src/tabs/gb-multi-notebook.c \
- src/tabs/gb-multi-notebook.h \
- src/tabs/gb-notebook.c \
- src/tabs/gb-notebook.h \
- src/tabs/gb-tab-label.c \
- src/tabs/gb-tab-label.h \
- src/tabs/gb-tab-label-private.h \
- src/tabs/gb-tab.c \
- src/tabs/gb-tab.h \
- src/tabs/gb-tab-grid.c \
- src/tabs/gb-tab-grid.h \
- src/tabs/gb-tab-stack.c \
- src/tabs/gb-tab-stack.h \
src/theatrics/gb-box-theatric.c \
src/theatrics/gb-box-theatric.h \
src/tree/gb-tree.c \
diff --git a/src/resources/gnome-builder.gresource.xml b/src/resources/gnome-builder.gresource.xml
index d4fb423..59723b9 100644
--- a/src/resources/gnome-builder.gresource.xml
+++ b/src/resources/gnome-builder.gresource.xml
@@ -21,24 +21,18 @@
<file>ui/gb-command-bar.ui</file>
<file>ui/gb-command-bar-item.ui</file>
<file>ui/gb-credits-widget.ui</file>
- <file>ui/gb-devhelp-tab.ui</file>
<file>ui/gb-devhelp-view.ui</file>
<file>ui/gb-document-stack.ui</file>
<file>ui/gb-document-menu-button.ui</file>
<file>ui/gb-editor-settings-widget.ui</file>
<file>ui/gb-editor-frame.ui</file>
- <file>ui/gb-editor-tab.ui</file>
<file>ui/gb-editor-view.ui</file>
<file>ui/gb-editor-workspace.ui</file>
<file>ui/gb-html-view.ui</file>
- <file>ui/gb-markdown-tab.ui</file>
<file>ui/gb-preferences-window.ui</file>
<file>ui/gb-preferences-page-editor.ui</file>
<file>ui/gb-preferences-page-git.ui</file>
<file>ui/gb-preferences-page-language.ui</file>
- <file>ui/gb-tab.ui</file>
- <file>ui/gb-tab-label.ui</file>
- <file>ui/gb-tab-stack.ui</file>
<file>ui/gb-workbench.ui</file>
</gresource>
</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]