[gnome-builder/wip/gtk4-port] plugins/shellcmd: dont show delete button for new commands
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/shellcmd: dont show delete button for new commands
- Date: Tue, 14 Jun 2022 19:23:49 +0000 (UTC)
commit 6cea4ff44f7d099bc57ad7ad4f0837002d37cf7d
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 14 12:23:43 2022 -0700
plugins/shellcmd: dont show delete button for new commands
src/plugins/shellcmd/gbp-shellcmd-command-dialog.c | 3 +++
src/plugins/shellcmd/gbp-shellcmd-command-dialog.ui | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
index ed444cfdf..05c2fc793 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
@@ -41,6 +41,7 @@ struct _GbpShellcmdCommandDialog
GtkListBox *envvars_list_box;
GtkLabel *shortcut_label;
GtkButton *save;
+ GtkButton *delete_button;
char *accel;
@@ -435,6 +436,7 @@ gbp_shellcmd_command_dialog_set_property (GObject *object,
{
gtk_window_set_title (GTK_WINDOW (self), _("Create Command"));
gtk_button_set_label (self->save, _("Cre_ate"));
+ gtk_widget_hide (GTK_WIDGET (self->delete_button));
}
break;
@@ -474,6 +476,7 @@ gbp_shellcmd_command_dialog_class_init (GbpShellcmdCommandDialogClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/plugins/shellcmd/gbp-shellcmd-command-dialog.ui");
gtk_widget_class_bind_template_child (widget_class, GbpShellcmdCommandDialog, argv);
+ gtk_widget_class_bind_template_child (widget_class, GbpShellcmdCommandDialog, delete_button);
gtk_widget_class_bind_template_child (widget_class, GbpShellcmdCommandDialog, envvars);
gtk_widget_class_bind_template_child (widget_class, GbpShellcmdCommandDialog, envvars_list_box);
gtk_widget_class_bind_template_child (widget_class, GbpShellcmdCommandDialog, location);
diff --git a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.ui
b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.ui
index ed75faf8b..910dcb513 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.ui
+++ b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.ui
@@ -140,7 +140,7 @@
</object>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton" id="delete_button">
<property name="label" translatable="yes">_Delete Command</property>
<property name="use-underline">true</property>
<property name="action-name">command.delete</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]