"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "f.edit.cc" between
fotoxx-22.30.tar.gz and fotoxx-22.35.tar.gz

About: fotoxx is a program for photo editing and collection management.

f.edit.cc  (fotoxx-22.30):f.edit.cc  (fotoxx-22.35)
skipping to change at line 4330 skipping to change at line 4330
zdialog_stuff(zd,"totransp",attr.transp[2]); zdialog_stuff(zd,"totransp",attr.transp[2]);
zdialog_stuff(zd,"shtransp",attr.transp[3]); zdialog_stuff(zd,"shtransp",attr.transp[3]);
zdialog_stuff(zd,"towidth",attr.towidth); zdialog_stuff(zd,"towidth",attr.towidth);
zdialog_stuff(zd,"shwidth",attr.shwidth); zdialog_stuff(zd,"shwidth",attr.shwidth);
zdialog_stuff(zd,"shangle",attr.shangle); zdialog_stuff(zd,"shangle",attr.shangle);
return; return;
badfile: // project file had a problem badfile: // project file had a problem
fclose(fid); fclose(fid);
zmessageACK(Mwin,"text file is defective"); zmessageACK(Mwin,"text file is defective");
Plog(1,"buff: %s\n",buff); Plog(0,"buff: %s\n",buff);
} }
// save text and attributes from dialog to a file // save text and attributes from dialog to a file
void save_text(zdialog *zd) void save_text(zdialog *zd)
{ {
cchar *dialogtitle = "save text data to a file"; cchar *dialogtitle = "save text data to a file";
FILE *fid; FILE *fid;
char *file, text2[1200]; char *file, text2[1200];
textattr_t attr; textattr_t attr;
skipping to change at line 6908 skipping to change at line 6908
PIXBUF *pixbuf1; PIXBUF *pixbuf1;
GError *gerror = 0; GError *gerror = 0;
GdkWindow *gdkwin; GdkWindow *gdkwin;
int ww1, hh1, ww2, hh2; int ww1, hh1, ww2, hh2;
if (*RGB_chooser_file != '/') return 1; // load last color chooser file if (*RGB_chooser_file != '/') return 1; // load last color chooser file
pixbuf1 = gdk_pixbuf_new_from_file_at_size(RGB_chooser_file,500,500,&gerror); pixbuf1 = gdk_pixbuf_new_from_file_at_size(RGB_chooser_file,500,500,&gerror);
if (! pixbuf1) { if (! pixbuf1) {
Plog(1,"pixbuf error: %s \n",gerror->message); // popup message >> draw event loop Plog(0,"pixbuf error: %s \n",gerror->message); // popup message >> draw event loop
return 1; return 1;
} }
ww1 = gdk_pixbuf_get_width(pixbuf1); // image dimensions ww1 = gdk_pixbuf_get_width(pixbuf1); // image dimensions
hh1 = gdk_pixbuf_get_height(pixbuf1); hh1 = gdk_pixbuf_get_height(pixbuf1);
gdkwin = gtk_widget_get_window(widget); // set drawing area to match gdkwin = gtk_widget_get_window(widget); // set drawing area to match
ww2 = gdk_window_get_width(gdkwin); // aspect ratio ww2 = gdk_window_get_width(gdkwin); // aspect ratio
hh2 = ww2 * hh1 / ww1; hh2 = ww2 * hh1 / ww1;
gtk_widget_set_size_request(widget,-1,hh2); gtk_widget_set_size_request(widget,-1,hh2);
skipping to change at line 8992 skipping to change at line 8992
popup_plugmenu = create_popmenu(); // create popup menu for plugins popup_plugmenu = create_popmenu(); // create popup menu for plugins
add_popmenu_item(popup_plugmenu, "Edit Plugins", // 1st entry is Edit Plugins add_popmenu_item(popup_plugmenu, "Edit Plugins", // 1st entry is Edit Plugins
m_edit_plugins, 0, "Edit plugins menu"); m_edit_plugins, 0, "Edit plugins menu");
for (ii = 0; ii < Nplugins; ii++) // add the plugin menu functions for (ii = 0; ii < Nplugins; ii++) // add the plugin menu functions
{ {
char *pp = strstr(plugins[ii]," = "); char *pp = strstr(plugins[ii]," = ");
if (! pp) { if (! pp) {
Plog(1,"plugin bad format: %s \n",plugins[ii]); Plog(0,"plugin bad format: %s \n",plugins[ii]);
continue; continue;
} }
*pp = 0; *pp = 0;
add_popmenu_item(popup_plugmenu, plugins[ii], m_run_plugin, 0, add_popmenu_item(popup_plugmenu, plugins[ii], m_run_plugin, 0,
"Run as Fotoxx edit function"); "Run as Fotoxx edit function");
*pp = ' '; *pp = ' ';
} }
popup_menu(Mwin,popup_plugmenu); // popup the menu popup_menu(Mwin,popup_plugmenu); // popup the menu
skipping to change at line 9019 skipping to change at line 9019
// edit the plugins file in /home/<user>/.fotoxx/plugins // edit the plugins file in /home/<user>/.fotoxx/plugins
void m_edit_plugins(GtkWidget *, cchar *) void m_edit_plugins(GtkWidget *, cchar *)
{ {
F1_help_topic = "plugins"; F1_help_topic = "plugins";
Plog(1,"m_edit_plugins \n"); Plog(1,"m_edit_plugins \n");
if (FGWM != 'F' && FGWM != 'G') return; if (FGWM != 'F' && FGWM != 'G') return;
zshell(0,"xdg-open %s/plugins",get_zhomedir()); zshell("ack","xdg-open %s/plugins",get_zhomedir());
return; return;
} }
/******************************************************************************* */ /******************************************************************************* */
// process plugin menu selection // process plugin menu selection
// execute corresponding command using current image file // execute corresponding command using current image file
void m_run_plugin(GtkWidget *, cchar *menu) void m_run_plugin(GtkWidget *, cchar *menu)
{ {
skipping to change at line 9086 skipping to change at line 9086
err = PXM_save(E1pxm,pluginfile,8,100,1); // E1 >> plugin_file err = PXM_save(E1pxm,pluginfile,8,100,1); // E1 >> plugin_file
if (err) goto FAIL; if (err) goto FAIL;
zd = zmessage_post(Mwin,"20/20",0,"Plugin working ..."); zd = zmessage_post(Mwin,"20/20",0,"Plugin working ...");
repl_1str(plugincommand,command,"%s",pluginfile); // command filename repl_1str(plugincommand,command,"%s",pluginfile); // command filename
if (! regfile(pluginfile,&statB)) goto FAIL; // image file mod time if (! regfile(pluginfile,&statB)) goto FAIL; // image file mod time
modtime1 = statB.st_mtime; modtime1 = statB.st_mtime;
err = zshell("log",command); err = zshell("log ack",command);
// execute plugin command // execute plugin command
if (err) { if (err) goto FAIL;
zmessageACK(Mwin,"command: %s \n status: %s",command,strerror(err));
goto FAIL;
}
if (! regfile(pluginfile,&statB)) goto FAIL; // check if new file made if (! regfile(pluginfile,&statB)) goto FAIL; // check if new file made
modtime2 = statB.st_mtime; modtime2 = statB.st_mtime;
if (modtime2 == modtime1) { if (modtime2 == modtime1) {
zmessageACK(Mwin,"no changes made"); zmessageACK(Mwin,"no changes made");
goto FAIL; goto FAIL;
} }
pxmtemp = TIFF_PXM_load(pluginfile); // read command output file pxmtemp = TIFF_PXM_load(pluginfile); // read command output file
if (! pxmtemp) { if (! pxmtemp) {
 End of changes. 5 change blocks. 
10 lines changed or deleted 7 lines changed or added

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