Commit e56e2514 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Actually add it.

2008-07-09  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-window-slot-info.h:
	Actually add it.

	* src/nautilus-navigation-window-slot.h:
	* src/nautilus-notebook.h:
	* src/nautilus-window-slot.h:
	Contents was added twice. Remove it once.

svn path=/trunk/; revision=14331
parent 5e1a91d6
2008-07-09 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-window-slot-info.h:
Actually add it.
* src/nautilus-navigation-window-slot.h:
* src/nautilus-notebook.h:
* src/nautilus-window-slot.h:
Contents was added twice. Remove it once.
2008-07-08 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/*.c:
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-window-slot-info.h: Interface for nautilus window slots
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: Christian Neumair <cneumair@gnome.org>
*/
#ifndef NAUTILUS_WINDOW_SLOT_INFO_H
#define NAUTILUS_WINDOW_SLOT_INFO_H
#include "nautilus-window-info.h"
#define NAUTILUS_TYPE_WINDOW_SLOT_INFO (nautilus_window_slot_info_get_type ())
#define NAUTILUS_WINDOW_SLOT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_WINDOW_SLOT_INFO, NautilusWindowSlotInfo))
#define NAUTILUS_IS_WINDOW_SLOT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_WINDOW_SLOT_INFO))
#define NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NAUTILUS_TYPE_WINDOW_SLOT_INFO, NautilusWindowSlotInfoIface))
typedef struct _NautilusWindowSlotInfoIface NautilusWindowSlotInfoIface;
struct _NautilusWindowSlotInfoIface
{
GTypeInterface g_iface;
/* signals */
/* emitted right after this slot becomes active.
* Views should connect to this signal and merge their UI
* into the main window.
*/
void (* active) (NautilusWindowSlotInfo *slot);
/* emitted right before this slot becomes inactive.
* Views should connect to this signal and unmerge their UI
* from the main window.
*/
void (* inactive) (NautilusWindowSlotInfo *slot);
/* returns the window info associated with this slot */
NautilusWindowInfo * (* get_window) (NautilusWindowSlotInfo *slot);
/* Returns the number of selected items in the view */
int (* get_selection_count) (NautilusWindowSlotInfo *slot);
/* Returns a list of uris for th selected items in the view, caller frees it */
GList *(* get_selection) (NautilusWindowSlotInfo *slot);
char * (* get_current_location) (NautilusWindowSlotInfo *slot);
void (* set_status) (NautilusWindowSlotInfo *slot,
const char *status);
char * (* get_title) (NautilusWindowSlotInfo *slot);
void (* open_location) (NautilusWindowSlotInfo *slot,
GFile *location,
NautilusWindowOpenMode mode,
NautilusWindowOpenFlags flags,
GList *selection);
};
GType nautilus_window_slot_info_get_type (void);
NautilusWindowInfo * nautilus_window_slot_info_get_window (NautilusWindowSlotInfo *slot);
void nautilus_window_slot_info_open_location (NautilusWindowSlotInfo *slot,
GFile *location,
NautilusWindowOpenMode mode,
NautilusWindowOpenFlags flags,
GList *selection);
void nautilus_window_slot_info_set_status (NautilusWindowSlotInfo *slot,
const char *status);
char * nautilus_window_slot_info_get_current_location (NautilusWindowSlotInfo *slot);
int nautilus_window_slot_info_get_selection_count (NautilusWindowSlotInfo *slot);
GList * nautilus_window_slot_info_get_selection (NautilusWindowSlotInfo *slot);
char * nautilus_window_slot_info_get_title (NautilusWindowSlotInfo *slot);
#endif /* NAUTILUS_WINDOW_SLOT_INFO_H */
......@@ -70,77 +70,3 @@ void nautilus_navigation_window_slot_clear_forward_list (NautilusNavigationWindo
void nautilus_navigation_window_slot_clear_back_list (NautilusNavigationWindowSlot *slot);
#endif /* NAUTILUS_NAVIGATION_WINDOW_SLOT_H */
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-navigation-window-slot.h: Nautilus navigation window slot
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: Christian Neumair <cneumair@gnome.org>
*/
#ifndef NAUTILUS_NAVIGATION_WINDOW_SLOT_H
#define NAUTILUS_NAVIGATION_WINDOW_SLOT_H
#include "nautilus-window-slot.h"
typedef struct NautilusNavigationWindowSlot NautilusNavigationWindowSlot;
typedef struct NautilusNavigationWindowSlotClass NautilusNavigationWindowSlotClass;
#define NAUTILUS_TYPE_NAVIGATION_WINDOW_SLOT (nautilus_navigation_window_slot_get_type())
#define NAUTILUS_NAVIGATION_WINDOW_SLOT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_NAVIGATION_WINDOW_SLOT_CLASS, NautilusNavigationWindowSlotClass))
#define NAUTILUS_NAVIGATION_WINDOW_SLOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_NAVIGATION_WINDOW_SLOT, NautilusNavigationWindowSlot))
#define NAUTILUS_IS_NAVIGATION_WINDOW_SLOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_NAVIGATION_WINDOW_SLOT))
#define NAUTILUS_IS_NAVIGATION_WINDOW_SLOT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_NAVIGATION_WINDOW_SLOT))
#define NAUTILUS_NAVIGATION_WINDOW_SLOT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_NAVIGATION_WINDOW_SLOT, NautilusNavigationWindowSlotClass))
typedef enum {
NAUTILUS_BAR_PATH,
NAUTILUS_BAR_NAVIGATION,
NAUTILUS_BAR_SEARCH
} NautilusBarMode;
struct NautilusNavigationWindowSlot {
NautilusWindowSlot parent;
NautilusBarMode bar_mode;
GtkTreeModel *viewer_model;
int num_viewers;
/* Back/Forward chain, and history list.
* The data in these lists are NautilusBookmark pointers.
*/
GList *back_list, *forward_list;
/* Current views stuff */
GList *sidebar_panels;
};
struct NautilusNavigationWindowSlotClass {
NautilusWindowSlotClass parent;
};
GType nautilus_navigation_window_slot_get_type (void);
void nautilus_navigation_window_slot_clear_forward_list (NautilusNavigationWindowSlot *slot);
void nautilus_navigation_window_slot_clear_back_list (NautilusNavigationWindowSlot *slot);
#endif /* NAUTILUS_NAVIGATION_WINDOW_SLOT_H */
......@@ -91,96 +91,4 @@ gboolean nautilus_notebook_can_set_current_page_relative (NautilusNoteboo
G_END_DECLS
#endif /* NAUTILUS_NOTEBOOK_H */
/*
* Copyright © 2002 Christophe Fergeau
* Copyright © 2003 Marco Pesenti Gritti
* Copyright © 2003, 2004 Christian Persch
* (ephy-notebook.c)
*
* Copyright © 2008 Free Software Foundation, Inc.
* (nautilus-notebook.c)
*
* 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id: nautilus-notebook.h 8210 2008-04-11 20:05:25Z chpe $
*/
#ifndef NAUTILUS_NOTEBOOK_H
#define NAUTILUS_NOTEBOOK_H
#include <glib.h>
#include <gtk/gtknotebook.h>
#include "nautilus-window-slot.h"
G_BEGIN_DECLS
#define NAUTILUS_TYPE_NOTEBOOK (nautilus_notebook_get_type ())
#define NAUTILUS_NOTEBOOK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_NOTEBOOK, NautilusNotebook))
#define NAUTILUS_NOTEBOOK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_NOTEBOOK, NautilusNotebookClass))
#define NAUTILUS_IS_NOTEBOOK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_NOTEBOOK))
#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;
/*< private >*/
NautilusNotebookPrivate *priv;
};
struct _NautilusNotebookClass
{
GtkNotebookClass parent_class;
/* Signals */
void (* tab_close_request) (NautilusNotebook *notebook,
NautilusWindowSlot *slot);
};
GType nautilus_notebook_get_type (void);
int nautilus_notebook_add_tab (NautilusNotebook *nb,
NautilusWindowSlot *slot,
int position,
gboolean jump_to);
void nautilus_notebook_set_show_tabs (NautilusNotebook *nb,
gboolean show_tabs);
void nautilus_notebook_set_dnd_enabled (NautilusNotebook *nb,
gboolean enabled);
void nautilus_notebook_sync_tab_label (NautilusNotebook *nb,
NautilusWindowSlot *slot);
void nautilus_notebook_sync_loading (NautilusNotebook *nb,
NautilusWindowSlot *slot);
void nautilus_notebook_reorder_current_child_relative (NautilusNotebook *notebook,
int offset);
void nautilus_notebook_set_current_page_relative (NautilusNotebook *notebook,
int offset);
gboolean nautilus_notebook_can_reorder_current_child_relative (NautilusNotebook *notebook,
int offset);
gboolean nautilus_notebook_can_set_current_page_relative (NautilusNotebook *notebook,
int offset);
G_END_DECLS
#endif /* NAUTILUS_NOTEBOOK_H */
......@@ -171,156 +171,3 @@ void nautilus_window_slot_remove_extra_location_widgets (NautilusWindowSlot *
void nautilus_window_slot_add_current_location_to_history_list (NautilusWindowSlot *slot);
#endif /* NAUTILUS_WINDOW_SLOT_H */
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-window-slot.h: Nautilus window slot
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: Christian Neumair <cneumair@gnome.org>
*/
#ifndef NAUTILUS_WINDOW_SLOT_H
#define NAUTILUS_WINDOW_SLOT_H
#include "nautilus-window.h"
#include "nautilus-query-editor.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))
#define NAUTILUS_IS_WINDOW_SLOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_WINDOW_SLOT))
#define NAUTILUS_IS_WINDOW_SLOT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_WINDOW_SLOT))
#define NAUTILUS_WINDOW_SLOT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_WINDOW_SLOT, NautilusWindowSlotClass))
typedef enum {
NAUTILUS_LOCATION_CHANGE_STANDARD,
NAUTILUS_LOCATION_CHANGE_BACK,
NAUTILUS_LOCATION_CHANGE_FORWARD,
NAUTILUS_LOCATION_CHANGE_RELOAD,
NAUTILUS_LOCATION_CHANGE_REDIRECT,
NAUTILUS_LOCATION_CHANGE_FALLBACK
} NautilusLocationChangeType;
struct NautilusWindowSlotClass {
GObjectClass parent_class;
/* wrapped NautilusWindowInfo signals, for overloading */
void (* active) (NautilusWindowSlot *slot);
void (* inactive) (NautilusWindowSlot *slot);
void (* update_query_editor) (NautilusWindowSlot *slot);
};
/* Each NautilusWindowSlot corresponds to
* a location in the window for displaying
* a NautilusView.
*
* For navigation windows, this would be a
* tab, while spatial windows only have one slot.
*/
struct NautilusWindowSlot {
GObject parent;
NautilusWindow *window;
/* content_box contains
* 1) an event box containing extra_location_widgets
* 2) the view box for the content view
*/
GtkWidget *content_box;
GtkWidget *extra_location_event_box;
GtkWidget *extra_location_widgets;
GtkWidget *view_box;
NautilusView *content_view;
NautilusView *new_content_view;
/* Information about bookmarks */
NautilusBookmark *current_location_bookmark;
NautilusBookmark *last_location_bookmark;
/* Current location. */
GFile *location;
char *title;
char *status_text;
NautilusFile *viewed_file;
gboolean viewed_file_seen;
gboolean viewed_file_in_trash;
gboolean allow_stop;
NautilusQueryEditor *query_editor;
/* New location. */
NautilusLocationChangeType location_change_type;
guint location_change_distance;
GFile *pending_location;
char *pending_scroll_to;
GList *pending_selection;
NautilusFile *determine_view_file;
GCancellable *mount_cancellable;
GError *mount_error;
gboolean tried_mount;
GCancellable *find_mount_cancellable;
};
GType nautilus_window_slot_get_type (void);
char * nautilus_window_slot_get_title (NautilusWindowSlot *slot);
void nautilus_window_slot_update_title (NautilusWindowSlot *slot);
void nautilus_window_slot_update_icon (NautilusWindowSlot *slot);
void nautilus_window_slot_update_query_editor (NautilusWindowSlot *slot);
GFile * nautilus_window_slot_get_location (NautilusWindowSlot *slot);
char * nautilus_window_slot_get_location_uri (NautilusWindowSlot *slot);
void nautilus_window_slot_close (NautilusWindowSlot *slot);
void nautilus_window_slot_reload (NautilusWindowSlot *slot);
#define nautilus_window_slot_go_to(slot,location, new_tab) \
nautilus_window_slot_open_location_full(slot, location, NAUTILUS_WINDOW_OPEN_ACCORDING_TO_MODE, \
(new_tab ? NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB : 0), \
NULL)
#define nautilus_window_slot_go_to_with_selection(slot,location,new_selection) \
nautilus_window_slot_open_location_with_selection(slot, location, new_selection, FALSE)
void nautilus_window_slot_go_home (NautilusWindowSlot *slot,
gboolean new_tab);
void nautilus_window_slot_go_up (NautilusWindowSlot *slot,
gboolean close_behind);
void nautilus_window_slot_set_content_view_widget (NautilusWindowSlot *slot,
NautilusView *content_view);
void nautilus_window_slot_set_viewed_file (NautilusWindowSlot *slot,
NautilusFile *file);
void nautilus_window_slot_set_allow_stop (NautilusWindowSlot *slot,
gboolean allow_stop);
void nautilus_window_slot_set_status (NautilusWindowSlot *slot,
const char *status);
void nautilus_window_slot_add_extra_location_widget (NautilusWindowSlot *slot,
GtkWidget *widget);
void nautilus_window_slot_remove_extra_location_widgets (NautilusWindowSlot *slot);
void nautilus_window_slot_add_current_location_to_history_list (NautilusWindowSlot *slot);
#endif /* NAUTILUS_WINDOW_SLOT_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment