Warn about the switch widget with Gtk < 3.0

This commit is contained in:
Pierre Pronchery 2016-06-12 01:06:17 +02:00
parent 9d7b8ce538
commit 54da95b45c

View File

@ -83,6 +83,7 @@ Flashlight * flashlight_new(GtkOrientation orientation)
g_signal_connect_swapped(flashlight->co_main, "notify::active",
G_CALLBACK(_flashlight_on_toggled), flashlight);
#else
# warning Switch widget is not available (needs Gtk+ >= 3.0)
flashlight->co_main = gtk_toggle_button_new_with_mnemonic("_Switch");
g_signal_connect_swapped(flashlight->co_main, "toggled", G_CALLBACK(
_flashlight_on_toggled), flashlight);