/[gtktalog]/gtktalog/src/config_parse.y
ViewVC logotype

Diff of /gtktalog/src/config_parse.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by chevdor, Tue Oct 28 22:34:47 2003 UTC revision 1.11 by chevdor, Wed Oct 29 23:38:52 2003 UTC
# Line 295  one_line:      line_ADDEXTICON EOL                                     { $$ = Line 295  one_line:      line_ADDEXTICON EOL                                     { $$ =
295                  | line_DBCLICKFORINFO EOL                               { $$ = $1; }                  | line_DBCLICKFORINFO EOL                               { $$ = $1; }
296                  | line_DISPLAYDIRSIZE EOL                               { $$ = $1; }                  | line_DISPLAYDIRSIZE EOL                               { $$ = $1; }
297                  | line_DATEFORMAT EOL                                   { $$ = $1; }                  | line_DATEFORMAT EOL                                   { $$ = $1; }
298                  | line_SIZEFORMAT EOL                                   { $$ = $1; }           | line_SIZEFORMAT EOL                       { $$ = $1; }
299                  | line_RECENTFILE EOL                                   { $$ = $1; }           | line_RECENTFILE EOL                                       { $$ = $1; }
300                  | line_RECENTFILESMAX EOL                               { $$ = $1; }           | line_RECENTFILESMAX EOL                              { $$ = $1; }
301                  | line_PREVIOUSSEARCHMODE EOL                           { $$ = $1; }                  | line_PREVIOUSSEARCHMODE EOL                           { $$ = $1; }
302                  | line_SAVEONLYUSEDCATEGORIES EOL                       { $$ = $1; }                  | line_SAVEONLYUSEDCATEGORIES EOL                       { $$ = $1; }
303                  | line_MAINWINDOWPOSITION EOL                           { $$ = $1; }                  | line_MAINWINDOWPOSITION EOL                           { $$ = $1; }
# Line 311  one_line:      line_ADDEXTICON EOL                                     { $$ = Line 311  one_line:      line_ADDEXTICON EOL                                     { $$ =
311                  | line_TOOLBARSTYLE EOL                                 { $$ = $1; }                  | line_TOOLBARSTYLE EOL                                 { $$ = $1; }
312                  | line_NEWSEARCHTYPE EOL                                { $$ = $1; }                  | line_NEWSEARCHTYPE EOL                                { $$ = $1; }
313                  | line_WORKINGPATH EOL                                  { $$ = $1; }                  | line_WORKINGPATH EOL                                  { $$ = $1; }
314                  | line_DISPLAYSPLASH EOL                                { $$ = $1; }           | line_DISPLAYSPLASH EOL                               { $$ = $1; }
315                  | EOL                                                   { $$ = NULL;}                  | EOL                                                   { $$ = NULL;}
316                  ;                  ;
317    
# Line 1267  init_config (GtkWidget * w) Line 1267  init_config (GtkWidget * w)
1267    gchar *path;    gchar *path;
1268    GString *tmpstr;    GString *tmpstr;
1269    
1270    mime_type_to_skip_t* mime_type_to_skip;    MIME_EXTENSIONS* mime_type_to_skip;
1271    vfs_t * vfs_struct;    MIME_VFS_EXTENSIONS* mime_vfs_extension;
1272      
1273    conf_file = g_string_new (g_get_home_dir ());    conf_file = g_string_new (g_get_home_dir ());
1274    conf_file =    conf_file =
1275      g_string_append (conf_file, USER_CONFIG_DIR "/" USER_CONFIG_FILE);      g_string_append (conf_file, USER_CONFIG_DIR "/" USER_CONFIG_FILE);
# Line 1304  init_config (GtkWidget * w) Line 1304  init_config (GtkWidget * w)
1304        my_config->use_supermount = FALSE;        my_config->use_supermount = FALSE;
1305        my_config->mount_retry = 0;        my_config->mount_retry = 0;
1306        my_config->mime_extensions = g_tree_new ((GCompareFunc) strcmp);        my_config->mime_extensions = g_tree_new ((GCompareFunc) strcmp);
1307        my_config->mime_vfs_extensions = g_tree_new ((GCompareFunc) strcmp);        my_config->mime_vfs_extensions = NULL;
1308        my_config->mime_to_skip_during_a_scan = NULL;        my_config->mime_to_skip_during_a_scan = NULL;
       my_config->vfs_list = NULL;  
