Commit f7263fbd authored by Ramiro Estrugo's avatar Ramiro Estrugo

Rename NautilusGraphic to NautilusImage everywhere.

	*
	components/services/install/nautilus-view/nautilus-service-install-
	view.c: (generate_install_form), (create_image_widget),
	(create_title_widget), (create_middle_title_widget):
	* components/services/login/nautilus-view/nautilus-login-view.c:
	(generate_login_form), (create_image_widget),
	(create_title_widget):
	*
	components/services/startup/nautilus-view/nautilus-service-startup-
	view.c: (generate_startup_form), (create_image_widget),
	(generate_form_logo):
	* libnautilus-extensions/Makefile.am:
	* libnautilus-extensions/nautilus-graphic.c:
	* libnautilus-extensions/nautilus-graphic.h:
	* libnautilus-extensions/nautilus-image.c:
	(nautilus_image_initialize_class), (nautilus_image_initialize),
	(nautilus_image_destroy), (nautilus_image_set_arg),
	(nautilus_image_get_arg), (nautilus_image_realize),
	(nautilus_image_unrealize), (nautilus_image_draw),
	(nautilus_image_size_allocate), (nautilus_image_size_request),
	(nautilus_image_map), (nautilus_image_unmap),
	(nautilus_image_expose), (ensure_buffer_size),
	(create_child_window), (nautilus_gdk_create_copy_area_gc),
	(nautilus_gdk_pixbuf_render_to_drawable),
	(nautilus_gdk_pixbuf_render_to_pixbuf),
	(nautilus_gdk_pixbuf_render_to_pixbuf_alpha),
	(gdk_string_dimensions), (nautilus_gdk_pixbuf_set_to_color),
	(nautilus_gdk_pixbuf_tile), (nautilus_gdk_pixbuf_tile_alpha),
	(nautilus_image_new), (nautilus_image_set_background_pixbuf),
	(nautilus_image_get_background_pixbuf),
	(nautilus_image_set_background_type),
	(nautilus_image_get_background_type),
	(nautilus_image_set_background_color),
	(nautilus_image_get_background_color),
	(nautilus_image_set_placement_type),
	(nautilus_image_get_placement_type), (nautilus_image_set_pixbuf),
	(nautilus_image_get_pixbuf), (nautilus_image_set_overall_alpha),
	(nautilus_image_set_label_text), (nautilus_image_get_label_text),
	(nautilus_image_set_label_font), (nautilus_image_get_label_font),
	(nautilus_image_set_left_offset),
	(nautilus_image_set_right_offset), (nautilus_image_set_top_offset),
	(nautilus_image_set_bottom_offset),
	(nautilus_image_set_extra_width),
	(nautilus_image_set_extra_height):
	* libnautilus-extensions/nautilus-image.h:
	* test/.cvsignore:
	* test/Makefile.am:
	* test/test-nautilus-graphic.c:
	* test/test-nautilus-image.c: (create_background), (create_pixbuf),
	(create_image), (alpha_scale_value_changed),
	(red_color_value_changed), (green_color_value_changed),
	(blue_color_value_changed), (toggle_background_type_callback),
	(create_color_scale), (main):

	Rename NautilusGraphic to NautilusImage everywhere.
