diff options
author | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-06-16 16:33:36 +0000 |
---|---|---|
committer | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-06-16 16:33:36 +0000 |
commit | a5fa2e8a5116d195e000dfbec17f38162ac75a7c (patch) | |
tree | 164dc8fc8cca1aeac03f273a49d21fd011a6e890 /src/nautilus-navigation-bar.h | |
parent | 9c7276fd4a51ce959b0a2d3c20db539e6b8ebfab (diff) | |
download | nautilus-a5fa2e8a5116d195e000dfbec17f38162ac75a7c.tar.gz |
Task 1351: implement controllers to allow location bar and the
search/browse button
* src/nautilus-location-bar.h, src/nautilus-location-bar.c:
Factored this into two classes, NautilusNavigationBar, a class
that defines the abstract interface (the set_location function and
the location_changed signal), and NautilusLocationBar, a concrete
implementation that works like the previous location bar.
(nautilus_location_bar_set_location,
nautilus_location_bar_get_location): Made static. Made
`nautilus_location_bar_set_location' the handler for the
set_location virtual method.
* src/nautilus-navigation-bar.h, src/nautilus-navigation-bar.c:
Abstract superclass for navigation bars.
* src/nautilus-search-bar.h, src/nautilus-search-bar.c: New
subclass of NautilusNavigationBar. Contains placeholder widgets
for now, will eventually be the search bar.
* src/nautilus-switchable-navigation-bar.h,
src/nautilus-switchable-navigation-bar.c: New subclass of
NautilusNavigationBar that allows switching between the location
bar and the search bar.
* src/nautilus-window.h: Rename `ent_uri' member of the window
struct to `navigation_bar'.
* src/nautilus-window.c
(nautilus_window_navigation_bar_mode_changed_callback): Callback
to sync the "search" toggle button to the mode of the switchable
navigation bar.
(nautilus_window_constructed): Create a
NautilusSwitchableNavigationBar instead of a NautilusLocationBar.
(nautilus_window_set_search_mode): New function to be used by the
search toggle button callback; simply sets the mode of the
switchable navigation bar appropriately.
* src/nautilus-window-toolbars.c: Made Search button a toggle
button.
(toolbar_search_callback): Call `nautilus_window_set_search_mode'.
* src/nautilus-window-manage-views.c
(nautilus_window_update_internals,
nautilus_window_end_location_change_callback): Use
NautlusNavigationBar calls instead of NautilusLocationBar ones.
* src/Makefile.am: Add new files to the build, and split all
headers into noinst_HEADERS out from the nautilus_SOURCES
variable.
Diffstat (limited to 'src/nautilus-navigation-bar.h')
-rw-r--r-- | src/nautilus-navigation-bar.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/nautilus-navigation-bar.h b/src/nautilus-navigation-bar.h new file mode 100644 index 000000000..a447bba3b --- /dev/null +++ b/src/nautilus-navigation-bar.h @@ -0,0 +1,65 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* nautilus-navigation-bar.h - Abstract navigation bar class + + Copyright (C) 2000 Eazel, 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; see the file COPYING. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Author: Maciej Stachowiak <mjs@eazel.com> +*/ + +#ifndef NAUTILUS_NAVIGATION_BAR_H +#define NAUTILUS_NAVIGATION_BAR_H + +#include <libnautilus-extensions/nautilus-generous-bin.h> + +#define NAUTILUS_TYPE_NAVIGATION_BAR (nautilus_navigation_bar_get_type ()) +#define NAUTILUS_NAVIGATION_BAR(obj) \ + GTK_CHECK_CAST (obj, NAUTILUS_TYPE_NAVIGATION_BAR, NautilusNavigationBar) +#define NAUTILUS_NAVIGATION_BAR_CLASS(klass) \ + GTK_CHECK_CLASS_CAST (klass, NAUTILUS_TYPE_NAVIGATION_BAR, NautilusNavigationBarClass) +#define NAUTILUS_IS_NAVIGATION_BAR(obj) \ + GTK_CHECK_TYPE (obj, NAUTILUS_TYPE_NAVIGATION_BAR) + +typedef struct NautilusNavigationBar { + NautilusGenerousBin parent; +} NautilusNavigationBar; + +typedef struct { + NautilusGenerousBinClass parent_class; + + /* signals */ + void (*location_changed) (NautilusNavigationBar *navigation_bar, + const char *location); + + + /* virtual methods */ + void (*set_location) (NautilusNavigationBar *navigation_bar, + const char *location); + +} NautilusNavigationBarClass; + +GtkType nautilus_navigation_bar_get_type (void); +void nautilus_navigation_bar_set_location (NautilusNavigationBar *bar, + const char *location); + +/* `protected' function meant to be used by subclasses to emit the `location_changed' signal */ +void nautilus_navigation_bar_location_changed (NautilusNavigationBar *bar, + const char *location); + + +#endif /* NAUTILUS_NAVIGATION_BAR_H */ |