]> spindle.queued.net Git - midori/commitdiff
sokoke, gtk3-compat, gtkiconentry, stock join midori-platform.h
authorChristian Dywan <christian@twotoasts.de>
Mon, 31 Oct 2011 21:10:39 +0000 (22:10 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 31 Oct 2011 21:18:06 +0000 (22:18 +0100)
Also introduce #define MIDORI_MODULE_PREFIX.

Fixes: https://bugs.launchpad.net/midori/+bug/884395
37 files changed:
extensions/adblock.c
extensions/addons.c
extensions/cookie-manager/cookie-manager-page.c
extensions/copy-tabs.c
extensions/feed-panel/feed-panel.c
extensions/formhistory.c
extensions/shortcuts.c
extensions/statusbar-features.c
extensions/tab-panel.c
extensions/tabs-minimized.c
extensions/web-cache.c
midori/gtkiconentry.h
midori/main.c
midori/midori-app.c
midori/midori-browser.c
midori/midori-extension.c
midori/midori-locationaction.c
midori/midori-panel.c
midori/midori-platform.h
midori/midori-preferences.c
midori/midori-searchaction.c
midori/midori-stock.h
midori/midori-view.c
midori/midori-websettings.c
midori/midori.h
midori/socket.h
midori/sokoke.c
panels/midori-bookmarks.c
panels/midori-bookmarks.h
panels/midori-extensions.c
panels/midori-history.c
panels/midori-transfers.c
tests/browser.c
tests/extensions.c
tests/magic-uri.c
tests/properties.c
toolbars/midori-findbar.c

index 803c197e4fd9b2b579956bf381720f451debf8e5..a72c5da5b89591e8609cec78b6668e9687360f5c 100644 (file)
 */
 
 #include <midori/midori.h>
+#include <glib/gstdio.h>
 
-#include <midori/sokoke.h>
 #include "config.h"
-
-#include <glib/gstdio.h>
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
index 2f82099b978615d645854bd11f1c9b7f95ee5922..7db7ab5f6b06ab6261a4d6f6ead36ce6e0f7107c 100644 (file)
 /* This extensions add support for user addons: userscripts and userstyles */
 
 #include <midori/midori.h>
-#include <midori/sokoke.h>
 #include <glib/gstdio.h>
 
 #include "config.h"
-
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
index 70947dd448af12850c49741f6412ed356a024dd9..16710dc45105f01e6a9248774f8b4e9f18305edc 100644 (file)
@@ -9,12 +9,9 @@
  See the file COPYING for the full license text.
 */
 
-#include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
 #include <midori/midori.h>
-#include <midori/gtkiconentry.h>
-#include "katze/gtk3-compat.h"
 #include <webkit/webkit.h>
 #include <time.h>
 
index 60fe2dbca77d9448d1a88d2f6638ea06f5b38fb7..55c4c31551b2f5fe8ceef38381fac742417edad7 100644 (file)
@@ -10,7 +10,6 @@
 */
 
 #include <midori/midori.h>
-#include <midori/sokoke.h>
 
 static void
 copy_tabs_apply_cb (GtkWidget*     menuitem,
index 576088cac6ae0790eebbb7de8c08bbfe45049f22..327237dcb5f9e3ea79d0b3abe180aa66b9026f89 100644 (file)
 #include "feed-panel.h"
 
 #include <midori/midori.h>
-#include <midori/sokoke.h>
 #include <time.h>
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 #define STOCK_FEED_PANEL "feed-panel"
 
 struct _FeedPanel
index 04af872b0bcd92dea9429397c06af0a79cc9fcac..e5ea71f6bb18eca765947b570c1facb41e8c73e8 100644 (file)
 #define MINCHARS 2
 
 #include <midori/midori.h>
+#include <glib/gstdio.h>
 
 #include "config.h"
-#include "midori/sokoke.h"
-
-#include <glib/gstdio.h>
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
index f10ba985a7e5ea1c105ac42d4bfe16eddde73e15..85cb80856a4b61693e9a8d3fbd407f9461da4b01 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <midori/midori.h>
 
-#include <midori/sokoke.h>
 #include "config.h"
 
 static void
index be47b9ddf8a5c1f61c51c9df7b90f14e5b208485..2f0ee996da3600ffb9e76ce57d64c3bd59806e9a 100644 (file)
@@ -10,7 +10,6 @@
 */
 
 #include <midori/midori.h>
-#include <midori/sokoke.h>
 
 typedef struct
 {
index 0c2291a251a5212d03d89b02f9a5a5bd15246140..ce33af079f65cc65dcf608017be15f2848255232 100644 (file)
@@ -10,7 +10,6 @@
 */
 
 #include <midori/midori.h>
-#include <midori/sokoke.h>
 
 #define STOCK_TAB_PANEL "tab-panel"
 
index f5130ee3c1a7939c1cc509264cadb5d6ff2c9445..feccfed5ded6d925ddbc0d8baad5c31ef017aa46 100644 (file)
@@ -10,7 +10,6 @@
 */
 
 #include <midori/midori.h>
-#include <midori/sokoke.h>
 
 static void
 tabs_minimized_app_add_browser_cb (MidoriApp*       app,
index 1980d53dfb91bcb707e8ee4601fbb159130b130b..a5ae6cdc4287962b36ae6a48bfd80d501feeeda3 100644 (file)
 */
 
 #include <midori/midori.h>
-
-#include <midori/sokoke.h>
-#include "config.h"
-
 #include <glib/gstdio.h>
 #include <stdlib.h>
+
+#include "config.h"
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
index 3b566c8c133272a9e1c5f42f8fadbce84792d1d3..18ec4e100cb5d5ad3237841f3e9461aa04be9f54 100644 (file)
 #ifndef __GTK_ICON_ENTRY_H__
 #define __GTK_ICON_ENTRY_H__
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 #include <gio/gio.h>
 #include <gtk/gtk.h>
 
index 7906c9d310b554de1e74ca653bd6c9c72425acf4..90b8e9a7049067c50f3b66953071dd8bd5ecce5a 100644 (file)
  See the file COPYING for the full license text.
 */
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
-#include "midori.h"
+#include "midori-app.h"
 #include "midori-array.h"
 #include "midori-bookmarks.h"
+#include "midori-extension.h"
 #include "midori-extensions.h"
 #include "midori-history.h"
 #include "midori-transfers.h"
+#include "midori-panel.h"
+#include "midori-platform.h"
+#include "midori-preferences.h"
 #include <midori/midori-core.h>
 
-#include "sokoke.h"
-
+#include <config.h>
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
@@ -32,6 +31,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <glib/gstdio.h>
+#include <glib/gi18n-lib.h>
 #include <webkit/webkit.h>
 #include <sqlite3.h>
 
     #include <gdk/gdkx.h>
 #endif
 
-#ifdef G_OS_WIN32
-    #define LIBPREFIX ""
-#else
-    #define LIBPREFIX "lib"
-#endif
-
 static gchar*
 build_config_filename (const gchar* filename)
 {
@@ -1805,7 +1799,7 @@ midori_clear_saved_logins_cb (void)
     g_unlink (path);
     /* Form History database, written by the extension */
     katze_assign (path, g_build_filename (sokoke_set_config_dir (NULL),
-        "extensions", LIBPREFIX "formhistory." G_MODULE_SUFFIX, "forms.db", NULL));
+        "extensions", MIDORI_MODULE_PREFIX "formhistory." G_MODULE_SUFFIX, "forms.db", NULL));
     if (sqlite3_open (path, &db) == SQLITE_OK)
     {
         sqlite3_exec (db, "DELETE FROM forms", NULL, NULL, NULL);
index 646038e426be09924328f021032a95e965c52392..772c13f10bc398ea336415a6066df5c218e933ac 100644 (file)
@@ -14,8 +14,7 @@
 #endif
 
 #include "midori-app.h"
-#include "midori-stock.h"
-#include "sokoke.h"
+#include "midori-platform.h"
 
 #include <string.h>
 #include <gtk/gtk.h>
index fee9807502c7087a45a18c0344b4ea9c762f5cbd..dae48ad9e1688b6cf269a7a6ffdb7d020d760a45 100644 (file)
@@ -11,8 +11,6 @@
  See the file COPYING for the full license text.
 */
 
-#include "gtk3-compat.h"
-
 #include "midori-browser.h"
 
 #include "midori-array.h"
 #include "midori-panel.h"
 #include "midori-locationaction.h"
 #include "midori-searchaction.h"
-#include "midori-stock.h"
 #include "midori-findbar.h"
 #include "midori-transferbar.h"
 #include "midori-platform.h"
 #include "midori-core.h"
 
-#include "gtkiconentry.h"
 #include "marshal.h"
-#include "sokoke.h"
 
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 #include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
 #include <string.h>
+
+#include <config.h>
 #ifdef HAVE_UNISTD_H
     #include <unistd.h>
 #endif
 
 #include <sqlite3.h>
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 struct _MidoriBrowser
 {
     #if HAVE_HILDON
index 634462cc015310ec9ff018f853c7e7ef48aa44fd..3a5cbd1373bbb45e9d2cb32123e226f61ad8255c 100644 (file)
 
 #include "midori-extension.h"
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 #include <katze/katze.h>
-#include "sokoke.h"
+#include "midori-platform.h"
 #include <glib/gi18n.h>
 
 G_DEFINE_TYPE (MidoriExtension, midori_extension, G_TYPE_OBJECT);
@@ -295,8 +291,8 @@ midori_extension_activate_cb (MidoriExtension* extension,
             {
                 gchar* filename = g_object_get_data (G_OBJECT (extension), "filename");
                 gchar* folder;
-                if (g_str_has_prefix (filename, "lib"))
-                    filename = &filename[strlen ("len")];
+                if (g_str_has_prefix (filename, MIDORI_MODULE_PREFIX))
+                    filename = &filename[strlen (MIDORI_MODULE_PREFIX)];
                 if (g_str_has_suffix (filename, G_MODULE_SUFFIX))
                     filename = g_strndup (filename,
                         strlen (filename) - strlen ("." G_MODULE_SUFFIX));
index ee2d0d3b5485626d8d42818b0ccdd662a6a438a5..682420c70d9d07c772954130e73938f173baaf5d 100644 (file)
 
 #include "midori-locationaction.h"
 
-#include "gtkiconentry.h"
 #include "marshal.h"
-#include "sokoke.h"
 #include "midori-browser.h"
 #include "midori-searchaction.h"
 #include "midori-platform.h"
 #include <midori/midori-core.h>
 
+#include "config.h"
 #include <string.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
index 260a12baae3bf503ac621474cb1c1840d4b273eb..c14577907073cc37df57c07134bbe0efed4c0585 100644 (file)
 
 #include "midori-panel.h"
 
-#include "midori-view.h"
-
 #include "midori-browser.h"
+#include "midori-platform.h"
+#include "midori-view.h"
 
 #include "marshal.h"
-#include "sokoke.h"
 
 #include <glib/gi18n.h>
 
 #include "config.h"
-
 #ifdef HAVE_HILDON_2_2
     #include <hildon/hildon.h>
 #endif
index 194bf57b3533e4c8e89283561331452b0230184e..e974ed8187dd9aa1b41aa8f5577012982b56e99b 100644 (file)
 #ifndef __MIDORI_PLATFORM_H__
 #define __MIDORI_PLATFORM_H__ 1
 
-#include <gtk/gtk.h>
+#include "midori/midori-stock.h"
+#include "katze/gtk3-compat.h"
+#include "midori/gtkiconentry.h"
+#include "midori/sokoke.h"
 
 /* Common behavior modifiers */
 #define MIDORI_MOD_NEW_WINDOW(state) (state & GDK_SHIFT_MASK)
      && MIDORI_MOD_NEW_TAB(((GdkEventButton*)evt)->state)) \
     || (((GdkEventButton*)evt)->button == 2))
 
+#ifndef G_OS_WIN32
+    #define MIDORI_MODULE_PREFIX "lib"
+#else
+    #define MIDORI_MODULE_PREFIX ""
+#endif
+
+
 #endif /* !__MIDORI_PLATFORM_H__ */
index 1dc9f9e6f02053aff5cba33f9be53ab243da9137..6bfe1218b0bd46d426dc85ec62ffdb379337f7b9 100644 (file)
 
 #include "midori-preferences.h"
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
-#include "sokoke.h"
-#include "midori-stock.h"
+#include "midori-platform.h"
 
 #include <string.h>
 #include <glib/gi18n.h>
@@ -27,6 +22,7 @@
     #include <libsoup/soup-cache.h>
 #endif
 
+#include <config.h>
 #if HAVE_LIBNOTIFY
     #include <libnotify/notify.h>
 #endif
index 6c7acbcc6949019b98861dc42aa1c908a04776f6..bb87bab81930dbcb8eeacc045291cdb2e30e451e 100644 (file)
 
 #include "midori-searchaction.h"
 
-#include "gtk3-compat.h"
-#include "gtkiconentry.h"
 #include "marshal.h"
-#include "sokoke.h"
 #include "midori-platform.h"
 #include "midori-core.h"
 
+#include "config.h"
 #include <string.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
index 991d2ecd0991d1c71e4e856ffac6d30e9f3be48b..7fe9f1270f21b21272ef75051523cf0cd77e76ab 100644 (file)
@@ -12,8 +12,6 @@
 #ifndef __MIDORI_STOCK_H__
 #define __MIDORI_STOCK_H__ 1
 
-#include <gtk/gtk.h>
-
 /* Custom stock items
 
    We should distribute these
index 9c537e6566345768465489f012fee28615d5db08..d3837811a679dd6de0c596280a0a4602c8045308 100644 (file)
  See the file COPYING for the full license text.
 */
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
-#include "gtk3-compat.h"
 #include "midori-view.h"
-#include "midori-stock.h"
 #include "midori-browser.h"
 #include "midori-searchaction.h"
 #include "midori-platform.h"
 #include "midori-core.h"
 
 #include "marshal.h"
-#include "sokoke.h"
 
 #include <string.h>
 #include <stdlib.h>
 #include <gdk/gdkkeysyms.h>
 #include <webkit/webkit.h>
 
+#include <config.h>
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
-
 #ifndef G_OS_WIN32
     #include <sys/utsname.h>
 #endif
index 9ef144ca8ff76888e91444b3d2d771338f7f2add..b6794a5577e03a1a3eca8f073b52d124e2b34a5f 100644 (file)
 #include <glib/gstdio.h>
 #include <string.h>
 
+#include <config.h>
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
-
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 #if defined (G_OS_UNIX)
     #include <sys/utsname.h>
 #endif
index f4e7a95347a45b53328cbf34d2b44de62d6dbcc0..02af3671ce1097a14a55058d0eb0282c9c9cc05f 100644 (file)
@@ -20,7 +20,6 @@
 #include "midori-panel.h"
 #include "midori-preferences.h"
 #include "midori-searchaction.h"
-#include "midori-stock.h"
 #include "midori-view.h"
 #include "midori-viewable.h"
 #include "midori-websettings.h"
index e7f175dc79e66ef29d6ad920d2f6f734ed234f7e..45ae384eae96f50921fa4b7a7733549c087ad9a7 100644 (file)
 #ifndef __SYLPH_SOCKET_H__
 #define __SYLPH_SOCKET_H__
 
-#if HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include <glib.h>
+#include "config.h"
 #if HAVE_NETDB_H
 #  include <netdb.h>
 #endif
index 71c294dadf6ebed3349ad81388b1c3d3d1807401..6387491748620704d116b9bcd5fed6b371cf3a09 100644 (file)
 
 #include "sokoke.h"
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
-#include "midori-stock.h"
 #include "midori-core.h"
+#include "midori-platform.h"
 
+#include <config.h>
 #if HAVE_UNISTD_H
     #include <unistd.h>
 #endif
index dca50faaf53628ff87467ebbc482ea222fd619b1..8bf7e48b871169c026691d7682db36700139b6d9 100644 (file)
 */
 
 #include "midori-bookmarks.h"
-#include "gtk3-compat.h"
 
 #include "midori-array.h"
 #include "midori-app.h"
 #include "midori-browser.h"
-#include "midori-stock.h"
+#include "midori-platform.h"
 #include "midori-view.h"
 #include "midori-viewable.h"
 
-#include "sokoke.h"
-#include "gtkiconentry.h"
-
 #include <glib/gi18n.h>
 #include <string.h>
 
index 3dc260bed22fc3432bf260210b94d3aeb8dfd1d1..1be04121d085fe92d67ce3547e90d34951ef2107 100644 (file)
@@ -12,8 +12,6 @@
 #ifndef __MIDORI_BOOKMARKS_H__
 #define __MIDORI_BOOKMARKS_H__
 
-#include "config.h"
-
 #include <sqlite3.h>
 #include <gtk/gtk.h>
 #include <katze/katze.h>
index b55b6ba20327a3aaf63eed395d94f2b0e01f4cda..ad2de72f6b07ee6f332e73b59d7d69640582dcd7 100644 (file)
 
 #include "midori-app.h"
 #include "midori-extension.h"
-#include "midori-stock.h"
+#include "midori-platform.h"
 #include "midori-viewable.h"
 #include "midori-core.h"
 
-#include "sokoke.h"
 #include <glib/gi18n.h>
 
 struct _MidoriExtensions
index 9dfa1400d3a5154d955c6a580c9c79e37e17cae0..0678df8210049a667df9ac8e89a7ae11e11588b1 100644 (file)
 */
 
 #include "midori-history.h"
-#include "gtk3-compat.h"
 
 #include "midori-app.h"
 #include "midori-array.h"
 #include "midori-browser.h"
-#include "midori-stock.h"
+#include "midori-platform.h"
 #include "midori-view.h"
 #include "midori-viewable.h"
 
-#include "sokoke.h"
-#include "gtkiconentry.h"
-
 #include <glib/gi18n.h>
 #include <string.h>
-
 #include <gdk/gdkkeysyms.h>
 
 #define COMPLETION_DELAY 200
index 3309e6e09b4b1ea0a327481f325ab554fc3c4c6c..83d070bab47f28baa8a25b42b989fdd58cea80ab 100644 (file)
 
 #include "midori-app.h"
 #include "midori-browser.h"
-#include "midori-stock.h"
+#include "midori-platform.h"
 #include "midori-view.h"
 
-#include "sokoke.h"
 #include <glib/gi18n.h>
 
 struct _MidoriTransfers
index 866292324e77a4987e91177302ab7dbc08ff8976..7cf359e94b2cc347845b66d4f53283cc6b6ca971 100644 (file)
@@ -9,13 +9,7 @@
  See the file COPYING for the full license text.
 */
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 #include "midori.h"
-#include "midori-stock.h"
-#include "sokoke.h"
 
 static void
 browser_create (void)
index b471da2a7b56dc4ceffc0dd005fb8aa014cf5b7f..911ebf09721779eeebb599684de486f654c12949 100644 (file)
@@ -9,10 +9,6 @@
  See the file COPYING for the full license text.
 */
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 #include "midori.h"
 
 const gpointer magic = (gpointer)0xdeadbeef;
index f9ce3b534bd6905f2c99c56e142b8527e30087a9..b9a211cce8dafdac9dbadab78468b15fd51f8e70 100644 (file)
  See the file COPYING for the full license text.
 */
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
-#include "sokoke.h"
 #include <midori/midori.h>
 
 #define SM "http://www.searchmash.com/search/"
index 2504b0f9eb7980b87f1c066a11c5836d73fcc30d..cd6b61cd27a8d596cec404de1ee0f1793787a2e1 100644 (file)
@@ -9,13 +9,8 @@
  See the file COPYING for the full license text.
 */
 
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
 #include "midori.h"
 #include "midori-bookmarks.h"
-#include "sokoke.h"
 
 typedef struct
 {
index a639035d943a512931fea15937363a239aa12e11..c3296809423d0b3bb57201be995550ddc38a7eeb 100644 (file)
 */
 
 #include "midori-findbar.h"
-#include "gtk3-compat.h"
 
 #include "midori-browser.h"
-#include "gtkiconentry.h"
-#include "sokoke.h"
+#include "midori-platform.h"
 
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 
-#if HAVE_CONFIG_H
-    #include "config.h"
-#endif
+#include "config.h"
 
 struct _MidoriFindbar
 {