ThierryHFR / scangearmp2

This project is a sane backend for the canon's scanner, based on the source code of scangearmp2.
Other
80 stars 17 forks source link

Default paper format #24

Closed j1schmid closed 3 years ago

j1schmid commented 4 years ago

So far the default paperformat is selected according to the variable LANG. Wouldn't it be more reasonable to use the variable LC_PAPER. This would lead to the patch:

diff --git a/scangearmp2/src/mainui.c b/scangearmp2/src/mainui.c
index 31d50cf..b08d81b 100755
--- a/scangearmp2/src/mainui.c
+++ b/scangearmp2/src/mainui.c
@@ -106,7 +106,7 @@ static int ui_main_is_en_US( void )
 #ifdef USE_PO_LOCALE
        env_locale = _( "Locale" );
 #else
-       if( ( env_locale = (char *)getenv( "LANG" ) ) == NULL ){
+       if( ( env_locale = (char *)getenv( "LC_PAPER" ) ) == NULL ){
                env_locale = "";
        }
        env_locale = (char *)strsep( &env_locale, "." );
ThierryHFR commented 3 years ago

Hi, I had little time, I just looked at your patch. My Git concerns the support of canon drivers by sane. So I made some modifications. Support for different resolutions (this is not the case for scangearmp2, only 300 resolution is used). Possibility to adjust the scan size according to the device used. Added ADF support.

ThierryHFR commented 3 years ago

If you offer me a "pull-request", I would merge it!

j1schmid commented 3 years ago

I do not understand all of the comment:

Hi, I had little time, I just looked at your patch. My Git concerns the support of canon drivers by sane. So I made some modifications. Support for different resolutions (this is not the case for scangearmp2, only 300 resolution is used). Possibility to adjust the scan size according to the device used. Added ADF support.

Is there possibly something mixed up with pull request #31 ?

However. For sure I can offer a pull request, but so far I do not have the permissions to create a new branch or push something.

ThierryHFR commented 3 years ago

I have completed the features offered by the canon_pixma backend. Among these features :

To test these features use xsane. I will merge the "pull-request" #31 after testing. After the holidays...

To propose a "pull-request", you have to clone the project. Apply your modification and propose it to me. The web interface allows these actions.

j1schmid commented 3 years ago

Thanks for your advice regarding "pull-request".

I created the "pull-request" #34 where the default paper size is chosen according to the locale environment variable LC_PAPER.

ThierryHFR commented 3 years ago

Fixed by #34