[easytag] Remove setting to force the scanner window on top



commit 1f9d3989d9f3fb6a09df3b7cd24b07892741fae5
Author: David King <amigadave amigadave com>
Date:   Sun Mar 3 18:06:42 2013 +0000

    Remove setting to force the scanner window on top
    
    The scanner window should always be set transient for the main window,
    and it is up to the window manager whether that means that the scanner
    window is placed above the main window.

 src/prefs.c   |    6 ------
 src/scan.c    |    4 ++--
 src/setting.c |   11 +++--------
 src/setting.h |    1 -
 4 files changed, 5 insertions(+), 17 deletions(-)
---
diff --git a/src/prefs.c b/src/prefs.c
index 75d9503..ce38ed4 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -1065,12 +1065,6 @@ void Open_OptionsWindow (void)
     gtk_widget_set_tooltip_text(OpenScannerWindowOnStartup,_("Activate this option to open automatically "
         "the scanner window when EasyTAG starts."));
 
-    ScannerWindowOnTop = gtk_check_button_new_with_label(_("Scanner window always on top"));
-    gtk_box_pack_start(GTK_BOX(vbox),ScannerWindowOnTop,FALSE,FALSE,0);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ScannerWindowOnTop),SCANNER_WINDOW_ON_TOP);
-    gtk_widget_set_tooltip_text(ScannerWindowOnTop,_("If activated, the window which contains the masks "
-                        "will stay always over the main window."));
-
 
     /* Other options */
     Frame = gtk_frame_new (_("Fields"));
diff --git a/src/scan.c b/src/scan.c
index de6203b..be35cd8 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -2356,8 +2356,8 @@ void Open_ScannerWindow (gint scanner_type)
     gtk_container_set_border_width(GTK_CONTAINER(ScannerWindow), 5);
     gtk_window_set_resizable(GTK_WINDOW(ScannerWindow), FALSE);
     gtk_window_set_wmclass(GTK_WINDOW(ScannerWindow),"EasyTag_Scanner","easytag"); // Patch from Nikolai 
Prokoschenko (Debian)
-    if (SCANNER_WINDOW_ON_TOP)
-        gtk_window_set_transient_for(GTK_WINDOW(ScannerWindow),GTK_WINDOW(MainWindow));
+    gtk_window_set_transient_for (GTK_WINDOW (ScannerWindow),
+                                  GTK_WINDOW (MainWindow));
 
     /* The init position is define below, cause the scanner window must be showed before
      * to be able to move it. */
diff --git a/src/setting.c b/src/setting.c
index aca10cf..2a665a2 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -196,7 +196,6 @@ tConfigVariable Config_Variables[] =
     {"default_comment",                         CV_TYPE_STRING,  &DEFAULT_COMMENT                        },
     {"crc32_comment",                           CV_TYPE_BOOL,    &SET_CRC32_COMMENT                      },
     {"open_scanner_window_on_startup",          CV_TYPE_BOOL,    &OPEN_SCANNER_WINDOW_ON_STARTUP         },
-    {"scanner_window_on_top",                   CV_TYPE_BOOL,    &SCANNER_WINDOW_ON_TOP                  },
     {"set_scanner_window_position",             CV_TYPE_BOOL,    &SET_SCANNER_WINDOW_POSITION            },
     {"scanner_window_x",                        CV_TYPE_INT,     &SCANNER_WINDOW_X                       },
     {"scanner_window_y",                        CV_TYPE_INT,     &SCANNER_WINDOW_Y                       },
@@ -207,6 +206,7 @@ tConfigVariable Config_Variables[] =
     {"confirm_write_playlist",                  CV_TYPE_BOOL,    &CONFIRM_WRITE_PLAYLIST                 },
     {"confirm_delete_file",                     CV_TYPE_BOOL,    &CONFIRM_DELETE_FILE                    },
     {"confirm_when_unsaved_files",              CV_TYPE_BOOL,    &CONFIRM_WHEN_UNSAVED_FILES             },
+
     {"process_filename_field",                  CV_TYPE_BOOL,    &PROCESS_FILENAME_FIELD                 },
     {"process_title_field",                     CV_TYPE_BOOL,    &PROCESS_TITLE_FIELD                    },
     {"process_artist_field",                    CV_TYPE_BOOL,    &PROCESS_ARTIST_FIELD                   },
@@ -470,7 +470,6 @@ void Init_Config_Variables (void)
     DEFAULT_COMMENT                           = g_strdup("Tagged with EasyTAG");
     SET_CRC32_COMMENT                         = 0;
     OPEN_SCANNER_WINDOW_ON_STARTUP            = 0;
-    SCANNER_WINDOW_ON_TOP                     = 1;
     SET_SCANNER_WINDOW_POSITION               = 1; // Set it to '0' if problem with some Windows Manager
     SCANNER_WINDOW_X                          = -1;
     SCANNER_WINDOW_Y                          = -1;
@@ -769,7 +768,6 @@ Apply_Changes_Of_Preferences_Window (void)
         SET_CRC32_COMMENT   = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Crc32Comment));
 
         OPEN_SCANNER_WINDOW_ON_STARTUP = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(OpenScannerWindowOnStartup));
-        SCANNER_WINDOW_ON_TOP          = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ScannerWindowOnTop));
 
         /* CDDB */
         if (CDDB_SERVER_NAME_AUTOMATIC_SEARCH) g_free(CDDB_SERVER_NAME_AUTOMATIC_SEARCH);
@@ -844,12 +842,9 @@ Apply_Changes_Of_Preferences_Window (void)
 
     if (ScannerWindow)
     {
-        if (SCANNER_WINDOW_ON_TOP)
-            gtk_window_set_transient_for(GTK_WINDOW(ScannerWindow),GTK_WINDOW(MainWindow));
-        else
-            gtk_window_set_transient_for(GTK_WINDOW(ScannerWindow),NULL);
+        gtk_window_set_transient_for (GTK_WINDOW (ScannerWindow),
+                                      GTK_WINDOW (MainWindow));
     }
-
 }
 
 /*
diff --git a/src/setting.h b/src/setting.h
index 5e61c86..6a06f1a 100644
--- a/src/setting.h
+++ b/src/setting.h
@@ -149,7 +149,6 @@ gint    SET_DEFAULT_COMMENT;
 gchar  *DEFAULT_COMMENT;
 gint    SET_CRC32_COMMENT;
 gint    OPEN_SCANNER_WINDOW_ON_STARTUP;
-gint    SCANNER_WINDOW_ON_TOP;
 gint    SET_SCANNER_WINDOW_POSITION;
 gint    SCANNER_WINDOW_X;
 gint    SCANNER_WINDOW_Y;


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