[gparted] Print new info before "Root privileges are required ..." dialog (!34)



commit 68cdfe99d98527d73cb4053214804351cdc2ba02
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Mar 31 18:16:57 2019 +0100

    Print new info before "Root privileges are required ..." dialog (!34)
    
    So that the new version and configuration information is displayed even
    if the gpartedbin executable is run as a non-root user.  To help with
    diagnosing root authorisation issues with the gparted shell wrapper
    script.
    
    Closes !34 - Display more version and configuration information

 src/GParted_Core.cc | 3 ---
 src/main.cc         | 5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 74e15c74..0e51a254 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -92,9 +92,6 @@ GParted_Core::GParted_Core()
              flag = ped_partition_flag_next( flag ) )
                flags .push_back( flag ) ;
 
-       // Display version and configuration info when starting for command line users.
-       std::cout << get_version_and_config_string() << std::endl;
-
        find_supported_core();
 
        //initialize file system list
diff --git a/src/main.cc b/src/main.cc
index 2c37ec99..91478db5 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -20,6 +20,8 @@
 #include <glibmm.h>
 #include <gtkmm/messagedialog.h>
 #include <gtkmm/main.h>
+#include <iostream>
+
 
 int main( int argc, char *argv[] )
 {
@@ -35,6 +37,9 @@ int main( int argc, char *argv[] )
        bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" ) ;
        textdomain( GETTEXT_PACKAGE ) ;
 
+       // Display version and configuration info when starting for command line users.
+       std::cout << GParted::GParted_Core::get_version_and_config_string() << std::endl;
+
        //check UID
        if ( getuid() != 0 )
        {


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