parent a7570956
2000-07-14 Ramiro Estrugo <ramiro@eazel.com>
*
components/services/install/nautilus-view/nautilus-service-install-
view.c: (generate_install_form), (create_image_widget),
(create_title_widget), (create_middle_title_widget):
* components/services/login/nautilus-view/nautilus-login-view.c:
(generate_login_form), (create_image_widget),
(create_title_widget):
*
components/services/startup/nautilus-view/nautilus-service-startup-
view.c: (generate_startup_form), (create_image_widget),
(generate_form_logo):
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-graphic.c:
* libnautilus-extensions/nautilus-graphic.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_realize),
(nautilus_image_unrealize), (nautilus_image_draw),
(nautilus_image_size_allocate), (nautilus_image_size_request),
(nautilus_image_map), (nautilus_image_unmap),
(nautilus_image_expose), (ensure_buffer_size),
(create_child_window), (nautilus_gdk_create_copy_area_gc),
(nautilus_gdk_pixbuf_render_to_drawable),
(nautilus_gdk_pixbuf_render_to_pixbuf),
(nautilus_gdk_pixbuf_render_to_pixbuf_alpha),
(gdk_string_dimensions), (nautilus_gdk_pixbuf_set_to_color),
(nautilus_gdk_pixbuf_tile), (nautilus_gdk_pixbuf_tile_alpha),
(nautilus_image_new), (nautilus_image_set_background_pixbuf),
(nautilus_image_get_background_pixbuf),
(nautilus_image_set_background_type),
(nautilus_image_get_background_type),
(nautilus_image_set_background_color),
(nautilus_image_get_background_color),
(nautilus_image_set_placement_type),
(nautilus_image_get_placement_type), (nautilus_image_set_pixbuf),
(nautilus_image_get_pixbuf), (nautilus_image_set_overall_alpha),
(nautilus_image_set_label_text), (nautilus_image_get_label_text),
(nautilus_image_set_label_font), (nautilus_image_get_label_font),
(nautilus_image_set_left_offset),
(nautilus_image_set_right_offset), (nautilus_image_set_top_offset),
(nautilus_image_set_bottom_offset),
(nautilus_image_set_extra_width),
(nautilus_image_set_extra_height):
* libnautilus-extensions/nautilus-image.h:
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-graphic.c:
* test/test-nautilus-image.c: (create_background), (create_pixbuf),
(create_image), (alpha_scale_value_changed),
(red_color_value_changed), (green_color_value_changed),
(blue_color_value_changed), (toggle_background_type_callback),
(create_color_scale), (main):
Rename NautilusGraphic to NautilusImage everywhere.
2000-07-14 Ramiro Estrugo <ramiro@eazel.com>
* src/nautilus-main.c: (main):
......
......@@ -38,7 +38,7 @@
#include <libnautilus-extensions/nautilus-file-utilities.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-font-factory.h>
#include <libnautilus-extensions/nautilus-graphic.h>
#include <libnautilus-extensions/nautilus-image.h>
#include <libnautilus-extensions/nautilus-gdk-extensions.h>
#include <stdio.h>
#include <fcntl.h>
......@@ -51,34 +51,34 @@
#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_graphic_widget (const char *icon_name,
const char *background_color_spec,
NautilusGraphicPlacementType 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);
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);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusServiceInstallView, nautilus_service_install_view, GTK_TYPE_EVENT_BOX)
static void
generate_install_form (NautilusServiceInstallView *view) {
generate_install_form (NautilusServiceInstallView *view)
{
GdkFont *font;
GtkWidget *temp_box;
GtkWidget *title;
......@@ -152,19 +152,19 @@ generate_install_form (NautilusServiceInstallView *view) {
}
static GtkWidget*
create_graphic_widget (const char *icon_name,
const char *background_color_spec,
NautilusGraphicPlacementType placement)
create_image_widget (const char *icon_name,
const char *background_color_spec,
NautilusImagePlacementType placement)
{
char *path;
GtkWidget *graphic;
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);
graphic = nautilus_graphic_new();
image = nautilus_image_new();
path = nautilus_pixmap_file (icon_name);
......@@ -172,68 +172,68 @@ create_graphic_widget (const char *icon_name,
g_free (path);
if (pixbuf != NULL) {
nautilus_graphic_set_pixbuf (NAUTILUS_GRAPHIC (graphic), pixbuf);
nautilus_image_set_pixbuf (NAUTILUS_IMAGE (image), pixbuf);
gdk_pixbuf_unref (pixbuf);
}
else {
g_warning ("Could not find the requested icon.");
}
nautilus_graphic_set_background_type (NAUTILUS_GRAPHIC (graphic),
NAUTILUS_GRAPHIC_BACKGROUND_SOLID);
nautilus_image_set_background_type (NAUTILUS_IMAGE (image),
NAUTILUS_IMAGE_BACKGROUND_SOLID);
background_rgb = nautilus_parse_rgb_with_white_default (background_color_spec);
nautilus_graphic_set_background_color (NAUTILUS_GRAPHIC (graphic),
background_rgb);
nautilus_image_set_background_color (NAUTILUS_IMAGE (image),
background_rgb);
nautilus_graphic_set_placement_type (NAUTILUS_GRAPHIC (graphic), placement);
nautilus_image_set_placement_type (NAUTILUS_IMAGE (image), placement);
return graphic;
return image;
}
static GtkWidget*
create_title_widget (const char *title_text)
{
GtkWidget *title_hbox;
GtkWidget *logo_graphic;
GtkWidget *filler_graphic;
GtkWidget *text_graphic;
GtkWidget *logo_image;
GtkWidget *filler_image;
GtkWidget *text_image;
GdkFont *font;
g_assert (title_text != NULL);
title_hbox = gtk_hbox_new (FALSE, 0);
logo_graphic = create_graphic_widget ("eazel-services-logo.png",
logo_image = create_image_widget ("eazel-services-logo.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_CENTER);
NAUTILUS_IMAGE_PLACEMENT_CENTER);
filler_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
filler_image = create_image_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
NAUTILUS_IMAGE_PLACEMENT_TILE);
text_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
text_image = create_image_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
NAUTILUS_IMAGE_PLACEMENT_TILE);
font = nautilus_font_factory_get_font_by_family ("helvetica", 20);
nautilus_graphic_set_label_text (NAUTILUS_GRAPHIC (text_graphic), title_text);
nautilus_graphic_set_label_font (NAUTILUS_GRAPHIC (text_graphic), font);
nautilus_graphic_set_extra_width (NAUTILUS_GRAPHIC (text_graphic), 8);
nautilus_graphic_set_right_offset (NAUTILUS_GRAPHIC (text_graphic), 8);
nautilus_graphic_set_top_offset (NAUTILUS_GRAPHIC (text_graphic), 3);
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_graphic);
gtk_widget_show (filler_graphic);
gtk_widget_show (text_graphic);
gtk_widget_show (logo_image);
gtk_widget_show (filler_image);
gtk_widget_show (text_image);
gtk_box_pack_start (GTK_BOX (title_hbox), logo_graphic, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (title_hbox), filler_graphic, TRUE, TRUE, 0);
gtk_box_pack_end (GTK_BOX (title_hbox), text_graphic, FALSE, FALSE, 0);
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;
}
......@@ -243,9 +243,9 @@ create_middle_title_widget (const char *left_text,
const char *right_text)
{
GtkWidget *title_hbox;
GtkWidget *left_graphic;
GtkWidget *right_graphic;
GtkWidget *filler_graphic;
GtkWidget *left_image;
GtkWidget *right_image;
GtkWidget *filler_image;
GdkFont *font;
g_assert (left_text != NULL);
......@@ -253,43 +253,43 @@ create_middle_title_widget (const char *left_text,
title_hbox = gtk_hbox_new (FALSE, 0);
left_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
filler_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
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_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_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_graphic_set_label_text (NAUTILUS_GRAPHIC (left_graphic), left_text);
nautilus_graphic_set_label_font (NAUTILUS_GRAPHIC (left_graphic), font);
nautilus_image_set_label_text (NAUTILUS_IMAGE (left_image), left_text);
nautilus_image_set_label_font (NAUTILUS_IMAGE (left_image), font);
nautilus_graphic_set_extra_width (NAUTILUS_GRAPHIC (left_graphic), 8);
nautilus_graphic_set_left_offset (NAUTILUS_GRAPHIC (left_graphic), 8);
nautilus_graphic_set_top_offset (NAUTILUS_GRAPHIC (left_graphic), 1);
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_graphic_set_label_text (NAUTILUS_GRAPHIC (right_graphic), right_text);
nautilus_graphic_set_label_font (NAUTILUS_GRAPHIC (right_graphic), font);
nautilus_image_set_label_text (NAUTILUS_IMAGE (right_image), right_text);
nautilus_image_set_label_font (NAUTILUS_IMAGE (right_image), font);
nautilus_graphic_set_extra_width (NAUTILUS_GRAPHIC (right_graphic), 8);
nautilus_graphic_set_right_offset (NAUTILUS_GRAPHIC (right_graphic), 8);
nautilus_graphic_set_top_offset (NAUTILUS_GRAPHIC (right_graphic), 1);
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_graphic);
gtk_widget_show (filler_graphic);
gtk_widget_show (right_graphic);
gtk_widget_show (left_image);
gtk_widget_show (filler_image);
gtk_widget_show (right_image);
gtk_box_pack_start (GTK_BOX (title_hbox), left_graphic, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (title_hbox), filler_graphic, TRUE, TRUE, 0);
gtk_box_pack_end (GTK_BOX (title_hbox), right_graphic, FALSE, FALSE, 0);
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;
}
......
......@@ -38,7 +38,7 @@
#include <libnautilus-extensions/nautilus-file-utilities.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-font-factory.h>
#include <libnautilus-extensions/nautilus-graphic.h>
#include <libnautilus-extensions/nautilus-image.h>
#include <libnautilus-extensions/nautilus-gdk-extensions.h>
#include <stdio.h>
#include <fcntl.h>
......@@ -51,34 +51,34 @@
#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_graphic_widget (const char *icon_name,
const char *background_color_spec,
NautilusGraphicPlacementType 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);
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);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusServiceInstallView, nautilus_service_install_view, GTK_TYPE_EVENT_BOX)
static void
generate_install_form (NautilusServiceInstallView *view) {
generate_install_form (NautilusServiceInstallView *view)
{
GdkFont *font;
GtkWidget *temp_box;
GtkWidget *title;
......@@ -152,19 +152,19 @@ generate_install_form (NautilusServiceInstallView *view) {
}
static GtkWidget*
create_graphic_widget (const char *icon_name,
const char *background_color_spec,
NautilusGraphicPlacementType placement)
create_image_widget (const char *icon_name,
const char *background_color_spec,
NautilusImagePlacementType placement)
{
char *path;
GtkWidget *graphic;
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);
graphic = nautilus_graphic_new();
image = nautilus_image_new();
path = nautilus_pixmap_file (icon_name);
......@@ -172,68 +172,68 @@ create_graphic_widget (const char *icon_name,
g_free (path);
if (pixbuf != NULL) {
nautilus_graphic_set_pixbuf (NAUTILUS_GRAPHIC (graphic), pixbuf);
nautilus_image_set_pixbuf (NAUTILUS_IMAGE (image), pixbuf);
gdk_pixbuf_unref (pixbuf);
}
else {
g_warning ("Could not find the requested icon.");
}
nautilus_graphic_set_background_type (NAUTILUS_GRAPHIC (graphic),
NAUTILUS_GRAPHIC_BACKGROUND_SOLID);
nautilus_image_set_background_type (NAUTILUS_IMAGE (image),
NAUTILUS_IMAGE_BACKGROUND_SOLID);
background_rgb = nautilus_parse_rgb_with_white_default (background_color_spec);
nautilus_graphic_set_background_color (NAUTILUS_GRAPHIC (graphic),
background_rgb);
nautilus_image_set_background_color (NAUTILUS_IMAGE (image),
background_rgb);
nautilus_graphic_set_placement_type (NAUTILUS_GRAPHIC (graphic), placement);
nautilus_image_set_placement_type (NAUTILUS_IMAGE (image), placement);
return graphic;
return image;
}
static GtkWidget*
create_title_widget (const char *title_text)
{
GtkWidget *title_hbox;
GtkWidget *logo_graphic;
GtkWidget *filler_graphic;
GtkWidget *text_graphic;
GtkWidget *logo_image;
GtkWidget *filler_image;
GtkWidget *text_image;
GdkFont *font;
g_assert (title_text != NULL);
title_hbox = gtk_hbox_new (FALSE, 0);
logo_graphic = create_graphic_widget ("eazel-services-logo.png",
logo_image = create_image_widget ("eazel-services-logo.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_CENTER);
NAUTILUS_IMAGE_PLACEMENT_CENTER);
filler_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
filler_image = create_image_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
NAUTILUS_IMAGE_PLACEMENT_TILE);
text_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
text_image = create_image_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
NAUTILUS_IMAGE_PLACEMENT_TILE);
font = nautilus_font_factory_get_font_by_family ("helvetica", 20);
nautilus_graphic_set_label_text (NAUTILUS_GRAPHIC (text_graphic), title_text);
nautilus_graphic_set_label_font (NAUTILUS_GRAPHIC (text_graphic), font);
nautilus_graphic_set_extra_width (NAUTILUS_GRAPHIC (text_graphic), 8);
nautilus_graphic_set_right_offset (NAUTILUS_GRAPHIC (text_graphic), 8);
nautilus_graphic_set_top_offset (NAUTILUS_GRAPHIC (text_graphic), 3);
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_graphic);
gtk_widget_show (filler_graphic);
gtk_widget_show (text_graphic);
gtk_widget_show (logo_image);
gtk_widget_show (filler_image);
gtk_widget_show (text_image);
gtk_box_pack_start (GTK_BOX (title_hbox), logo_graphic, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (title_hbox), filler_graphic, TRUE, TRUE, 0);
gtk_box_pack_end (GTK_BOX (title_hbox), text_graphic, FALSE, FALSE, 0);
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;
}
......@@ -243,9 +243,9 @@ create_middle_title_widget (const char *left_text,
const char *right_text)
{
GtkWidget *title_hbox;
GtkWidget *left_graphic;
GtkWidget *right_graphic;
GtkWidget *filler_graphic;
GtkWidget *left_image;
GtkWidget *right_image;
GtkWidget *filler_image;
GdkFont *font;
g_assert (left_text != NULL);
......@@ -253,43 +253,43 @@ create_middle_title_widget (const char *left_text,
title_hbox = gtk_hbox_new (FALSE, 0);
left_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
filler_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_PLACEMENT_TILE);
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_graphic = create_graphic_widget ("eazel-services-logo-tile.png",
SERVICE_VIEW_DEFAULT_BACKGROUND_COLOR,
NAUTILUS_GRAPHIC_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_graphic_set_label_text (NAUTILUS_GRAPHIC (left_graphic), left_text);
nautilus_graphic_set_label_font (NAUTILUS_GRAPHIC (left_graphic), font);
nautilus_image_set_label_text (NAUTILUS_IMAGE (left_image), left_text);
nautilus_image_set_label_font (NAUTILUS_IMAGE (left_image), font);
nautilus_graphic_set_extra_width (NAUTILUS_GRAPHIC (left_graphic), 8);
nautilus_graphic_set_left_offset (NAUTILUS_GRAPHIC (left_graphic), 8);
nautilus_graphic_set_top_offset (NAUTILUS_GRAPHIC (left_graphic), 1);
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_graphic_set_label_text (NAUTILUS_GRAPHIC (right_graphic), right_text);
nautilus_graphic_set_label_font (NAUTILUS_GRAPHIC (right_graphic), font);
nautilus_image_set_label_text (NAUTILUS_IMAGE (right_image), right_text);
nautilus_image_set_label_font (NAUTILUS_IMAGE (right_image), font);
nautilus_graphic_set_extra_width (NAUTILUS_GRAPHIC (right_graphic), 8);
nautilus_graphic_set_right_offset (NAUTILUS_GRAPHIC (right_graphic), 8);
nautilus_graphic_set_top_offset (NAUTILUS_GRAPHIC (right_graphic), 1);
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_graphic);
gtk_widget_show (filler_graphic);
gtk_widget_show (right_graphic);
gtk_widget_show (left_image);
gtk_widget_show (filler_image);
gtk_widget_show (right_image);
gtk_box_pack_start (GTK_BOX (title_hbox), left_graphic, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (title_hbox), filler_graphic, TRUE, TRUE, 0);
gtk_box_pack_end (GTK_BOX (title_hbox), right_graphic, FALSE, FALSE, 0);
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;
}
......
......@@ -35,7 +35,7 @@
#include <libnautilus-extensions/nautilus-file-utilities.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-font-factory.h>
#include <libnautilus-extensions/nautilus-graphic.h>
#include <libnautilus-extensions/nautilus-image.h>
#include <libnautilus-extensions/nautilus-gdk-extensions.h>
#include <stdio.h>
#include <unistd.h>
......@@ -62,33 +62,33 @@ struct _NautilusLoginViewDetails {
#define SERVICE_SUMMARY_LOCATION "http://eazel1.eazel.com/services/control1.html"
#define SERVICE_HELP_LOCATION "http://www.eazel.com"
static void nautilus_login_view_initialize_class (NautilusLoginViewClass *klass);
static void nautilus_login_view_initialize (NautilusLoginView *view);
static void nautilus_login_view_destroy (GtkObject *object);
static void login_load_location_callback (NautilusView *nautilus_view,
const char *location,
NautilusLoginView *view);
static void show_feedback (NautilusLoginView *view,
char *error_message);
static void generate_login_form (NautilusLoginView *view);
static void entry_changed_cb (GtkWidget *entry,
NautilusLoginView *view);
static void login_button_cb (GtkWidget *button,
NautilusLoginView *view);
static void maintenance_button_cb (GtkWidget *button,
NautilusLoginView *view);
static void go_to_uri (NautilusLoginView *view,
char *uri);
static GtkWidget* create_title_widget (const char *title_text);
static GtkWidget* create_graphic_widget (const char *icon_name,
const char *background_color_spec,
NautilusGraphicPlacementType placement);
static void nautilus_login_view_initialize_class (NautilusLoginViewClass *klass);
static void nautilus_login_view_initialize (NautilusLoginView *view);
static void nautilus_login_view_destroy (GtkObject *object);
static void login_load_location_callback (NautilusView *nautilus_view,
const char *location,
NautilusLoginView *view);
static void show_feedback (NautilusLoginView *view,
char *error_message);
static void generate_login_form (NautilusLoginView *view);
static void entry_changed_cb (GtkWidget *entry,
NautilusLoginView *view);
static void login_button_cb (GtkWidget *button,
NautilusLoginView *view);
static void maintenance_button_cb (GtkWidget *button,
NautilusLoginView *view);
static void go_to_uri (NautilusLoginView *view,
char *uri);
static GtkWidget* create_title_widget (const char *title_text);
static GtkWidget* create_image_widget (const char *icon_name,
const char *background_color_spec,
NautilusImagePlacementType placement);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusLoginView, nautilus_login_view, GTK_TYPE_EVENT_BOX)
static void
generate_login_form (NautilusLoginView *view) {
generate_login_form (NautilusLoginView *view)
{