Lines 83-93
Link Here
|
83 |
on_ebox_enter(GtkWidget* box, GdkEventCrossing* event, GtkLabel* label) { |
83 |
on_ebox_enter(GtkWidget* box, GdkEventCrossing* event, GtkLabel* label) { |
84 |
static GdkCursor* Cursor = NULL; |
84 |
static GdkCursor* Cursor = NULL; |
85 |
const char* text; |
85 |
const char* text; |
86 |
|
86 |
|
87 |
(void)event; |
87 |
(void)event; |
|
|
88 |
#if GTK_CHECK_VERSION(2, 20, 0) |
89 |
if (gtk_widget_get_sensitive(label)) { |
90 |
#else |
88 |
if (GTK_WIDGET_SENSITIVE(label)) { |
91 |
if (GTK_WIDGET_SENSITIVE(label)) { |
|
|
92 |
#endif |
89 |
char* temp; |
93 |
char* temp; |
90 |
|
94 |
|
91 |
text = g_object_get_data(G_OBJECT(label), "label"); |
95 |
text = g_object_get_data(G_OBJECT(label), "label"); |
92 |
temp = g_strdup_printf(EVENT_HFMT, text); |
96 |
temp = g_strdup_printf(EVENT_HFMT, text); |
93 |
gtk_label_set_markup(label, temp); |
97 |
gtk_label_set_markup(label, temp); |
Lines 127-137
Link Here
|
127 |
* @param set TRUE to set sensitive, FALSE to disable |
131 |
* @param set TRUE to set sensitive, FALSE to disable |
128 |
*/ |
132 |
*/ |
129 |
void ui_event_label_set_sensitive(GtkWidget* ebox, gboolean set) { |
133 |
void ui_event_label_set_sensitive(GtkWidget* ebox, gboolean set) { |
130 |
gpointer callback = g_object_get_data(G_OBJECT(ebox), "callback"); |
134 |
gpointer callback = g_object_get_data(G_OBJECT(ebox), "callback"); |
131 |
GtkWidget* child = GTK_BIN(ebox)->child; |
135 |
GtkWidget* child = GTK_BIN(ebox)->child; |
|
|
136 |
#if GTK_CHECK_VERSION(2, 20, 0) |
137 |
if (gtk_widget_get_sensitive(child) == set) return; |
138 |
#else |
132 |
if (GTK_WIDGET_SENSITIVE(child) == set) return; |
139 |
if (GTK_WIDGET_SENSITIVE(child) == set) return; |
|
|
140 |
#endif |
133 |
|
141 |
|
134 |
if (set && !callback) return; |
142 |
if (set && !callback) return; |
135 |
gtk_widget_set_sensitive(child, set); |
143 |
gtk_widget_set_sensitive(child, set); |
136 |
|
144 |
|
137 |
if (!set) { |
145 |
if (!set) { |