[Nautilus-list] PATCH: some compile fixes for users without medusa
- From: Jason Leach <jasonleach usa net>
- To: nautilus-list eazel com
- Subject: [Nautilus-list] PATCH: some compile fixes for users without medusa
- Date: Tue, 10 Apr 2001 17:09:04 -0400
Hey hackers,
Amidst all the recent changes to the code base, some stuff has slipped
in which breaks compiles for users without medusa. Mostly the compile
stops on the warning of "function defined but never used", and there
are approx three situations where this type of thing happens:
int foo (void) {
#ifdef HAVE_MEDUSA
// do something, return something special
#else
// return NULL or do nothing and return immediately
#endif
}
...
void bar (void) {
#ifdef HAVE_MEDUSA
// do stuff including a call to foo()
#else
// do next to nothing, not calling foo()
#endif
}
Basically since the #ifndef HAVE_MEDUSA case of foo() is so useless,
the #ifdef should be moved to outside the function and the #endif also
outside the ending brace.
And you should see how this gives such a warning and craps out the
compile. I said approx three places because one is really about a
misplaced #endif. So, examine the patch and lemme know if it's
alright to commit as is, or you could go ahead and add your own fixes
for this problem into one of your future commits.
NOTE: I have nothing against medusa, just too lazy to install it (but
not too lazy to compile nautilus myself, I don't know either :-)).
Thanks,
Jason.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.4382
diff -u -r1.4382 ChangeLog
--- ChangeLog 2001/04/09 23:55:56 1.4382
+++ ChangeLog 2001/04/10 04:21:13
@@ -1,3 +1,14 @@
+2001-04-09 Jason Leach <jasonleach usa net>
+
+ * src/file-manager/nautilus-indexing-info.c
+ (show_index_progress_dialog): Compile fix for users without
+ medusa.
+
+ * src/file-manager/fm-search-list-view.c
+ (report_index_age_as_status): Same here.
+
+ * libnautilus-extensions/nautilus-medusa-support.c: Here too.
+
2001-04-09 John Sullivan <sullivan eazel com>
reviewed by: <delete if not using a buddy>
Index: libnautilus-extensions/nautilus-medusa-support.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-extensions/nautilus-medusa-support.c,v
retrieving revision 1.9
diff -u -r1.9 nautilus-medusa-support.c
--- libnautilus-extensions/nautilus-medusa-support.c 2001/04/07 00:51:22 1.9
+++ libnautilus-extensions/nautilus-medusa-support.c 2001/04/10 04:21:14
@@ -39,8 +39,16 @@
#include <libmedusa/medusa-system-state.h>
#endif
-static const char * nautilus_medusa_get_configuration_file_path (void);
+#ifdef HAVE_MEDUSA
+static const char *
+nautilus_medusa_get_configuration_file_path (void)
+{
+ return medusa_get_configuration_file_path ();
+}
+#endif
+
+
gboolean
nautilus_medusa_services_are_enabled (void)
{
@@ -51,7 +59,6 @@
#endif
}
-
NautilusCronStatus
nautilus_medusa_check_cron_is_enabled (void)
{
@@ -111,15 +118,6 @@
return status;
}
-static const char *
-nautilus_medusa_get_configuration_file_path (void)
-{
-#ifdef HAVE_MEDUSA
- return medusa_get_configuration_file_path ();
-#else
- return NULL;
-#endif
-}
char *
nautilus_medusa_get_explanation_of_enabling (void)
Index: src/file-manager/fm-search-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-search-list-view.c,v
retrieving revision 1.71
diff -u -r1.71 fm-search-list-view.c
--- src/file-manager/fm-search-list-view.c 2001/04/07 00:51:23 1.71
+++ src/file-manager/fm-search-list-view.c 2001/04/10 04:21:14
@@ -111,6 +111,7 @@
FM_TYPE_LIST_VIEW)
+#ifdef HAVE_MEDUSA
static void
report_index_age_as_status (NautilusView *nautilus_view)
{
@@ -127,6 +128,7 @@
g_free (status_string);
}
}
+#endif
static void
load_location_callback (NautilusView *nautilus_view, char *location)
Index: src/file-manager/nautilus-indexing-info.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-indexing-info.c,v
retrieving revision 1.23
diff -u -r1.23 nautilus-indexing-info.c
--- src/file-manager/nautilus-indexing-info.c 2001/04/07 00:51:23 1.23
+++ src/file-manager/nautilus-indexing-info.c 2001/04/10 04:21:14
@@ -131,11 +131,9 @@
"destroy",
medusa_remove_state_changed_function,
GINT_TO_POINTER (callback_id));
-#endif
}
-
static void
show_reindex_request_dialog (void)
{
@@ -326,8 +324,6 @@
return dialog;
}
-
-
static void
destroy_indexing_info_dialogs_on_exit (void)
{
@@ -335,8 +331,6 @@
gtk_widget_destroy (GTK_WIDGET (dialogs->last_index_time_dialog));
g_free (dialogs);
}
-
-#ifdef HAVE_MEDUSA
static void
show_indexing_info_dialog (void)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]