summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-10-26 14:21:45 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2012-10-26 16:47:28 -0400
commit56ed540087e787a593fa55598fdedd647c2cfd76 (patch)
tree77da230d6d7e3fa4c2fa827fdb0028a7f230ec3f
parent89a3e98ac3b238535cd2e28ec1d711972d372223 (diff)
downloadnautilus-56ed540087e787a593fa55598fdedd647c2cfd76.tar.gz
window: remove nautilus-window-types.h
Cleanup and rearrange typedefs to avoid the need for a separate types header. Conflicts: src/nautilus-window.h
-rw-r--r--src/Makefile.am1
-rw-r--r--src/nautilus-notebook.h9
-rw-r--r--src/nautilus-window-slot.h11
-rw-r--r--src/nautilus-window-types.h49
-rw-r--r--src/nautilus-window.h39
5 files changed, 34 insertions, 75 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 74f2e5052..c11919ca7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -205,7 +205,6 @@ nautilus_SOURCES = \
nautilus-window-slot-dnd.h \
nautilus-window.c \
nautilus-window.h \
- nautilus-window-types.h \
nautilus-x-content-bar.c \
nautilus-x-content-bar.h \
$(NULL)
diff --git a/src/nautilus-notebook.h b/src/nautilus-notebook.h
index 7dd145a16..b11abaa0c 100644
--- a/src/nautilus-notebook.h
+++ b/src/nautilus-notebook.h
@@ -29,6 +29,11 @@
#include <glib.h>
#include <gtk/gtk.h>
+
+typedef struct _NautilusNotebookClass NautilusNotebookClass;
+typedef struct _NautilusNotebook NautilusNotebook;
+typedef struct _NautilusNotebookPrivate NautilusNotebookPrivate;
+
#include "nautilus-window-slot.h"
G_BEGIN_DECLS
@@ -40,10 +45,6 @@ G_BEGIN_DECLS
#define NAUTILUS_IS_NOTEBOOK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_NOTEBOOK))
#define NAUTILUS_NOTEBOOK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_NOTEBOOK, NautilusNotebookClass))
-typedef struct _NautilusNotebookClass NautilusNotebookClass;
-typedef struct _NautilusNotebook NautilusNotebook;
-typedef struct _NautilusNotebookPrivate NautilusNotebookPrivate;
-
struct _NautilusNotebook
{
GtkNotebook parent;
diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
index cd9c4ea4b..fd53cf6e7 100644
--- a/src/nautilus-window-slot.h
+++ b/src/nautilus-window-slot.h
@@ -25,10 +25,15 @@
#ifndef NAUTILUS_WINDOW_SLOT_H
#define NAUTILUS_WINDOW_SLOT_H
-#include "nautilus-view.h"
-#include "nautilus-window-types.h"
#include "nautilus-query-editor.h"
+typedef struct NautilusWindowSlot NautilusWindowSlot;
+typedef struct NautilusWindowSlotClass NautilusWindowSlotClass;
+typedef struct NautilusWindowSlotDetails NautilusWindowSlotDetails;
+
+#include "nautilus-view.h"
+#include "nautilus-window.h"
+
#define NAUTILUS_TYPE_WINDOW_SLOT (nautilus_window_slot_get_type())
#define NAUTILUS_WINDOW_SLOT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_WINDOW_SLOT, NautilusWindowSlotClass))
#define NAUTILUS_WINDOW_SLOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_WINDOW_SLOT, NautilusWindowSlot))
@@ -51,8 +56,6 @@ struct NautilusWindowSlotClass {
void (* inactive) (NautilusWindowSlot *slot);
};
-typedef struct NautilusWindowSlotDetails NautilusWindowSlotDetails;
-
/* Each NautilusWindowSlot corresponds to a location in the window
* for displaying a NautilusView, i.e. a tab.
*/
diff --git a/src/nautilus-window-types.h b/src/nautilus-window-types.h
deleted file mode 100644
index f202f9761..000000000
--- a/src/nautilus-window-types.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
-/*
- * nautilus-window-types: typedefs for window-related types.
- *
- * Copyright (C) 1999, 2000, 2010 Red Hat, Inc.
- * Copyright (C) 1999, 2000, 2001 Eazel, Inc.
- *
- * Nautilus 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.
- *
- * Nautilus 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 this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Authors: Elliot Lee <sopwith@redhat.com>
- * Darin Adler <darin@bentspoon.com>
- *
- */
-
-#ifndef __NAUTILUS_WINDOW_TYPES_H__
-#define __NAUTILUS_WINDOW_TYPES_H__
-
-typedef struct _NautilusWindowPane NautilusWindowPane;
-typedef struct _NautilusWindowPaneClass NautilusWindowPaneClass;
-
-typedef struct NautilusWindow NautilusWindow;
-
-typedef struct NautilusWindowSlot NautilusWindowSlot;
-typedef struct NautilusWindowSlotClass NautilusWindowSlotClass;
-
-typedef gboolean (* NautilusWindowGoToCallback) (NautilusWindow *window,
- GError *error,
- gpointer user_data);
-
-typedef enum {
- NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND = 1<<0,
- NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW = 1<<1,
- NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB = 1<<2
-} NautilusWindowOpenFlags;
-
-#endif /* __NAUTILUS_WINDOW_TYPES_H__ */
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index b9148962d..799fac9c1 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -34,8 +34,27 @@
#include <libnautilus-private/nautilus-bookmark.h>
#include <libnautilus-private/nautilus-search-directory.h>
+typedef struct NautilusWindow NautilusWindow;
+typedef struct NautilusWindowClass NautilusWindowClass;
+typedef struct NautilusWindowDetails NautilusWindowDetails;
+
+typedef enum {
+ NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND = 1 << 0,
+ NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW = 1 << 1,
+ NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB = 1 << 2
+} NautilusWindowOpenFlags;
+
+typedef enum {
+ NAUTILUS_WINDOW_OPEN_SLOT_NONE = 0,
+ NAUTILUS_WINDOW_OPEN_SLOT_APPEND = 1
+} NautilusWindowOpenSlotFlags;
+
+typedef gboolean (* NautilusWindowGoToCallback) (NautilusWindow *window,
+ GError *error,
+ gpointer user_data);
+
#include "nautilus-view.h"
-#include "nautilus-window-types.h"
+#include "nautilus-window-slot.h"
#define NAUTILUS_TYPE_WINDOW nautilus_window_get_type()
#define NAUTILUS_WINDOW(obj) \
@@ -49,27 +68,13 @@
#define NAUTILUS_WINDOW_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_WINDOW, NautilusWindowClass))
-typedef enum {
- NAUTILUS_WINDOW_NOT_SHOWN,
- NAUTILUS_WINDOW_POSITION_SET,
- NAUTILUS_WINDOW_SHOULD_SHOW
-} NautilusWindowShowState;
-
-typedef enum {
- NAUTILUS_WINDOW_OPEN_SLOT_NONE = 0,
- NAUTILUS_WINDOW_OPEN_SLOT_APPEND = 1
-} NautilusWindowOpenSlotFlags;
-
#define NAUTILUS_WINDOW_SIDEBAR_PLACES "places"
#define NAUTILUS_WINDOW_SIDEBAR_TREE "tree"
-typedef struct NautilusWindowDetails NautilusWindowDetails;
-
-typedef struct {
+struct NautilusWindowClass {
GtkApplicationWindowClass parent_spot;
/* Function pointers for overriding, without corresponding signals */
-
void (* sync_title) (NautilusWindow *window,
NautilusWindowSlot *slot);
void (* sync_view_as_menus) (NautilusWindow *window);
@@ -77,7 +82,7 @@ typedef struct {
NautilusWindowSlot *slot);
void (* close) (NautilusWindow *window);
-} NautilusWindowClass;
+};
struct NautilusWindow {
GtkApplicationWindow parent_object;