"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gtk/file/gamgi_gtk_file_chooser.c" between
gamgi-all-0.17.4x.tar.gz and gamgi-all-0.17.5x.tar.gz

About: GAMGI (General Atomistic Modelling Graphic Interface) is a program to build, view, and analyze atomic strucures such as molecules, crystals, glasses, liquids, etc. (tarball using only the GLX library).

gamgi_gtk_file_chooser.c  (gamgi-all-0.17.4x):gamgi_gtk_file_chooser.c  (gamgi-all-0.17.5x)
skipping to change at line 137 skipping to change at line 137
GtkTreeIter iter; GtkTreeIter iter;
DIR *directory; DIR *directory;
struct dirent *child; struct dirent *child;
char pathname[GAMGI_IO_PATHNAME]; char pathname[GAMGI_IO_PATHNAME];
int length; int length;
/***************************************************** /*****************************************************
* path < GAMGI_IO_PATHNAME, otherwise ignore excess * * path < GAMGI_IO_PATHNAME, otherwise ignore excess *
*****************************************************/ *****************************************************/
strncpy (pathname, path, GAMGI_IO_PATHNAME - 1); gamgi_io_token_cut (path, pathname, GAMGI_IO_PATHNAME);
length = strlen (pathname); length = strlen (pathname);
/**************************************** /****************************************
* block signal connected to treeview * * block signal connected to treeview *
* changes to avoid reentrant callbacks * * changes to avoid reentrant callbacks *
****************************************/ ****************************************/
treeview = (GtkWidget *) g_object_get_data (G_OBJECT (dialog), "tree_folders"); treeview = (GtkWidget *) g_object_get_data (G_OBJECT (dialog), "tree_folders");
g_signal_handlers_block_by_func (treeview, static_select_folders, window); g_signal_handlers_block_by_func (treeview, static_select_folders, window);
skipping to change at line 172 skipping to change at line 172
while ((child = readdir (directory)) != NULL) while ((child = readdir (directory)) != NULL)
{ {
if (strcmp (child->d_name, ".") == 0 || strcmp (child->d_name, "..") == 0) if (strcmp (child->d_name, ".") == 0 || strcmp (child->d_name, "..") == 0)
continue; continue;
/********************************************************************* /*********************************************************************
* path + child->d_name < GAMGI_IO_PATHNAME, otherwise ignore excess * * path + child->d_name < GAMGI_IO_PATHNAME, otherwise ignore excess *
*********************************************************************/ *********************************************************************/
strncpy (pathname + length, child->d_name, GAMGI_IO_PATHNAME - length - 1); gamgi_io_token_cut (child->d_name, pathname + length, GAMGI_IO_PATHNAME - le ngth);
if (static_dir (pathname) == TRUE) if (static_dir (pathname) == TRUE)
{ {
if (static_hide_folders (child->d_name, window) == TRUE) continue; if (static_hide_folders (child->d_name, window) == TRUE) continue;
if (static_show_folders (child->d_name, window) == FALSE) continue; if (static_show_folders (child->d_name, window) == FALSE) continue;
gtk_list_store_append (store, &iter); gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, child->d_name, -1); gtk_list_store_set (store, &iter, 0, child->d_name, -1);
} }
} }
skipping to change at line 230 skipping to change at line 230
GtkTreeIter iter; GtkTreeIter iter;
DIR *directory; DIR *directory;
struct dirent *child; struct dirent *child;
char fullname[GAMGI_IO_FULLNAME]; char fullname[GAMGI_IO_FULLNAME];
int length; int length;
/***************************************************** /*****************************************************
* path < GAMGI_IO_PATHNAME, otherwise ignore excess * * path < GAMGI_IO_PATHNAME, otherwise ignore excess *
*****************************************************/ *****************************************************/
strncpy (fullname, path, GAMGI_IO_PATHNAME - 1); gamgi_io_token_cut (path, fullname, GAMGI_IO_PATHNAME);
length = strlen (fullname); length = strlen (fullname);
/********************* /*********************
* build store model * * build store model *
*********************/ *********************/
store = gtk_list_store_new (1, G_TYPE_STRING); store = gtk_list_store_new (1, G_TYPE_STRING);
directory = opendir (path); directory = opendir (path);
if (directory != NULL) if (directory != NULL)
skipping to change at line 253 skipping to change at line 253
{ {
if (strcmp (child->d_name, ".") == 0 || strcmp (child->d_name, "..") == 0) if (strcmp (child->d_name, ".") == 0 || strcmp (child->d_name, "..") == 0)
continue; continue;
/*********************************************************************** /***********************************************************************
* child->d_name < GAMGI_IO_SHORTNAME, otherwise ignore excess * * child->d_name < GAMGI_IO_SHORTNAME, otherwise ignore excess *
* * * *
* GAMGI_IO_FULLNAME must be >= GAMGI_IO_PATHNAME + GAMGI_IO_SHORTNAME * * GAMGI_IO_FULLNAME must be >= GAMGI_IO_PATHNAME + GAMGI_IO_SHORTNAME *
***********************************************************************/ ***********************************************************************/
strncpy (fullname + length, child->d_name, GAMGI_IO_SHORTNAME - 1); gamgi_io_token_cut (child->d_name, fullname + length, GAMGI_IO_SHORTNAME);
if (static_dir (fullname) == FALSE) if (static_dir (fullname) == FALSE)
{ {
if (static_hide_files (child->d_name, window) == TRUE) continue; if (static_hide_files (child->d_name, window) == TRUE) continue;
if (static_show_files (child->d_name, window) == FALSE) continue; if (static_show_files (child->d_name, window) == FALSE) continue;
gtk_list_store_append (store, &iter); gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, child->d_name, -1); gtk_list_store_set (store, &iter, 0, child->d_name, -1);
} }
} }
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)