GTK 3 prep: use GTK instead of GDK window-icon functions.

We now build cleanly with -DGDK_DISABLE_DEPRECATED.
This commit is contained in:
Simon Tatham
2015-10-03 12:28:04 +01:00
parent fd7882fb45
commit 3d0d54e3b4

13
gtk.c
View File

@ -2153,7 +2153,6 @@ static frontend *new_window(char *arg, int argtype, char **error)
frontend *fe; frontend *fe;
GtkBox *vbox, *hbox; GtkBox *vbox, *hbox;
GtkWidget *menu, *menuitem; GtkWidget *menu, *menuitem;
GdkPixmap *iconpm;
GList *iconlist; GList *iconlist;
int x, y, n; int x, y, n;
char errbuf[1024]; char errbuf[1024];
@ -2515,12 +2514,10 @@ static frontend *new_window(char *arg, int argtype, char **error)
GDK_POINTER_MOTION_HINT_MASK); GDK_POINTER_MOTION_HINT_MASK);
if (n_xpm_icons) { if (n_xpm_icons) {
gtk_widget_realize(fe->window); gtk_window_set_icon(GTK_WINDOW(fe->window),
iconpm = gdk_pixmap_create_from_xpm_d gdk_pixbuf_new_from_xpm_data
(gtk_widget_get_window(fe->window), NULL, NULL, ((const gchar **)xpm_icons[0]));
(gchar **)xpm_icons[0]);
gdk_window_set_icon(gtk_widget_get_window(fe->window),
NULL, iconpm, NULL);
iconlist = NULL; iconlist = NULL;
for (n = 0; n < n_xpm_icons; n++) { for (n = 0; n < n_xpm_icons; n++) {
iconlist = iconlist =
@ -2528,7 +2525,7 @@ static frontend *new_window(char *arg, int argtype, char **error)
gdk_pixbuf_new_from_xpm_data((const gchar **) gdk_pixbuf_new_from_xpm_data((const gchar **)
xpm_icons[n])); xpm_icons[n]));
} }
gdk_window_set_icon_list(gtk_widget_get_window(fe->window), iconlist); gtk_window_set_icon_list(GTK_WINDOW(fe->window), iconlist);
} }
gtk_widget_show(fe->area); gtk_widget_show(fe->area);