diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2013-11-13 18:07:42 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2013-11-13 18:07:42 +0100 |
commit | 91522bd0b3cff351252ebbdbd23e1a2a02688394 (patch) | |
tree | ae40cc0899b993be1265957ba60ee55252ae0143 /ui | |
parent | b570b6fa9e85fd2d0881fb9ddb2b2e4d47156748 (diff) | |
download | librcc-91522bd0b3cff351252ebbdbd23e1a2a02688394.tar.gz librcc-91522bd0b3cff351252ebbdbd23e1a2a02688394.tar.bz2 librcc-91522bd0b3cff351252ebbdbd23e1a2a02688394.tar.xz librcc-91522bd0b3cff351252ebbdbd23e1a2a02688394.zip |
Fix GTK3 deprecated functions...
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -366,7 +366,12 @@ int rccUiMenuConfigureWidget(rcc_ui_menu_context ctx) { rcc_ui_box rccUiBoxCreate(rcc_ui_menu_context ctx, const char *title) { GtkWidget *hbox, *label; +#if GTK_MAJOR_VERSION > 2 + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, BOX_SPACING); +#else /* GTK_MAJOR_VERSION < 3 */ hbox = gtk_hbox_new(FALSE, BOX_SPACING); +#endif /* GTK_MAJOR_VERSION */ + gtk_container_border_width(GTK_CONTAINER(hbox), BOX_BORDER); if ((ctx->type != RCC_UI_MENU_OPTION)||(rccUiMenuGetRangeType(ctx) != RCC_OPTION_RANGE_TYPE_BOOLEAN)) { @@ -388,7 +393,11 @@ rcc_ui_frame rccUiFrameCreate(rcc_ui_frame_context ctx, const char *title) { frame = gtk_frame_new(title?title:""); gtk_container_border_width(GTK_CONTAINER(frame), FRAME_BORDER); +#if GTK_MAJOR_VERSION > 2 + box = gtk_box_new(GTK_ORIENTATION_VERTICAL, FRAME_SPACING); +#else /* GTK_MAJOR_VERSION < 3 */ box = gtk_vbox_new(FALSE, FRAME_SPACING); +#endif /* GTK_MAJOR_VERSION */ gtk_widget_show(box); gtk_container_add(GTK_CONTAINER(frame), box); @@ -412,7 +421,11 @@ int rccUiFrameAdd(rcc_ui_frame_context ctx, rcc_ui_box box) { rcc_ui_page rccUiPageCreate(rcc_ui_context ctx, const char *title) { GtkWidget *vbox; +#if GTK_MAJOR_VERSION > 2 + vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PAGE_SPACING); +#else /* GTK_MAJOR_VERSION < 3 */ vbox = gtk_vbox_new(FALSE, PAGE_SPACING); +#endif /* GTK_MAJOR_VERSION */ return (rcc_ui_page)vbox; } |