[easytag/wip/gsettings: 20/21] Remove setting to force the scanner window on top



commit 6e897c121d0e945de1e526e5b4c60083e3ba0fb7
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 |   16 ----------------
 src/setting.h |    1 -
 4 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/src/prefs.c b/src/prefs.c
index 1fc65a6..2a1d9e4 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -1097,12 +1097,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 b69675e..44cc344 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -2371,8 +2371,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 88dcf5a..9b959a4 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -141,7 +141,6 @@ tConfigVariable Config_Variables[] =
     {"rfs_convert_underscore_and_p20_into_space",CV_TYPE_BOOL,&RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE },
     {"rfs_convert_space_into_underscore",        CV_TYPE_BOOL,&RFS_CONVERT_SPACE_INTO_UNDERSCORE         },
     {"rfs_remove_spaces",                        CV_TYPE_BOOL,&RFS_REMOVE_SPACES                         },
-    {"scanner_window_on_top",                   CV_TYPE_BOOL,    &SCANNER_WINDOW_ON_TOP                  },
 
     {"process_filename_field",                  CV_TYPE_BOOL,    &PROCESS_FILENAME_FIELD                 },
     {"process_title_field",                     CV_TYPE_BOOL,    &PROCESS_TITLE_FIELD                    },
@@ -279,7 +278,6 @@ void Init_Config_Variables (void)
     FTS_CONVERT_SPACE_INTO_UNDERSCORE         = 0;
     RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE = 1;
     RFS_CONVERT_SPACE_INTO_UNDERSCORE         = 0;
-    SCANNER_WINDOW_ON_TOP                     = 1;
 
     /*
      * Scanner window
@@ -428,8 +426,6 @@ Apply_Changes_Of_Preferences_Window (void)
         RFS_CONVERT_SPACE_INTO_UNDERSCORE         = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RFSConvertSpaceIntoUnderscore));
                                RFS_REMOVE_SPACES                         = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RFSRemoveSpaces));
 
-        SCANNER_WINDOW_ON_TOP          = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ScannerWindowOnTop));
-
         /* CDDB */
         if (CDDB_LOCAL_PATH) g_free(CDDB_LOCAL_PATH);
         CDDB_LOCAL_PATH = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(CddbLocalPath)))));
@@ -437,18 +433,6 @@ Apply_Changes_Of_Preferences_Window (void)
         /* Parameters and variables of Scanner Window are in "scan.c" file */
         /* Parameters and variables of Cddb Window are in "cddb.c" file */
     }
-
-    /*
-     * Changes to apply to :
-     */
-    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);
-    }
-
 }
 
 /*
diff --git a/src/setting.h b/src/setting.h
index a19e2ee..eaf902d 100644
--- a/src/setting.h
+++ b/src/setting.h
@@ -91,7 +91,6 @@ gint    FTS_CONVERT_SPACE_INTO_UNDERSCORE;
 gint    RFS_CONVERT_UNDERSCORE_AND_P20_INTO_SPACE;
 gint    RFS_CONVERT_SPACE_INTO_UNDERSCORE;
 gint    RFS_REMOVE_SPACES;
-gint    SCANNER_WINDOW_ON_TOP;
 
 /* Scanner window */
 gint    PROCESS_FILENAME_FIELD;


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