Compare commits

...

9 Commits

Author SHA1 Message Date
Matthias Clasen
b015f8a1b8 3.14.12 2015-04-09 06:49:10 -04:00
Matthias Clasen
e0fe93062e popover: Remove signal handlers in dispose
If we don't, they may get triggered at an inopportune
time later, causing us to crash.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1203499

https://bugzilla.gnome.org/show_bug.cgi?id=747539
2015-04-09 06:40:32 -04:00
Matthias Clasen
5af10c9c70 Make gtk-update-icon-cache not fall over leftover temp files
This is a followup to 0fd185fa6d. There is no
good reason to only try again if --force is passed. Do it
always.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1194957
2015-04-08 20:35:49 -04:00
Matthias Clasen
1d93df8a5e tree view: Avoid a crash with rubberbanding
When a treeview is destroyed while rubberbanding is going
on, we crash because the rb tree is nuked before we want
to access it to stop the rubberbanding. To avoid this crash
end the rubberbanding early in destroy().

See
https://bugzilla.redhat.com/show_bug.cgi?id=1173904
2015-04-08 18:57:40 -04:00
Matthias Clasen
792ba583f3 GtkApplication: avoid a crash
It can apparently happen that we get focus in events
on windows after gtk_application_shutdown() has been
called. Avoid an unnecessary crash in this case.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1176339
2015-04-08 15:46:34 -04:00
Matthias Clasen
2e733c2587 Revert "image: Optimize non-resize changes"
This reverts commit 78475606c9.

We're still seeing regressions from this, see
http://bugzilla.redhat.com/show_bug.cgi?id=1208183
2015-04-08 14:20:08 -04:00
Georges Basile Stavracas Neto
3df5b52148 places sidebar: compare bookmarks by index
GtkPlacesSidebar applies a sorting function on
the tree model that does not consider the case
of bookmarks, which are sorted by their indexes.

By adding the bookmarks corner case and comparing
then by their indexes, GtkPlacesSidebar can sort
the bookmarks properly in the order they're saved.

https://bugzilla.gnome.org/show_bug.cgi?id=744589
2015-04-05 10:21:34 -04:00
Carlos Garnacho
dd62e0410e gtkdnd: Restore widget opacity after fading out
Otherwise the widget is left fully transparent, and will start as such if
the widget is reused.
2015-03-30 12:47:02 +02:00
Carlos Garnacho
a65a371822 gtkdnd: Set the icon helper from the drag site onto the context
If the icon happened to come from the drag site icon helper (ie. set through
gtk_drag_source_set_icon*), it would be referenced on the GtkDragInfo,
but not hooked into its context. This results on non visible drag windows,
until set_icon_helper() happened to be called on some path.
2015-03-30 12:46:53 +02:00
9 changed files with 61 additions and 96 deletions

13
NEWS
View File

@@ -1,3 +1,16 @@
Overview of Changes in GTK+ 3.14.12 to 3.14.12
==============================================
* Bugs fixed:
744589 nautilus bookmarks changing places randomly
747539 popover: Remove signal handlers in dispose
Fix unwanted transparency of drag icons
Revert "image: Optimize non-resize changes"
Avoid a crash in GtkApplication
Avoid a crash with tree view rubberbanding
Make gtk-update-icon-cache more resilient
Overview of Changes in GTK+ 3.14.10 to 3.14.11
==============================================

View File

@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [14])
m4_define([gtk_micro_version], [11])
m4_define([gtk_interface_age], [11])
m4_define([gtk_micro_version], [12])
m4_define([gtk_interface_age], [12])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],

View File

@@ -502,7 +502,9 @@ gtk_application_focus_in_event_cb (GtkWindow *window,
priv->windows = g_list_concat (link, priv->windows);
}
gtk_application_impl_active_window_changed (application->priv->impl, window);
if (application->priv->impl)
gtk_application_impl_active_window_changed (application->priv->impl, window);
g_object_notify (G_OBJECT (application), "active-window");
return FALSE;

View File

