summaryrefslogtreecommitdiff
path: root/src/nautilus-switchable-search-bar.h
diff options
context:
space:
mode:
authorRebecca Schulman <rebecka@eazel.com>2000-06-21 02:25:54 +0000
committerRebecca Schulman <rebecka@src.gnome.org>2000-06-21 02:25:54 +0000
commitd18ad1f885d5069cff341248209a1ec8a8cd24d9 (patch)
treedfd64e6f46040767fc75fc99e47d1c2803861941 /src/nautilus-switchable-search-bar.h
parentb3af87db6ee43653329678d74da93906d986bf14 (diff)
downloadnautilus-d18ad1f885d5069cff341248209a1ec8a8cd24d9.tar.gz
set up search-bar as a virtual class that switches between the available
2000-06-20 Rebecca Schulman <rebecka@eazel.com> * src/Makefile.am: * src/nautilus-search-bar.c: * src/nautilus-search-bar.h: (nautilus_search_bar_initialize_class), (nautilus_search_bar_initialize), (nautilus_search_bar_set_location), (nautilus_search_bar_set_search_controls): * src/nautilus-switchable-search-bar.c: * src/nautilus-switchable-search-bar.h: * src/nautilus-search-bar-criterion.c: * src/nautilus-search-bar-criterion.h: set up search-bar as a virtual class that switches between the available search bars, similar to nautilus-navigation-bar. * src/nautilus-complex-search-bar.c: * src/nautilus-complex-search-bar.h: * src/nautilus-simple-search-bar.c: * src/nautilus-simple-search-bar.h: Added simple and complex search bar skeletons. these need to get filled out a lot more * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_initialize): switchable navigation bar uses a switchable search bar instead of a normal search bar, since that class is now virtual * src/nautilus-navigation-bar.c: fixed comment typos * libnautilus-extensions/nautilus-directory.h: Exported nautilus_uri_is_search_uri function * libnautilus-extensions/Makefile.am: Added nautilus-search-uri.c and .h files The functions aren't filled out yet, though * libnautilus-extensions/nautilus-search-uri.c: (nautilus_search_uri_to_simple_search_criteria): * libnautilus-extensions/nautilus-search-uri.h: * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_register_for_ui): * libnautilus-extensions/nautilus-global-preferences.h: Changed search bar preference names from NAUTILUS_SEARCH_BAR_ONE_BOX and NAUTILUS_SEARCH_BAR_MULTI_BOX to NAUTILUS_SIMPLE_SEARCH_BAR and NAUTILUS_COMPLEX_SEARCH_BAR to match respective object names
Diffstat (limited to 'src/nautilus-switchable-search-bar.h')
-rw-r--r--src/nautilus-switchable-search-bar.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/nautilus-switchable-search-bar.h b/src/nautilus-switchable-search-bar.h
new file mode 100644
index 000000000..a87fc2380
--- /dev/null
+++ b/src/nautilus-switchable-search-bar.h
@@ -0,0 +1,73 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/* nautilus-switchable-navigation-bar.h - Navigation bar for Nautilus
+ that allows switching between the location bar and the search bar
+
+ 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: Rebecca Schulman <rebecka@eazel.com> */
+
+#ifndef NAUTILUS_SWITCHABLE_SEARCH_BAR_H
+#define NAUTILUS_SWITCHABLE_SEARCH_BAR_H
+
+#include "nautilus-search-bar.h"
+#include <gtk/gtkhbox.h>
+#include "nautilus-location-bar.h"
+#include "nautilus-search-bar.h"
+
+#define NAUTILUS_TYPE_SWITCHABLE_SEARCH_BAR (nautilus_switchable_search_bar_get_type ())
+#define NAUTILUS_SWITCHABLE_SEARCH_BAR(obj) \
+ GTK_CHECK_CAST (obj, NAUTILUS_TYPE_SWITCHABLE_SEARCH_BAR, NautilusSwitchableSearchBar)
+#define NAUTILUS_SWITCHABLE_SEARCH_BAR_CLASS(klass) \
+ GTK_CHECK_CLASS_CAST (klass, NAUTILUS_TYPE_SWITCHABLE_SEARCH_BAR, NautilusSwitchableSearchBarClass)
+#define NAUTILUS_IS_SWITCHABLE_SEARCH_BAR(obj) \
+ GTK_CHECK_TYPE (obj, NAUTILUS_TYPE_SWITCHABLE_SEARCH_BAR)
+
+
+
+typedef struct NautilusSwitchableSearchBar {
+ NautilusNavigationBar parent;
+
+ NautilusSearchBarMode mode;
+ GtkHBox *container;
+ GtkLabel *label;
+ GtkButton *search_button;
+ GtkWidget *complex_search_bar;
+ GtkWidget *simple_search_bar;
+} NautilusSwitchableSearchBar;
+
+
+typedef struct {
+ NautilusSearchBarClass parent_class;
+ void (*mode_changed) (NautilusSwitchableSearchBar *search_bar,
+ NautilusSearchBarMode mode);
+} NautilusSwitchableSearchBarClass;
+
+GtkType nautilus_switchable_search_bar_get_type (void);
+GtkWidget* nautilus_switchable_search_bar_new (void);
+void nautilus_switchable_search_bar_set_mode (NautilusSwitchableSearchBar *search_bar,
+ NautilusSearchBarMode mode);
+void nautilus_switchable_search_bar_mode_is_usable (NautilusSearchBar *search_bar,
+ NautilusSearchBarMode mode);
+gboolean nautilus_switchable_search_bar_mode_is_useable_with_uri (NautilusSearchBar *bar,
+ const char *location,
+ NautilusSearchBarMode mode);
+
+
+#endif /* NAUTILUS_SWITCHABLE_SEARCH_BAR_H */
+