]> spindle.queued.net Git - midori/commitdiff
Use #if instead of #ifdef consistently
authorChristian Dywan <christian@twotoasts.de>
Sat, 23 Aug 2008 21:44:55 +0000 (23:44 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 23 Aug 2008 21:44:55 +0000 (23:44 +0200)
midori/main.c
midori/midori-app.c
midori/midori-browser.c
midori/midori-webview.c
midori/sokoke.c

index 30e6c2fbd1e12bbb695833f25cf384d80c8506de..e3a666ba317dcf32d4caa92a1cdb8ea81fbacc40 100644 (file)
@@ -25,7 +25,7 @@
 #include <string.h>
 #include <gtk/gtk.h>
 
-#ifdef ENABLE_NLS
+#if ENABLE_NLS
     #include <libintl.h>
 #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);
index 660bbe4de7efc8f7b1e4cb29a8addde2eb273029..7314957c0251986c4182b64e8b154f6b3fc892b5 100644 (file)
@@ -19,7 +19,7 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
-#ifdef HAVE_UNIQUE
+#if HAVE_UNIQUE
     #include <unique/unique.h>
 #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
index c30b0463fb6cca97e2722307c2743531a64f3d52..146070dff9730d2c6076961690e0c9d5b47e9d63 100644 (file)
@@ -28,7 +28,7 @@
 #include "compat.h"
 #include "gjs.h"
 
-#ifdef HAVE_GIO
+#if HAVE_GIO
 #include <gio/gio.h>
 #endif
 #include <glib/gi18n.h>
@@ -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
index faf45855b76a43f4e123c6f82bad91dc97337d76..e85f052c2cc26796680932e45c2327ac727948ff 100644 (file)
@@ -20,7 +20,7 @@
 #include "sokoke.h"
 #include "compat.h"
 
-#ifdef HAVE_GIO
+#if HAVE_GIO
 #include <gio/gio.h>
 #endif
 #include <webkit/webkit.h>
@@ -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");
index 77263a3d683ebb847d8c51594edd574ecfec8c20..60ee1476f50510ca51356b764cca5986d53d7bea 100644 (file)
@@ -16,7 +16,7 @@
 #include "sokoke.h"
 #include "main.h"
 
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
 #include <string.h>
@@ -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 ();