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
This commit is contained in:
Mike Fleetwood 2019-03-31 18:16:57 +01:00 committed by Curtis Gedak
parent 707aaea56f
commit 68cdfe99d9
2 changed files with 5 additions and 3 deletions

View File

@ -92,9 +92,6 @@ GParted_Core::GParted_Core()
flag = ped_partition_flag_next( flag ) ) flag = ped_partition_flag_next( flag ) )
flags .push_back( 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(); find_supported_core();
//initialize file system list //initialize file system list

View File

@ -20,6 +20,8 @@
#include <glibmm.h> #include <glibmm.h>
#include <gtkmm/messagedialog.h> #include <gtkmm/messagedialog.h>
#include <gtkmm/main.h> #include <gtkmm/main.h>
#include <iostream>
int main( int argc, char *argv[] ) int main( int argc, char *argv[] )
{ {
@ -35,6 +37,9 @@ int main( int argc, char *argv[] )
bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" ) ; bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" ) ;
textdomain( GETTEXT_PACKAGE ) ; 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 //check UID
if ( getuid() != 0 ) if ( getuid() != 0 )
{ {