diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2000-10-23 06:14:37 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2000-10-23 06:14:37 +0000 |
commit | 0fae4e60e1bef90888efaa95636d468f2b710506 (patch) | |
tree | 100acb2d6294ad4b6f12b46331d30a598edaf22f /components | |
parent | 8ae4ae2792ea495f925bb198e0037bb094f076c1 (diff) | |
download | nautilus-0fae4e60e1bef90888efaa95636d468f2b710506.tar.gz |
added image-based tabs to the summary view. Also, fixed problem where the
* components/services/summary/
nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_login_dialog),
(nautilus_summary_view_load_uri), (service_tab_selected_callback):
added image-based tabs to the summary view. Also, fixed problem where
the throbber kept spinning until the login dialog was dismissed by
making it a non-modal dialog by refraining from calling gnome_run_dialog
Currently, only the service tabs have been converted but the update
tab is coming soon.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize_class), (nautilus_tabs_initialize),
(nautilus_tabs_new), (tab_item_destroy), (tab_item_destroy_cover),
(nautilus_tabs_destroy), (nautilus_tabs_unload_tab_pieces),
(load_tab_piece), (nautilus_tabs_load_tab_pieces),
(nautilus_tabs_hit_test), (measure_height), (recalculate_size),
(nautilus_tabs_size_request), (draw_tab_piece_aa),
(draw_pixbuf_tiled_aa), (allocate_cleared_pixbuf),
(measure_tab_name), (draw_tab_label), (draw_all_tabs),
(tab_item_find_by_name), (nautilus_tabs_expose),
(nautilus_tabs_draw), (nautilus_tabs_add_tab),
(nautilus_tabs_remove_tab), (nautilus_tabs_prelight_tab),
(nautilus_tabs_select_tab), (nautilus_tabs_press_event),
(nautilus_tabs_leave_event), (nautilus_tabs_motion_event):
* libnautilus-extensions/nautilus-tabs.h:
added a new class for the fancy Arlo tabs in the summary view,
based on the sidebar tabs.
* configure.in:
* components/services/summary/
nautilus-view/Makefile.am:
* components/services/summary/
nautilus-view/icons/.cvsignore:
* components/services/summary/
nautilus-view/icons/Makefile.am:
* components/services/summary/
nautilus-view/icons/gray_tab_pieces/.cvsignore:
* components/services/summary/
nautilus-view/icons/gray_tab_pieces/*.png
added Arlo's new tab images for the summary view
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize), (add_new_button_callback),
(done_button_callback):
added a done button to the property dialog to make it easier to
dismiss it.
Diffstat (limited to 'components')
36 files changed, 141 insertions, 64 deletions
diff --git a/components/services/summary/icons/Makefile.am b/components/services/summary/icons/Makefile.am new file mode 100644 index 000000000..7ab4d2c21 --- /dev/null +++ b/components/services/summary/icons/Makefile.am @@ -0,0 +1,22 @@ +NULL= + +graytabdir = $(datadir)/pixmaps/nautilus/gray_tab_pieces + +graytab_DATA = \ + active-fill.png \ + active-inactive-bridge.png \ + active-left-bumper.png \ + active-prelight-bridge.png \ + active-right-bumper.png \ + fill-background.png \ + inactive-active-bridge.png \ + inactive-fill.png \ + inactive-left-bumper.png \ + inactive-right-bumper.png \ + prelight-active-bridge.png \ + prelight-fill.png \ + prelight-left-bumper.png \ + prelight-right-bumper.png \ + $(NULL) + +EXTRA_DIST = $(graytab_DATA) diff --git a/components/services/summary/icons/active-fill.png b/components/services/summary/icons/active-fill.png Binary files differnew file mode 100644 index 000000000..ac9eb69e0 --- /dev/null +++ b/components/services/summary/icons/active-fill.png diff --git a/components/services/summary/icons/active-inactive-bridge.png b/components/services/summary/icons/active-inactive-bridge.png Binary files differnew file mode 100644 index 000000000..ff59ce82e --- /dev/null +++ b/components/services/summary/icons/active-inactive-bridge.png diff --git a/components/services/summary/icons/active-left-bumper.png b/components/services/summary/icons/active-left-bumper.png Binary files differnew file mode 100644 index 000000000..6415636e1 --- /dev/null +++ b/components/services/summary/icons/active-left-bumper.png diff --git a/components/services/summary/icons/active-prelight-bridge.png b/components/services/summary/icons/active-prelight-bridge.png Binary files differnew file mode 100644 index 000000000..005607f55 --- /dev/null +++ b/components/services/summary/icons/active-prelight-bridge.png diff --git a/components/services/summary/icons/active-right-bumper.png b/components/services/summary/icons/active-right-bumper.png Binary files differnew file mode 100644 index 000000000..2d3243c0d --- /dev/null +++ b/components/services/summary/icons/active-right-bumper.png diff --git a/components/services/summary/icons/fill-background.png b/components/services/summary/icons/fill-background.png Binary files differnew file mode 100644 index 000000000..b9efe3c36 --- /dev/null +++ b/components/services/summary/icons/fill-background.png diff --git a/components/services/summary/icons/inactive-active-bridge.png b/components/services/summary/icons/inactive-active-bridge.png Binary files differnew file mode 100644 index 000000000..daf841544 --- /dev/null +++ b/components/services/summary/icons/inactive-active-bridge.png diff --git a/components/services/summary/icons/inactive-fill.png b/components/services/summary/icons/inactive-fill.png Binary files differnew file mode 100644 index 000000000..3922d04a4 --- /dev/null +++ b/components/services/summary/icons/inactive-fill.png diff --git a/components/services/summary/icons/inactive-left-bumper.png b/components/services/summary/icons/inactive-left-bumper.png Binary files differnew file mode 100644 index 000000000..5a72fecec --- /dev/null +++ b/components/services/summary/icons/inactive-left-bumper.png diff --git a/components/services/summary/icons/inactive-right-bumper.png b/components/services/summary/icons/inactive-right-bumper.png Binary files differnew file mode 100644 index 000000000..561efe6ba --- /dev/null +++ b/components/services/summary/icons/inactive-right-bumper.png diff --git a/components/services/summary/icons/prelight-active-bridge.png b/components/services/summary/icons/prelight-active-bridge.png Binary files differnew file mode 100644 index 000000000..a210d1fdb --- /dev/null +++ b/components/services/summary/icons/prelight-active-bridge.png diff --git a/components/services/summary/icons/prelight-fill.png b/components/services/summary/icons/prelight-fill.png Binary files differnew file mode 100644 index 000000000..b5559bf2b --- /dev/null +++ b/components/services/summary/icons/prelight-fill.png diff --git a/components/services/summary/icons/prelight-left-bumper.png b/components/services/summary/icons/prelight-left-bumper.png Binary files differnew file mode 100644 index 000000000..1305d82c4 --- /dev/null +++ b/components/services/summary/icons/prelight-left-bumper.png diff --git a/components/services/summary/icons/prelight-right-bumper.png b/components/services/summary/icons/prelight-right-bumper.png Binary files differnew file mode 100644 index 000000000..744c6a92b --- /dev/null +++ b/components/services/summary/icons/prelight-right-bumper.png diff --git a/components/services/summary/nautilus-summary-view.c b/components/services/summary/nautilus-summary-view.c index e76df4535..d42f0191d 100644 --- a/components/services/summary/nautilus-summary-view.c +++ b/components/services/summary/nautilus-summary-view.c @@ -31,17 +31,20 @@ #include <gnome-xml/tree.h> #include <bonobo/bonobo-control.h> #include <libgnomevfs/gnome-vfs-utils.h> + #include <libnautilus-extensions/nautilus-background.h> #include <libnautilus-extensions/nautilus-bonobo-extensions.h> -#include <libnautilus-extensions/nautilus-gtk-extensions.h> -#include <libnautilus-extensions/nautilus-gtk-macros.h> -#include <libnautilus-extensions/nautilus-glib-extensions.h> -#include <libnautilus-extensions/nautilus-global-preferences.h> +#include <libnautilus-extensions/nautilus-caption-table.h> #include <libnautilus-extensions/nautilus-file-utilities.h> -#include <libnautilus-extensions/nautilus-string.h> #include <libnautilus-extensions/nautilus-font-factory.h> #include <libnautilus-extensions/nautilus-gdk-extensions.h> -#include <libnautilus-extensions/nautilus-caption-table.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-global-preferences.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-tabs.h> + #include <libgnomeui/gnome-stock.h> #include <stdio.h> #include <unistd.h> @@ -126,7 +129,8 @@ struct _NautilusSummaryViewDetails { char *services_goto_label; char *services_redirects[500]; gboolean services_button_enabled; - + GtkWidget *services_notebook; + /* Login Frame Widgets */ GtkWidget *username_label; GtkWidget *password_label; @@ -225,6 +229,10 @@ static void merge_bonobo_menu_items (BonoboControl *control, gpointer user_data); static void update_menu_items (NautilusSummaryView *view, gboolean logged_in); +static void +service_tab_selected_callback (GtkWidget *widget, + int which_tab, + NautilusSummaryView *view); NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusSummaryView, nautilus_summary_view, GTK_TYPE_EVENT_BOX) @@ -234,7 +242,7 @@ generate_summary_form (NautilusSummaryView *view) GtkWidget *frame; GtkWidget *title; - GtkWidget *notebook; + GtkWidget *notebook, *notebook_tabs; GtkWidget *tab_label_widget; GtkWidget *temp_box; ServicesData *service_node; @@ -332,26 +340,27 @@ generate_summary_form (NautilusSummaryView *view) gtk_container_add (GTK_CONTAINER (temp_scrolled_window), viewport); gtk_box_pack_start (GTK_BOX (frame), temp_scrolled_window, TRUE, TRUE, 0); + /* add a set of tabs to control the notebook page switching */ + notebook_tabs = nautilus_tabs_new (); + gtk_widget_show (notebook_tabs); + gtk_box_pack_start (GTK_BOX (frame), notebook_tabs, FALSE, FALSE, 0); /* Create the notebook container for services */ notebook = gtk_notebook_new (); gtk_widget_show (notebook); gtk_container_add (GTK_CONTAINER (view->details->form), notebook); - - /* Create the tab_label_widget */ - tab_label_widget = nautilus_label_new ("Your Services"); - nautilus_label_set_font_size (NAUTILUS_LABEL (tab_label_widget), 16); - nautilus_label_set_font_from_components (NAUTILUS_LABEL (tab_label_widget), - "helvetica", - "bold", - NULL, - NULL); - gtk_widget_show (tab_label_widget); - + + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); + view->details->services_notebook = notebook; + gtk_signal_connect (GTK_OBJECT (notebook_tabs), "tab_selected", service_tab_selected_callback, view); + + /* add the tab */ + nautilus_tabs_add_tab (NAUTILUS_TABS (notebook_tabs), _("Your Services"), 0); + /* Create the Services Listing Box */ frame = gtk_vbox_new (FALSE, 0); gtk_widget_show (frame); - gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, tab_label_widget); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, NULL); /* create the services scroll widget */ temp_scrolled_window = gtk_scrolled_window_new (NULL, NULL); @@ -403,18 +412,11 @@ generate_summary_form (NautilusSummaryView *view) /* create the Additional Services pane */ - tab_label_widget = nautilus_label_new ("Additional Services"); - nautilus_label_set_font_size (NAUTILUS_LABEL (tab_label_widget), 16); - nautilus_label_set_font_from_components (NAUTILUS_LABEL (tab_label_widget), - "helvetica", - "bold", - NULL, - NULL); - gtk_widget_show (tab_label_widget); + nautilus_tabs_add_tab (NAUTILUS_TABS (notebook_tabs), _("Additional Services"), 1); temp_vbox = gtk_vbox_new (TRUE, 0); gtk_widget_show (temp_vbox); - gtk_notebook_append_page (GTK_NOTEBOOK (notebook), temp_vbox, tab_label_widget); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), temp_vbox, NULL); temp_hbox = gtk_hbox_new (TRUE, 0); gtk_widget_show (temp_hbox); @@ -1201,8 +1203,8 @@ generate_login_dialog (NautilusSummaryView *view) gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0, GTK_SIGNAL_FUNC (register_button_cb), view); gnome_dialog_button_connect (GNOME_DIALOG (dialog), 1, GTK_SIGNAL_FUNC (login_button_cb), view); - gnome_dialog_run (GNOME_DIALOG (dialog)); - + gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE); + gtk_widget_show (GTK_WIDGET (dialog)); } static void @@ -1353,7 +1355,7 @@ nautilus_summary_view_load_uri (NautilusSummaryView *view, (view, _("Found problem with data on Eazel servers. " "Please contact support@eazel.com.")); } else { - generate_summary_form (view); + generate_summary_form (view); if (!view->details->logged_in) { generate_login_dialog (view); } @@ -1377,6 +1379,16 @@ summary_load_location_callback (NautilusView *nautilus_view, } +/* here is the callback to handle service tab selection */ +static void +service_tab_selected_callback (GtkWidget *widget, + int which_tab, + NautilusSummaryView *view) +{ + gtk_notebook_set_page (GTK_NOTEBOOK (view->details->services_notebook), which_tab); +} + +/* here are the callbacks to handle bonobo menu items */ static void bonobo_register_callback (BonoboUIComponent *ui, gpointer user_data, const char *verb) { diff --git a/components/services/summary/nautilus-view/Makefile.am b/components/services/summary/nautilus-view/Makefile.am index 22413ff50..cc5cb6b01 100644 --- a/components/services/summary/nautilus-view/Makefile.am +++ b/components/services/summary/nautilus-view/Makefile.am @@ -6,6 +6,8 @@ CPPFLAGS = \ -DDATADIR=\"$(datadir)\" \ $(NULL) +SUBDIRS = icons + INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/components/services/nautilus-dependent-shared \ diff --git a/components/services/summary/nautilus-view/icons/.cvsignore b/components/services/summary/nautilus-view/icons/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/components/services/summary/nautilus-view/icons/Makefile.am b/components/services/summary/nautilus-view/icons/Makefile.am new file mode 100644 index 000000000..0390c3161 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/Makefile.am @@ -0,0 +1,3 @@ +NULL= + +SUBDIRS = gray_tab_pieces diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/.cvsignore b/components/services/summary/nautilus-view/icons/gray_tab_pieces/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/Makefile.am b/components/services/summary/nautilus-view/icons/gray_tab_pieces/Makefile.am new file mode 100644 index 000000000..7ab4d2c21 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/Makefile.am @@ -0,0 +1,22 @@ +NULL= + +graytabdir = $(datadir)/pixmaps/nautilus/gray_tab_pieces + +graytab_DATA = \ + active-fill.png \ + active-inactive-bridge.png \ + active-left-bumper.png \ + active-prelight-bridge.png \ + active-right-bumper.png \ + fill-background.png \ + inactive-active-bridge.png \ + inactive-fill.png \ + inactive-left-bumper.png \ + inactive-right-bumper.png \ + prelight-active-bridge.png \ + prelight-fill.png \ + prelight-left-bumper.png \ + prelight-right-bumper.png \ + $(NULL) + +EXTRA_DIST = $(graytab_DATA) diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-fill.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-fill.png Binary files differnew file mode 100644 index 000000000..ac9eb69e0 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-fill.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-inactive-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-inactive-bridge.png Binary files differnew file mode 100644 index 000000000..ff59ce82e --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-inactive-bridge.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-left-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-left-bumper.png Binary files differnew file mode 100644 index 000000000..6415636e1 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-left-bumper.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-prelight-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-prelight-bridge.png Binary files differnew file mode 100644 index 000000000..005607f55 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-prelight-bridge.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-right-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-right-bumper.png Binary files differnew file mode 100644 index 000000000..2d3243c0d --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/active-right-bumper.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/fill-background.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/fill-background.png Binary files differnew file mode 100644 index 000000000..b9efe3c36 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/fill-background.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-active-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-active-bridge.png Binary files differnew file mode 100644 index 000000000..daf841544 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-active-bridge.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-fill.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-fill.png Binary files differnew file mode 100644 index 000000000..3922d04a4 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-fill.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-left-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-left-bumper.png Binary files differnew file mode 100644 index 000000000..5a72fecec --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-left-bumper.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-right-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-right-bumper.png Binary files differnew file mode 100644 index 000000000..561efe6ba --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/inactive-right-bumper.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-active-bridge.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-active-bridge.png Binary files differnew file mode 100644 index 000000000..a210d1fdb --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-active-bridge.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-fill.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-fill.png Binary files differnew file mode 100644 index 000000000..b5559bf2b --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-fill.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-left-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-left-bumper.png Binary files differnew file mode 100644 index 000000000..1305d82c4 --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-left-bumper.png diff --git a/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-right-bumper.png b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-right-bumper.png Binary files differnew file mode 100644 index 000000000..744c6a92b --- /dev/null +++ b/components/services/summary/nautilus-view/icons/gray_tab_pieces/prelight-right-bumper.png diff --git a/components/services/summary/nautilus-view/nautilus-summary-view.c b/components/services/summary/nautilus-view/nautilus-summary-view.c index e76df4535..d42f0191d 100644 --- a/components/services/summary/nautilus-view/nautilus-summary-view.c +++ b/components/services/summary/nautilus-view/nautilus-summary-view.c @@ -31,17 +31,20 @@ #include <gnome-xml/tree.h> #include <bonobo/bonobo-control.h> #include <libgnomevfs/gnome-vfs-utils.h> + #include <libnautilus-extensions/nautilus-background.h> #include <libnautilus-extensions/nautilus-bonobo-extensions.h> -#include <libnautilus-extensions/nautilus-gtk-extensions.h> -#include <libnautilus-extensions/nautilus-gtk-macros.h> -#include <libnautilus-extensions/nautilus-glib-extensions.h> -#include <libnautilus-extensions/nautilus-global-preferences.h> +#include <libnautilus-extensions/nautilus-caption-table.h> #include <libnautilus-extensions/nautilus-file-utilities.h> -#include <libnautilus-extensions/nautilus-string.h> #include <libnautilus-extensions/nautilus-font-factory.h> #include <libnautilus-extensions/nautilus-gdk-extensions.h> -#include <libnautilus-extensions/nautilus-caption-table.h> +#include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-global-preferences.h> +#include <libnautilus-extensions/nautilus-gtk-extensions.h> +#include <libnautilus-extensions/nautilus-gtk-macros.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-tabs.h> + #include <libgnomeui/gnome-stock.h> #include <stdio.h> #include <unistd.h> @@ -126,7 +129,8 @@ struct _NautilusSummaryViewDetails { char *services_goto_label; char *services_redirects[500]; gboolean services_button_enabled; - + GtkWidget *services_notebook; + /* Login Frame Widgets */ GtkWidget *username_label; GtkWidget *password_label; @@ -225,6 +229,10 @@ static void merge_bonobo_menu_items (BonoboControl *control, gpointer user_data); static void update_menu_items (NautilusSummaryView *view, gboolean logged_in); +static void +service_tab_selected_callback (GtkWidget *widget, + int which_tab, + NautilusSummaryView *view); NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusSummaryView, nautilus_summary_view, GTK_TYPE_EVENT_BOX) @@ -234,7 +242,7 @@ generate_summary_form (NautilusSummaryView *view) GtkWidget *frame; GtkWidget *title; - GtkWidget *notebook; + GtkWidget *notebook, *notebook_tabs; GtkWidget *tab_label_widget; GtkWidget *temp_box; ServicesData *service_node; @@ -332,26 +340,27 @@ generate_summary_form (NautilusSummaryView *view) gtk_container_add (GTK_CONTAINER (temp_scrolled_window), viewport); gtk_box_pack_start (GTK_BOX (frame), temp_scrolled_window, TRUE, TRUE, 0); + /* add a set of tabs to control the notebook page switching */ + notebook_tabs = nautilus_tabs_new (); + gtk_widget_show (notebook_tabs); + gtk_box_pack_start (GTK_BOX (frame), notebook_tabs, FALSE, FALSE, 0); /* Create the notebook container for services */ notebook = gtk_notebook_new (); gtk_widget_show (notebook); gtk_container_add (GTK_CONTAINER (view->details->form), notebook); - - /* Create the tab_label_widget */ - tab_label_widget = nautilus_label_new ("Your Services"); - nautilus_label_set_font_size (NAUTILUS_LABEL (tab_label_widget), 16); - nautilus_label_set_font_from_components (NAUTILUS_LABEL (tab_label_widget), - "helvetica", - "bold", - NULL, - NULL); - gtk_widget_show (tab_label_widget); - + + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); + view->details->services_notebook = notebook; + gtk_signal_connect (GTK_OBJECT (notebook_tabs), "tab_selected", service_tab_selected_callback, view); + + /* add the tab */ + nautilus_tabs_add_tab (NAUTILUS_TABS (notebook_tabs), _("Your Services"), 0); + /* Create the Services Listing Box */ frame = gtk_vbox_new (FALSE, 0); gtk_widget_show (frame); - gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, tab_label_widget); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, NULL); /* create the services scroll widget */ temp_scrolled_window = gtk_scrolled_window_new (NULL, NULL); @@ -403,18 +412,11 @@ generate_summary_form (NautilusSummaryView *view) /* create the Additional Services pane */ - tab_label_widget = nautilus_label_new ("Additional Services"); - nautilus_label_set_font_size (NAUTILUS_LABEL (tab_label_widget), 16); - nautilus_label_set_font_from_components (NAUTILUS_LABEL (tab_label_widget), - "helvetica", - "bold", - NULL, - NULL); - gtk_widget_show (tab_label_widget); + nautilus_tabs_add_tab (NAUTILUS_TABS (notebook_tabs), _("Additional Services"), 1); temp_vbox = gtk_vbox_new (TRUE, 0); gtk_widget_show (temp_vbox); - gtk_notebook_append_page (GTK_NOTEBOOK (notebook), temp_vbox, tab_label_widget); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), temp_vbox, NULL); temp_hbox = gtk_hbox_new (TRUE, 0); gtk_widget_show (temp_hbox); @@ -1201,8 +1203,8 @@ generate_login_dialog (NautilusSummaryView *view) gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0, GTK_SIGNAL_FUNC (register_button_cb), view); gnome_dialog_button_connect (GNOME_DIALOG (dialog), 1, GTK_SIGNAL_FUNC (login_button_cb), view); - gnome_dialog_run (GNOME_DIALOG (dialog)); - + gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE); + gtk_widget_show (GTK_WIDGET (dialog)); } static void @@ -1353,7 +1355,7 @@ nautilus_summary_view_load_uri (NautilusSummaryView *view, (view, _("Found problem with data on Eazel servers. " "Please contact support@eazel.com.")); } else { - generate_summary_form (view); + generate_summary_form (view); if (!view->details->logged_in) { generate_login_dialog (view); } @@ -1377,6 +1379,16 @@ summary_load_location_callback (NautilusView *nautilus_view, } +/* here is the callback to handle service tab selection */ +static void +service_tab_selected_callback (GtkWidget *widget, + int which_tab, + NautilusSummaryView *view) +{ + gtk_notebook_set_page (GTK_NOTEBOOK (view->details->services_notebook), which_tab); +} + +/* here are the callbacks to handle bonobo menu items */ static void bonobo_register_callback (BonoboUIComponent *ui, gpointer user_data, const char *verb) { |