mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Add a missing runtime check
The cursor theme and size settting code was ifdefed to only be compiled with the X11 backend, but it didn't check for running under X at runtime. Fix that. http://bugzilla.gnome.org/695495
This commit is contained in:
parent
36d2324891
commit
7dd2539e1b
@ -4801,27 +4801,30 @@ create_cursors (GtkWidget *widget)
|
||||
NULL);
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
|
||||
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (vbox)))
|
||||
{
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new ("Cursor Theme : ");
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
|
||||
label = gtk_label_new ("Cursor Theme : ");
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), "default");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, TRUE, 0);
|
||||
entry = gtk_entry_new ();
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), "default");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, TRUE, 0);
|
||||
|
||||
size = gtk_spin_button_new_with_range (1.0, 64.0, 1.0);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (size), 24.0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), size, TRUE, TRUE, 0);
|
||||
|
||||
g_signal_connect (entry, "changed",
|
||||
G_CALLBACK (change_cursor_theme), hbox);
|
||||
g_signal_connect (size, "changed",
|
||||
G_CALLBACK (change_cursor_theme), hbox);
|
||||
size = gtk_spin_button_new_with_range (1.0, 64.0, 1.0);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (size), 24.0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), size, TRUE, TRUE, 0);
|
||||
|
||||
g_signal_connect (entry, "changed",
|
||||
G_CALLBACK (change_cursor_theme), hbox);
|
||||
g_signal_connect (size, "changed",
|
||||
G_CALLBACK (change_cursor_theme), hbox);
|
||||
}
|
||||
#endif
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user