Commit 95c70d24fb7b3a71a4fd123197852ad32c02a0e6
1 parent
a0591186
Exists in
master
and in
1 other branch
Fixing RHEL 7 builds.
Showing
3 changed files
with
9 additions
and
7 deletions
Show diff stats
src/dialogs/commondialog.c
| ... | ... | @@ -132,9 +132,9 @@ LIB3270_EXPORT GtkWidget * v3270_dialog_new(GtkWidget *widget, const gchar *titl |
| 132 | 132 | return dialog; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | +#if GTK_CHECK_VERSION(3,12,0) | |
| 135 | 136 | GtkHeaderBar * v3270_dialog_get_header_bar(GtkWidget * widget) |
| 136 | 137 | { |
| 137 | -#if GTK_CHECK_VERSION(3,12,0) | |
| 138 | 138 | |
| 139 | 139 | gboolean use_header = FALSE; |
| 140 | 140 | |
| ... | ... | @@ -143,7 +143,7 @@ GtkHeaderBar * v3270_dialog_get_header_bar(GtkWidget * widget) |
| 143 | 143 | if(use_header) |
| 144 | 144 | return GTK_HEADER_BAR(gtk_dialog_get_header_bar(GTK_DIALOG(widget))); |
| 145 | 145 | |
| 146 | -#endif // GTK 3.12 | |
| 147 | - | |
| 148 | 146 | return NULL; |
| 149 | 147 | } |
| 148 | +#endif // GTK 3.12 | |
| 149 | + | ... | ... |
src/dialogs/settingsdialog.c
| ... | ... | @@ -273,6 +273,7 @@ static void V3270FTSettingsDialog_init(V3270FTSettingsDialog *widget) |
| 273 | 273 | g_signal_connect(G_OBJECT(widget->settings),"validity",G_CALLBACK(validity_changed),widget); |
| 274 | 274 | g_signal_connect(G_OBJECT(widget->settings),"has-activity",G_CALLBACK(has_activity_changed),widget); |
| 275 | 275 | |
| 276 | +#if GTK_CHECK_VERSION(3,12,0) | |
| 276 | 277 | // Does the dialog have header bar? |
| 277 | 278 | GtkHeaderBar * header = v3270_dialog_get_header_bar(GTK_WIDGET(widget)); |
| 278 | 279 | |
| ... | ... | @@ -280,6 +281,9 @@ static void V3270FTSettingsDialog_init(V3270FTSettingsDialog *widget) |
| 280 | 281 | gtk_header_bar_set_title(header,_( "3270 File transfer")); |
| 281 | 282 | else |
| 282 | 283 | gtk_window_set_title(GTK_WINDOW(widget),_( "3270 File transfer")); |
| 284 | +#else | |
| 285 | + gtk_window_set_title(GTK_WINDOW(widget),_( "3270 File transfer")); | |
| 286 | +#endif // GTK 3.12 | |
| 283 | 287 | |
| 284 | 288 | // https://developer.gnome.org/hig/stable/visual-layout.html.en |
| 285 | 289 | gtk_container_set_border_width(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(widget))),18); | ... | ... |
src/include/internals.h
| ... | ... | @@ -54,11 +54,9 @@ |
| 54 | 54 | G_GNUC_INTERNAL GtkWidget * v3270_dialog_create_grid(GtkAlign align); |
| 55 | 55 | G_GNUC_INTERNAL GtkWidget * v3270_dialog_create_frame(GtkWidget * child, const gchar *title); |
| 56 | 56 | |
| 57 | -#if ! GTK_CHECK_VERSION(3,12,0) | |
| 58 | - #define GtkHeaderBar GtkWidget | |
| 59 | -#endif // ! GTK 3.12 | |
| 60 | - | |
| 57 | +#if GTK_CHECK_VERSION(3,12,0) | |
| 61 | 58 | G_GNUC_INTERNAL GtkHeaderBar * v3270_dialog_get_header_bar(GtkWidget * widget); |
| 59 | +#endif // ! GTK 3.12 | |
| 62 | 60 | |
| 63 | 61 | // Activity list widget. |
| 64 | 62 | #define GTK_TYPE_V3270_FT_ACTIVITY_LIST (V3270FTActivityList_get_type ()) | ... | ... |