From 74a587f5e8b7cc236c9a69f1bf8f3548d902fd40 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 23 Aug 2008 23:44:55 +0200 Subject: [PATCH] Use #if instead of #ifdef consistently --- midori/main.c | 4 ++-- midori/midori-app.c | 20 ++++++++++---------- midori/midori-browser.c | 16 ++++++++-------- midori/midori-webview.c | 12 ++++++------ midori/sokoke.c | 4 ++-- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/midori/main.c b/midori/main.c index 30e6c2fb..e3a666ba 100644 --- a/midori/main.c +++ b/midori/main.c @@ -25,7 +25,7 @@ #include #include -#ifdef ENABLE_NLS +#if ENABLE_NLS #include #endif @@ -397,7 +397,7 @@ main (int argc, gchar* homepage; MidoriWebList* search_engines; - #ifdef ENABLE_NLS + #if ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MIDORI_LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); diff --git a/midori/midori-app.c b/midori/midori-app.c index 660bbe4d..7314957c 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -19,7 +19,7 @@ #include #include -#ifdef HAVE_UNIQUE +#if HAVE_UNIQUE #include #endif @@ -174,7 +174,7 @@ midori_app_constructor (GType type, type, n_construct_properties, construct_properties); } -#ifdef HAVE_UNIQUE +#if HAVE_UNIQUE static UniqueResponse midori_browser_message_received_cb (UniqueApp* instance, UniqueCommand command, @@ -225,7 +225,7 @@ midori_browser_message_received_cb (UniqueApp* instance, static void midori_app_init (MidoriApp* app) { - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE gchar* display_name; gchar* instance_name; guint i, n; @@ -241,7 +241,7 @@ midori_app_init (MidoriApp* app) app->trash = midori_web_list_new (); app->search_engines = midori_web_list_new (); - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE display_name = g_strdup (gdk_display_get_name (gdk_display_get_default ())); n = strlen (display_name); for (i = 0; i < n; i++) @@ -422,7 +422,7 @@ midori_app_instance_is_running (MidoriApp* app) { g_return_val_if_fail (MIDORI_IS_APP (app), FALSE); - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE return unique_app_is_running (app->instance); #else return FALSE; @@ -443,14 +443,14 @@ midori_app_instance_is_running (MidoriApp* app) gboolean midori_app_instance_send_activate (MidoriApp* app) { - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE UniqueResponse response; #endif g_return_val_if_fail (MIDORI_IS_APP (app), FALSE); g_return_val_if_fail (midori_app_instance_is_running (app), FALSE); - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE response = unique_app_send_message (app->instance, UNIQUE_ACTIVATE, NULL); if (response == UNIQUE_RESPONSE_OK) return TRUE; @@ -474,7 +474,7 @@ gboolean midori_app_instance_send_uris (MidoriApp* app, gchar** uris) { - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE UniqueMessageData* message; UniqueResponse response; #endif @@ -483,7 +483,7 @@ midori_app_instance_send_uris (MidoriApp* app, g_return_val_if_fail (midori_app_instance_is_running (app), FALSE); g_return_val_if_fail (uris != NULL, FALSE); - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE message = unique_message_data_new (); unique_message_data_set_uris (message, uris); response = unique_app_send_message (app->instance, UNIQUE_OPEN, message); @@ -525,7 +525,7 @@ midori_app_add_browser (MidoriApp* app, app->browsers = g_list_prepend (app->browsers, browser); - #ifdef HAVE_UNIQUE + #if HAVE_UNIQUE if (app->instance) unique_app_watch_window (app->instance, GTK_WINDOW (browser)); #endif diff --git a/midori/midori-browser.c b/midori/midori-browser.c index c30b0463..146070df 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -28,7 +28,7 @@ #include "compat.h" #include "gjs.h" -#ifdef HAVE_GIO +#if HAVE_GIO #include #endif #include @@ -1829,14 +1829,14 @@ _action_source_view_activate (GtkAction* action, #if HAVE_GIO GFile* file; gchar* tag; - #ifdef HAVE_GTKSOURCEVIEW + #if HAVE_GTKSOURCEVIEW GFileInfo* info; const gchar* content_type; #endif #endif gchar* contents; gchar* contents_utf8; - #ifdef HAVE_GTKSOURCEVIEW + #if HAVE_GTKSOURCEVIEW GtkSourceBuffer* buffer; #if HAVE_GIO GtkSourceLanguageManager* language_manager; @@ -1858,12 +1858,12 @@ _action_source_view_activate (GtkAction* action, #if HAVE_GIO file = g_file_new_for_uri (uri); tag = NULL; - #ifdef HAVE_GTKSOURCEVIEW + #if HAVE_GTKSOURCEVIEW content_type = NULL; #endif if (g_file_load_contents (file, NULL, &contents, NULL, &tag, NULL)) { - #ifdef HAVE_GTKSOURCEVIEW + #if HAVE_GTKSOURCEVIEW info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL); content_type = g_file_info_get_content_type (info); @@ -1880,10 +1880,10 @@ _action_source_view_activate (GtkAction* action, #endif contents_utf8 = contents; - #ifdef HAVE_GTKSOURCEVIEW + #if HAVE_GTKSOURCEVIEW buffer = gtk_source_buffer_new (NULL); gtk_source_buffer_set_highlight_syntax (buffer, TRUE); - #ifdef HAVE_GIO + #if HAVE_GIO if (content_type) { language_manager = gtk_source_language_manager_get_default (); @@ -1912,7 +1912,7 @@ _action_source_view_activate (GtkAction* action, #endif if (contents_utf8) gtk_text_buffer_set_text (GTK_TEXT_BUFFER (buffer), contents_utf8, -1); - #ifdef HAVE_GTKSOURCEVIEW + #if HAVE_GTKSOURCEVIEW text_view = gtk_source_view_new_with_buffer (buffer); gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (text_view), TRUE); #else diff --git a/midori/midori-webview.c b/midori/midori-webview.c index faf45855..e85f052c 100644 --- a/midori/midori-webview.c +++ b/midori/midori-webview.c @@ -20,7 +20,7 @@ #include "sokoke.h" #include "compat.h" -#ifdef HAVE_GIO +#if HAVE_GIO #include #endif #include @@ -294,7 +294,7 @@ webkit_web_view_window_object_cleared_cb (MidoriWebView* web_view, web_view->window_object_cleared = TRUE; } -#ifdef HAVE_GIO +#if HAVE_GIO void loadable_icon_finish_cb (GdkPixbuf* icon, GAsyncResult* res, @@ -380,7 +380,7 @@ file_info_finish_cb (GFile* icon_file, static void _midori_web_view_load_icon (MidoriWebView* web_view) { - #ifdef HAVE_GIO + #if HAVE_GIO GFile* file; GFile* icon_file; #endif @@ -388,7 +388,7 @@ _midori_web_view_load_icon (MidoriWebView* web_view) gint icon_width, icon_height; GdkPixbuf* pixbuf_scaled; - #ifdef HAVE_GIO + #if HAVE_GIO if (web_view->uri) { file = g_file_new_for_uri (web_view->uri); @@ -473,7 +473,7 @@ gjs_value_links_foreach_cb (GjsValue* link, { const gchar* type; const gchar* rel; -#ifdef HAVE_GIO +#if HAVE_GIO GFile* icon_file; GIcon* icon; #endif @@ -494,7 +494,7 @@ gjs_value_links_foreach_cb (GjsValue* link, ? gjs_value_get_attribute_string (link, "title") : NULL); } } -#ifdef HAVE_GIO +#if HAVE_GIO if (gjs_value_has_attribute (link, "rel")) { rel = gjs_value_get_attribute_string (link, "rel"); diff --git a/midori/sokoke.c b/midori/sokoke.c index 77263a3d..60ee1476 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -16,7 +16,7 @@ #include "sokoke.h" #include "main.h" -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H #include #endif #include @@ -338,7 +338,7 @@ sokoke_superuser_warning_new (void) { /* Create a horizontal bar with a security warning This returns NULL if the user is no superuser */ - #ifdef HAVE_UNISTD_H + #if HAVE_UNISTD_H if (G_UNLIKELY (!geteuid ())) /* effective superuser? */ { GtkWidget* hbox = gtk_event_box_new ();