Skip to content
Permalink
Browse files

UI: avoid deprecated GtkButton:use-stock

  • Loading branch information...
sc0w authored and raveit65 committed Jun 1, 2018
1 parent 074773b commit 58f106ab043c6d1b0199bb8a0f8552deb32e12ef
Showing with 49 additions and 24 deletions.
  1. +20 −20 data/buttons-financial.ui
  2. +8 −2 data/buttons-programming.ui
  3. +8 −2 data/preferences.ui
  4. +13 −0 src/math-buttons.c
@@ -24,12 +24,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -206,12 +206,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button3">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -388,12 +388,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button5">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -570,12 +570,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button19">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -722,12 +722,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button7">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -905,12 +905,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button9">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1088,12 +1088,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button11">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1271,12 +1271,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button13">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1454,12 +1454,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button15">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1666,12 +1666,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button17">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -2,6 +2,11 @@
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">process-stop</property>
</object>
<object class="GtkDialog" id="character_code_dialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
@@ -25,12 +30,13 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button8">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="image">image1</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -15,6 +15,11 @@
<property name="step_increment">1</property>
<property name="page_increment">1</property>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">window-close</property>
</object>
<object class="GtkListStore" id="number_format_model">
<columns>
<!-- column-name label -->
@@ -72,11 +77,12 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-close</property>
<property name="label" translatable="yes">_Close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="image">image1</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -584,6 +584,19 @@ load_mode(MathButtons *buttons, ButtonMode mode)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
}

/* put the icon name "process-stop" in the buttons
button1, button3, button5, button7, button9,
button11, button13, button15, button17, button19
taken from buttons-financial.ui */
for (i = 1; i < 20; i++) {
if (i % 2) {
widget = GET_WIDGET (builder, g_strdup_printf ("button%d",i));
if (GTK_IS_BUTTON(widget))
gtk_button_set_image (GTK_BUTTON (widget),
gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));
}
}

if (mode == PROGRAMMING) {
GtkListStore *model;
GtkTreeIter iter;

0 comments on commit 58f106a

Please sign in to comment.
You can’t perform that action at this time.