[chronojump] genericWin more clear edit/play/delete is about selected row
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] genericWin more clear edit/play/delete is about selected row
- Date: Tue, 1 Dec 2020 16:50:53 +0000 (UTC)
commit c30d41775eb499afeee1996bd0e50d669f1140e7
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Dec 1 17:50:30 2020 +0100
genericWin more clear edit/play/delete is about selected row
glade/generic_window.glade | 19 +++++++++++++++----
src/gui/genericWindow.cs | 14 ++++++++++++++
2 files changed, 29 insertions(+), 4 deletions(-)
---
diff --git a/glade/generic_window.glade b/glade/generic_window.glade
index e28f84e2..64bb50d1 100644
--- a/glade/generic_window.glade
+++ b/glade/generic_window.glade
@@ -759,7 +759,18 @@
<widget class="GtkHBox" id="hbox_treeviewload_editdelete">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">16</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="label_treeviewload_row">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Selected:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<widget class="GtkButton" id="button_treeviewload_row_edit">
<property name="label" translatable="yes">Edit</property>
@@ -772,7 +783,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -792,7 +803,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -807,7 +818,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</widget>
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index 40491372..aaca55b1 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -82,6 +82,7 @@ public class GenericWindow
[Widget] Gtk.Button button_row_play;
[Widget] Gtk.Button button_row_delete;
+ [Widget] Gtk.Label label_treeviewload_row;
[Widget] Gtk.Button button_treeviewload_row_edit;
[Widget] Gtk.Button button_treeviewload_row_delete;
[Widget] Gtk.Button button_treeviewload_row_play;
@@ -226,6 +227,7 @@ public class GenericWindow
hbox_height_metric.Hide();
check1.Hide();
hbox_edit_row.Hide();
+ label_treeviewload_row.Hide();
button_treeviewload_row_edit.Hide();
button_treeviewload_row_play.Hide();
button_treeviewload_row_delete.Hide();
@@ -634,6 +636,8 @@ public class GenericWindow
if(editAction == EditActions.EDITDELETE)
{
+ label_treeviewload_row.Sensitive = false;
+ label_treeviewload_row.Visible = true;
button_treeviewload_row_edit.Sensitive = false;
button_treeviewload_row_edit.Visible = true;
button_treeviewload_row_delete.Sensitive = false;
@@ -642,6 +646,8 @@ public class GenericWindow
button_row_delete = new Gtk.Button();
} else if(editAction == EditActions.EDITPLAYDELETE)
{
+ label_treeviewload_row.Sensitive = false;
+ label_treeviewload_row.Visible = true;
button_treeviewload_row_edit.Sensitive = false;
button_treeviewload_row_edit.Visible = true;
button_treeviewload_row_play.Sensitive = false;
@@ -653,6 +659,8 @@ public class GenericWindow
button_row_delete = new Gtk.Button();
} else if(editAction == EditActions.DELETE)
{
+ label_treeviewload_row.Sensitive = false;
+ label_treeviewload_row.Visible = true;
button_row_delete = new Gtk.Button();
button_treeviewload_row_delete.Sensitive = false;
button_treeviewload_row_delete.Visible = true;
@@ -729,6 +737,7 @@ public class GenericWindow
if (treeview.Selection.GetSelected (out myModel, out iter))
{
SetButtonAcceptSensitive(true);
+ label_treeviewload_row.Sensitive = true;
button_treeviewload_row_edit.Sensitive = true;
button_treeviewload_row_delete.Sensitive = true;
@@ -738,6 +747,7 @@ public class GenericWindow
else
{
SetButtonAcceptSensitive(false);
+ label_treeviewload_row.Sensitive = false;
button_treeviewload_row_edit.Sensitive = false;
button_treeviewload_row_delete.Sensitive = false;
button_treeviewload_row_play.Sensitive = false;
@@ -752,6 +762,7 @@ public class GenericWindow
TreeModel myModel = treeview.Model;
if (treeview.Selection.GetSelected (out myModel, out iter))
{
+ label_treeviewload_row.Sensitive = false;
button_treeviewload_row_edit.Sensitive = true;
button_treeviewload_row_play.Sensitive = true;
button_treeviewload_row_delete.Sensitive = true;
@@ -898,6 +909,7 @@ public class GenericWindow
entry_edit_row.Text = (string) model.GetValue (iter, commentColumn);
+ label_treeviewload_row.Sensitive = false;
button_treeviewload_row_edit.Sensitive = false;
button_treeviewload_row_play.Sensitive = false;
button_treeviewload_row_delete.Sensitive = false;
@@ -929,6 +941,7 @@ public class GenericWindow
public void on_hbox_combo_button_cancel_clicked (object o, EventArgs args)
{
+ label_treeviewload_row.Sensitive = true;
button_treeviewload_row_edit.Sensitive = true;
button_treeviewload_row_play.Sensitive = true;
button_treeviewload_row_delete.Sensitive = true;
@@ -960,6 +973,7 @@ public class GenericWindow
return;
TreeviewSelectedUniqueID = Convert.ToInt32((string) store.GetValue (iter, 0));
+ label_treeviewload_row.Sensitive = false;
button_treeviewload_row_edit.Sensitive = false;
button_treeviewload_row_play.Sensitive = false;
button_treeviewload_row_delete.Sensitive = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]