[nautilus] Add new class NautilusNavigationWindowPane, derived from NautilusWindowPane



commit 651053fec975b95536b7e967c7e8b81732b1f740
Author: Holger Berndt <berndth gmx de>
Date:   Mon May 18 08:00:26 2009 +0200

    Add new class NautilusNavigationWindowPane, derived from NautilusWindowPane
    
    NautilusWindowPane is the base class for window panes, while
    NautilusNavigationWindowPane will add some functionality spefic to panes
    in a Nautilus navigation window.

 po/POTFILES.in                        |    1 +
 src/Makefile.am                       |    2 +
 src/nautilus-navigation-window-pane.c |   63 +++++++++++++++++++++++++++++++++
 src/nautilus-navigation-window-pane.h |   53 +++++++++++++++++++++++++++
 4 files changed, 119 insertions(+), 0 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 62a0605..bf23473 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -87,6 +87,7 @@ src/nautilus-location-dialog.c
 src/nautilus-location-entry.c
 src/nautilus-main.c
 src/nautilus-navigation-window-menus.c
+src/nautilus-navigation-window-pane.c
 src/nautilus-navigation-window-ui.xml
 src/nautilus-navigation-window.c
 src/nautilus-notebook.c
diff --git a/src/Makefile.am b/src/Makefile.am
index bde398c..7f7b242 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -90,6 +90,8 @@ nautilus_SOURCES = \
 	nautilus-navigation-window-menus.c      \
 	nautilus-navigation-window.c            \
 	nautilus-navigation-window.h            \
+	nautilus-navigation-window-pane.c	\
+	nautilus-navigation-window-pane.h	\
 	nautilus-navigation-window-slot.c	\
 	nautilus-navigation-window-slot.h	\
 	nautilus-notebook.c			\
diff --git a/src/nautilus-navigation-window-pane.c b/src/nautilus-navigation-window-pane.c
new file mode 100644
index 0000000..c3d0136
--- /dev/null
+++ b/src/nautilus-navigation-window-pane.c
@@ -0,0 +1,63 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
+
+   nautilus-navigation-window-pane.c: Nautilus navigation window pane
+ 
+   Copyright (C) 2008 Free Software Foundation, Inc.
+  
+   This program 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.
+  
+   This program 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., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+  
+   Author: Holger Berndt <berndth gmx de>
+*/
+
+#include "nautilus-navigation-window-pane.h"
+
+static void nautilus_navigation_window_pane_init       (NautilusNavigationWindowPane *pane);
+static void nautilus_navigation_window_pane_class_init (NautilusNavigationWindowPaneClass *class);
+static void nautilus_navigation_window_pane_dispose    (GObject *object);
+
+G_DEFINE_TYPE (NautilusNavigationWindowPane,
+               nautilus_navigation_window_pane,
+               NAUTILUS_TYPE_WINDOW_PANE)
+#define parent_class nautilus_navigation_window_pane_parent_class
+
+
+static void
+nautilus_navigation_window_pane_init (NautilusNavigationWindowPane *pane)
+{
+}
+
+static void
+nautilus_navigation_window_pane_class_init (NautilusNavigationWindowPaneClass *class)
+{
+	G_OBJECT_CLASS (class)->dispose = nautilus_navigation_window_pane_dispose;
+}
+
+static void
+nautilus_navigation_window_pane_dispose (GObject *object)
+{
+	G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+NautilusNavigationWindowPane *
+nautilus_navigation_window_pane_new (NautilusWindow *window)
+{
+	NautilusNavigationWindowPane *pane;
+
+	pane = g_object_new (NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE, NULL);
+	NAUTILUS_WINDOW_PANE(pane)->window = window;
+
+	return pane;
+}
diff --git a/src/nautilus-navigation-window-pane.h b/src/nautilus-navigation-window-pane.h
new file mode 100644
index 0000000..cea3b3e
--- /dev/null
+++ b/src/nautilus-navigation-window-pane.h
@@ -0,0 +1,53 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
+
+   nautilus-navigation-window-pane.h: Nautilus navigation window pane
+ 
+   Copyright (C) 2008 Free Software Foundation, Inc.
+  
+   This program 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.
+  
+   This program 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., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+  
+   Author: Holger Berndt <berndth gmx de>
+*/
+
+#ifndef NAUTILUS_NAVIGATION_WINDOW_PANE_H
+#define NAUTILUS_NAVIGATION_WINDOW_PANE_H
+
+#include "nautilus-window.h"
+#include "nautilus-window-pane.h"
+
+#define NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE	 (nautilus_navigation_window_pane_get_type())
+#define NAUTILUS_NAVIGATION_WINDOW_PANE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE, NautilusNavigationWindowPaneClass))
+#define NAUTILUS_NAVIGATION_WINDOW_PANE(obj)	 (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE, NautilusNavigationWindowPane))
+#define NAUTILUS_IS_NAVIGATION_WINDOW_PANE(obj)  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE))
+#define NAUTILUS_IS_NAVIGATION_WINDOW_PANE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE))
+#define NAUTILUS_NAVIGATION_WINDOW_PANE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_NAVIGATION_WINDOW_PANE, NautilusNavigationWindowPaneClass))
+
+typedef struct _NautilusNavigationWindowPaneClass NautilusNavigationWindowPaneClass;
+typedef struct _NautilusNavigationWindowPane      NautilusNavigationWindowPane;
+
+struct _NautilusNavigationWindowPaneClass {
+	NautilusWindowPaneClass parent_class;
+};
+
+struct _NautilusNavigationWindowPane {
+	NautilusWindowPane parent;
+};
+
+GType nautilus_navigation_window_pane_get_type (void);
+
+NautilusNavigationWindowPane* nautilus_navigation_window_pane_new (NautilusWindow *window);
+
+#endif /* NAUTILUS_NAVIGATION_WINDOW_PANE_H */



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