Implement 'full' debug-level and fix according warnings
This commit is contained in:
parent
43f48a9b43
commit
b6e33e5399
18 changed files with 83 additions and 69 deletions
|
@ -239,7 +239,7 @@ katze_net_finished_cb (SoupMessage* msg,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
katze_net_local_cb (KatzeNetPriv* priv)
|
katze_net_local_cb (KatzeNetPriv* priv)
|
||||||
{
|
{
|
||||||
KatzeNetRequest* request;
|
KatzeNetRequest* request;
|
||||||
|
@ -288,7 +288,7 @@ katze_net_local_cb (KatzeNetPriv* priv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
katze_net_default_cb (KatzeNetPriv* priv)
|
katze_net_default_cb (KatzeNetPriv* priv)
|
||||||
{
|
{
|
||||||
KatzeNetRequest* request;
|
KatzeNetRequest* request;
|
||||||
|
|
|
@ -885,17 +885,17 @@ katze_throbber_expose_event (GtkWidget* widget,
|
||||||
|
|
||||||
if (G_LIKELY (cols > 0 && rows > 0))
|
if (G_LIKELY (cols > 0 && rows > 0))
|
||||||
{
|
{
|
||||||
gint index;
|
gint idx;
|
||||||
guint x, y;
|
guint x, y;
|
||||||
|
|
||||||
katze_throbber_aligned_coords (widget, &ax, &ay);
|
katze_throbber_aligned_coords (widget, &ax, &ay);
|
||||||
|
|
||||||
index = throbber->index % (cols * rows);
|
idx = throbber->index % (cols * rows);
|
||||||
if (G_LIKELY (throbber->timer_id >= 0))
|
if (G_LIKELY (throbber->timer_id >= 0))
|
||||||
index = MAX (index, 1);
|
idx = MAX (idx, 1);
|
||||||
|
|
||||||
x = (index % cols) * throbber->width;
|
x = (idx % cols) * throbber->width;
|
||||||
y = (index / cols) * throbber->height;
|
y = (idx / cols) * throbber->height;
|
||||||
|
|
||||||
gdk_draw_pixbuf (event->window, NULL, throbber->pixbuf,
|
gdk_draw_pixbuf (event->window, NULL, throbber->pixbuf,
|
||||||
x, y, ax, ay,
|
x, y, ax, ay,
|
||||||
|
|
|
@ -335,7 +335,7 @@ katze_property_proxy (gpointer object,
|
||||||
}
|
}
|
||||||
else if (type == G_TYPE_PARAM_ENUM)
|
else if (type == G_TYPE_PARAM_ENUM)
|
||||||
{
|
{
|
||||||
gint i;
|
guint i;
|
||||||
GEnumClass* enum_class = G_ENUM_CLASS (
|
GEnumClass* enum_class = G_ENUM_CLASS (
|
||||||
g_type_class_ref (pspec->value_type));
|
g_type_class_ref (pspec->value_type));
|
||||||
gint value = katze_object_get_enum (object, property);
|
gint value = katze_object_get_enum (object, property);
|
||||||
|
|
12
midori/gjs.c
12
midori/gjs.c
|
@ -198,7 +198,7 @@ gjs_value_get_string (GjsValue* value)
|
||||||
return value->string;
|
return value->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
gjs_value_weak_notify_cb (GjsValue* attribute,
|
gjs_value_weak_notify_cb (GjsValue* attribute,
|
||||||
GjsValue* value)
|
GjsValue* value)
|
||||||
{
|
{
|
||||||
|
@ -542,7 +542,7 @@ _js_class_get_property_names_cb (JSContextRef js_context,
|
||||||
guint n;
|
guint n;
|
||||||
GParamSpec** pspecs = g_object_class_list_properties (
|
GParamSpec** pspecs = g_object_class_list_properties (
|
||||||
G_OBJECT_GET_CLASS (object), &n);
|
G_OBJECT_GET_CLASS (object), &n);
|
||||||
gint i;
|
guint i;
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
const gchar* property = g_param_spec_get_name (pspecs[i]);
|
const gchar* property = g_param_spec_get_name (pspecs[i]);
|
||||||
|
@ -556,8 +556,8 @@ _js_class_get_property_names_cb (JSContextRef js_context,
|
||||||
guint* signals = g_signal_list_ids (type, &n);
|
guint* signals = g_signal_list_ids (type, &n);
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
const gchar* signal = g_signal_name (signals[i]);
|
const gchar* signal_ = g_signal_name (signals[i]);
|
||||||
JSStringRef js_signal = JSStringCreateWithUTF8CString (signal);
|
JSStringRef js_signal = JSStringCreateWithUTF8CString (signal_);
|
||||||
JSPropertyNameAccumulatorAddName (js_properties, js_signal);
|
JSPropertyNameAccumulatorAddName (js_properties, js_signal);
|
||||||
JSStringRelease (js_signal);
|
JSStringRelease (js_signal);
|
||||||
}
|
}
|
||||||
|
@ -622,7 +622,7 @@ _js_object_call_as_function_cb (JSContextRef js_context,
|
||||||
GValue* values = g_new0 (GValue, n_arguments + 1);
|
GValue* values = g_new0 (GValue, n_arguments + 1);
|
||||||
g_value_init (&values[0], G_OBJECT_TYPE (object));
|
g_value_init (&values[0], G_OBJECT_TYPE (object));
|
||||||
g_value_set_instance (&values[0], object);
|
g_value_set_instance (&values[0], object);
|
||||||
gint i;
|
guint i;
|
||||||
for (i = 0; i < n_arguments; i++)
|
for (i = 0; i < n_arguments; i++)
|
||||||
{
|
{
|
||||||
GValue value = {0, };
|
GValue value = {0, };
|
||||||
|
@ -1002,7 +1002,7 @@ _js_module_get_property_cb (JSContextRef js_context,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSObjectRef
|
static JSObjectRef
|
||||||
gjs_module_new (JSContextRef js_context,
|
gjs_module_new (JSContextRef js_context,
|
||||||
const gchar* namespace)
|
const gchar* namespace)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,9 +97,7 @@ enum
|
||||||
PROP_SENSITIVITY_SECONDARY
|
PROP_SENSITIVITY_SECONDARY
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gtk_icon_entry_class_init (GtkIconEntryClass *klass);
|
|
||||||
static void gtk_icon_entry_editable_init (GtkEditableClass *iface);
|
static void gtk_icon_entry_editable_init (GtkEditableClass *iface);
|
||||||
static void gtk_icon_entry_init (GtkIconEntry *entry);
|
|
||||||
static void gtk_icon_entry_finalize (GObject *obj);
|
static void gtk_icon_entry_finalize (GObject *obj);
|
||||||
static void gtk_icon_entry_dispose (GObject *obj);
|
static void gtk_icon_entry_dispose (GObject *obj);
|
||||||
static void gtk_icon_entry_map (GtkWidget *widget);
|
static void gtk_icon_entry_map (GtkWidget *widget);
|
||||||
|
|
|
@ -65,11 +65,11 @@ stock_items_init (void)
|
||||||
{
|
{
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
gchar* stock_id;
|
const gchar* stock_id;
|
||||||
gchar* label;
|
const gchar* label;
|
||||||
GdkModifierType modifier;
|
GdkModifierType modifier;
|
||||||
guint keyval;
|
guint keyval;
|
||||||
gchar* fallback;
|
const gchar* fallback;
|
||||||
} FatStockItem;
|
} FatStockItem;
|
||||||
GtkIconSource* icon_source;
|
GtkIconSource* icon_source;
|
||||||
GtkIconSet* icon_set;
|
GtkIconSet* icon_set;
|
||||||
|
@ -143,7 +143,7 @@ settings_new_from_file (const gchar* filename)
|
||||||
GParamSpec* pspec;
|
GParamSpec* pspec;
|
||||||
GType type;
|
GType type;
|
||||||
const gchar* property;
|
const gchar* property;
|
||||||
gchar* string;
|
gchar* str;
|
||||||
gint integer;
|
gint integer;
|
||||||
gfloat number;
|
gfloat number;
|
||||||
gboolean boolean;
|
gboolean boolean;
|
||||||
|
@ -167,11 +167,11 @@ settings_new_from_file (const gchar* filename)
|
||||||
property = g_param_spec_get_name (pspec);
|
property = g_param_spec_get_name (pspec);
|
||||||
if (type == G_TYPE_PARAM_STRING)
|
if (type == G_TYPE_PARAM_STRING)
|
||||||
{
|
{
|
||||||
string = sokoke_key_file_get_string_default (key_file,
|
str = sokoke_key_file_get_string_default (key_file,
|
||||||
"settings", property,
|
"settings", property,
|
||||||
G_PARAM_SPEC_STRING (pspec)->default_value, NULL);
|
G_PARAM_SPEC_STRING (pspec)->default_value, NULL);
|
||||||
g_object_set (settings, property, string, NULL);
|
g_object_set (settings, property, str, NULL);
|
||||||
g_free (string);
|
g_free (str);
|
||||||
}
|
}
|
||||||
else if (type == G_TYPE_PARAM_INT)
|
else if (type == G_TYPE_PARAM_INT)
|
||||||
{
|
{
|
||||||
|
@ -200,17 +200,17 @@ settings_new_from_file (const gchar* filename)
|
||||||
g_type_class_ref (pspec->value_type));
|
g_type_class_ref (pspec->value_type));
|
||||||
GEnumValue* enum_value = g_enum_get_value (enum_class,
|
GEnumValue* enum_value = g_enum_get_value (enum_class,
|
||||||
G_PARAM_SPEC_ENUM (pspec)->default_value);
|
G_PARAM_SPEC_ENUM (pspec)->default_value);
|
||||||
gchar* string = sokoke_key_file_get_string_default (key_file,
|
str = sokoke_key_file_get_string_default (key_file,
|
||||||
"settings", property,
|
"settings", property,
|
||||||
enum_value->value_name, NULL);
|
enum_value->value_name, NULL);
|
||||||
enum_value = g_enum_get_value_by_name (enum_class, string);
|
enum_value = g_enum_get_value_by_name (enum_class, str);
|
||||||
if (enum_value)
|
if (enum_value)
|
||||||
g_object_set (settings, property, enum_value->value, NULL);
|
g_object_set (settings, property, enum_value->value, NULL);
|
||||||
else
|
else
|
||||||
g_warning (_("Value '%s' is invalid for %s"),
|
g_warning (_("Value '%s' is invalid for %s"),
|
||||||
string, property);
|
str, property);
|
||||||
|
|
||||||
g_free (string);
|
g_free (str);
|
||||||
g_type_class_unref (enum_class);
|
g_type_class_unref (enum_class);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -243,9 +243,9 @@ settings_save_to_file (MidoriWebSettings* settings,
|
||||||
property = g_param_spec_get_name (pspec);
|
property = g_param_spec_get_name (pspec);
|
||||||
if (!(pspec->flags & G_PARAM_WRITABLE))
|
if (!(pspec->flags & G_PARAM_WRITABLE))
|
||||||
{
|
{
|
||||||
gchar* comment = g_strdup_printf ("# %s", property);
|
gchar* prop_comment = g_strdup_printf ("# %s", property);
|
||||||
g_key_file_set_string (key_file, "settings", comment, "");
|
g_key_file_set_string (key_file, "settings", prop_comment, "");
|
||||||
g_free (comment);
|
g_free (prop_comment);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (type == G_TYPE_PARAM_STRING)
|
if (type == G_TYPE_PARAM_STRING)
|
||||||
|
@ -747,7 +747,7 @@ midori_history_add_items (void* data,
|
||||||
/* Test whether have the right number of columns */
|
/* Test whether have the right number of columns */
|
||||||
g_return_val_if_fail (argc % ncols == 0, 1);
|
g_return_val_if_fail (argc % ncols == 0, 1);
|
||||||
|
|
||||||
for (i = 0; i <= (argc - ncols); i++)
|
for (i = 0; i < (argc - ncols) + 1; i++)
|
||||||
{
|
{
|
||||||
if (argv[i])
|
if (argv[i])
|
||||||
{
|
{
|
||||||
|
@ -2141,11 +2141,11 @@ main (int argc,
|
||||||
G_CALLBACK (midori_bookmarks_remove_item_cb), NULL);
|
G_CALLBACK (midori_bookmarks_remove_item_cb), NULL);
|
||||||
if (!katze_array_is_empty (bookmarks))
|
if (!katze_array_is_empty (bookmarks))
|
||||||
{
|
{
|
||||||
guint i, n;
|
guint n;
|
||||||
n = katze_array_get_length (bookmarks);
|
n = katze_array_get_length (bookmarks);
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
KatzeItem* item = katze_array_get_nth_item (bookmarks, i);
|
item = katze_array_get_nth_item (bookmarks, i);
|
||||||
if (KATZE_IS_ARRAY (item))
|
if (KATZE_IS_ARRAY (item))
|
||||||
{
|
{
|
||||||
g_signal_connect_after (item, "add-item",
|
g_signal_connect_after (item, "add-item",
|
||||||
|
|
|
@ -141,7 +141,7 @@ midori_browser_quit_cb (MidoriBrowser* browser,
|
||||||
midori_app_quit (app);
|
midori_app_quit (app);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
_midori_app_add_browser (MidoriApp* app,
|
_midori_app_add_browser (MidoriApp* app,
|
||||||
MidoriBrowser* browser)
|
MidoriBrowser* browser)
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,7 @@ _midori_app_add_browser (MidoriApp* app,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
_midori_app_quit (MidoriApp* app)
|
_midori_app_quit (MidoriApp* app)
|
||||||
{
|
{
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
|
@ -282,7 +282,7 @@ static UniqueResponse
|
||||||
midori_browser_message_received_cb (UniqueApp* instance,
|
midori_browser_message_received_cb (UniqueApp* instance,
|
||||||
UniqueCommand command,
|
UniqueCommand command,
|
||||||
UniqueMessageData* message,
|
UniqueMessageData* message,
|
||||||
guint time,
|
guint timestamp,
|
||||||
MidoriApp* app)
|
MidoriApp* app)
|
||||||
{
|
{
|
||||||
UniqueResponse response;
|
UniqueResponse response;
|
||||||
|
|
|
@ -1990,12 +1990,12 @@ _action_location_activate (GtkAction* action,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_action_location_active_changed (GtkAction* action,
|
_action_location_active_changed (GtkAction* action,
|
||||||
gint index,
|
gint idx,
|
||||||
MidoriBrowser* browser)
|
MidoriBrowser* browser)
|
||||||
{
|
{
|
||||||
const gchar* uri;
|
const gchar* uri;
|
||||||
|
|
||||||
if (index > -1)
|
if (idx > -1)
|
||||||
{
|
{
|
||||||
uri = midori_location_action_get_uri (MIDORI_LOCATION_ACTION (action));
|
uri = midori_location_action_get_uri (MIDORI_LOCATION_ACTION (action));
|
||||||
midori_browser_set_current_uri (browser, uri);
|
midori_browser_set_current_uri (browser, uri);
|
||||||
|
@ -2163,16 +2163,16 @@ _action_search_notify_current_item (GtkAction* action,
|
||||||
{
|
{
|
||||||
MidoriSearchAction* search_action;
|
MidoriSearchAction* search_action;
|
||||||
KatzeItem* item;
|
KatzeItem* item;
|
||||||
guint index;
|
guint idx;
|
||||||
|
|
||||||
search_action = MIDORI_SEARCH_ACTION (action);
|
search_action = MIDORI_SEARCH_ACTION (action);
|
||||||
item = midori_search_action_get_current_item (search_action);
|
item = midori_search_action_get_current_item (search_action);
|
||||||
if (item)
|
if (item)
|
||||||
index = katze_array_get_item_index (browser->search_engines, item);
|
idx = katze_array_get_item_index (browser->search_engines, item);
|
||||||
else
|
else
|
||||||
index = 0;
|
idx = 0;
|
||||||
|
|
||||||
g_object_set (browser->settings, "last-web-search", index, NULL);
|
g_object_set (browser->settings, "last-web-search", idx, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2827,23 +2827,23 @@ static const gchar* license =
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_action_about_activate_link (GtkAboutDialog* about,
|
_action_about_activate_link (GtkAboutDialog* about,
|
||||||
const gchar* link,
|
const gchar* uri,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MidoriBrowser* browser;
|
MidoriBrowser* browser;
|
||||||
gint n;
|
gint n;
|
||||||
|
|
||||||
browser = MIDORI_BROWSER (user_data);
|
browser = MIDORI_BROWSER (user_data);
|
||||||
n = midori_browser_add_uri (browser, link);
|
n = midori_browser_add_uri (browser, uri);
|
||||||
midori_browser_set_current_page (browser, n);
|
midori_browser_set_current_page (browser, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_action_about_activate_email (GtkAboutDialog* about,
|
_action_about_activate_email (GtkAboutDialog* about,
|
||||||
const gchar* link,
|
const gchar* uri,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gchar* command = g_strconcat ("xdg-open ", link, NULL);
|
gchar* command = g_strconcat ("xdg-open ", uri, NULL);
|
||||||
g_spawn_command_line_async (command, NULL);
|
g_spawn_command_line_async (command, NULL);
|
||||||
g_free (command);
|
g_free (command);
|
||||||
}
|
}
|
||||||
|
@ -4070,7 +4070,7 @@ midori_browser_init (MidoriBrowser* browser)
|
||||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("Close Findbar"));
|
gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("Close Findbar"));
|
||||||
g_signal_connect (toolitem, "clicked",
|
g_signal_connect (toolitem, "clicked",
|
||||||
G_CALLBACK (midori_browser_find_button_close_clicked_cb), browser);
|
G_CALLBACK (midori_browser_find_button_close_clicked_cb), browser);
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (browser->find), toolitem, 0);
|
gtk_toolbar_insert (GTK_TOOLBAR (browser->find), toolitem, 0);
|
||||||
#else
|
#else
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (browser->find), toolitem, -1);
|
gtk_toolbar_insert (GTK_TOOLBAR (browser->find), toolitem, -1);
|
||||||
|
|
|
@ -140,7 +140,7 @@ midori_extension_class_init (MidoriExtensionClass* class)
|
||||||
g_type_class_add_private (class, sizeof (MidoriExtensionPrivate));
|
g_type_class_add_private (class, sizeof (MidoriExtensionPrivate));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
midori_extension_activate_cb (MidoriExtension* extension,
|
midori_extension_activate_cb (MidoriExtension* extension,
|
||||||
MidoriApp* app)
|
MidoriApp* app)
|
||||||
{
|
{
|
||||||
|
|
|
@ -894,7 +894,7 @@ midori_location_action_prepend_item (MidoriLocationAction* location_action,
|
||||||
GtkTreeModel* filter_model;
|
GtkTreeModel* filter_model;
|
||||||
GtkTreeModel* model;
|
GtkTreeModel* model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreeIter index;
|
GtkTreeIter idx;
|
||||||
gint n;
|
gint n;
|
||||||
gint visits = 0;
|
gint visits = 0;
|
||||||
|
|
||||||
|
@ -904,17 +904,17 @@ midori_location_action_prepend_item (MidoriLocationAction* location_action,
|
||||||
if (midori_location_action_iter_insert (location_action,
|
if (midori_location_action_iter_insert (location_action,
|
||||||
item->uri, &iter, 0))
|
item->uri, &iter, 0))
|
||||||
{
|
{
|
||||||
gtk_tree_model_get_iter_first (model, &index);
|
gtk_tree_model_get_iter_first (model, &idx);
|
||||||
gtk_tree_model_get (model, &iter, VISITS_COL, &visits, -1);
|
gtk_tree_model_get (model, &iter, VISITS_COL, &visits, -1);
|
||||||
gtk_list_store_move_before (GTK_LIST_STORE (model), &iter, &index);
|
gtk_list_store_move_before (GTK_LIST_STORE (model), &iter, &idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
n = gtk_tree_model_iter_n_children (filter_model, NULL);
|
n = gtk_tree_model_iter_n_children (filter_model, NULL);
|
||||||
if (n > MAX_ITEMS)
|
if (n > MAX_ITEMS)
|
||||||
{
|
{
|
||||||
gtk_tree_model_iter_nth_child (model, &index, NULL, n - 1);
|
gtk_tree_model_iter_nth_child (model, &idx, NULL, n - 1);
|
||||||
gtk_list_store_set (GTK_LIST_STORE (model),
|
gtk_list_store_set (GTK_LIST_STORE (model),
|
||||||
&index, VISIBLE_COL, FALSE, -1);
|
&idx, VISIBLE_COL, FALSE, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only increment the visits when we add the uri */
|
/* Only increment the visits when we add the uri */
|
||||||
|
|
|
@ -134,7 +134,7 @@ _gtk_entry_effective_inner_border (GtkEntry *entry,
|
||||||
*border = default_inner_border;
|
*border = default_inner_border;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
gtk_entry_borders (GtkEntry* entry,
|
gtk_entry_borders (GtkEntry* entry,
|
||||||
gint* xborder,
|
gint* xborder,
|
||||||
gint* yborder,
|
gint* yborder,
|
||||||
|
|
|
@ -595,6 +595,7 @@ typedef struct
|
||||||
GtkAlignmentClass parent_class;
|
GtkAlignmentClass parent_class;
|
||||||
} MidoriDummyViewableClass;
|
} MidoriDummyViewableClass;
|
||||||
|
|
||||||
|
GType midori_dummy_viewable_get_type (void) G_GNUC_CONST;
|
||||||
#define MIDORI_TYPE_DUMMY_VIEWABLE (midori_dummy_viewable_get_type ())
|
#define MIDORI_TYPE_DUMMY_VIEWABLE (midori_dummy_viewable_get_type ())
|
||||||
#define MIDORI_DUMMY_VIEWABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
#define MIDORI_DUMMY_VIEWABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||||
MIDORI_TYPE_DUMMY_VIEWABLE, MidoriDummyViewable))
|
MIDORI_TYPE_DUMMY_VIEWABLE, MidoriDummyViewable))
|
||||||
|
|
|
@ -235,7 +235,7 @@ midori_preferences_notify_identify_as_cb (MidoriWebSettings* settings,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
static void
|
static void
|
||||||
midori_preferences_help_clicked_cb (GtkWidget* button,
|
midori_preferences_help_clicked_cb (GtkWidget* button,
|
||||||
GtkDialog* dialog)
|
GtkDialog* dialog)
|
||||||
|
@ -260,7 +260,7 @@ midori_preferences_add_toolbutton (GtkWidget* toolbar,
|
||||||
const gchar* label,
|
const gchar* label,
|
||||||
GtkWidget* page)
|
GtkWidget* page)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
*toolbutton = GTK_WIDGET (*toolbutton ? gtk_radio_tool_button_new_from_widget (
|
*toolbutton = GTK_WIDGET (*toolbutton ? gtk_radio_tool_button_new_from_widget (
|
||||||
GTK_RADIO_TOOL_BUTTON (*toolbutton)) : gtk_radio_tool_button_new (NULL));
|
GTK_RADIO_TOOL_BUTTON (*toolbutton)) : gtk_radio_tool_button_new (NULL));
|
||||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (*toolbutton), label);
|
gtk_tool_button_set_label (GTK_TOOL_BUTTON (*toolbutton), label);
|
||||||
|
@ -316,7 +316,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
||||||
preferences->notebook = gtk_notebook_new ();
|
preferences->notebook = gtk_notebook_new ();
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (preferences->notebook), 6);
|
gtk_container_set_border_width (GTK_CONTAINER (preferences->notebook), 6);
|
||||||
|
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (preferences->notebook), FALSE);
|
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (preferences->notebook), FALSE);
|
||||||
gtk_notebook_set_show_border (GTK_NOTEBOOK (preferences->notebook), FALSE);
|
gtk_notebook_set_show_border (GTK_NOTEBOOK (preferences->notebook), FALSE);
|
||||||
toolbar = gtk_toolbar_new ();
|
toolbar = gtk_toolbar_new ();
|
||||||
|
@ -607,7 +607,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
||||||
g_object_unref (sizegroup);
|
g_object_unref (sizegroup);
|
||||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (preferences)->vbox),
|
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (preferences)->vbox),
|
||||||
preferences->notebook, FALSE, FALSE, 4);
|
preferences->notebook, FALSE, FALSE, 4);
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
GtkWidget* icon;
|
GtkWidget* icon;
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
button = gtk_button_new ();
|
button = gtk_button_new ();
|
||||||
|
|
|
@ -1144,7 +1144,7 @@ midori_search_action_get_dialog (MidoriSearchAction* search_action)
|
||||||
gtk_widget_set_sensitive (button, FALSE);
|
gtk_widget_set_sensitive (button, FALSE);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||||
|
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
GtkWidget* icon;
|
GtkWidget* icon;
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
button = gtk_button_new ();
|
button = gtk_button_new ();
|
||||||
|
|
|
@ -692,7 +692,7 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view,
|
||||||
case 1:
|
case 1:
|
||||||
if (!link_uri)
|
if (!link_uri)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
/* FIXME: Test for Command key */
|
/* FIXME: Test for Command key */
|
||||||
if (0)
|
if (0)
|
||||||
#else
|
#else
|
||||||
|
@ -1891,8 +1891,9 @@ midori_view_tab_label_parent_set (GtkWidget* tab_label,
|
||||||
{
|
{
|
||||||
GtkWidget* parent;
|
GtkWidget* parent;
|
||||||
|
|
||||||
|
/* FIXME: Disconnect orientation notification
|
||||||
if (old_parent)
|
if (old_parent)
|
||||||
/* FIXME: Disconnect orientation notification */;
|
; */
|
||||||
|
|
||||||
if (!(parent = gtk_widget_get_parent (tab_label)))
|
if (!(parent = gtk_widget_get_parent (tab_label)))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -251,7 +251,7 @@ typedef enum
|
||||||
static SokokeDesktop
|
static SokokeDesktop
|
||||||
sokoke_get_desktop (void)
|
sokoke_get_desktop (void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_OSX
|
#if HAVE_OSX
|
||||||
return SOKOKE_DESKTOP_OSX;
|
return SOKOKE_DESKTOP_OSX;
|
||||||
#else
|
#else
|
||||||
static SokokeDesktop desktop = SOKOKE_DESKTOP_UNTESTED;
|
static SokokeDesktop desktop = SOKOKE_DESKTOP_UNTESTED;
|
||||||
|
|
|
@ -308,7 +308,7 @@ _addons_get_files (MidoriAddons* addons)
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkTreePath*
|
static GtkTreePath*
|
||||||
_treeview_first_selected_path (GtkTreeView *treeview)
|
_treeview_first_selected_path (GtkTreeView *treeview)
|
||||||
{
|
{
|
||||||
GtkTreeSelection* selection;
|
GtkTreeSelection* selection;
|
||||||
|
|
26
wscript
26
wscript
|
@ -141,8 +141,7 @@ def configure (conf):
|
||||||
check_pkg ('libxml-2.0', '2.6')
|
check_pkg ('libxml-2.0', '2.6')
|
||||||
|
|
||||||
conf.check (header_name='unistd.h')
|
conf.check (header_name='unistd.h')
|
||||||
if sys.platform == 'darwin':
|
conf.define ('HAVE_OSX', int(sys.platform == 'darwin'))
|
||||||
conf.define ('HAVE_OSX', 1)
|
|
||||||
|
|
||||||
if conf.find_program ('rsvg-convert', var='RSVG_CONVERT'):
|
if conf.find_program ('rsvg-convert', var='RSVG_CONVERT'):
|
||||||
icons = 'yes'
|
icons = 'yes'
|
||||||
|
@ -162,11 +161,26 @@ def configure (conf):
|
||||||
conf.write_config_header ('config.h')
|
conf.write_config_header ('config.h')
|
||||||
conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')
|
conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')
|
||||||
debug_level = Options.options.debug_level
|
debug_level = Options.options.debug_level
|
||||||
if debug_level != '':
|
if debug_level != 'no':
|
||||||
compiler = conf.env['CC_NAME']
|
compiler = conf.env['CC_NAME']
|
||||||
if compiler == 'gcc':
|
if compiler == 'gcc':
|
||||||
if debug_level == 'debug':
|
if debug_level == 'debug':
|
||||||
conf.env.append_value ('CCFLAGS', '-Wall -O0 -g')
|
conf.env.append_value ('CCFLAGS', '-Wall -O0 -g')
|
||||||
|
elif debug_level == 'full':
|
||||||
|
# -Wdeclaration-after-statement
|
||||||
|
# -Wmissing-declarations -Wmissing-prototypes
|
||||||
|
# -Wwrite-strings
|
||||||
|
conf.env.append_value ('CCFLAGS',
|
||||||
|
'-Wall -Wextra -O1 -g '
|
||||||
|
'-Waggregate-return -Wno-unused-parameter '
|
||||||
|
'-Wno-missing-field-initializers '
|
||||||
|
'-Wunsafe-loop-optimizations '
|
||||||
|
'-Wredundant-decls -Wmissing-noreturn '
|
||||||
|
'-Wshadow -Wpointer-arith -Wcast-align '
|
||||||
|
'-Winline -Wformat-security '
|
||||||
|
'-Winit-self -Wmissing-include-dirs -Wundef '
|
||||||
|
'-Wmissing-format-attribute -Wnested-externs '
|
||||||
|
'-DG_ENABLE_DEBUG')
|
||||||
else:
|
else:
|
||||||
conf.env.append_value ('CCFLAGS', '-O2')
|
conf.env.append_value ('CCFLAGS', '-O2')
|
||||||
else:
|
else:
|
||||||
|
@ -207,9 +221,9 @@ def set_options (opt):
|
||||||
|
|
||||||
opt.tool_options ('compiler_cc')
|
opt.tool_options ('compiler_cc')
|
||||||
opt.get_option_group ('--check-c-compiler').add_option('-d', '--debug-level',
|
opt.get_option_group ('--check-c-compiler').add_option('-d', '--debug-level',
|
||||||
action = 'store', default = '',
|
action = 'store', default = 'debug',
|
||||||
help = 'Specify the debugging level. [\'debug\', \'release\']',
|
help = 'Specify the debugging level. [\'no\', \'debug\', \'full\']',
|
||||||
choices = ['', 'debug', 'release'], dest = 'debug_level')
|
choices = ['no', 'debug', 'full'], dest = 'debug_level')
|
||||||
opt.tool_options ('gnu_dirs')
|
opt.tool_options ('gnu_dirs')
|
||||||
opt.parser.remove_option ('--oldincludedir')
|
opt.parser.remove_option ('--oldincludedir')
|
||||||
opt.parser.remove_option ('--htmldir')
|
opt.parser.remove_option ('--htmldir')
|
||||||
|
|
Loading…
Reference in a new issue