Skip to content

Commit

Permalink
Merge pull request #92 from dimkr/compat
Browse files Browse the repository at this point in the history
Automatically replace deprecated widgets
  • Loading branch information
01micko authored Mar 13, 2021
2 parents 3d8d1ae + e570075 commit 2f9ec3a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/automaton.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,12 +1063,17 @@ instruction_execute_push(
Widget = widget_colorbutton_create(Attr, tag_attributes, Widget_Type);
push_widget(Widget, Widget_Type);
break;
#if !GTK_CHECK_VERSION(3,0,0)
case WIDGET_COMBOBOX:
Widget = widget_combobox_create(Attr, tag_attributes, Widget_Type);
push_widget(Widget, Widget_Type);
break;
#endif
case WIDGET_COMBOBOXENTRY:
case WIDGET_COMBOBOXTEXT:
#if GTK_CHECK_VERSION(3,0,0)
case WIDGET_COMBOBOX:
#endif
Widget = widget_comboboxtext_create(Attr, tag_attributes, Widget_Type);
push_widget(Widget, Widget_Type);
break;
Expand Down Expand Up @@ -1131,12 +1136,14 @@ instruction_execute_push(
Widget = widget_hseparator_create(Attr, tag_attributes, Widget_Type);
push_widget(Widget, Widget_Type);
break;
#if !GTK_CHECK_VERSION(3,0,0)
case WIDGET_LIST:
Widget = widget_list_create(Attr, tag_attributes, Widget_Type);
scrolled_window = put_in_the_scrolled_window(Widget, Attr,
tag_attributes, Widget_Type);
push_widget(scrolled_window, WIDGET_SCROLLEDW);
break;
#endif
case WIDGET_MENU:
Widget = widget_menu_create(Attr, tag_attributes, Widget_Type);
push_widget(Widget, Widget_Type);
Expand Down Expand Up @@ -1182,12 +1189,14 @@ instruction_execute_push(
Widget = widget_statusbar_create(Attr, tag_attributes, Widget_Type);
push_widget(Widget, Widget_Type);
break;
#if !GTK_CHECK_VERSION(3,0,0)
case WIDGET_TABLE:
Widget = widget_table_create(Attr, tag_attributes, Widget_Type);
scrolled_window = put_in_the_scrolled_window(Widget, Attr,
tag_attributes, Widget_Type);
push_widget(scrolled_window, WIDGET_SCROLLEDW);
break;
#endif
case WIDGET_TERMINAL:
Widget = widget_terminal_create(Attr, tag_attributes, Widget_Type);
scrolled_window = put_in_the_scrolled_window(Widget, Attr,
Expand All @@ -1204,6 +1213,10 @@ instruction_execute_push(
break;
#if GTK_CHECK_VERSION(2,4,0)
case WIDGET_TREE:
#if GTK_CHECK_VERSION(3,0,0)
case WIDGET_LIST:
case WIDGET_TABLE:
#endif
Widget = widget_tree_create(Attr, tag_attributes, Widget_Type);
scrolled_window = put_in_the_scrolled_window(Widget, Attr,
tag_attributes, Widget_Type);
Expand Down

0 comments on commit 2f9ec3a

Please sign in to comment.