[chronojump] New session cancel/accept with icons



commit 1b27d12c334e342f7ac25c9f4f46e78b98933e1c
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jul 26 13:54:00 2021 +0200

    New session cancel/accept with icons

 glade/app1.glade             | 99 +++++++++++++++++++++++++++++++++++---------
 src/gui/app1/icons.cs        |  7 +++-
 src/gui/app1/session/main.cs |  2 +
 3 files changed, 88 insertions(+), 20 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 460044b29..766b83fd6 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -25787,6 +25787,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32098,18 +32101,6 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -32146,6 +32137,18 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -41383,6 +41386,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -45827,15 +45833,44 @@ then click this button.</property>
                                                             <property name="spacing">20</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="app1sae_button_cancel">
-                                                            <property name="label">gtk-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="relief">half</property>
-                                                            <property name="use_stock">True</property>
                                                             <signal name="clicked" 
handler="app1sae_on_button_cancel_clicked" swapped="no"/>
                                                             <accelerator key="Escape" signal="clicked"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox297">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">4</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_app1sae_button_cancel">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label128">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">Cancel</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -45845,14 +45880,43 @@ then click this button.</property>
                                                             </child>
                                                             <child>
                                                             <widget class="GtkButton" 
id="app1sae_button_accept">
-                                                            <property name="label">gtk-ok</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="relief">half</property>
-                                                            <property name="use_stock">True</property>
                                                             <signal name="clicked" 
handler="app1sae_on_button_accept_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox331">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">4</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_app1sae_button_accept">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label131">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">Accept</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -48123,9 +48187,6 @@ then click this button.</property>
                                                         </child>
                                                       </widget>
                                                     </child>
-                                                    <child>
-                                                      <placeholder/>
-                                                    </child>
                                                   </widget>
                                                   <packing>
                                                     <property name="expand">True</property>
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 5c28f5e7d..6797d18fd 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -762,7 +762,12 @@ public partial class ChronoJumpWindow
                image_force_sensor_export_cancel.Pixbuf = pixbuf;
                image_run_encoder_export_cancel.Pixbuf = pixbuf;
                app1s_image_cancel.Pixbuf = pixbuf;
-               
+               image_app1sae_button_cancel.Pixbuf = pixbuf;
+
+               //accept
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_done_blue.png");
+               image_app1sae_button_accept.Pixbuf = pixbuf;
+
                //zoom icons, done like this because there's one zoom icon created ad-hoc, 
                //and is not nice that the other are different for an user theme change
        
diff --git a/src/gui/app1/session/main.cs b/src/gui/app1/session/main.cs
index 877693203..0b9320109 100644
--- a/src/gui/app1/session/main.cs
+++ b/src/gui/app1/session/main.cs
@@ -144,6 +144,8 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.ComboBox app1sae_combo_levels;
        [Widget] Gtk.TextView app1sae_textview_comments;
        [Widget] Gtk.Button app1sae_button_accept;
+       [Widget] Gtk.Image image_app1sae_button_cancel;
+       [Widget] Gtk.Image image_app1sae_button_accept;
 
        //notebook tab 7 (backup)
        [Widget] Gtk.Button app1s_button_backup_select;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]