summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2000-10-09 06:11:24 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2000-10-09 06:11:24 +0000
commit63c49f0f2101ba42b37bc1669afa7973c6f34652 (patch)
treee1607e9c6b42980d599198a88e469a6f7f29cd79 /src
parente157a14f4b181627cb76ab9377ef3d3040661e4e (diff)
downloadnautilus-63c49f0f2101ba42b37bc1669afa7973c6f34652.tar.gz
fixed bug 3549, services button disappeared due to UI handler change, by
fixed bug 3549, services button disappeared due to UI handler change, by adding it on the fly if EAZEL_SERVICES is set. Currently, it comes after the throbber, but that will be fixed when the throbber is positioned properly again. * src/nautilus-window-menus.c: (stop_button_callback), (services_button_callback), (nautilus_window_initialize_menus): added bonobo verb for services and it's handler. Also, added one for the stop button, which was inadvertently lost during the translation. * src/nautilus-window-toolbars.c: (set_up_toolbar_images), (nautilus_window_initialize_toolbars): if EAZEL_SERVICES is set, add the services button and handle it's image. * icons/Makefile.am: * icons/Services.png: added Services image to default theme.
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-navigation-window-menus.c19
-rw-r--r--src/nautilus-window-menus.c19
-rw-r--r--src/nautilus-window-toolbars.c25
3 files changed, 48 insertions, 15 deletions
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index 6513e7777..75e7e0218 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -35,6 +35,7 @@
#include "nautilus-property-browser.h"
#include "nautilus-signaller.h"
#include "nautilus-theme-selector.h"
+#include "nautilus-window-manage-views.h"
#include "nautilus-window-private.h"
#include <gtk/gtkmain.h>
#include <libgnome/gnome-i18n.h>
@@ -247,6 +248,22 @@ file_menu_web_search_callback (BonoboUIComponent *component,
}
static void
+stop_button_callback (BonoboUIComponent *component,
+ gpointer user_data,
+ const char *verb)
+{
+ nautilus_window_stop_loading (NAUTILUS_WINDOW (user_data));
+}
+
+static void
+services_button_callback (BonoboUIComponent *component,
+ gpointer user_data,
+ const char *verb)
+{
+ nautilus_window_goto_uri (NAUTILUS_WINDOW (user_data), "eazel:");
+}
+
+static void
edit_menu_undo_callback (BonoboUIComponent *component,
gpointer user_data,
const char *verb)
@@ -1440,6 +1457,8 @@ nautilus_window_initialize_menus (NautilusWindow *window)
BONOBO_UI_VERB ("Edit Bookmarks", bookmarks_menu_edit_bookmarks_callback),
BONOBO_UI_VERB ("About Nautilus", help_menu_about_nautilus_callback),
BONOBO_UI_VERB ("Nautilus Feedback", help_menu_nautilus_feedback_callback),
+ BONOBO_UI_VERB ("Stop", stop_button_callback),
+ BONOBO_UI_VERB ("Services", services_button_callback),
#ifdef UIH
/* The next set of verbs doesn't work. Need some different mechanism for radio items apparently */
#endif
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 6513e7777..75e7e0218 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -35,6 +35,7 @@
#include "nautilus-property-browser.h"
#include "nautilus-signaller.h"
#include "nautilus-theme-selector.h"
+#include "nautilus-window-manage-views.h"
#include "nautilus-window-private.h"
#include <gtk/gtkmain.h>
#include <libgnome/gnome-i18n.h>
@@ -247,6 +248,22 @@ file_menu_web_search_callback (BonoboUIComponent *component,
}
static void
+stop_button_callback (BonoboUIComponent *component,
+ gpointer user_data,
+ const char *verb)
+{
+ nautilus_window_stop_loading (NAUTILUS_WINDOW (user_data));
+}
+
+static void
+services_button_callback (BonoboUIComponent *component,
+ gpointer user_data,
+ const char *verb)
+{
+ nautilus_window_goto_uri (NAUTILUS_WINDOW (user_data), "eazel:");
+}
+
+static void
edit_menu_undo_callback (BonoboUIComponent *component,
gpointer user_data,
const char *verb)
@@ -1440,6 +1457,8 @@ nautilus_window_initialize_menus (NautilusWindow *window)
BONOBO_UI_VERB ("Edit Bookmarks", bookmarks_menu_edit_bookmarks_callback),
BONOBO_UI_VERB ("About Nautilus", help_menu_about_nautilus_callback),
BONOBO_UI_VERB ("Nautilus Feedback", help_menu_nautilus_feedback_callback),
+ BONOBO_UI_VERB ("Stop", stop_button_callback),
+ BONOBO_UI_VERB ("Services", services_button_callback),
#ifdef UIH
/* The next set of verbs doesn't work. Need some different mechanism for radio items apparently */
#endif
diff --git a/src/nautilus-window-toolbars.c b/src/nautilus-window-toolbars.c
index fdbe029b5..a05e34f12 100644
--- a/src/nautilus-window-toolbars.c
+++ b/src/nautilus-window-toolbars.c
@@ -55,20 +55,6 @@ static void toolbar_services_callback (GtkWidget *widget, NautilusWindow *window
*/
#endif
-/* toolbar definitions */
-
-#define TOOLBAR_BACK_BUTTON_INDEX 0
-#define TOOLBAR_FORWARD_BUTTON_INDEX 1
-#define TOOLBAR_UP_BUTTON_INDEX 2
-#define TOOLBAR_RELOAD_BUTTON_INDEX 3
-/* separator */
-#define TOOLBAR_HOME_BUTTON_INDEX 5
-#define TOOLBAR_SEARCH_LOCAL_BUTTON_INDEX 6
-#define TOOLBAR_SEARCH_WEB_BUTTON_INDEX 7
-/* separator */
-#define TOOLBAR_STOP_BUTTON_INDEX 9
-#define TOOLBAR_SERVICES_INDEX 10
-
#define GNOME_STOCK_PIXMAP_WEBSEARCH "SearchWeb"
/*
@@ -215,6 +201,10 @@ set_up_toolbar_images (NautilusWindow *window)
set_up_button (window, "Toggle Find Mode", "Search");
set_up_button (window, "Go to Web Search", "SearchWeb");
set_up_button (window, "Stop", "Stop");
+
+#ifdef EAZEL_SERVICES
+ set_up_button (window, "Services", "Services");
+#endif
}
static GtkWidget *
@@ -278,9 +268,14 @@ nautilus_window_initialize_toolbars (NautilusWindow *window)
{
GtkWidget *frame;
BonoboControl *throbber_wrapper;
+
+/* add the services button if necessary */
+#ifdef EAZEL_SERVICES
+ bonobo_ui_component_set (window->details->shell_ui, "/Tool Bar/", _("<toolitem type=\"std\" name=\"Services\" label=\"Services\" descr=\"Go To Eazel Services\" verb=\"\"/>"), NULL);
+#endif
set_up_toolbar_images (window);
-
+
window->throbber = allocate_throbber ();
frame = set_up_throbber_frame_type (window);