diff options
author | J Shane Culpepper <pepper@eazel.com> | 2000-07-18 22:24:46 +0000 |
---|---|---|
committer | J Shane Culpepper <pepper@src.gnome.org> | 2000-07-18 22:24:46 +0000 |
commit | 18911c8e47dd21b58bbbf00459e3f02a0d6effa4 (patch) | |
tree | 96fe683801d1500687e64c4e2f5d516d1642e23a | |
parent | c030351f9c79604c012e359d6966de2918bf2f21 (diff) | |
download | nautilus-18911c8e47dd21b58bbbf00459e3f02a0d6effa4.tar.gz |
First part of the fix for task #1632. Creating a common repository for
2000-07-18 J Shane Culpepper <pepper@eazel.com>
* components/services/Makefile.am:
* components/services/install/nautilus-view/Makefile.am:
*
components/services/install/nautilus-view/nautilus-service-install-
view.c: (generate_install_form),
(nautilus_service_install_view_update_from_uri):
* components/services/nautilus-dependant-shared/.cvsignore:
* components/services/nautilus-dependant-shared/Makefile.am:
* components/services/nautilus-dependant-shared/icons/.cvsignore:
* components/services/nautilus-dependant-shared/icons/Makefile.am:
*
components/services/nautilus-dependant-shared/shared-service-utilit
ies.c: (go_to_uri):
*
components/services/nautilus-dependant-shared/shared-service-utilit
ies.h:
*
components/services/nautilus-dependant-shared/shared-service-widget
s.c: (create_image_widget), (create_services_title_widget),
(create_services_header_widget):
*
components/services/nautilus-dependant-shared/shared-service-widget
s.h:
* components/services/startup/nautilus-view/Makefile.am:
* components/services/startup/nautilus-view/icons/Makefile.am:
*
components/services/startup/nautilus-view/nautilus-service-startup-
view.c: (generate_startup_form), (generate_form_logo),
(nautilus_service_startup_view_initialize),
(nautilus_service_startup_view_load_uri):
* configure.in:
First part of the fix for task #1632. Creating a common repository
for duplicated nautilus dependant code that is used in service views.
25 files changed, 477 insertions, 440 deletions
@@ -1,3 +1,40 @@ +2000-07-18 J Shane Culpepper <pepper@eazel.com> + + * components/services/Makefile.am: + * components/services/install/nautilus-view/Makefile.am: + * + components/services/install/nautilus-view/nautilus-service-install- + view.c: (generate_install_form), + (nautilus_service_install_view_update_from_uri): + * components/services/nautilus-dependant-shared/.cvsignore: + * components/services/nautilus-dependant-shared/Makefile.am: + * components/services/nautilus-dependant-shared/icons/.cvsignore: + * components/services/nautilus-dependant-shared/icons/Makefile.am: + * + components/services/nautilus-dependant-shared/shared-service-utilit + ies.c: (go_to_uri): + * + components/services/nautilus-dependant-shared/shared-service-utilit + ies.h: + * + components/services/nautilus-dependant-shared/shared-service-widget + s.c: (create_image_widget), (create_services_title_widget), + (create_services_header_widget): + * + components/services/nautilus-dependant-shared/shared-service-widget + s.h: + * components/services/startup/nautilus-view/Makefile.am: + * components/services/startup/nautilus-view/icons/Makefile.am: + * + components/services/startup/nautilus-view/nautilus-service-startup- + view.c: (generate_startup_form), (generate_form_logo), + (nautilus_service_startup_view_initialize), + (nautilus_service_startup_view_load_uri): + * configure.in: + + First part of the fix for task #1632. Creating a common repository + for duplicated nautilus dependant code that is used in service views. + 2000-07-18 Pavel Cisler <pavel@eazel.com> * libnautilus-extensions/nautilus-list.c: (nautilus_list_draw), diff --git a/components/services/Makefile.am b/components/services/Makefile.am index 80a05de9c..369e87144 100644 --- a/components/services/Makefile.am +++ b/components/services/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = trilobite startup install time login summary inventory vault +SUBDIRS = trilobite nautilus-dependant-shared startup install time login summary inventory vault diff --git a/components/services/install-view/Makefile.am b/components/services/install-view/Makefile.am index 9b533af3f..48fba2fe2 100644 --- a/components/services/install-view/Makefile.am +++ b/components/services/install-view/Makefile.am @@ -10,6 +10,8 @@ INCLUDES = \ -I$(top_srcdir)/components/services/trilobite \ -I$(top_builddir)/components/services/install/lib \ -I$(top_builddir)/components/services/trilobite \ + -I$(top_srcdir)/components/services/nautilus-dependant-shared \ + -I$(top_builddir)/components/services/install/lib \ -I$(top_builddir) \ -I/usr/include/rpm \ $(GCONF_CFLAGS) \ @@ -39,6 +41,7 @@ nautilus_service_install_view_LDADD = \ $(top_builddir)/librsvg/librsvg.la \ $(top_builddir)/components/services/install/lib/libeazelinstall.la \ $(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \ + $(top_builddir)/components/services/nautilus-dependant-shared/libnautilusdepshared.a \ $(BONOBO_LIBS) \ $(GCONF_LIBS) \ $(GNOMEUI_LIBS) \ diff --git a/components/services/install-view/nautilus-service-install-view.c b/components/services/install-view/nautilus-service-install-view.c index b8a5f2491..89d5efc1c 100644 --- a/components/services/install-view/nautilus-service-install-view.c +++ b/components/services/install-view/nautilus-service-install-view.c @@ -25,6 +25,8 @@ #include "nautilus-service-install-view.h" #include "nautilus-service-install.h" +#include "shared-service-widgets.h" +#include "shared-service-utilities.h" #include <libeazelinstall.h> #include <rpm/rpmlib.h> @@ -47,32 +49,23 @@ #include <errno.h> #include <sys/stat.h> -#define SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR "rgb:FFFF/FFFF/FFFF" #define SERVICE_DOMAIN_NAME "testmachine.eazel.com" #define NEXT_VIEW "http://eazel1.eazel.com/services/control2.html" -static void nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass); -static void nautilus_service_install_view_initialize (NautilusServiceInstallView *view); -static void nautilus_service_install_view_destroy (GtkObject *object); -static void service_install_load_location_callback (NautilusView *nautilus_view, - const char *location, - NautilusServiceInstallView *view); -static void generate_install_form (NautilusServiceInstallView *view); -static void fake_overall_install_progress (NautilusServiceInstallView *view); -static void generate_current_progress (NautilusServiceInstallView *view, - char *progress_message); -static void nautilus_service_install_view_update_from_uri (NautilusServiceInstallView *view, - const char *uri); -static void show_overall_feedback (NautilusServiceInstallView *view, - char *progress_message); -static GtkWidget* create_title_widget (const char *title_text); -static GtkWidget* create_middle_title_widget (const char *left_text, - const char *right_text); -static GtkWidget* create_image_widget (const char *icon_name, - const char *background_color_spec, - NautilusImagePlacementType placement); -static void go_to_uri (NautilusServiceInstallView *view, - char *uri); +static void nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass); +static void nautilus_service_install_view_initialize (NautilusServiceInstallView *view); +static void nautilus_service_install_view_destroy (GtkObject *object); +static void service_install_load_location_callback (NautilusView *nautilus_view, + const char *location, + NautilusServiceInstallView *view); +static void generate_install_form (NautilusServiceInstallView *view); +static void fake_overall_install_progress (NautilusServiceInstallView *view); +static void generate_current_progress (NautilusServiceInstallView *view, + char *progress_message); +static void nautilus_service_install_view_update_from_uri (NautilusServiceInstallView *view, + const char *uri); +static void show_overall_feedback (NautilusServiceInstallView *view, + char *progress_message); NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusServiceInstallView, nautilus_service_install_view, GTK_TYPE_EVENT_BOX) @@ -90,7 +83,7 @@ generate_install_form (NautilusServiceInstallView *view) gtk_widget_show (view->details->form); /* Setup the title */ - title = create_title_widget ("Easy Install"); + title = create_services_title_widget ("Easy Install"); gtk_box_pack_start (GTK_BOX (view->details->form), title, FALSE, FALSE, 0); gtk_widget_show (title); @@ -139,8 +132,8 @@ generate_install_form (NautilusServiceInstallView *view) nautilus_gtk_widget_set_font (view->details->overall_feedback_text, font); gtk_box_pack_start (GTK_BOX (view->details->form), view->details->overall_feedback_text, FALSE, FALSE, 8); - /* Setup the title */ - middle_title = create_middle_title_widget ("Messages", "Progress"); + /* Setup the progress header */ + middle_title = create_services_header_widget ("Messages", "Progress"); gtk_box_pack_start (GTK_BOX (view->details->form), middle_title, FALSE, FALSE, 0); gtk_widget_show (middle_title); @@ -151,149 +144,6 @@ generate_install_form (NautilusServiceInstallView *view) } -static GtkWidget* -create_image_widget (const char *icon_name, - const char *background_color_spec, - NautilusImagePlacementType placement) -{ - char *path; - GtkWidget *image; - GdkPixbuf *pixbuf; - guint32 background_rgb; - - g_return_val_if_fail (icon_name != NULL, NULL); - g_return_val_if_fail (background_color_spec != NULL, NULL); - - image = nautilus_image_new(); - - path = nautilus_pixmap_file (icon_name); - - pixbuf = gdk_pixbuf_new_from_file (path); - g_free (path); - - if (pixbuf != NULL) { - nautilus_image_set_pixbuf (NAUTILUS_IMAGE (image), pixbuf); - gdk_pixbuf_unref (pixbuf); - } - else { - g_warning ("Could not find the requested icon."); - } - - nautilus_image_set_background_type (NAUTILUS_IMAGE (image), - NAUTILUS_IMAGE_BACKGROUND_SOLID); - - background_rgb = nautilus_parse_rgb_with_white_default (background_color_spec); - - nautilus_image_set_background_color (NAUTILUS_IMAGE (image), - background_rgb); - - nautilus_image_set_placement_type (NAUTILUS_IMAGE (image), placement); - - return image; -} - -static GtkWidget* -create_title_widget (const char *title_text) -{ - GtkWidget *title_hbox; - GtkWidget *logo_image; - GtkWidget *filler_image; - GtkWidget *text_image; - GdkFont *font; - - g_assert (title_text != NULL); - - title_hbox = gtk_hbox_new (FALSE, 0); - - logo_image = create_image_widget ("eazel-services-logo.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_CENTER); - - filler_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - text_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - font = nautilus_font_factory_get_font_by_family ("helvetica", 20); - - nautilus_image_set_label_text (NAUTILUS_IMAGE (text_image), title_text); - nautilus_image_set_label_font (NAUTILUS_IMAGE (text_image), font); - nautilus_image_set_extra_width (NAUTILUS_IMAGE (text_image), 8); - nautilus_image_set_right_offset (NAUTILUS_IMAGE (text_image), 8); - nautilus_image_set_top_offset (NAUTILUS_IMAGE (text_image), 3); - - gdk_font_unref (font); - - gtk_widget_show (logo_image); - gtk_widget_show (filler_image); - gtk_widget_show (text_image); - - gtk_box_pack_start (GTK_BOX (title_hbox), logo_image, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (title_hbox), filler_image, TRUE, TRUE, 0); - gtk_box_pack_end (GTK_BOX (title_hbox), text_image, FALSE, FALSE, 0); - - return title_hbox; -} - -static GtkWidget* -create_middle_title_widget (const char *left_text, - const char *right_text) -{ - GtkWidget *title_hbox; - GtkWidget *left_image; - GtkWidget *right_image; - GtkWidget *filler_image; - GdkFont *font; - - g_assert (left_text != NULL); - g_assert (right_text != NULL); - - title_hbox = gtk_hbox_new (FALSE, 0); - - left_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - filler_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - right_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - font = nautilus_font_factory_get_font_by_family ("helvetica", 18); - - nautilus_image_set_label_text (NAUTILUS_IMAGE (left_image), left_text); - nautilus_image_set_label_font (NAUTILUS_IMAGE (left_image), font); - - nautilus_image_set_extra_width (NAUTILUS_IMAGE (left_image), 8); - nautilus_image_set_left_offset (NAUTILUS_IMAGE (left_image), 8); - nautilus_image_set_top_offset (NAUTILUS_IMAGE (left_image), 1); - - nautilus_image_set_label_text (NAUTILUS_IMAGE (right_image), right_text); - nautilus_image_set_label_font (NAUTILUS_IMAGE (right_image), font); - - nautilus_image_set_extra_width (NAUTILUS_IMAGE (right_image), 8); - nautilus_image_set_right_offset (NAUTILUS_IMAGE (right_image), 8); - nautilus_image_set_top_offset (NAUTILUS_IMAGE (right_image), 1); - - gdk_font_unref (font); - - gtk_widget_show (left_image); - gtk_widget_show (filler_image); - gtk_widget_show (right_image); - - gtk_box_pack_start (GTK_BOX (title_hbox), left_image, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (title_hbox), filler_image, TRUE, TRUE, 0); - gtk_box_pack_end (GTK_BOX (title_hbox), right_image, FALSE, FALSE, 0); - - return title_hbox; -} - static void fake_overall_install_progress (NautilusServiceInstallView *view) { @@ -391,16 +241,6 @@ show_overall_feedback (NautilusServiceInstallView *view, char *progress_message) } -/* utility routine to go to another uri */ - -static void -go_to_uri (NautilusServiceInstallView *view, char *uri) { - - nautilus_view_open_location (view->details->nautilus_view, uri); - -} - - static void nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass) { @@ -586,7 +426,7 @@ nautilus_service_install_view_update_from_uri (NautilusServiceInstallView *view, show_overall_feedback (view, "Waiting for downloads"); generate_current_progress (view, "Downloading glib libraries ..."); fake_overall_install_progress (view); - go_to_uri (view, NEXT_VIEW); + go_to_uri (view->details->nautilus_view, NEXT_VIEW); } diff --git a/components/services/install/nautilus-view/Makefile.am b/components/services/install/nautilus-view/Makefile.am index 9b533af3f..48fba2fe2 100644 --- a/components/services/install/nautilus-view/Makefile.am +++ b/components/services/install/nautilus-view/Makefile.am @@ -10,6 +10,8 @@ INCLUDES = \ -I$(top_srcdir)/components/services/trilobite \ -I$(top_builddir)/components/services/install/lib \ -I$(top_builddir)/components/services/trilobite \ + -I$(top_srcdir)/components/services/nautilus-dependant-shared \ + -I$(top_builddir)/components/services/install/lib \ -I$(top_builddir) \ -I/usr/include/rpm \ $(GCONF_CFLAGS) \ @@ -39,6 +41,7 @@ nautilus_service_install_view_LDADD = \ $(top_builddir)/librsvg/librsvg.la \ $(top_builddir)/components/services/install/lib/libeazelinstall.la \ $(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \ + $(top_builddir)/components/services/nautilus-dependant-shared/libnautilusdepshared.a \ $(BONOBO_LIBS) \ $(GCONF_LIBS) \ $(GNOMEUI_LIBS) \ diff --git a/components/services/install/nautilus-view/nautilus-service-install-view.c b/components/services/install/nautilus-view/nautilus-service-install-view.c index b8a5f2491..89d5efc1c 100644 --- a/components/services/install/nautilus-view/nautilus-service-install-view.c +++ b/components/services/install/nautilus-view/nautilus-service-install-view.c @@ -25,6 +25,8 @@ #include "nautilus-service-install-view.h" #include "nautilus-service-install.h" +#include "shared-service-widgets.h" +#include "shared-service-utilities.h" #include <libeazelinstall.h> #include <rpm/rpmlib.h> @@ -47,32 +49,23 @@ #include <errno.h> #include <sys/stat.h> -#define SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR "rgb:FFFF/FFFF/FFFF" #define SERVICE_DOMAIN_NAME "testmachine.eazel.com" #define NEXT_VIEW "http://eazel1.eazel.com/services/control2.html" -static void nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass); -static void nautilus_service_install_view_initialize (NautilusServiceInstallView *view); -static void nautilus_service_install_view_destroy (GtkObject *object); -static void service_install_load_location_callback (NautilusView *nautilus_view, - const char *location, - NautilusServiceInstallView *view); -static void generate_install_form (NautilusServiceInstallView *view); -static void fake_overall_install_progress (NautilusServiceInstallView *view); -static void generate_current_progress (NautilusServiceInstallView *view, - char *progress_message); -static void nautilus_service_install_view_update_from_uri (NautilusServiceInstallView *view, - const char *uri); -static void show_overall_feedback (NautilusServiceInstallView *view, - char *progress_message); -static GtkWidget* create_title_widget (const char *title_text); -static GtkWidget* create_middle_title_widget (const char *left_text, - const char *right_text); -static GtkWidget* create_image_widget (const char *icon_name, - const char *background_color_spec, - NautilusImagePlacementType placement); -static void go_to_uri (NautilusServiceInstallView *view, - char *uri); +static void nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass); +static void nautilus_service_install_view_initialize (NautilusServiceInstallView *view); +static void nautilus_service_install_view_destroy (GtkObject *object); +static void service_install_load_location_callback (NautilusView *nautilus_view, + const char *location, + NautilusServiceInstallView *view); +static void generate_install_form (NautilusServiceInstallView *view); +static void fake_overall_install_progress (NautilusServiceInstallView *view); +static void generate_current_progress (NautilusServiceInstallView *view, + char *progress_message); +static void nautilus_service_install_view_update_from_uri (NautilusServiceInstallView *view, + const char *uri); +static void show_overall_feedback (NautilusServiceInstallView *view, + char *progress_message); NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusServiceInstallView, nautilus_service_install_view, GTK_TYPE_EVENT_BOX) @@ -90,7 +83,7 @@ generate_install_form (NautilusServiceInstallView *view) gtk_widget_show (view->details->form); /* Setup the title */ - title = create_title_widget ("Easy Install"); + title = create_services_title_widget ("Easy Install"); gtk_box_pack_start (GTK_BOX (view->details->form), title, FALSE, FALSE, 0); gtk_widget_show (title); @@ -139,8 +132,8 @@ generate_install_form (NautilusServiceInstallView *view) nautilus_gtk_widget_set_font (view->details->overall_feedback_text, font); gtk_box_pack_start (GTK_BOX (view->details->form), view->details->overall_feedback_text, FALSE, FALSE, 8); - /* Setup the title */ - middle_title = create_middle_title_widget ("Messages", "Progress"); + /* Setup the progress header */ + middle_title = create_services_header_widget ("Messages", "Progress"); gtk_box_pack_start (GTK_BOX (view->details->form), middle_title, FALSE, FALSE, 0); gtk_widget_show (middle_title); @@ -151,149 +144,6 @@ generate_install_form (NautilusServiceInstallView *view) } -static GtkWidget* -create_image_widget (const char *icon_name, - const char *background_color_spec, - NautilusImagePlacementType placement) -{ - char *path; - GtkWidget *image; - GdkPixbuf *pixbuf; - guint32 background_rgb; - - g_return_val_if_fail (icon_name != NULL, NULL); - g_return_val_if_fail (background_color_spec != NULL, NULL); - - image = nautilus_image_new(); - - path = nautilus_pixmap_file (icon_name); - - pixbuf = gdk_pixbuf_new_from_file (path); - g_free (path); - - if (pixbuf != NULL) { - nautilus_image_set_pixbuf (NAUTILUS_IMAGE (image), pixbuf); - gdk_pixbuf_unref (pixbuf); - } - else { - g_warning ("Could not find the requested icon."); - } - - nautilus_image_set_background_type (NAUTILUS_IMAGE (image), - NAUTILUS_IMAGE_BACKGROUND_SOLID); - - background_rgb = nautilus_parse_rgb_with_white_default (background_color_spec); - - nautilus_image_set_background_color (NAUTILUS_IMAGE (image), - background_rgb); - - nautilus_image_set_placement_type (NAUTILUS_IMAGE (image), placement); - - return image; -} - -static GtkWidget* -create_title_widget (const char *title_text) -{ - GtkWidget *title_hbox; - GtkWidget *logo_image; - GtkWidget *filler_image; - GtkWidget *text_image; - GdkFont *font; - - g_assert (title_text != NULL); - - title_hbox = gtk_hbox_new (FALSE, 0); - - logo_image = create_image_widget ("eazel-services-logo.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_CENTER); - - filler_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - text_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - font = nautilus_font_factory_get_font_by_family ("helvetica", 20); - - nautilus_image_set_label_text (NAUTILUS_IMAGE (text_image), title_text); - nautilus_image_set_label_font (NAUTILUS_IMAGE (text_image), font); - nautilus_image_set_extra_width (NAUTILUS_IMAGE (text_image), 8); - nautilus_image_set_right_offset (NAUTILUS_IMAGE (text_image), 8); - nautilus_image_set_top_offset (NAUTILUS_IMAGE (text_image), 3); - - gdk_font_unref (font); - - gtk_widget_show (logo_image); - gtk_widget_show (filler_image); - gtk_widget_show (text_image); - - gtk_box_pack_start (GTK_BOX (title_hbox), logo_image, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (title_hbox), filler_image, TRUE, TRUE, 0); - gtk_box_pack_end (GTK_BOX (title_hbox), text_image, FALSE, FALSE, 0); - - return title_hbox; -} - -static GtkWidget* -create_middle_title_widget (const char *left_text, - const char *right_text) -{ - GtkWidget *title_hbox; - GtkWidget *left_image; - GtkWidget *right_image; - GtkWidget *filler_image; - GdkFont *font; - - g_assert (left_text != NULL); - g_assert (right_text != NULL); - - title_hbox = gtk_hbox_new (FALSE, 0); - - left_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - filler_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - right_image = create_image_widget ("eazel-services-logo-tile.png", - SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, - NAUTILUS_IMAGE_PLACEMENT_TILE); - - font = nautilus_font_factory_get_font_by_family ("helvetica", 18); - - nautilus_image_set_label_text (NAUTILUS_IMAGE (left_image), left_text); - nautilus_image_set_label_font (NAUTILUS_IMAGE (left_image), font); - - nautilus_image_set_extra_width (NAUTILUS_IMAGE (left_image), 8); - nautilus_image_set_left_offset (NAUTILUS_IMAGE (left_image), 8); - nautilus_image_set_top_offset (NAUTILUS_IMAGE (left_image), 1); - - nautilus_image_set_label_text (NAUTILUS_IMAGE (right_image), right_text); - nautilus_image_set_label_font (NAUTILUS_IMAGE (right_image), font); - - nautilus_image_set_extra_width (NAUTILUS_IMAGE (right_image), 8); - nautilus_image_set_right_offset (NAUTILUS_IMAGE (right_image), 8); - nautilus_image_set_top_offset (NAUTILUS_IMAGE (right_image), 1); - - gdk_font_unref (font); - - gtk_widget_show (left_image); - gtk_widget_show (filler_image); - gtk_widget_show (right_image); - - gtk_box_pack_start (GTK_BOX (title_hbox), left_image, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (title_hbox), filler_image, TRUE, TRUE, 0); - gtk_box_pack_end (GTK_BOX (title_hbox), right_image, FALSE, FALSE, 0); - - return title_hbox; -} - static void fake_overall_install_progress (NautilusServiceInstallView *view) { @@ -391,16 +241,6 @@ show_overall_feedback (NautilusServiceInstallView *view, char *progress_message) } -/* utility routine to go to another uri */ - -static void -go_to_uri (NautilusServiceInstallView *view, char *uri) { - - nautilus_view_open_location (view->details->nautilus_view, uri); - -} - - static void nautilus_service_install_view_initialize_class (NautilusServiceInstallViewClass *klass) { @@ -586,7 +426,7 @@ nautilus_service_install_view_update_from_uri (NautilusServiceInstallView *view, show_overall_feedback (view, "Waiting for downloads"); generate_current_progress (view, "Downloading glib libraries ..."); fake_overall_install_progress (view); - go_to_uri (view, NEXT_VIEW); + go_to_uri (view->details->nautilus_view, NEXT_VIEW); } diff --git a/components/services/nautilus-dependant-shared/.cvsignore b/components/services/nautilus-dependant-shared/.cvsignore new file mode 100644 index 000000000..4b9aad494 --- /dev/null +++ b/components/services/nautilus-dependant-shared/.cvsignore @@ -0,0 +1,6 @@ +*.lo +.deps +.libs +Makefile +Makefile.in +libnautilusdepshared.a diff --git a/components/services/nautilus-dependant-shared/Makefile.am b/components/services/nautilus-dependant-shared/Makefile.am new file mode 100644 index 000000000..6749c0691 --- /dev/null +++ b/components/services/nautilus-dependant-shared/Makefile.am @@ -0,0 +1,33 @@ +NULL = + +CPPFLAGS = \ + -DPREFIX=\"$(prefix)\" \ + -DG_LOG_DOMAIN=\"eazel-service\" \ + $(NULL) + +CFLAGS=-g -O + +INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/components/services/trilobite \ + -I$(top_builddir)/components/services/trilobite \ + -I$(top_srcdir)/components/services/trilobite/lib \ + -I$(top_builddir)/components/services/trilobite/lib \ + $(GNOME_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(XML_CFLAGS) \ + $(NULL) + +noinst_LIBRARIES = libnautilusdepshared.a + +noinst_HEADERS = \ + shared-service-utilities.h \ + shared-service-widgets.h \ + $(NULL) + +libnautilusdepshared_a_SOURCES = \ + shared-service-utilities.c \ + shared-service-widgets.c \ + $(NULL) + diff --git a/components/services/nautilus-dependant-shared/icons/.cvsignore b/components/services/nautilus-dependant-shared/icons/.cvsignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/components/services/nautilus-dependant-shared/icons/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/components/services/nautilus-dependant-shared/icons/Makefile.am b/components/services/nautilus-dependant-shared/icons/Makefile.am new file mode 100644 index 000000000..32ef0ae2e --- /dev/null +++ b/components/services/nautilus-dependant-shared/icons/Makefile.am @@ -0,0 +1,15 @@ +NULL = + +icondir = $(datadir)/pixmaps/nautilus + +icon_DATA = \ + config-gather.png \ + register.png \ + eazel-cloud-logo.png \ + startup-logo.png \ + service-watch.png \ + eazel-services-logo.png \ + eazel-services-logo-tile.png \ + $(NULL) + +EXTRA_DIST = $(icon_DATA) diff --git a/components/services/startup/nautilus-view/icons/config-gather.png b/components/services/nautilus-dependant-shared/icons/config-gather.png Binary files differindex 0791294b5..0791294b5 100644 --- a/components/services/startup/nautilus-view/icons/config-gather.png +++ b/components/services/nautilus-dependant-shared/icons/config-gather.png diff --git a/components/services/startup/nautilus-view/icons/eazel-cloud-logo.png b/components/services/nautilus-dependant-shared/icons/eazel-cloud-logo.png Binary files differindex 573020ab6..573020ab6 100644 --- a/components/services/startup/nautilus-view/icons/eazel-cloud-logo.png +++ b/components/services/nautilus-dependant-shared/icons/eazel-cloud-logo.png diff --git a/components/services/startup/nautilus-view/icons/eazel-services-logo-tile.png b/components/services/nautilus-dependant-shared/icons/eazel-services-logo-tile.png Binary files differindex aa39b8fe6..aa39b8fe6 100644 --- a/components/services/startup/nautilus-view/icons/eazel-services-logo-tile.png +++ b/components/services/nautilus-dependant-shared/icons/eazel-services-logo-tile.png diff --git a/components/services/startup/nautilus-view/icons/eazel-services-logo.png b/components/services/nautilus-dependant-shared/icons/eazel-services-logo.png Binary files differindex f5b1a1efd..f5b1a1efd 100644 --- a/components/services/startup/nautilus-view/icons/eazel-services-logo.png +++ b/components/services/nautilus-dependant-shared/icons/eazel-services-logo.png diff --git a/components/services/startup/nautilus-view/icons/register.png b/components/services/nautilus-dependant-shared/icons/register.png Binary files differindex bd56b4d2f..bd56b4d2f 100644 --- a/components/services/startup/nautilus-view/icons/register.png +++ b/components/services/nautilus-dependant-shared/icons/register.png diff --git a/components/services/startup/nautilus-view/icons/service-watch.png b/components/services/nautilus-dependant-shared/icons/service-watch.png Binary files differindex fb9ef8885..fb9ef8885 100644 --- a/components/services/startup/nautilus-view/icons/service-watch.png +++ b/components/services/nautilus-dependant-shared/icons/service-watch.png diff --git a/components/services/startup/nautilus-view/icons/startup-logo.png b/components/services/nautilus-dependant-shared/icons/startup-logo.png Binary files differindex ed55c4973..ed55c4973 100644 --- a/components/services/startup/nautilus-view/icons/startup-logo.png +++ b/components/services/nautilus-dependant-shared/icons/startup-logo.png diff --git a/components/services/nautilus-dependant-shared/shared-service-utilities.c b/components/services/nautilus-dependant-shared/shared-service-utilities.c new file mode 100644 index 000000000..0d1478dfd --- /dev/null +++ b/components/services/nautilus-dependant-shared/shared-service-utilities.c @@ -0,0 +1,39 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * 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; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: J Shane Culpepper <pepper@eazel.com> + * + */ + +#include <config.h> + +#include "shared-service-utilities.h" + +#include <stdio.h> + +/* utility routine to go to another uri */ + +void +go_to_uri (NautilusView *nautilus_view, char *uri) { + + nautilus_view_open_location (nautilus_view, uri); + +} + diff --git a/components/services/nautilus-dependant-shared/shared-service-utilities.h b/components/services/nautilus-dependant-shared/shared-service-utilities.h new file mode 100644 index 000000000..28248caad --- /dev/null +++ b/components/services/nautilus-dependant-shared/shared-service-utilities.h @@ -0,0 +1,35 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * 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; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * + */ + +#ifndef SHARED_SERVICE_UTILITIES_H +#define SHARED_SERVICE_UTILITITES_H + +#include <gnome.h> +#include <libnautilus/nautilus-view.h> +#include <libnautilus-extensions/nautilus-image.h> + +void go_to_uri (NautilusView *view, + char *uri); + +#endif /* SHARED_SERVICE_UTILITIES_H */ + diff --git a/components/services/nautilus-dependant-shared/shared-service-widgets.c b/components/services/nautilus-dependant-shared/shared-service-widgets.c new file mode 100644 index 000000000..28952671e --- /dev/null +++ b/components/services/nautilus-dependant-shared/shared-service-widgets.c @@ -0,0 +1,186 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * 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; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: Ramiro Estrugo <ramiro@eazel.com> + * J Shane Culpepper <pepper@eazel.com> + * + */ + +#include <config.h> + +#include "shared-service-widgets.h" + +#include <libnautilus-extensions/nautilus-background.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-file-utilities.h> +#include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-font-factory.h> +#include <libnautilus-extensions/nautilus-gdk-extensions.h> +#include <stdio.h> + +GtkWidget* +create_image_widget (const char *icon_name, + const char *background_color_spec, + NautilusImagePlacementType placement) { + + char *path; + GtkWidget *image; + GdkPixbuf *pixbuf; + guint32 background_rgb; + + g_return_val_if_fail (icon_name != NULL, NULL); + g_return_val_if_fail (background_color_spec != NULL, NULL); + + image = nautilus_image_new (); + + path = nautilus_pixmap_file (icon_name); + + pixbuf = gdk_pixbuf_new_from_file (path); + g_free (path); + + if (pixbuf != NULL) { + nautilus_image_set_pixbuf (NAUTILUS_IMAGE (image), pixbuf); + gdk_pixbuf_unref (pixbuf); + } + else { + g_warning ("Could not find the requested icon."); + } + + nautilus_image_set_background_type (NAUTILUS_IMAGE (image), + NAUTILUS_IMAGE_BACKGROUND_SOLID); + + background_rgb = nautilus_parse_rgb_with_white_default (background_color_spec); + + nautilus_image_set_background_color (NAUTILUS_IMAGE (image), + background_rgb); + + nautilus_image_set_placement_type (NAUTILUS_IMAGE (image), placement); + + return image; + +} + +GtkWidget* +create_services_title_widget (const char *title_text) { + + GtkWidget *title_hbox; + GtkWidget *logo_image; + GtkWidget *filler_image; + GtkWidget *text_image; + GdkFont *font; + + g_assert (title_text != NULL); + + title_hbox = gtk_hbox_new (FALSE, 0); + + logo_image = create_image_widget ("eazel-services-logo.png", + SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_CENTER); + + filler_image = create_image_widget ("eazel-services-logo-tile.png", + SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_TILE); + + text_image = create_image_widget ("eazel-services-logo-tile.png", + SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_TILE); + + font = nautilus_font_factory_get_font_by_family ("helvetica", 20); + + nautilus_image_set_label_text (NAUTILUS_IMAGE (text_image), title_text); + nautilus_image_set_label_font (NAUTILUS_IMAGE (text_image), font); + nautilus_image_set_extra_width (NAUTILUS_IMAGE (text_image), 8); + nautilus_image_set_right_offset (NAUTILUS_IMAGE (text_image), 8); + nautilus_image_set_top_offset (NAUTILUS_IMAGE (text_image), 3); + + gdk_font_unref (font); + + gtk_widget_show (logo_image); + gtk_widget_show (filler_image); + gtk_widget_show (text_image); + + gtk_box_pack_start (GTK_BOX (title_hbox), logo_image, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (title_hbox), filler_image, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (title_hbox), text_image, FALSE, FALSE, 0); + + return title_hbox; + +} + +GtkWidget* +create_services_header_widget (const char *left_text, + const char *right_text) { + + GtkWidget *title_hbox; + GtkWidget *left_image; + GtkWidget *right_image; + GtkWidget *filler_image; + GdkFont *font; + + g_assert (left_text != NULL); + g_assert (right_text != NULL); + + title_hbox = gtk_hbox_new (FALSE, 0); + + left_image = create_image_widget ("eazel-services-logo-tile.png", + SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_TILE); + + filler_image = create_image_widget ("eazel-services-logo-tile.png", + SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_TILE); + + right_image = create_image_widget ("eazel-services-logo-tile.png", + SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_TILE); + + font = nautilus_font_factory_get_font_by_family ("helvetica", 18); + + nautilus_image_set_label_text (NAUTILUS_IMAGE (left_image), left_text); + nautilus_image_set_label_font (NAUTILUS_IMAGE (left_image), font); + + nautilus_image_set_extra_width (NAUTILUS_IMAGE (left_image), 8); + nautilus_image_set_left_offset (NAUTILUS_IMAGE (left_image), 8); + nautilus_image_set_top_offset (NAUTILUS_IMAGE (left_image), 1); + + nautilus_image_set_label_text (NAUTILUS_IMAGE (right_image), right_text); + nautilus_image_set_label_font (NAUTILUS_IMAGE (right_image), font); + + nautilus_image_set_extra_width (NAUTILUS_IMAGE (right_image), 8); + nautilus_image_set_right_offset (NAUTILUS_IMAGE (right_image), 8); + nautilus_image_set_top_offset (NAUTILUS_IMAGE (right_image), 1); + + gdk_font_unref (font); + + gtk_widget_show (left_image); + gtk_widget_show (filler_image); + gtk_widget_show (right_image); + + gtk_box_pack_start (GTK_BOX (title_hbox), left_image, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (title_hbox), filler_image, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (title_hbox), right_image, FALSE, FALSE, 0); + + return title_hbox; + +} + diff --git a/components/services/nautilus-dependant-shared/shared-service-widgets.h b/components/services/nautilus-dependant-shared/shared-service-widgets.h new file mode 100644 index 000000000..0cf4de3ac --- /dev/null +++ b/components/services/nautilus-dependant-shared/shared-service-widgets.h @@ -0,0 +1,43 @@ + + +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* + * 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; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: J Shane Culpepper <pepper@eazel.com> + * + */ + +#ifndef SHARED_SERVICE_WIDGETS_H +#define SHARED_SERVICE_WIDGETS_H + +#include <gnome.h> +#include <libnautilus/nautilus-view.h> +#include <libnautilus-extensions/nautilus-image.h> + +#define SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR "rgb:FFFF/FFFF/FFFF" + +GtkWidget* create_image_widget (const char *icon_name, + const char *background_color_spec, + NautilusImagePlacementType placement); +GtkWidget* create_services_title_widget (const char *title_text); +GtkWidget* create_services_header_widget (const char *left_text, + const char *right_text); + +#endif /* SHARED_SERVICE_WIDGETS_H */ + diff --git a/components/services/startup/nautilus-view/Makefile.am b/components/services/startup/nautilus-view/Makefile.am index 1c7242874..27feba3b5 100644 --- a/components/services/startup/nautilus-view/Makefile.am +++ b/components/services/startup/nautilus-view/Makefile.am @@ -8,7 +8,8 @@ CPPFLAGS = \ INCLUDES = \ -I$(top_srcdir) \ - -I$(top_srcdir)/components/services/trilobite/libtrilobite\ + -I$(top_srcdir)/components/services/trilobite/libtrilobite \ + -I$(top_srcdir)/components/services/nautilus-dependant-shared \ -I$(top_builddir) \ $(GNOMEUI_CFLAGS) \ $(GCONF_CFLAGS) \ @@ -34,9 +35,10 @@ nautilus_service_startup_view_SOURCES = \ nautilus_service_startup_view_LDADD = \ $(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \ + $(top_builddir)/components/services/nautilus-dependant-shared/libnautilusdepshared.a \ $(top_builddir)/libnautilus/libnautilus.la \ - $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ - $(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la \ + $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ + $(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la \ $(top_builddir)/librsvg/librsvg.la \ $(BONOBO_LIBS) \ $(GNOMEUI_LIBS) \ diff --git a/components/services/startup/nautilus-view/icons/Makefile.am b/components/services/startup/nautilus-view/icons/Makefile.am index 32ef0ae2e..b51dd1b74 100644 --- a/components/services/startup/nautilus-view/icons/Makefile.am +++ b/components/services/startup/nautilus-view/icons/Makefile.am @@ -3,13 +3,6 @@ NULL = icondir = $(datadir)/pixmaps/nautilus icon_DATA = \ - config-gather.png \ - register.png \ - eazel-cloud-logo.png \ - startup-logo.png \ - service-watch.png \ - eazel-services-logo.png \ - eazel-services-logo-tile.png \ $(NULL) EXTRA_DIST = $(icon_DATA) diff --git a/components/services/startup/nautilus-view/nautilus-service-startup-view.c b/components/services/startup/nautilus-view/nautilus-service-startup-view.c index 726d447d0..3e74c2f1a 100644 --- a/components/services/startup/nautilus-view/nautilus-service-startup-view.c +++ b/components/services/startup/nautilus-view/nautilus-service-startup-view.c @@ -28,6 +28,11 @@ */ #include <config.h> + +#include "nautilus-service-startup-view.h" +#include "shared-service-widgets.h" +#include "shared-service-utilities.h" + #include <ghttp.h> #include <unistd.h> #include <gnome-xml/tree.h> @@ -46,7 +51,6 @@ #include <libnautilus-extensions/nautilus-image.h> #include <stdio.h> -#include "nautilus-service-startup-view.h" struct _NautilusServiceStartupViewDetails { char *uri; @@ -57,7 +61,7 @@ struct _NautilusServiceStartupViewDetails { GtkWidget *feedback_text; }; -#define SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR "rgb:0000/6666/6666" +#define STARTUP_VIEW_DEFAULT_BACKGROUND_COLOR "rgb:0000/6666/6666" #define SERVICE_DOMAIN_NAME "testmachine.eazel.com" @@ -73,12 +77,8 @@ static gboolean is_location (char static void generate_form_logo (NautilusServiceStartupView *view); static void set_widget_color (GtkWidget *widget, const char *color_spec); -static void go_to_uri (NautilusServiceStartupView *view, - char *uri); static void show_feedback (NautilusServiceStartupView *view, char *error_message); -static GtkWidget* create_image_widget (const char *name, - const char *background_color_spec); NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusServiceStartupView, nautilus_service_startup_view, GTK_TYPE_EVENT_BOX) @@ -111,7 +111,9 @@ generate_startup_form (NautilusServiceStartupView *view) gtk_box_pack_start (GTK_BOX (view->details->form), temp_box, 0, 0, 40); gtk_widget_show (temp_box); - temp_widget = create_image_widget ("service-watch.png", SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR); + temp_widget = create_image_widget ("service-watch.png", + STARTUP_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_CENTER); g_assert (temp_widget != NULL); gtk_box_pack_start (GTK_BOX (temp_box), temp_widget, 0, 0, 8); @@ -156,7 +158,7 @@ generate_startup_form (NautilusServiceStartupView *view) show_feedback (view, "Retreiving services list ..."); } if (counter == 20000) { - go_to_uri (view, "eazel-login:"); + go_to_uri (view->details->nautilus_view, "eazel-login:"); } else { gtk_progress_bar_update (GTK_PROGRESS_BAR (view->details->progress_bar), value); @@ -168,15 +170,6 @@ generate_startup_form (NautilusServiceStartupView *view) } -/* utility routine to go to another uri */ - -static void -go_to_uri (NautilusServiceStartupView *view, char *uri) { - - nautilus_view_open_location (view->details->nautilus_view, uri); - -} - /* utility routine to show an error message */ static void show_feedback (NautilusServiceStartupView *view, char *error_message) { @@ -211,44 +204,6 @@ set_widget_color (GtkWidget *widget, const char* color_spec) { } -/* shared utility to allocate a title for a form */ - -static GtkWidget* -create_image_widget (const char *name, const char *background_color_spec) -{ - char *path; - GtkWidget *image; - GdkPixbuf *pixbuf; - guint32 background_rgb; - - g_return_val_if_fail (name != NULL, NULL); - g_return_val_if_fail (background_color_spec != NULL, NULL); - - path = nautilus_pixmap_file (name); - - pixbuf = gdk_pixbuf_new_from_file (path); - g_free (path); - - if (!pixbuf) { - return NULL; - } - - image = nautilus_image_new(); - - nautilus_image_set_background_type (NAUTILUS_IMAGE (image), - NAUTILUS_IMAGE_BACKGROUND_SOLID); - - background_rgb = nautilus_parse_rgb_with_white_default (background_color_spec); - - nautilus_image_set_background_color (NAUTILUS_IMAGE (image), - background_rgb); - - nautilus_image_set_pixbuf (NAUTILUS_IMAGE (image), pixbuf); - gdk_pixbuf_unref (pixbuf); - - return image; -} - static void generate_form_logo (NautilusServiceStartupView *view) { @@ -258,7 +213,10 @@ generate_form_logo (NautilusServiceStartupView *view) { logo_container = gtk_hbox_new (TRUE, 0); gtk_box_pack_start (GTK_BOX (view->details->form), logo_container, 0, 0, 4); - logo_widget = create_image_widget ("startup-logo.png", SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR); + logo_widget = create_image_widget ("startup-logo.png", + STARTUP_VIEW_DEFAULT_BACKGROUND_COLOR, + NAUTILUS_IMAGE_PLACEMENT_CENTER); + g_assert (logo_widget != NULL); gtk_box_pack_start (GTK_BOX(logo_container), logo_widget, 0, 0, 4); @@ -290,7 +248,7 @@ nautilus_service_startup_view_initialize (NautilusServiceStartupView *view) { view); background = nautilus_get_widget_background (GTK_WIDGET (view)); - nautilus_background_set_color (background, SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR); + nautilus_background_set_color (background, STARTUP_VIEW_DEFAULT_BACKGROUND_COLOR); gtk_widget_show_all (GTK_WIDGET (view)); } @@ -349,25 +307,25 @@ nautilus_service_startup_view_load_uri (NautilusServiceStartupView *view, generate_startup_form (view); } else if (is_location (document_name, "login")) { - go_to_uri (view, "eazel-login:"); + go_to_uri (view->details->nautilus_view, "eazel-login:"); } else if (is_location(document_name, "summary")) { - go_to_uri (view, "eazel-summary:"); + go_to_uri (view->details->nautilus_view, "eazel-summary:"); } else if (is_location(document_name, "inventory")) { - go_to_uri (view, "eazel-inventory:"); + go_to_uri (view->details->nautilus_view, "eazel-inventory:"); } else if (is_location(document_name, "install")) { - go_to_uri (view, "eazel-install:"); + go_to_uri (view->details->nautilus_view, "eazel-install:"); } else if (is_location(document_name, "time")) { - go_to_uri (view, "eazel-time:"); + go_to_uri (view->details->nautilus_view, "eazel-time:"); } else if (is_location(document_name, "vault")) { - go_to_uri (view, "eazel-vault:"); + go_to_uri (view->details->nautilus_view, "eazel-vault:"); } else if (is_location(document_name, "register")) { - go_to_uri (view, "http://www.eazel.com"); + go_to_uri (view->details->nautilus_view, "http://www.eazel.com"); } else { generate_startup_form (view); /* eventually, this should be setup_bad_location_form */ diff --git a/configure.in b/configure.in index 234a7297e..a86a36f0c 100644 --- a/configure.in +++ b/configure.in @@ -439,11 +439,8 @@ components/services/trilobite/sample/command-line/Makefile components/services/trilobite/sample/nautilus-view/Makefile components/services/trilobite/sample/nautilus-view/icons/Makefile components/services/trilobite/helper/Makefile -components/services/time/Makefile -components/services/time/service/Makefile -components/services/time/command-line/Makefile -components/services/time/nautilus-view/Makefile -components/services/time/idl/Makefile +components/services/nautilus-dependant-shared/Makefile +components/services/nautilus-dependant-shared/icons/Makefile components/services/startup/Makefile components/services/startup/lib/Makefile components/services/startup/command-line/Makefile @@ -481,6 +478,11 @@ components/services/vault/service/Makefile components/services/vault/command-line/Makefile components/services/vault/nautilus-view/Makefile components/services/vault/nautilus-view/icons/Makefile +components/services/time/Makefile +components/services/time/service/Makefile +components/services/time/command-line/Makefile +components/services/time/nautilus-view/Makefile +components/services/time/idl/Makefile components/loser/Makefile components/loser/content/Makefile components/loser/sidebar/Makefile |