Commit 61299401 authored by Kjartan Maraas's avatar Kjartan Maraas Committed by Kjartan Maraas

Lots of cleanups. Closes bug #313094 and bug #149714

2005-08-12  Kjartan Maraas  <kmaraas@gnome.org>

	Lots of cleanups. Closes bug #313094 and bug #149714

	* libnautilus-private/nautilus-directory-background.c:
	(nautilus_file_background_write_desktop_default_settings):
	ANSIfication
	* libnautilus-private/nautilus-file.c: Mark some variables
	static.
	* libnautilus-private/nautilus-icon-container.c:
	(nautilus_icon_container_get_selection): Return NULL not
	FALSE.
	* libnautilus-private/nautilus-icon-factory.c:
	(nautilus_icon_factory_get_thumbnail_factory): ANSIfication
	* libnautilus-private/nautilus-metafile.c: Static variables
	* libnautilus-private/nautilus-program-choosing.c:
	(slowly_and_stupidly_obtain_timestamp): Sparse fix
	* src/file-manager/fm-icon-view.c:
	(fm_icon_view_get_background_widget): FALSE vs NULL
	* src/file-manager/fm-list-view.c: (filename_cell_data_func):
	Plug a leak. Bug #313094.
	* src/file-manager/fm-tree-model.c: (fm_tree_model_iter_get_file):
	NULL vs 0.
	* src/nautilus-bookmark-list.c:
	(nautilus_bookmark_list_get_file_path),
	(nautilus_bookmark_list_load_file): ANSIfication
	* src/nautilus-bookmarks-window.c: (bookmarks_delete_bookmark):
	ANSIfication
	* src/nautilus-main.c: (slowly_and_stupidly_obtain_timestamp):
	NULL vs 0.
	* src/nautilus-self-check-functions.c: (nautilus_run_self_checks):
	ANSIfication
