summaryrefslogtreecommitdiff
path: root/src/nautilus-switchable-navigation-bar.h
diff options
context:
space:
mode:
authorJohn Sullivan <sullivan@src.gnome.org>2000-09-12 17:16:59 +0000
committerJohn Sullivan <sullivan@src.gnome.org>2000-09-12 17:16:59 +0000
commit7a6d8a28f9f03a742965d43ff16a1ade1f2514a5 (patch)
tree3eb756ff18f1889b2508f490f01485d23fab103f /src/nautilus-switchable-navigation-bar.h
parente8d3b4590332148edfdee58cf9fddba80c4f4e11 (diff)
downloadnautilus-7a6d8a28f9f03a742965d43ff16a1ade1f2514a5.tar.gz
Fixed bug 2668 (Switching to Search mode should move the
focus to the search text field). * src/nautilus-navigation-bar.h: Added signal and public function for nautilus_navigation_bar_activate. * src/nautilus-navigation-bar.c: (nautilus_navigation_bar_initialize_class): Wire up activate signal; default function is NULL. (nautilus_navigation_bar_activate): New function, emits signal. * src/nautilus-switchable-navigation-bar.h: * src/nautilus-switchable-navigation-bar.c: Defined a NautilusSwitchableNavigationBarDetails struct, and moved implementation details into it. Set the types of the fields in this struct to reflect actual needs, instead of using GtkWidget and casting up to other classes. (nautilus_switchable_navigation_bar_initialize): Create details struct. (nautilus_switchable_navigation_bar_destroy): New function, free details struct. (nautilus_switchable_navigation_bar_initialize_class): Wire up destroy handler. (nautilus_switchable_navigation_bar_set_mode): Call nautilus_navigation_bar_activate on switched-to bar. (nautilus_switchable_navigation_bar_get_mode), (nautilus_switchable_navigation_bar_get_location), (nautilus_switchable_navigation_bar_set_location): Updated to use bar->details. * src/nautilus-switchable-search-bar.c: (nautilus_switchable_search_bar_initialize_class): Wire up activate signal to real_activate. (real_activate): Call nautilus_navigation_bar_activate on the current search bar. * src/nautilus-simple-search-bar.c: (nautilus_simple_search_bar_initialize_class): Wire up activate signal to real_activate. (real_activate): Set focus to text field. * src/nautilus-complex-search-bar.c: (nautilus_complex_search_bar_initialize_class): Wire up activate signal to real_activate. (get_first_text_field): New helper function to find the first text field in a search criterion (or NULL). (real_activate): Set focus to first text field.
Diffstat (limited to 'src/nautilus-switchable-navigation-bar.h')
-rw-r--r--src/nautilus-switchable-navigation-bar.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nautilus-switchable-navigation-bar.h b/src/nautilus-switchable-navigation-bar.h
index bf0cb2a03..46b4b3fd1 100644
--- a/src/nautilus-switchable-navigation-bar.h
+++ b/src/nautilus-switchable-navigation-bar.h
@@ -43,6 +43,8 @@
#define NAUTILUS_IS_SWITCHABLE_NAVIGATION_BAR(obj) \
GTK_CHECK_TYPE (obj, NAUTILUS_TYPE_SWITCHABLE_NAVIGATION_BAR)
+typedef struct NautilusSwitchableNavigationBarDetails NautilusSwitchableNavigationBarDetails;
+
typedef enum {
NAUTILUS_SWITCHABLE_NAVIGATION_BAR_MODE_LOCATION,
NAUTILUS_SWITCHABLE_NAVIGATION_BAR_MODE_SEARCH
@@ -51,11 +53,7 @@ typedef enum {
typedef struct NautilusSwitchableNavigationBar {
NautilusNavigationBar parent;
-
- NautilusSwitchableNavigationBarMode mode;
-
- GtkWidget *location_bar;
- GtkWidget *search_bar;
+ NautilusSwitchableNavigationBarDetails *details;
} NautilusSwitchableNavigationBar;
typedef struct {