Commit add78396 authored by Pavel Cisler's avatar Pavel Cisler Committed by Pavel Cisler
Browse files

Fix all the warnings -Wuninitialized found. Quite a number of them were

2000-09-05  Pavel Cisler  <pavel@eazel.com>

	* components/help/converters/gnome-db2html2/gdb3html.c:
	(xml_parse_document):
	* components/help/hyperbola-nav-index.c: (end_element):
	* components/services/summary/nautilus-view/nautilus-summary-view.c
	: (logout_button_cb):
	* components/services/time/service/trilobite-eazel-time-service.c:
	(trilobite_eazel_time_service_do_http_request):
	* components/tree/nautilus-tree-view.c:
	* configure.in:
	* libnautilus-extensions/bonobo-stream-vfs.c:
	(bonobo_stream_vfs_open):
	* libnautilus-extensions/nautilus-background.c:
	(nautilus_background_draw), (nautilus_background_draw_aa):
	* libnautilus-extensions/nautilus-customization-data.c:
	(nautilus_customization_data_new):
	* libnautilus-extensions/nautilus-directory-background.c:
	(nautilus_directory_background_write_desktop_settings):
	* libnautilus-extensions/nautilus-file-operations.c:
	(nautilus_file_operations_move_to_trash), (do_empty_trash):
	* libnautilus-extensions/nautilus-file.c: (nautilus_file_dump):
	* libnautilus-extensions/nautilus-icon-canvas-item.c:
	(draw_or_measure_label_text), (emblem_layout_next):
	* libnautilus-extensions/nautilus-icon-factory.c:
	(get_image_from_cache):
	* libnautilus-extensions/nautilus-icon-text-item.c:
	(iti_paint_text):
	* libnautilus-extensions/nautilus-list.c: (draw_cell), (draw_row):
	* libnautilus-extensions/nautilus-mime-actions.c:
	(nautilus_mime_add_application_to_short_list_for_uri):
	* libnautilus-extensions/nautilus-program-chooser.c:
	(program_file_pair_get_short_status_text),
	(program_file_pair_get_long_status_text):
	* libnautilus-extensions/nautilus-program-choosing.c:
	(nautilus_choose_component_for_file),
	(nautilus_choose_application_for_file):
	* libnautilus-extensions/nautilus-scalable-font.c:
	(nautilus_scalable_font_draw_text_lines_with_dimensions):
	* libnautilus-extensions/nautilus-theme.c:
	(nautilus_theme_make_selector):
	* librsvg/rsvg-ft.c: (rsvg_ft_get_glyph):
	* librsvg/test-ft-gtk.c: (set_text):
	* librsvg/test-ft.c: (save_pixbuf_to_file_internal),
	(save_pixbuf_to_file):
	* librsvg/test-rsvg.c: (save_pixbuf_to_file_internal),
	(save_pixbuf_to_file):
	* src/file-manager/fm-directory-view.c: (display_pending_files),
	(compute_menu_item_info):
	* src/file-manager/fm-icon-view.c: (compute_menu_item_info):
	* src/file-manager/fm-list-view.c: (get_column_from_attribute):
	* src/nautilus-application.c: (nautilus_application_startup):
	* src/nautilus-search-bar-criterion.c:
	(nautilus_search_bar_criterion_next_new),
	(nautilus_search_bar_criterion_get_location),
	(get_date_modified_location_for):
	* src/nautilus-sidebar-tabs.c: (draw_one_tab_themed),
	(draw_or_layout_all_tabs):
	* src/nautilus-toolbar.c: (nautilus_toolbar_size_allocate):
	* src/nautilus-window-manage-views.c:
	(nautilus_window_get_current_location_title):
	* test/test-nautilus-label.c: (justification_changed_callback):

	Fix all the warnings -Wuninitialized found.
	Quite a number of them were actual bugs.
	Turn on -Wuninitialized in configure.in now that ORBit generates
	warning-free code.
parent 1b18a656
2000-09-05 Pavel Cisler <pavel@eazel.com>
* components/help/converters/gnome-db2html2/gdb3html.c:
(xml_parse_document):
* components/help/hyperbola-nav-index.c: (end_element):
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (logout_button_cb):
* components/services/time/service/trilobite-eazel-time-service.c:
(trilobite_eazel_time_service_do_http_request):
* components/tree/nautilus-tree-view.c:
* configure.in:
* libnautilus-extensions/bonobo-stream-vfs.c:
(bonobo_stream_vfs_open):
* libnautilus-extensions/nautilus-background.c:
(nautilus_background_draw), (nautilus_background_draw_aa):
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_new):
* libnautilus-extensions/nautilus-directory-background.c:
(nautilus_directory_background_write_desktop_settings):
* libnautilus-extensions/nautilus-file-operations.c:
(nautilus_file_operations_move_to_trash), (do_empty_trash):
* libnautilus-extensions/nautilus-file.c: (nautilus_file_dump):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(draw_or_measure_label_text), (emblem_layout_next):
* libnautilus-extensions/nautilus-icon-factory.c:
(get_image_from_cache):
* libnautilus-extensions/nautilus-icon-text-item.c:
(iti_paint_text):
* libnautilus-extensions/nautilus-list.c: (draw_cell), (draw_row):
* libnautilus-extensions/nautilus-mime-actions.c:
(nautilus_mime_add_application_to_short_list_for_uri):
* libnautilus-extensions/nautilus-program-chooser.c:
(program_file_pair_get_short_status_text),
(program_file_pair_get_long_status_text):
* libnautilus-extensions/nautilus-program-choosing.c:
(nautilus_choose_component_for_file),
(nautilus_choose_application_for_file):
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_draw_text_lines_with_dimensions):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_make_selector):
* librsvg/rsvg-ft.c: (rsvg_ft_get_glyph):
* librsvg/test-ft-gtk.c: (set_text):
* librsvg/test-ft.c: (save_pixbuf_to_file_internal),
(save_pixbuf_to_file):
* librsvg/test-rsvg.c: (save_pixbuf_to_file_internal),
(save_pixbuf_to_file):
* src/file-manager/fm-directory-view.c: (display_pending_files),
(compute_menu_item_info):
* src/file-manager/fm-icon-view.c: (compute_menu_item_info):
* src/file-manager/fm-list-view.c: (get_column_from_attribute):
* src/nautilus-application.c: (nautilus_application_startup):
* src/nautilus-search-bar-criterion.c:
(nautilus_search_bar_criterion_next_new),
(nautilus_search_bar_criterion_get_location),
(get_date_modified_location_for):
* src/nautilus-sidebar-tabs.c: (draw_one_tab_themed),
(draw_or_layout_all_tabs):
* src/nautilus-toolbar.c: (nautilus_toolbar_size_allocate):
* src/nautilus-window-manage-views.c:
(nautilus_window_get_current_location_title):
* test/test-nautilus-label.c: (justification_changed_callback):
Fix all the warnings -Wuninitialized found.
Quite a number of them were actual bugs.
Turn on -Wuninitialized in configure.in now that ORBit generates
warning-free code.
2000-09-05 John Sullivan <sullivan@eazel.com>
Fixed bug 1247 ("Edit Novice Settings" menu item
......
......@@ -360,19 +360,24 @@ BonoboStream *
bonobo_stream_vfs_open (const char *uri, Bonobo_Storage_OpenMode mode)
{
GnomeVFSHandle *fd = NULL;
GnomeVFSResult res;
GnomeVFSResult result;
g_return_val_if_fail (uri != NULL, NULL);
if (mode == Bonobo_Storage_READ)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
else if (mode == Bonobo_Storage_WRITE)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
/* unhandled open modes */
result = GNOME_VFS_ERROR_NOT_SUPPORTED;
if(fd && res == GNOME_VFS_OK)
if (mode == Bonobo_Storage_READ) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
} else if (mode == Bonobo_Storage_WRITE) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
}
if (fd != NULL && result == GNOME_VFS_OK) {
return bonobo_stream_create (fd);
else
return NULL;
}
return NULL;
}
/**
......
......@@ -551,6 +551,8 @@ xml_parse_document (gchar *filename)
xmlParserCtxtPtr ctxt;
char *directory;
directory = NULL;
ctxt = xmlCreateFileParserCtxt(filename);
if (ctxt == NULL) {
return (NULL);
......
......@@ -395,6 +395,7 @@ end_element (SAXParseInfo *spi,
g_return_if_fail(spi->stinfo[PRIMARY]);
it = PRIMARY;
if(spi->stinfo[SECONDARY] || spi->stinfo[SEE] || spi->stinfo[SEEALSO])
{
parent_ii = g_tree_lookup(spi->idx->all_items, spi->stinfo[PRIMARY]);
......@@ -442,7 +443,6 @@ end_element (SAXParseInfo *spi,
}
else
{
it = PRIMARY;
parent_tree = spi->idx->all_items;
}
......
......@@ -558,7 +558,7 @@ logout_button_cb (GtkWidget *button, NautilusSummaryView *view)
if (CORBA_OBJECT_NIL != view->details->user_control) {
/* Get list of currently active users */
EazelProxy_UserControl_get_active_users (
users = EazelProxy_UserControl_get_active_users (
view->details->user_control, &ev
);
......
......@@ -558,7 +558,7 @@ logout_button_cb (GtkWidget *button, NautilusSummaryView *view)
if (CORBA_OBJECT_NIL != view->details->user_control) {
/* Get list of currently active users */
EazelProxy_UserControl_get_active_users (
users = EazelProxy_UserControl_get_active_users (
view->details->user_control, &ev
);
......
......@@ -435,18 +435,18 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service
switch (request_status) {
case ghttp_error: {
Trilobite_Eazel_Time_CannotGetTime *exn;
const char *reason;
exn = Trilobite_Eazel_Time_CannotGetTime__alloc ();
reason = ghttp_get_error (request);
exn->url = CORBA_string_dup (service->private->time_url);
exn->reason = reason==NULL ? CORBA_string_dup ("Bad url"): CORBA_string_dup ( reason );
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Trilobite_Eazel_Time_CannotGetTime, exn);
result = 0;
}
break;
Trilobite_Eazel_Time_CannotGetTime *exn;
const char *reason;
exn = Trilobite_Eazel_Time_CannotGetTime__alloc ();
reason = ghttp_get_error (request);
exn->url = CORBA_string_dup (service->private->time_url);
exn->reason = reason==NULL ? CORBA_string_dup ("Bad url"): CORBA_string_dup ( reason );
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Trilobite_Eazel_Time_CannotGetTime, exn);
result = 0;
}
break;
case ghttp_not_done:
g_message ("hest");
result = 0;
......@@ -454,6 +454,10 @@ trilobite_eazel_time_service_do_http_request (TrilobiteEazelTimeService *service
case ghttp_done:
result = trilobite_eazel_time_service_parse_body (ghttp_get_body (request));
break;
default:
result = 0;
g_assert_not_reached ();
break;
}
ghttp_clean (request);
......
......@@ -1106,6 +1106,7 @@ expand_uri_sequence_and_select_end (NautilusTreeView *view)
gboolean at_least_one_found;
at_least_one_found = FALSE;
uri = NULL;
if (!view->details->root_seen) {
call_when_root_seen (view, expand_uri_sequence_and_select_end);
......@@ -1578,6 +1579,8 @@ static void nautilus_tree_view_drag_data_received (GtkWidget *widget,
action_string = "link";
break;
default:
g_assert_not_reached ();
action_string = "error";
break;
}
......
......@@ -466,7 +466,7 @@ AC_MSG_CHECKING(for more warnings, including -Werror)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS \
-Wall -Wno-uninitialized \
-Wall -Wuninitialized \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wno-sign-compare -Wsign-promo \
......
......@@ -360,19 +360,24 @@ BonoboStream *
bonobo_stream_vfs_open (const char *uri, Bonobo_Storage_OpenMode mode)
{
GnomeVFSHandle *fd = NULL;
GnomeVFSResult res;
GnomeVFSResult result;
g_return_val_if_fail (uri != NULL, NULL);
if (mode == Bonobo_Storage_READ)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
else if (mode == Bonobo_Storage_WRITE)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
/* unhandled open modes */
result = GNOME_VFS_ERROR_NOT_SUPPORTED;
if(fd && res == GNOME_VFS_OK)
if (mode == Bonobo_Storage_READ) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
} else if (mode == Bonobo_Storage_WRITE) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
}
if (fd != NULL && result == GNOME_VFS_OK) {
return bonobo_stream_create (fd);
else
return NULL;
}
return NULL;
}
/**
......
......@@ -348,6 +348,8 @@ nautilus_background_draw (NautilusBackground *background,
g_assert_not_reached ();
/* fall through */
case NAUTILUS_BACKGROUND_CENTERED:
image_width = gdk_pixbuf_get_width (background->details->image);
image_height = gdk_pixbuf_get_height (background->details->image);
gdk_pixbuf_render_to_drawable (background->details->image, drawable, gc,
0, 0,
rectangle->x + (rectangle->width - image_width)/2,
......@@ -531,6 +533,9 @@ nautilus_background_draw_aa (NautilusBackground *background,
int accumulator, temp_value;
g_return_if_fail (NAUTILUS_IS_BACKGROUND (background));
remaining_width = 0;
remaining_height = 0;
if (!buffer->is_buf) {
if (!nautilus_background_image_fully_obscures (background, entire_width, entire_height, TRUE)) {
......
......@@ -83,6 +83,7 @@ nautilus_customization_data_new (const char *customization_name,
data = g_new0 (NautilusCustomizationData, 1);
public_result = GNOME_VFS_OK;
if (show_public_customizations) {
public_directory_uri = get_global_customization_uri (customization_name);
......
......@@ -271,6 +271,10 @@ nautilus_directory_background_write_desktop_settings (char *color, char *image,
break;
case NAUTILUS_BACKGROUND_SCALED_ASPECT:
wallpaper_align = WALLPAPER_SCALED_KEEP;
break;
default:
g_assert_not_reached ();
wallpaper_align = WALLPAPER_TILED;
break;
}
gnome_config_set_int ("/Background/Default/wallpaperAlign", wallpaper_align);
......
......@@ -916,6 +916,8 @@ nautilus_file_operations_move_to_trash (const GList *item_uris,
source_uri_list = NULL;
target_uri_list = NULL;
result = GNOME_VFS_OK;
/* build the source and uri list, checking if any of the delete itmes are Trash */
for (p = item_uris; p != NULL; p = p->next) {
bail = FALSE;
......@@ -1057,6 +1059,8 @@ do_empty_trash (GtkWidget *parent_view)
*/
trash_dir_uri = NULL;
trash_dir_list = NULL;
result = gnome_vfs_find_directory (NULL, GNOME_VFS_DIRECTORY_KIND_TRASH,
&trash_dir_uri, FALSE, FALSE, 0777);
......
......@@ -3717,9 +3717,6 @@ nautilus_file_dump (NautilusFile *file)
} else {
g_print("size: %ld \n", size);
switch (file->details->info->type) {
case GNOME_VFS_FILE_TYPE_UNKNOWN:
file_kind = "unknown";
break;
case GNOME_VFS_FILE_TYPE_REGULAR:
file_kind = "regular file";
break;
......@@ -3741,6 +3738,10 @@ nautilus_file_dump (NautilusFile *file)
case GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK:
file_kind = "symbolic link";
break;
case GNOME_VFS_FILE_TYPE_UNKNOWN:
default:
file_kind = "unknown";
break;
}
g_print("kind: %s \n", file_kind);
if (file->details->info->type == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK) {
......
......@@ -627,6 +627,9 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
char *combined_text;
gboolean have_editable, have_additional, needs_highlight;
gc = NULL;
icon_width = 0;
details = item->details;
needs_highlight = details->is_highlighted_for_selection || details->is_highlighted_for_drop;
......@@ -956,6 +959,11 @@ emblem_layout_next (EmblemLayout *layout,
x = layout->icon_rect.x0;
y = layout->icon_rect.y0;
break;
default:
g_assert_not_reached ();
x = 0;
y = 0;
break;
}
if (layout->position != 0) {
switch (layout->side) {
......
......@@ -1934,6 +1934,9 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon,
g_return_val_if_fail (scalable_icon != NULL, NULL);
key = NULL;
image = NULL;
factory = nautilus_get_current_icon_factory ();
hash_table = factory->icon_cache;
......@@ -1959,8 +1962,7 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon,
g_assert (image != NULL);
}
if (!found_image)
{
if (!found_image) {
gboolean got_scaled_image;
gboolean got_custom_image;
IconInfo key_icon_info;
......@@ -2046,6 +2048,7 @@ get_image_from_cache (NautilusScalableIcon *scalable_icon,
nautilus_icon_factory_schedule_sweep ();
/* Grab a ref for the caller. */
g_assert (image != NULL);
gdk_pixbuf_ref (image);
return image;
}
......
......@@ -399,6 +399,8 @@ iti_paint_text (Iti *iti, GdkDrawable *drawable, int x, int y)
int cursor, offset, i;
GnomeCanvasItem *canvas_item;
xpos = 0;
offset = 0;
priv = iti->priv;
style = GTK_WIDGET (GNOME_CANVAS_ITEM (iti)->canvas)->style;
......@@ -525,7 +527,7 @@ iti_paint_text (Iti *iti, GdkDrawable *drawable, int x, int y)
/* The i-beam should only be drawn at the end of a line of text if that line is the
* only or last line of text in a label. We subtract one from the x position
* so the i-beam is not visually jammed against the edge of the bounding rect. */
if (cursor == i){
if (cursor == i) {
int px = x + xpos + offset;
y -= ti->baseline_skip;
......
......@@ -1943,7 +1943,7 @@ get_cell_greater_rectangle (GdkRectangle *cell_rect, GdkRectangle *result,
static void
draw_cell (GtkCList *clist, GdkRectangle *area, int row_index, int column_index,
GtkCListRow *row, GdkRectangle *erase_rect)
GtkCListRow *row)
{
GtkStyle *style;
GdkGC *fg_gc;
......@@ -2128,7 +2128,6 @@ static void
draw_row (GtkCList *clist, GdkRectangle *area, int row_index, GtkCListRow *row)
{
GtkWidget *widget;
GdkRectangle *rect;
GdkRectangle row_rectangle;
GdkRectangle extended_row_rectangle;
GdkRectangle intersect_rectangle;
......@@ -2180,7 +2179,7 @@ draw_row (GtkCList *clist, GdkRectangle *area, int row_index, GtkCListRow *row)
/* iterate and draw all the columns (row cells) and draw their contents */
for (colum_index = 0; colum_index < clist->columns; colum_index++) {
draw_cell (clist, area, row_index, colum_index, row, rect);
draw_cell (clist, area, row_index, colum_index, row);
}
/* draw the row spacer */
......
......@@ -857,6 +857,8 @@ nautilus_mime_add_application_to_short_list_for_uri (const char *uri,
GList *old_list, *new_list;
GnomeVFSResult result;
result = GNOME_VFS_OK;
old_list = nautilus_mime_get_short_list_applications_for_uri (uri);
if (!gnome_vfs_mime_id_in_application_list (application_id, old_list)) {
......
......@@ -209,8 +209,10 @@ program_file_pair_get_short_status_text (ProgramFilePair *pair)
supertype = get_supertype_from_file (pair->file);
switch (pair->status) {
default:
case PROGRAM_STATUS_UNKNOWN:
g_assert_not_reached ();
result = "error";
break;
case PROGRAM_NOT_IN_PREFERRED_LIST:
result = g_strdup (_("not in menu"));
......@@ -254,8 +256,10 @@ program_file_pair_get_long_status_text (ProgramFilePair *pair)
file_name = nautilus_file_get_name (pair->file);
switch (pair->status) {
default:
case PROGRAM_STATUS_UNKNOWN:
g_assert_not_reached ();
result = "error";
break;
case PROGRAM_NOT_IN_PREFERRED_LIST:
result = g_strdup_printf (_("Is not in the menu for \"%s\" items."), file_type);
......
......@@ -125,13 +125,14 @@ nautilus_choose_component_for_file (NautilusFile *file,
any_choices = any_programs_available_for_file (action_type, file);
identifier = NULL;
dialog = NULL;
if (any_choices) {
dialog = set_up_program_chooser
(file, action_type, parent_window);
if (gnome_dialog_run (dialog) == GNOME_OK) {
identifier = nautilus_program_chooser_get_component (dialog);;
identifier = nautilus_program_chooser_get_component (dialog);
}
} else {
nautilus_program_chooser_show_no_choices_message (action_type, file, parent_window);
......@@ -148,6 +149,7 @@ nautilus_choose_component_for_file (NautilusFile *file,
/* Destroy only after callback, since view identifier will
* be destroyed too.
*/
g_assert (dialog != NULL);
gtk_widget_destroy (GTK_WIDGET (dialog));
}
}
......@@ -185,6 +187,7 @@ nautilus_choose_application_for_file (NautilusFile *file,
any_choices = any_programs_available_for_file (action_type, file);
application = NULL;
dialog = NULL;
if (any_choices) {
dialog = set_up_program_chooser
......@@ -207,6 +210,7 @@ nautilus_choose_application_for_file (NautilusFile *file,
/* Destroy only after callback, since application struct will
* be destroyed too.
*/
g_assert (dialog != NULL);
gtk_widget_destroy (GTK_WIDGET (dialog));
}
}
......
......@@ -941,6 +941,7 @@ nautilus_scalable_font_draw_text_lines_with_dimensions (const NautilusScalableFo
default:
g_assert_not_reached ();
text_x = 0;
}
text_y = y;
......
......@@ -211,6 +211,7 @@ nautilus_theme_make_selector (const char *theme_name)
return NULL;
}
pixbuf = NULL;
/* load the icon that we found and return it */
if (nautilus_istr_has_suffix(pixbuf_file, ".svg")) {
FILE *f = fopen (pixbuf_file, "rb");
......
......@@ -360,19 +360,24 @@ BonoboStream *
bonobo_stream_vfs_open (const char *uri, Bonobo_Storage_OpenMode mode)
{
GnomeVFSHandle *fd = NULL;
GnomeVFSResult res;
GnomeVFSResult result;
g_return_val_if_fail (uri != NULL, NULL);
if (mode == Bonobo_Storage_READ)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
else if (mode == Bonobo_Storage_WRITE)
res = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
/* unhandled open modes */
result = GNOME_VFS_ERROR_NOT_SUPPORTED;
if(fd && res == GNOME_VFS_OK)
if (mode == Bonobo_Storage_READ) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_READ);
} else if (mode == Bonobo_Storage_WRITE) {
result = gnome_vfs_open(&fd, uri, GNOME_VFS_OPEN_WRITE);
}
if (fd != NULL && result == GNOME_VFS_OK) {
return bonobo_stream_create (fd);
else
return NULL;
}
return NULL;
}
/**
......
......@@ -348,6 +348,8 @@ nautilus_background_draw (NautilusBackground *background,
g_assert_not_reached ();
/* fall through */
case NAUTILUS_BACKGROUND_CENTERED:
image_width = gdk_pixbuf_get_width (background->details->image);
image_height = gdk_pixbuf_get_height (background->details->image);
gdk_pixbuf_render_to_drawable (background->details->image, drawable, gc,
0, 0,
rectangle->x + (rectangle->width - image_width)/2,
......@@ -531,6 +533,9 @@ nautilus_background_draw_aa (NautilusBackground *background,
int accumulator, temp_value;
g_return_if_fail (NAUTILUS_IS_BACKGROUND (background));
remaining_width = 0;
remaining_height = 0;
if (!buffer->is_buf) {
if (!nautilus_background_image_fully_obscures (background, entire_width, entire_height, TRUE)) {
......
......@@ -83,6 +83,7 @@ nautilus_customization_data_new (const char *customization_name,
data = g_new0 (NautilusCustomizationData, 1);
public_result = GNOME_VFS_OK;
if (show_public_customizations) {
public_directory_uri = get_global_customization_uri (customization_name);
......