parent 4d71d016
2005-08-12 Kjartan Maraas <kmaraas@gnome.org>
Lots of cleanups. Closes bug #313094 and bug #149714
* libnautilus-private/nautilus-directory-background.c:
(nautilus_file_background_write_desktop_default_settings):
ANSIfication
* libnautilus-private/nautilus-file.c: Mark some variables
static.
* libnautilus-private/nautilus-icon-container.c:
(nautilus_icon_container_get_selection): Return NULL not
FALSE.
* libnautilus-private/nautilus-icon-factory.c:
(nautilus_icon_factory_get_thumbnail_factory): ANSIfication
* libnautilus-private/nautilus-metafile.c: Static variables
* libnautilus-private/nautilus-program-choosing.c:
(slowly_and_stupidly_obtain_timestamp): Sparse fix
* src/file-manager/fm-icon-view.c:
(fm_icon_view_get_background_widget): FALSE vs NULL
* src/file-manager/fm-list-view.c: (filename_cell_data_func):
Plug a leak. Bug #313094.
* src/file-manager/fm-tree-model.c: (fm_tree_model_iter_get_file):
NULL vs 0.
* src/nautilus-bookmark-list.c:
(nautilus_bookmark_list_get_file_path),
(nautilus_bookmark_list_load_file): ANSIfication
* src/nautilus-bookmarks-window.c: (bookmarks_delete_bookmark):
ANSIfication
* src/nautilus-main.c: (slowly_and_stupidly_obtain_timestamp):
NULL vs 0.
* src/nautilus-self-check-functions.c: (nautilus_run_self_checks):
ANSIfication
2005-08-09 Martin Wehner <martin.wehner@gmail.com>
* configure.in:
......
......@@ -248,7 +248,7 @@ nautilus_file_background_write_desktop_settings (char *color, char *image, EelBa
}
static void
nautilus_file_background_write_desktop_default_settings ()
nautilus_file_background_write_desktop_default_settings (void)
{
/* We just unset all the gconf keys so they go back to
* defaults
......
......@@ -2918,7 +2918,7 @@ nautilus_file_get_where_string (NautilusFile *file)
get_where_string, (file));
}
const char *TODAY_TIME_FORMATS [] = {
static const char *TODAY_TIME_FORMATS [] = {
/* Today, use special word.
* strftime patterns preceeded with the widest
* possible resulting string for that pattern.
......@@ -2949,7 +2949,7 @@ const char *TODAY_TIME_FORMATS [] = {
NULL
};
const char *YESTERDAY_TIME_FORMATS [] = {
static const char *YESTERDAY_TIME_FORMATS [] = {
/* Yesterday, use special word.
* Note to localizers: Same issues as "today" string.
*/
......@@ -2968,7 +2968,7 @@ const char *YESTERDAY_TIME_FORMATS [] = {
NULL
};
const char *CURRENT_WEEK_TIME_FORMATS [] = {
static const char *CURRENT_WEEK_TIME_FORMATS [] = {
/* Current week, include day of week.
* Note to localizers: Same issues as "today" string.
* The width measurement templates correspond to
......
......@@ -5402,7 +5402,7 @@ nautilus_icon_container_get_selection (NautilusIconContainer *container)
{
GList *list, *p;
g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (container), FALSE);
g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (container), NULL);
list = NULL;
for (p = container->details->icons; p != NULL; p = p->next) {
......
......@@ -270,7 +270,7 @@ nautilus_icon_factory_get_icon_theme (void)
}
GnomeThumbnailFactory *
nautilus_icon_factory_get_thumbnail_factory ()
nautilus_icon_factory_get_thumbnail_factory (void)
{
NautilusIconFactory *factory;
......
......@@ -264,8 +264,8 @@ nautilus_metafile_get (const char *directory_uri)
* We may want to consider limiting writes as well.
*/
int num_reads_in_progress;
GList *pending_reads;
static int num_reads_in_progress;
static GList *pending_reads;
#if 0
#define DEBUG_METADATA_IO
......
......@@ -387,7 +387,7 @@ slowly_and_stupidly_obtain_timestamp (Display *xdisplay)
0,
CopyFromParent,
CopyFromParent,
CopyFromParent,
(Visual *)CopyFromParent,
CWOverrideRedirect | CWEventMask,
&attrs);
......
......@@ -1223,7 +1223,7 @@ fm_icon_view_can_zoom_out (FMDirectoryView *view)
static GtkWidget *
fm_icon_view_get_background_widget (FMDirectoryView *view)
{
g_return_val_if_fail (FM_IS_ICON_VIEW (view), FALSE);
g_return_val_if_fail (FM_IS_ICON_VIEW (view), NULL);
return GTK_WIDGET (get_icon_container (FM_ICON_VIEW (view)));
}
......
......@@ -1293,6 +1293,7 @@ filename_cell_data_func (GtkTreeViewColumn *column,
"text", text,
"underline", underline,
NULL);
g_free (text);
}
static void
......
......@@ -1736,8 +1736,8 @@ fm_tree_model_iter_get_file (FMTreeModel *model, GtkTreeIter *iter)
{
TreeNode *node;
g_return_val_if_fail (FM_IS_TREE_MODEL (model), 0);
g_return_val_if_fail (iter_is_valid (FM_TREE_MODEL (model), iter), 0);
g_return_val_if_fail (FM_IS_TREE_MODEL (model), NULL);
g_return_val_if_fail (iter_is_valid (FM_TREE_MODEL (model), iter), NULL);
node = iter->user_data;
return node == NULL ? NULL : nautilus_file_ref (node->file);
......
......@@ -123,7 +123,7 @@ new_bookmark_from_uri (const char *uri, const char *label)
}
static char *
nautilus_bookmark_list_get_file_path ()
nautilus_bookmark_list_get_file_path (void)
{
char *file_path;
file_path = g_build_filename (g_get_home_dir (),
......@@ -449,6 +449,7 @@ static void
nautilus_bookmark_list_load_file (NautilusBookmarkList *bookmarks)
{
char *filename, *contents;
GError **error = NULL;
filename = nautilus_bookmark_list_get_file_path ();
......@@ -462,7 +463,6 @@ nautilus_bookmark_list_load_file (NautilusBookmarkList *bookmarks)
}
/* Read new list from file */
GError **error = NULL;
if (g_file_get_contents (filename, &contents, NULL, error)) {
char **lines;
int i;
......
......@@ -600,7 +600,7 @@ on_jump_button_clicked (GtkButton *button,
}
static void
bookmarks_delete_bookmark ()
bookmarks_delete_bookmark (void)
{
GtkTreeIter iter;
GtkTreePath *path;
......
......@@ -216,7 +216,7 @@ slowly_and_stupidly_obtain_timestamp (Display *xdisplay)
0,
CopyFromParent,
CopyFromParent,
CopyFromParent,
(Visual *)CopyFromParent,
CWOverrideRedirect | CWEventMask,
&attrs);
......
......@@ -32,7 +32,7 @@
#include "nautilus-self-check-functions.h"
void nautilus_run_self_checks()
void nautilus_run_self_checks(void)
{
NAUTILUS_FOR_EACH_SELF_CHECK_FUNCTION (NAUTILUS_CALL_SELF_CHECK_FUNCTION)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment