[gimp] app: remove GimpDataEditor's save button, it was useless and confusing
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove GimpDataEditor's save button, it was useless and confusing
- Date: Wed, 12 Oct 2016 18:44:06 +0000 (UTC)
commit f722bc99d235499ea06a2424d882fc2346b09443
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 12 20:43:35 2016 +0200
app: remove GimpDataEditor's save button, it was useless and confusing
app/widgets/gimpdataeditor.c | 38 ++------------------------------------
app/widgets/gimpdataeditor.h | 3 ---
2 files changed, 2 insertions(+), 39 deletions(-)
---
diff --git a/app/widgets/gimpdataeditor.c b/app/widgets/gimpdataeditor.c
index a00c048..dce5c85 100644
--- a/app/widgets/gimpdataeditor.c
+++ b/app/widgets/gimpdataeditor.c
@@ -98,10 +98,6 @@ static gboolean gimp_data_editor_name_focus_out (GtkWidget *widget,
static void gimp_data_editor_data_name_changed (GimpObject *object,
GimpDataEditor *editor);
-static void gimp_data_editor_save_clicked (GtkWidget *widget,
- GimpDataEditor *editor);
-static void gimp_data_editor_revert_clicked (GtkWidget *widget,
- GimpDataEditor *editor);
static void gimp_data_editor_save_dirty (GimpDataEditor *editor);
@@ -208,24 +204,6 @@ gimp_data_editor_constructed (GObject *object)
g_assert (GIMP_IS_CONTEXT (editor->context));
gimp_data_editor_set_edit_active (editor, TRUE);
-
- editor->save_button =
- gimp_editor_add_button (GIMP_EDITOR (editor),
- "document-save",
- _("Save"), NULL,
- G_CALLBACK (gimp_data_editor_save_clicked),
- NULL,
- editor);
-
- editor->revert_button =
- gimp_editor_add_button (GIMP_EDITOR (editor),
- "document-revert",
- _("Revert"), NULL,
- G_CALLBACK (gimp_data_editor_revert_clicked),
- NULL,
- editor);
- /* Hide because revert buttons are not yet implemented */
- gtk_widget_hide (editor->revert_button);
}
static void
@@ -443,6 +421,8 @@ gimp_data_editor_real_set_data (GimpDataEditor *editor,
if (editor->data)
{
+ gimp_data_editor_save_dirty (editor);
+
g_signal_handlers_disconnect_by_func (editor->data,
gimp_data_editor_data_name_changed,
editor);
@@ -612,20 +592,6 @@ gimp_data_editor_data_name_changed (GimpObject *object,
}
static void
-gimp_data_editor_save_clicked (GtkWidget *widget,
- GimpDataEditor *editor)
-{
- gimp_data_editor_save_dirty (editor);
-}
-
-static void
-gimp_data_editor_revert_clicked (GtkWidget *widget,
- GimpDataEditor *editor)
-{
- g_print ("TODO: implement revert\n");
-}
-
-static void
gimp_data_editor_save_dirty (GimpDataEditor *editor)
{
GimpData *data = editor->data;
diff --git a/app/widgets/gimpdataeditor.h b/app/widgets/gimpdataeditor.h
index 1ccc862..7ddb3bd 100644
--- a/app/widgets/gimpdataeditor.h
+++ b/app/widgets/gimpdataeditor.h
@@ -49,9 +49,6 @@ struct _GimpDataEditor
GtkWidget *name_entry;
GtkWidget *view; /* filled by subclasses */
-
- GtkWidget *save_button;
- GtkWidget *revert_button;
};
struct _GimpDataEditorClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]