webview = webkit_web_view_new ();
#if GTK_CHECK_VERSION(3,0,0)
- font_desc = gtk_style_context_get_font(gtk_widget_get_style_context(treeview), GTK_STATE_FLAG_NORMAL);
+ font_desc = (PangoFontDescription*)gtk_style_context_get_font (
+ gtk_widget_get_style_context (treeview), GTK_STATE_FLAG_NORMAL);
#else
font_desc = treeview->style->font_desc;
#endif
GTK_WINDOW(parent),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
-#if !GTK_CHECK_VERSION(3,0,0)
- vbox = (GTK_DIALOG(dialog))->vbox;
-#else
- vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
-#endif
+ vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_box_set_spacing(GTK_BOX(vbox), 6);
gtk_widget_set_name(dialog, "GeanyDialog");
gtk_window_set_default_size(GTK_WINDOW(dialog), -1, 400);
#endif
#if GTK_CHECK_VERSION (3, 0, 0)
+ allocation.x = allocation.y = 0;
allocation.width = gtk_widget_get_allocated_width (widget);
allocation.height = gtk_widget_get_allocated_height (widget);
gtk_widget_get_preferred_size (widget, &requisition, NULL);
midori_load_soup_session (gpointer settings)
{
SoupSession* session = webkit_get_default_session ();
- g_object_set_data (G_OBJECT (session), "midori-settings", settings);
#if defined (HAVE_LIBSOUP_2_37_1)
g_object_set (session,
NULL);
#endif
+ g_object_set_data (G_OBJECT (session), "midori-settings", settings);
soup_session_settings_notify_http_proxy_cb (settings, NULL, session);
g_signal_connect (settings, "notify::http-proxy",
G_CALLBACK (soup_session_settings_notify_http_proxy_cb), session);
/* libSoup uses threads, therefore if WebKit is built with libSoup
* or Midori is using it, we need to initialize threads. */
+ #if !GLIB_CHECK_VERSION (2, 32, 0)
if (!g_thread_supported ()) g_thread_init (NULL);
+ #endif
#if ENABLE_NLS
setlocale (LC_ALL, "");
GtkSettings* gtk_settings;
GtkWidget* hpaned;
GtkWidget* vpaned;
- GtkRcStyle* rcstyle;
GtkWidget* scrolled;
KatzeArray* dummy_array;
gtk_paned_pack2 (GTK_PANED (hpaned), vpaned, TRUE, FALSE);
gtk_widget_show (vpaned);
browser->notebook = gtk_notebook_new ();
+ #if !GTK_CHECK_VERSION (3, 0, 0)
+ {
/* Remove the inner border between scrollbars and the window border */
- rcstyle = gtk_rc_style_new ();
+ GtkRcStyle* rcstyle = gtk_rc_style_new ();
rcstyle->xthickness = 0;
gtk_widget_modify_style (browser->notebook, rcstyle);
g_object_unref (rcstyle);
+ }
+ #endif
gtk_notebook_set_scrollable (GTK_NOTEBOOK (browser->notebook), TRUE);
gtk_paned_pack1 (GTK_PANED (vpaned), browser->notebook, FALSE, FALSE);
g_signal_connect (browser->notebook, "switch-page",
WebKitWebView* web_view = WEBKIT_WEB_VIEW (view->web_view);
GtkWidget* widget = GTK_WIDGET (view);
MidoriBrowser* browser = midori_browser_get_for_widget (widget);
+ GdkWindowState state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
GtkActionGroup* actions = midori_browser_get_action_group (browser);
GtkMenuShell* menu_shell = GTK_MENU_SHELL (menu);
GtkWidget* menuitem;
g_object_set_data (G_OBJECT (menuitem), "y", GINT_TO_POINTER (y));
}
- GdkWindowState state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
if (state & GDK_WINDOW_STATE_FULLSCREEN)
{
menuitem = sokoke_action_create_popup_menu_item (
{
gchar* value;
JSStringRef js_value_string;
+ JSStringRef js_script;
+ JSValueRef js_exception = NULL;
+ JSValueRef js_value;
g_return_val_if_fail (js_context, FALSE);
g_return_val_if_fail (script, FALSE);
- JSStringRef js_script = JSStringCreateWithUTF8CString (script);
- JSValueRef js_exception = NULL;
- JSValueRef js_value = JSEvaluateScript (js_context, js_script,
+ js_script = JSStringCreateWithUTF8CString (script);
+ js_value = JSEvaluateScript (js_context, js_script,
JSContextGetGlobalObject (js_context), NULL, 0, &js_exception);
JSStringRelease (js_script);
if (sokoke_get_desktop () == SOKOKE_DESKTOP_XFCE)
{
GtkWidget* entry;
- GtkStyle* style;
gchar* markup;
GtkWidget* xfce_heading;
GtkWidget* hbox;
xfce_heading = gtk_event_box_new ();
entry = gtk_entry_new ();
- style = gtk_widget_get_style (entry);
- gtk_widget_modify_bg (xfce_heading, GTK_STATE_NORMAL,
- &style->base[GTK_STATE_NORMAL]);
+
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
if (icon)
GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
label = gtk_label_new (NULL);
- gtk_widget_modify_fg (label, GTK_STATE_NORMAL
- , &style->text[GTK_STATE_NORMAL]);
markup = g_strdup_printf ("<span size='large' weight='bold'>%s</span>",
title);
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
gtk_widget_destroy (entry);
+ #if !GTK_CHECK_VERSION (3, 0, 0)
+ {
+ GtkStyle* style = gtk_widget_get_style (entry);
+ gtk_widget_modify_bg (xfce_heading, GTK_STATE_NORMAL,
+ &style->base[GTK_STATE_NORMAL]);
+ gtk_widget_modify_fg (label, GTK_STATE_NORMAL
+ , &style->text[GTK_STATE_NORMAL]);
+ }
+ #endif
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), xfce_heading, FALSE, FALSE, 0);