[chronojump] cancel/accept icons for genericWin
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] cancel/accept icons for genericWin
- Date: Mon, 26 Jul 2021 16:01:54 +0000 (UTC)
commit 454beea82041eb931a17c52b49e95fe5c2d1a1df
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jul 26 18:01:36 2021 +0200
cancel/accept icons for genericWin
glade/generic_window.glade | 66 +++++++++++++++++++++++++++++++++++++++++++---
src/gui/genericWindow.cs | 11 ++++++--
2 files changed, 71 insertions(+), 6 deletions(-)
---
diff --git a/glade/generic_window.glade b/glade/generic_window.glade
index bce9bc481..d2b1d10a6 100644
--- a/glade/generic_window.glade
+++ b/glade/generic_window.glade
@@ -749,14 +749,43 @@
<property name="can_focus">False</property>
<child>
<widget class="GtkButton" id="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="use_stock">True</property>
<signal name="clicked" handler="on_button_cancel_clicked" swapped="no"/>
<accelerator key="Escape" signal="clicked"/>
+ <child>
+ <widget class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage" id="image_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="label_button_cancel">
+ <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">False</property>
@@ -839,13 +868,42 @@
</child>
<child>
<widget class="GtkButton" id="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="use_stock">True</property>
<signal name="clicked" handler="on_button_accept_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage" id="image_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="label_button_accept">
+ <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">False</property>
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index 6533707da..605f2829c 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -76,6 +76,10 @@ public class GenericWindow
[Widget] Gtk.TreeView treeview;
[Widget] Gtk.Button button_accept;
[Widget] Gtk.Button button_cancel;
+ [Widget] Gtk.Image image_button_accept;
+ [Widget] Gtk.Image image_button_cancel;
+ [Widget] Gtk.Label label_button_accept;
+ [Widget] Gtk.Label label_button_cancel;
//treeview fake buttons
[Widget] Gtk.Button button_row_edit;
@@ -174,6 +178,9 @@ public class GenericWindow
Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "video_play.png");
GenericWindowBox.image_treeviewload_row_play.Pixbuf = pixbuf;
+ GenericWindowBox.image_button_cancel.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_cancel.png");
+ GenericWindowBox.image_button_accept.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_done_blue.png");
+
if(showNow)
GenericWindowBox.generic_window.Show ();
@@ -1028,7 +1035,7 @@ public class GenericWindow
}
public void SetButtonAcceptLabel(string str) {
- button_accept.Label=str;
+ label_button_accept.Text = str;
}
public void SetButtonAcceptSensitive(bool show) {
@@ -1036,7 +1043,7 @@ public class GenericWindow
}
public void SetButtonCancelLabel(string str) {
- button_cancel.Label=str;
+ label_button_cancel.Text = str;
}
public void ShowButtonCancel(bool show) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]