Skip to content
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

Changing mmconfig form from Pashua to GTKDialog #274

Merged
merged 4 commits into from Nov 2, 2020
Merged

Changing mmconfig form from Pashua to GTKDialog #274

merged 4 commits into from Nov 2, 2020

Conversation

tinytomato
Copy link
Contributor

No description provided.

mmconfig Outdated

if EXIT="OK" ;
then GTK_OUTPUT="$(gtkdialog --program=MAIN_DIALOG | sort)"
echo "${GTK_OUTPUT}" | sed 's:VOLADJUSTY="true":VOLADJUST="Y":g'';''s:VOLADJUSTN="false"::g'';''s:VOLADJUSTN="true":VOLADJUST="N":g'';''s:VOLADJUSTY="false"::g'';''s:PREMIS_DBY="true":PREMIS_DB="Y":g'';''s:PREMIS_DBN="false"::g'';''s:PREMIS_DBN="true":PREMIS_DB="N":g'';''s:PREMIS_DBY="false"::g'';''s:EXIT="OK"::g'';' | sort > "${MM_CONFIG_FILE}"
Copy link
Collaborator

@dericed dericed Oct 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be

echo "${GTK_OUTPUT}" | sed 's:VOLADJUSTY="true":VOLADJUST="Y":g;s:VOLADJUST[YN]="false"::g;s:VOLADJUSTN="true":VOLADJUST="N":g;s:PREMIS_DBY="true":PREMIS_DB="Y":g;s:PREMIS_DB[YN]="false"::g;s:PREMIS_DBN="true":PREMIS_DB="N":g;s:EXIT="OK"::g' | sort > "${MM_CONFIG_FILE}"

mmconfig Outdated
ENTRY_LABEL="${2}"
ENTRY_WIDTH="${3}"
if [[ -n "${ENTRY_VAR_VALUE}" ]] ;
then ENTRY_DEFAULT="<default>${ENTRY_VAR_VALUE}</default>"
Copy link
Collaborator

@dericed dericed Oct 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest line breaks and spacing like

if [[ condition ]] ; then
   things
fi

mmconfig Outdated
LTO_INDEX_DIR.type = openbrowser
LTO_INDEX_DIR.label = Please navigate to and select the LTO_INDEX_DIR directory that you've created:
LTO_INDEX_DIR.width = 270
idth = 270
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also all the stuff below seems accidentally there

Copy link
Collaborator

@dericed dericed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments added

@dericed
Copy link
Collaborator

dericed commented Oct 5, 2020

If I run mmconfig and make edits and then hit "Cancel", I would expect the changes not to be saved but they are. The changes should only be saved if the gui is exited via the OK button.

cat << GTK_PART
<frame ${DIR_VAR_NAME}>
<hbox>
<entry accept="directory" fs-entry="Select a Directory">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be arranged so that they are wider? Currently they are so narrow that the full path is rarely seen, so I have to click in the box to move to the end to see what the path is.

mmconfig Outdated
</entry>
<button>
<input file stock="gtk-open"></input>
<variable>DIRBROWSE</variable>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this variable needed? It doesn't seem used.

mmconfig Outdated
$(funcDirectory LOCAL_MM_DIR)
</hbox>
</frame>
<frame>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a name to this frame like you do with the others

mmconfig Outdated
</text>
<vbox>
<radiobutton>
$(funcrdoCreate VOLADJUSTY "Y")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having the function close a node that was opened outside of that function is ... -_-

mmconfig Outdated

GTK_OUTPUT="$(gtkdialog --program=MAIN_DIALOG | sort)"
if [[ "$GTK_OUTPUT" == *'EXIT="OK"'* ]]; then
echo "${GTK_OUTPUT}" | sed 's:VOLADJUSTY="true":VOLADJUST="Y":g;s:VOLADJUST[YN]="false"::g;s:VOLADJUSTN="true":VOLADJUST="N":g;s:PREMIS_DBY="true":PREMIS_DB="Y":g;s:PREMIS_DB[YN]="false"::g;s:PREMIS_DBN="true":PREMIS_DB="N":g;s:EXIT="OK"::g' | sort > "${MM_CONFIG_FILE}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as noted maybe this sed can be cleaned up if some unneeded variables are set to not export out of gtk

Copy link
Collaborator

@dericed dericed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dericed dericed merged commit c9415b5 into master Nov 2, 2020
@dericed dericed deleted the mmconfig branch November 2, 2020 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants