Disable database/opensearch
[oi-userland.git] / components / library / gtk+ / patches / 01-window-icons-for-message-dialog.patch
blobe1c8288dc91878fdaa929b7e60d10d67eeb607c0
1 --- gtk+-2.24.33/gtk/gtkmessagedialog.c.orig
2 +++ gtk+-2.24.33/gtk/gtkmessagedialog.c
3 @@ -411,6 +411,24 @@
6 static void
7 +set_window_icon_from_stock (GtkMessageDialog *dialog,
8 + const gchar *stock_id)
9 +{
10 + GdkPixbuf *icon;
12 + icon = gtk_widget_render_icon (GTK_WIDGET (dialog),
13 + stock_id,
14 + GTK_ICON_SIZE_DIALOG,
15 + NULL);
17 + if (icon) {
18 + gtk_window_set_icon (GTK_WINDOW (dialog), icon);
20 + g_object_unref (icon);
21 + }
24 +static void
25 setup_type (GtkMessageDialog *dialog,
26 GtkMessageType type)
28 @@ -1013,20 +1031,22 @@
30 GtkMessageDialog *dialog = GTK_MESSAGE_DIALOG (widget);
31 gboolean use_separator;
32 - GtkWidget *parent;
33 + GtkWidget *image;
34 gint border_width;
36 - parent = GTK_WIDGET (GTK_MESSAGE_DIALOG (widget)->image->parent);
37 + image = GTK_MESSAGE_DIALOG (widget)->image;
39 - if (parent)
40 + if (image->parent)
42 gtk_widget_style_get (widget, "message-border",
43 &border_width, NULL);
45 - gtk_container_set_border_width (GTK_CONTAINER (parent),
46 + gtk_container_set_border_width (GTK_CONTAINER (image->parent),
47 MAX (0, border_width - 7));
50 + set_window_icon_from_stock (GTK_MESSAGE_DIALOG (widget),
51 + GTK_IMAGE (image)->data.stock.stock_id);
52 gtk_widget_style_get (widget,
53 "use-separator", &use_separator,
54 NULL);