[gimp] plug-ins: get rid of "Show this dialog" checkbox in file-dds.



commit 948608e6586b0a8ff6fa341ead3da5e02d0f5a1b
Author: Jehan <jehan girinstud io>
Date:   Wed Jan 2 19:34:40 2019 +0100

    plug-ins: get rid of "Show this dialog" checkbox in file-dds.
    
    None of our load plug-ins have such a checkbox, so this is not
    consistent. Moreover one you uncheck it, you just can't get back the
    dialog until next GIMP restart. That's very bad usability.

 plug-ins/file-dds/dds.c       | 3 +--
 plug-ins/file-dds/ddsplugin.h | 1 -
 plug-ins/file-dds/ddsread.c   | 9 +--------
 3 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/plug-ins/file-dds/dds.c b/plug-ins/file-dds/dds.c
index c8181f8031..b4cc217364 100644
--- a/plug-ins/file-dds/dds.c
+++ b/plug-ins/file-dds/dds.c
@@ -62,7 +62,7 @@ DDSWriteVals dds_write_vals =
 
 DDSReadVals dds_read_vals =
 {
-   1, 1, 1
+   1, 1
 };
 
 static GimpParamDef load_args[] =
@@ -218,7 +218,6 @@ static void run(const gchar *name, gint nparams, const GimpParam *param,
                           break;
                        case GIMP_RUN_NONINTERACTIVE:
                           interactive_dds = 0;
-            dds_read_vals.show_dialog = 0;
             dds_read_vals.mipmaps = param[3].data.d_int32;
             dds_read_vals.decode_images = param[4].data.d_int32;
                           if(nparams != G_N_ELEMENTS(load_args))
diff --git a/plug-ins/file-dds/ddsplugin.h b/plug-ins/file-dds/ddsplugin.h
index 809ea34b0a..6306ec6922 100644
--- a/plug-ins/file-dds/ddsplugin.h
+++ b/plug-ins/file-dds/ddsplugin.h
@@ -52,7 +52,6 @@ typedef struct
 
 typedef struct
 {
-   int show_dialog;
    int mipmaps;
    int decode_images;
 } DDSReadVals;
diff --git a/plug-ins/file-dds/ddsread.c b/plug-ins/file-dds/ddsread.c
index e6cef40c32..0be3a5660e 100644
--- a/plug-ins/file-dds/ddsread.c
+++ b/plug-ins/file-dds/ddsread.c
@@ -93,7 +93,7 @@ GimpPDBStatusType read_dds(gchar *filename, gint32 *imageID)
    GimpImageBaseType type;
    int i, j;
 
-   if(interactive_dds && dds_read_vals.show_dialog)
+   if (interactive_dds)
    {
       if(!load_dialog())
          return(GIMP_PDB_CANCEL);
@@ -1241,13 +1241,6 @@ static int load_dialog(void)
    gtk_box_pack_start(GTK_BOX(vbox), check, 1, 1, 0);
    gtk_widget_show(check);
 
-   check = gtk_check_button_new_with_label(_("Show this dialog"));
-   gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), dds_read_vals.show_dialog);
-   g_signal_connect(check, "clicked",
-                    G_CALLBACK (toggle_clicked), &dds_read_vals.show_dialog);
-   gtk_box_pack_start(GTK_BOX(vbox), check, 1, 1, 0);
-   gtk_widget_show(check);
-
    gtk_widget_show(dlg);
 
    runme = 0;


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