@@ -2533,7 +2533,11 @@ gtk_drag_begin_internal (GtkWidget *widget,
* not have set one.
*/
if (!info->icon_window && !info->icon_helper)
info->icon_helper = gtk_drag_source_site_get_icon_helper (site);
{
info->icon_helper = gtk_drag_source_site_get_icon_helper (site);
set_icon_helper (info->context, info->icon_helper,
0, 0, TRUE);
}
/* We need to composite the icon into the cursor, if we are
* not using an icon window.
@@ -3988,6 +3992,7 @@ gtk_drag_remove_icon (GtkDragSourceInfo *info)
if (info->icon_window)
{
gtk_widget_hide (info->icon_window);
gtk_widget_set_opacity (info->icon_window, 1.0);
if (info->destroy_icon)
gtk_widget_destroy (info->icon_window);

View File

@@ -149,9 +149,6 @@ static gint gtk_image_draw (GtkWidget *widget,
static void gtk_image_unmap (GtkWidget *widget);
static void gtk_image_realize (GtkWidget *widget);
static void gtk_image_unrealize (GtkWidget *widget);
static void gtk_image_get_preferred_size (GtkImage *image,
gint *width_out,
gint *height_out);
static void gtk_image_get_preferred_width (GtkWidget *widget,
gint *minimum,
gint *natural);
@@ -930,8 +927,8 @@ gtk_image_set_from_file (GtkImage *image,
priv = image->priv;
g_object_freeze_notify (G_OBJECT (image));
gtk_image_reset (image);
gtk_image_clear (image);
if (filename == NULL)
{
@@ -944,7 +941,9 @@ gtk_image_set_from_file (GtkImage *image,
if (anim == NULL)
{
gtk_image_set_from_icon_name (image, "image-missing", DEFAULT_ICON_SIZE);
gtk_image_set_from_icon_name (image,
"image-missing",
DEFAULT_ICON_SIZE);
g_object_thaw_notify (G_OBJECT (image));
return;
}
@@ -965,21 +964,7 @@ gtk_image_set_from_file (GtkImage *image,
g_object_unref (anim);
priv->filename = g_strdup (filename);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
gint width, height;
gtk_image_get_preferred_size (image, &width, &height);
if (width != gtk_widget_get_allocated_width (GTK_WIDGET (image)) ||
height != gtk_widget_get_allocated_height (GTK_WIDGET (image)))
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_notify (G_OBJECT (image), "file");
g_object_thaw_notify (G_OBJECT (image));
}
@@ -1016,7 +1001,9 @@ gtk_image_set_from_resource (GtkImage *image,
if (animation == NULL)
{
gtk_image_set_from_icon_name (image, "image-missing", DEFAULT_ICON_SIZE);
gtk_image_set_from_icon_name (image,
"image-missing",
DEFAULT_ICON_SIZE);
g_object_thaw_notify (G_OBJECT (image));
return;
}
@@ -1052,29 +1039,18 @@ gtk_image_set_from_pixbuf (GtkImage *image,
GtkImagePrivate *priv;
g_return_if_fail (GTK_IS_IMAGE (image));
g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf));
g_return_if_fail (pixbuf == NULL ||
GDK_IS_PIXBUF (pixbuf));
priv = image->priv;
g_object_freeze_notify (G_OBJECT (image));
gtk_image_reset (image);
gtk_image_clear (image);
if (pixbuf != NULL)
_gtk_icon_helper_set_pixbuf (priv->icon_helper, pixbuf);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
gint width, height;
gtk_image_get_preferred_size (image, &width, &height);
if (width != gtk_widget_get_allocated_width (GTK_WIDGET (image)) ||
height != gtk_widget_get_allocated_height (GTK_WIDGET (image)))
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_notify (G_OBJECT (image), "pixbuf");
g_object_thaw_notify (G_OBJECT (image));
@@ -1188,7 +1164,7 @@ gtk_image_set_from_animation (GtkImage *image,
if (animation)
g_object_ref (animation);
gtk_image_reset (image);
gtk_image_clear (image);
if (animation != NULL)
{
@@ -1196,18 +1172,6 @@ gtk_image_set_from_animation (GtkImage *image,
g_object_unref (animation);
}
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
gint width, height;
gtk_image_get_preferred_size (image, &width, &height);
if (width != gtk_widget_get_allocated_width (GTK_WIDGET (image)) ||
height != gtk_widget_get_allocated_height (GTK_WIDGET (image)))
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_notify (G_OBJECT (image), "pixbuf-animation");
g_object_thaw_notify (G_OBJECT (image));
@@ -1238,8 +1202,7 @@ gtk_image_set_from_icon_name (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
new_name = g_strdup (icon_name);
gtk_image_reset (image);
gtk_image_clear (image);
if (new_name)
{
@@ -1247,18 +1210,6 @@ gtk_image_set_from_icon_name (GtkImage *image,
g_free (new_name);
}
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
gint width, height;
gtk_image_get_preferred_size (image, &width, &height);
if (width != gtk_widget_get_allocated_width (GTK_WIDGET (image)) ||
height != gtk_widget_get_allocated_height (GTK_WIDGET (image)))
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_notify (G_OBJECT (image), "icon-name");
g_object_notify (G_OBJECT (image), "icon-size");
@@ -1291,7 +1242,7 @@ gtk_image_set_from_gicon (GtkImage *image,
if (icon)
g_object_ref (icon);
gtk_image_reset (image);
gtk_image_clear (image);
if (icon)
{
@@ -1299,18 +1250,6 @@ gtk_image_set_from_gicon (GtkImage *image,
g_object_unref (icon);
}
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
gint width, height;
gtk_image_get_preferred_size (image, &width, &height);
if (width != gtk_widget_get_allocated_width (GTK_WIDGET (image)) ||
height != gtk_widget_get_allocated_height (GTK_WIDGET (image)))
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_notify (G_OBJECT (image), "gicon");
g_object_notify (G_OBJECT (image), "icon-size");
@@ -1341,7 +1280,7 @@ gtk_image_set_from_surface (GtkImage *image,
if (surface)
cairo_surface_reference (surface);
gtk_image_reset (image);
gtk_image_clear (image);
if (surface)
{
@@ -1349,18 +1288,6 @@ gtk_image_set_from_surface (GtkImage *image,
cairo_surface_destroy (surface);
}
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
gint width, height;
gtk_image_get_preferred_size (image, &width, &height);
if (width != gtk_widget_get_allocated_width (GTK_WIDGET (image)) ||
height != gtk_widget_get_allocated_height (GTK_WIDGET (image)))
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_notify (G_OBJECT (image), "surface");
g_object_thaw_notify (G_OBJECT (image));

View File

@@ -3828,6 +3828,20 @@ places_sidebar_sort_func (GtkTreeModel *model,
g_free (name_a);
g_free (name_b);
}
else if ((place_type_a == place_type_b) &&
(place_type_a == PLACES_BOOKMARK))
{
gint pos_a, pos_b;
gtk_tree_model_get (model, iter_a,
PLACES_SIDEBAR_COLUMN_INDEX, &pos_a,
-1);
gtk_tree_model_get (model, iter_b,
PLACES_SIDEBAR_COLUMN_INDEX, &pos_b,
-1);
retval = pos_a - pos_b;
}
else if (place_type_a == PLACES_CONNECT_TO_SERVER)
{
retval = 1;

View File

@@ -243,7 +243,10 @@ gtk_popover_dispose (GObject *object)
gtk_widget_set_visible (GTK_WIDGET (object), FALSE);
if (priv->window)
_gtk_window_remove_popover (priv->window, GTK_WIDGET (object));
{
g_signal_handlers_disconnect_by_data (priv->window, popover);
_gtk_window_remove_popover (priv->window, GTK_WIDGET (object));
}
priv->window = NULL;

View File

@@ -2120,6 +2120,7 @@ gtk_tree_view_destroy (GtkWidget *widget)
GList *list;
gtk_tree_view_stop_editing (tree_view, TRUE);
gtk_tree_view_stop_rubber_band (tree_view);
if (tree_view->priv->columns != NULL)
{

View File

@@ -1491,7 +1491,7 @@ build_cache (const gchar *path)
opentmp:
if ((fd = g_open (tmp_cache_path, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC | _O_BINARY, mode)) == -1)
{
if (force_update && retry_count == 0)
if (retry_count == 0)
{
retry_count++;
g_remove (tmp_cache_path);