KatzeNetStatus status;
gchar* mime_type;
gchar* data;
- gsize length;
+ goffset length;
} KatzeNetRequest;
typedef gboolean (*KatzeNetStatusCb) (KatzeNetRequest* request,
gtk_misc_get_alignment (GTK_MISC (widget), &xalign, &yalign);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- xalign = 1.0 - xalign;
+ xalign = 1.0f - xalign;
gtk_misc_get_padding (GTK_MISC (widget), &xpad, &ypad);
*ax = floor (widget->allocation.x + xpad
gtk_widget_set_sensitive (widget, pspec->flags & G_PARAM_WRITABLE);
- g_object_set_data (G_OBJECT (widget), "property", (gchar*)property);
+ g_object_set_data_full (G_OBJECT (widget), "property",
+ g_strdup (property), g_free);
return widget;
}
continue;
gchar* fullname = g_build_filename (addon_path, filename, NULL);
- gchar* exception = NULL;
+ exception = NULL;
gjs_script_from_file (js_context, fullname, &exception);
if (exception)
/* FIXME: Do we want to print this somewhere else? */
menuitem), gtk_image_new_from_stock (STOCK_NEWS_FEED,
GTK_ICON_SIZE_MENU));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
- g_object_set_data (G_OBJECT (menuitem), "uri", (gchar*)uri);
+ g_object_set_data_full (G_OBJECT (menuitem),
+ "uri", g_strup ((gchar*)uri), g_free);
g_signal_connect (menuitem, "activate",
G_CALLBACK (midori_browser_menu_feed_item_activate_cb),
browser);
gtk_tool_item_set_expand (GTK_TOOL_ITEM (toolitem), TRUE);
location_entry = midori_location_entry_new ();
- alignment = gtk_alignment_new (0, 0.5, 1, 0.1);
+ alignment = gtk_alignment_new (0.0f, 0.5f, 1.0f, 0.1f);
gtk_container_add (GTK_CONTAINER (alignment), location_entry);
gtk_widget_show (location_entry);
gtk_container_add (GTK_CONTAINER (toolitem), alignment);
case GDK_KP_Enter:
case GDK_Return:
{
- if ((uri = gtk_entry_get_text (GTK_ENTRY (widget))))
+ if ((uri = gtk_entry_get_text (GTK_ENTRY (widget))) && *uri)
{
g_signal_emit (action, signals[SUBMIT_URI], 0, uri,
(event->state & GDK_MOD1_MASK) ? TRUE : FALSE);
PangoLayout *layout = gtk_entry_get_layout (entry);
PangoLayoutLine *line = pango_layout_get_lines (layout)->data;
const char *text = pango_layout_get_text (layout);
- gint start_index = g_utf8_offset_to_pointer (text, start_char) - text;
- gint end_index = g_utf8_offset_to_pointer (text, end_char) - text;
+ gsize start_index = g_utf8_offset_to_pointer (text, start_char) - text;
+ gsize end_index = g_utf8_offset_to_pointer (text, end_char) - text;
gint real_n_ranges, i;
pango_layout_line_get_x_ranges (line,
gray_icon = gdk_pixbuf_copy (icon);
if (gray_icon)
{
- gdk_pixbuf_saturate_and_pixelate (gray_icon, gray_icon, 0.1, FALSE);
+ gdk_pixbuf_saturate_and_pixelate (gray_icon, gray_icon, 0.1f, FALSE);
gtk_window_set_icon (GTK_WINDOW (window), gray_icon);
g_object_unref (gray_icon);
}