Apply a few small corrections.
This commit is contained in:
parent
6982b226b8
commit
61d26feae8
5 changed files with 4 additions and 16 deletions
|
@ -326,15 +326,11 @@ _js_object_call_as_function_cb (JSContextRef js_context,
|
||||||
|
|
||||||
if (!n_arguments)
|
if (!n_arguments)
|
||||||
{
|
{
|
||||||
gtk_widget_show (GTK_WIDGET (object));
|
|
||||||
}
|
}
|
||||||
else if (n_arguments == 1)
|
else if (n_arguments == 1)
|
||||||
{
|
{
|
||||||
JSObjectRef js_arg1 = JSValueToObject (
|
JSObjectRef js_arg1 = JSValueToObject (
|
||||||
js_context, js_arguments[0], NULL);
|
js_context, js_arguments[0], NULL);
|
||||||
GObject* arg1 = JSObjectGetPrivate (js_arg1);
|
|
||||||
if (arg1)
|
|
||||||
gtk_container_add (GTK_CONTAINER (object), GTK_WIDGET (arg1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return JSValueMakeUndefined (js_context);
|
return JSValueMakeUndefined (js_context);
|
||||||
|
@ -478,7 +474,7 @@ gjs_module_new (JSContextRef js_context,
|
||||||
js_class_def.hasProperty = _js_module_has_property_cb;
|
js_class_def.hasProperty = _js_module_has_property_cb;
|
||||||
js_class_def.getProperty = _js_module_get_property_cb;
|
js_class_def.getProperty = _js_module_get_property_cb;
|
||||||
JSClassRef js_class = JSClassCreate (&js_class_def);
|
JSClassRef js_class = JSClassCreate (&js_class_def);
|
||||||
JSObjectRef js_module = JSObjectMake (js_context, js_class, namespace);
|
JSObjectRef js_module = JSObjectMake (js_context, js_class, (gpointer)namespace);
|
||||||
return js_module;
|
return js_module;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "midori-addons.h"
|
#include "midori-addons.h"
|
||||||
|
|
||||||
#include "sokoke.h"
|
#include "sokoke.h"
|
||||||
|
#include "gjs.h"
|
||||||
#include <webkit/webkit.h>
|
#include <webkit/webkit.h>
|
||||||
#include <JavaScriptCore/JavaScript.h>
|
#include <JavaScriptCore/JavaScript.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
|
@ -565,7 +565,7 @@ midori_browser_class_init (MidoriBrowserClass* class)
|
||||||
"element-motion",
|
"element-motion",
|
||||||
G_TYPE_FROM_CLASS (class),
|
G_TYPE_FROM_CLASS (class),
|
||||||
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
|
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
|
||||||
G_STRUCT_OFFSET (MidoriBrowserClass, new_window),
|
G_STRUCT_OFFSET (MidoriBrowserClass, element_motion),
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
g_cclosure_marshal_VOID__STRING,
|
g_cclosure_marshal_VOID__STRING,
|
||||||
|
|
|
@ -485,7 +485,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
|
||||||
_("Where to open new pages"),
|
_("Where to open new pages"),
|
||||||
MIDORI_TYPE_NEW_PAGE,
|
MIDORI_TYPE_NEW_PAGE,
|
||||||
MIDORI_NEW_PAGE_TAB,
|
MIDORI_NEW_PAGE_TAB,
|
||||||
flags));
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_MIDDLE_CLICK_OPENS_SELECTION,
|
PROP_MIDDLE_CLICK_OPENS_SELECTION,
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <glib/gprintf.h>
|
#include <glib/gprintf.h>
|
||||||
|
@ -90,12 +87,6 @@ sokoke_entry_append_completion (GtkEntry* entry, const gchar* text)
|
||||||
gtk_list_store_set (GTK_LIST_STORE (completion_store), &iter, 0, text, -1);
|
gtk_list_store_set (GTK_LIST_STORE (completion_store), &iter, 0, text, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOKOKE_DEBUG > 1
|
|
||||||
#define UNIMPLEMENTED g_print(" * Unimplemented: %s\n", G_STRFUNC);
|
|
||||||
#else
|
|
||||||
#define UNIMPLEMENTED ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void sokoke_combo_box_add_strings(GtkComboBox* combobox
|
void sokoke_combo_box_add_strings(GtkComboBox* combobox
|
||||||
, const gchar* labelFirst, ...)
|
, const gchar* labelFirst, ...)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue