@@ -87,9 +87,9 @@ void setMimeTypesList(char *filepath)
8787 {
8888 listit.label =strdup (buffer);
8989 listit.imageType =NOTHUMB;
90- if (listit.label [strlen ( listit.label )-1 ]==' ;' )
91- listit.label [strlen ( listit.label )-1 ]=0 ;
92- char *ptr=strchr (listit.label ,' =' );
90+ if (listit.label [listit.label . length ( )-1 ]==' ;' )
91+ listit.label [listit.label . length ( )-1 ]=0 ;
92+ char *ptr=strchr (( char *) listit.label . c_str () ,' =' );
9393 *ptr=0 ;
9494 ptr++;
9595 listit.userData =ptr;
@@ -137,10 +137,10 @@ void reWriteMimeFile(void)
137137 {
138138 if (j!=mimeList->currentItem )
139139 {
140- ptr=mimeList->listDataArray ->at (j).label ;
141- ptr+=strlen ( mimeList->listDataArray ->at (j).label );
140+ ptr=( char *) mimeList->listDataArray ->at (j).label . c_str () ;
141+ ptr+=mimeList->listDataArray ->at (j).label . length ( );
142142 ptr++;
143- fprintf (file," %s=%s;\n " ,mimeList->listDataArray ->at (j).label ,ptr);
143+ fprintf (file," %s=%s;\n " ,mimeList->listDataArray ->at (j).label . c_str () ,ptr);
144144 }
145145 }
146146
@@ -175,10 +175,10 @@ bool doUpdate(void *p,void* ud)
175175 }
176176 else
177177 {
178- ptr=mimeList->listDataArray ->at (j).label ;
179- ptr+=strlen ( mimeList->listDataArray ->at (j).label );
178+ ptr=( char *) mimeList->listDataArray ->at (j).label . c_str () ;
179+ ptr+=mimeList->listDataArray ->at (j).label . length ( );
180180 ptr++;
181- fprintf (file," %s=%s;\n " ,mimeList->listDataArray ->at (j).label ,ptr);
181+ fprintf (file," %s=%s;\n " ,mimeList->listDataArray ->at (j).label . c_str () ,ptr);
182182 }
183183 }
184184 fprintf (file," %s=%s.desktop;\n " ,editLine->LFSTK_getCStr (),appLine->LFSTK_getCStr ());
@@ -199,7 +199,7 @@ bool doUpdate(void *p,void* ud)
199199bool doInsert (void *p,void * ud)
200200{
201201 char *command;
202- const char *data=mimeList->listDataArray ->at (mimeList->currentItem ).label ;
202+ const char *data=mimeList->listDataArray ->at (mimeList->currentItem ).label . c_str () ;
203203
204204 asprintf (&command," sed -i 's@\\ (%s.*\\ )@\\ 1\\ n%s=Custom.desktop@' \" %s\" " ,data,data,mimeTypesFile);
205205 system (command);
@@ -234,7 +234,7 @@ bool doDelete(void *p,void* ud)
234234bool doApply (void *p,void * ud)
235235{
236236 char *command;
237- const char *data=mimeList->listDataArray ->at (mimeList->currentItem ).label ;
237+ const char *data=mimeList->listDataArray ->at (mimeList->currentItem ).label . c_str () ;
238238
239239 asprintf (&command," cp \" %s\" \" %s/.config\" " ,mimeTypesFile,getenv (" HOME" ));
240240 system (command);
0 commit comments