1309        my_config->use_du_s = TRUE;        my_config->use_du_s = TRUE;
1310        my_config->warn_mount = FALSE;        my_config->warn_mount = FALSE;
1311        my_config->eject_disk = TRUE;        my_config->eject_disk = TRUE;
# Line 1484  init_config (GtkWidget * w) Line 1483  init_config (GtkWidget * w)
1483              }              }
1484            else if (IS_TOKEN ("DefaultVfsIcon"))            else if (IS_TOKEN ("DefaultVfsIcon"))
1485              {              {
          // WK: LWH  
           
1486                 gs = GET_TOKEN;                 gs = GET_TOKEN;
1487                 my_config->default_vfs_pix = new_pix_from_filename (w, style,                 my_config->default_vfs_pix = new_pix_from_filename (w, style,
1488                                         (path =                                         (path =
1489                                                                     g_strdup                                                                     g_strdup
1490                                                                     (gs->str)),                                                                     (gs->str)),
1491                                         my_config);                                         my_config);
                 
                //gl2 = g_list_next (gs);  
   
                //vfs_struct=g_new(vfs_t, 1);  
                //vfs_struct->state     = (gboolean)gl2->data;  
                //vfs_struct->file_type = g_strdup (((GString*) (gl2->data))->str);  
   
                //g_print("VFS : %d",(gboolean)gs->data);  
                //my_config->vfs_list=g_list_append(my_config->vfs_list, vfs_struct);  
1492    
1493                 g_string_free (gs, TRUE);                 g_string_free (gs, TRUE);
                //g_string_free(gl2,TRUE);  
1494                 NEXT_TOKEN;                 NEXT_TOKEN;
1495              }              }
1496            else if (IS_TOKEN ("DefaultOpenedDirIcon"))            else if (IS_TOKEN ("DefaultOpenedDirIcon"))
# Line 1679  init_config (GtkWidget * w) Line 1666  init_config (GtkWidget * w)
1666            else if (IS_TOKEN ("VfsExtension"))            else if (IS_TOKEN ("VfsExtension"))
1667              {              {
1668                gs = GET_TOKEN;                gs = GET_TOKEN;
1669                mime = ((MIME_VFS_EXTENSIONS              // LWH
1670                         *) ((KEY_VALUE *) gs)->value)->mime->str;  
1671                if (mime)  /*** FOR INFO
1672                  {    GString *mime;   GString *prog;   GString *args;   GString *separator;   gint date;  GString *date_format;      gint size;   gint name;   LAST_COLUMN last_column;   gboolean state;
1673                    if (g_tree_lookup (my_config->mime_vfs_extensions, mime))  }*/
1674                      {           mime_vfs_extension                    = g_new(MIME_VFS_EXTENSIONS, 1);
1675                        MIME_VFS_EXTENSIONS *m = ((KEY_VALUE *) gs)->value;           mime_vfs_extension->mime          = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->mime->str;
1676                        g_string_free (m->mime, TRUE);           mime_vfs_extension->prog           = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->prog->str;
1677                        g_string_free (m->prog, TRUE);           mime_vfs_extension->args           = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->args->str;
1678                        g_string_free (m->args, TRUE);           mime_vfs_extension->separator    = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->separator->str;
1679                        g_string_free (m->separator, TRUE);           mime_vfs_extension->date           = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->date;
1680                        g_string_free (m->date_format, TRUE);           mime_vfs_extension->date_format = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->date_format->str;
1681                        g_free (m);           mime_vfs_extension->size            = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->size;
1682                      }           mime_vfs_extension->name          = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->name;
1683                    else           mime_vfs_extension->state           = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->state;
1684                      {          
1685                        g_tree_insert (my_config->mime_vfs_extensions, mime,           my_config->mime_vfs_extensions= g_list_append(my_config->mime_vfs_extensions, mime_vfs_extension);
1686                                       ((KEY_VALUE *) gs)->value);  
1687                        g_free (gs);           g_print("VFS : \n     %s\n     %s\n     %s\n     %s\n", ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->mime->str,
1688                      }           ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->prog->str,
1689                  }           ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->args->str,
1690             ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->separator->str);
1691    
1692             //mime = ((MIME_VFS_EXTENSIONS*) ((KEY_VALUE *) gs)->value)->mime->str;
1693                 // if (mime)
1694                    //{
1695                    //  if (g_tree_lookup (my_config->mime_vfs_extensions, mime))
1696                     //   {
1697                     //     MIME_VFS_EXTENSIONS *m = ((KEY_VALUE *) gs)->value;
1698                     //     g_string_free (m->mime, TRUE);
1699                     //     g_string_free (m->prog, TRUE);
1700                     //     g_string_free (m->args, TRUE);
1701                     //     g_string_free (m->separator, TRUE);
1702                     //     g_string_free (m->date_format, TRUE);
1703                     //     g_free (m);
1704                     //   }
1705                     // else
1706                     //   {
1707                     //     g_tree_insert (my_config->mime_vfs_extensions, mime,
1708                 //                      ((KEY_VALUE *) gs)->value);
1709                    //      g_free (gs);
1710                    //    }
1711                    //}
1712    
1713             g_free (gs);
1714                NEXT_TOKEN;                NEXT_TOKEN;
1715              }              }
1716            else if (IS_TOKEN ("AddMIMEToSkip"))            else if (IS_TOKEN ("AddMIMEToSkip"))
1717              {              {
1718                // WK: This section fills up the glist that contains the mime_type_to_skip data                // WK: This section fills up the glist that contains the mime_type_to_skip data
1719    
1720                gl1 = GET_TOKEN;                gl1 = GET_TOKEN;
1721                gl2 = g_list_next (gl1);                gl2 = g_list_next (gl1);
1722                  
1723                mime_type_to_skip=g_new(mime_type_to_skip_t, 1);                mime_type_to_skip=g_new(MIME_EXTENSIONS, 1);
1724                mime_type_to_skip->state     = (gboolean)gl2->data;                mime_type_to_skip->state     = (gboolean)gl2->data;
1725                mime_type_to_skip->mime_type = g_strdup (((GString*) (gl1->data))->str);                mime_type_to_skip->mime = g_strdup (((GString*) (gl1->data))->str);
1726    
1727                my_config->mime_to_skip_during_a_scan=                my_config->mime_to_skip_during_a_scan=
1728            g_list_append(my_config->mime_to_skip_during_a_scan,            g_list_append(my_config->mime_to_skip_during_a_scan,

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26