-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extensions #39
Extensions #39
Conversation
Shortcuts for main menu commands added, including Del for delete and Ins for colour editor, as well as about dialog with clickable URL link and text in model window reporting number of selected atoms (when non-zero).
Hello, Thank you for your contribution! Unfortunately, I can't review it right now. Anyway, I will review the changes tomorrow or later this week only, sorry for the delay. Best, |
Hi!
Sorry about that. The problem is that gui_main.c is in DOS format (carriage return and line feed line endings) whereas my gui_main.c is in unix/linux format (like all the other text files). It's probably better to have all files in the same format.
The only coding changes to gui_main.c are as follows:
< /* can we assoc. with a single atom */
---
/* can we assoc. with a single atom? */
757c757
< /* setup cell renderers */
---
/* set up cell renderers */
878c878
< /* setup the text rendering colum */
---
/* set up the text rendering colum */
887c887
< /* setup the selection handler */
---
/* set up the selection handler */
1332,1338c1332,1338
< /*
< { "/File/_New", NULL, create_new_model, 1, NULL },
< { "/File/sep1", NULL, NULL, 0, "<Separator>" },
< */
< { "/File/_Open...", NULL, file_load_dialog, 1, NULL },
< { "/File/_Save...", NULL, file_save_dialog, 1, NULL },
< { "/File/_Close", NULL, tree_select_delete, 1, NULL },
---
{ "/File/_New", "<CTRL>N", edit_model_create, 1, NULL },
/* { "/File/sep1", NULL, NULL, 0, "<Separator>" }, */
{ "/File/_Open...", "<CTRL>O", file_load_dialog, 1, NULL },
{ "/File/_Save...", "<CTRL>S", file_save_dialog, 1, NULL },
{ "/File/_Close", "<CTRL>W", tree_select_delete, 1, NULL },
1351c1351
< { "/File/_Quit", NULL, gdis_exit_test, 0, NULL },
---
{ "/File/_Quit", "<CTRL>Q", gdis_exit_test, 0, NULL },
1354,1359c1354,1356
< { "/Edit/_Copy", NULL, select_copy, 0, NULL },
< { "/Edit/_Paste", NULL, select_paste, 0, NULL },
< { "/Edit/sep1", NULL, NULL, 0, "<Separator>" },
<
< { "/Edit/Delete", NULL, select_delete, 0, NULL },
< { "/Edit/Undo", NULL, undo_active, 0, NULL },
---
{ "/Edit/Undo", "<CTRL>Z", undo_active, 0, NULL },
{ "/Edit/_Copy", "<CTRL>C", select_copy, 0, NULL },
{ "/Edit/_Paste", "<CTRL>V", select_paste, 0, NULL },
1364,1365d1360
< { "/Edit/Hide", NULL, select_hide, 0, NULL },
< { "/Edit/Unhide all", NULL, unhide_atoms, 0, NULL },
1367,1368c1362,1367
< { "/Edit/Select all", NULL, select_all, 0, NULL },
< { "/Edit/Invert", NULL, select_invert, 0, NULL },
---
{ "/Edit/Delete selected", NULL, select_delete, 0, NULL },
{ "/Edit/Select all", "<CTRL>A", select_all, 0, NULL },
{ "/Edit/Invert selection", "<CTRL>I", select_invert, 0, NULL },
{ "/Edit/Hide selected", "<CTRL>H", select_hide, 0, NULL },
{ "/Edit/Hide unselected", "<CTRL>U", unselect_hide, 0, NULL },
{ "/Edit/Unhide all", NULL, unhide_atoms, 0, NULL },
1377c1376
< { "/Tools/Building/Editing...", NULL, gui_edit_dialog, 0, NULL },
---
{ "/Tools/Building/Editing...", "<CTRL>E", gui_edit_dialog, 0, NULL },
1399c1398
< { "/View/Display properties...", NULL, gui_render_dialog, 0, NULL},
---
{ "/View/Display properties...", "<CTRL>D", gui_render_dialog, 0, NULL},
1417,1419c1416,1418
< /*
< { "/Help/About...", NULL, gui_help_dialog, 0, NULL},
< */
---
{ "/Help/About...", NULL, gui_about_dialog, 0, NULL},
1427a1427,1438
#ifdef UNUSED_BUT_SET
GdkModifierType state;
state = (GdkModifierType) event->state;
if ((state & GDK_CONTROL_MASK))
ctrl = TRUE;
if ((state & GDK_MOD1_MASK))
alt = TRUE;
#endif
1430c1441
< /* selection delete */
---
/* colour settings */
1432c1443
< undo_active();
---
select_colour();
1476a1488,1497
/* about dialog */
case GDK_F9:
gui_about_dialog();
break;
/* manual */
case GDK_F12:
gui_help_dialog();
break;
1477a1499
1735,1737c1757,1759
< /*********************************/
< /* setup the active model widget */
< /*********************************/
---
/**********************************/
/* set up the active model widget */
/**********************************/
1810a1833
GtkAccelGroup *accel;
1816a1840,1842
/* Make an accelerator group (shortcut keys) */
accel = gtk_accel_group_new();
1856c1882
< item = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", NULL);
---
item = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel);
1858a1885
gtk_window_add_accel_group(GTK_WINDOW (window), accel);
2015c2042
< /* model geomtry */
---
/* model geometry */
2266c2293
< text = g_strdup_printf("This is free software, distributed under the terms of the GNU public license (GPL).\nFor more information visit http://www.gnu.org\n");
---
text = g_strdup_printf("This is free software, distributed under the terms of the GNU public license (GPL).\nFor more information visit http://www.gnu.org/\n");
Regards,
Craig
…________________________________
差出人: Okadome Valencia ***@***.***>
送信日時: 2021年6月6日 19:42
宛先: arohl/gdis ***@***.***>
CC: クレイグ・フィッシャー ***@***.***>; Author ***@***.***>
件名: Re: [arohl/gdis] Extensions (#39)
Hello,
Thank you for your contribution!
Unfortunately, I can't review it right now.
But there seems to be a problem in the commit 52818f0<52818f0>
Did you by any chance delete the file gui_main.c and then copy it again (possibly from another system)?
It seems to me that this commit is suspiciously big as the whole gui_main.c file is changed and I can't see any reason for that.
Anyway, I will review the changes tomorrow or later this week only, sorry for the delay.
Best,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#39 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AP5N32AY3DLFR24ZPOXB2TDTRNGH5ANCNFSM46FUST2A>.
|
No idea when/how that happened but I can confirm that file does have DOS line breaks |
Hello, I'm finally back to GDIS after a few very long days ^^'
But I'm gonna take care of it later: it is a bug in the error hadling that would very unlikely impact any user. Best, |
Add menu shortcuts (including DEL for selection delete and INS for colour editor, no. of selected atoms info display in upper righthand corner of model window, and About dialog with clickable link.