lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.28k stars 161 forks source link

Make title_max_length_flag a combo to specify how to trim title #312

Closed tombriden closed 6 years ago

tombriden commented 7 years ago

The options being

Personally, I prefer to trim the end off the command as the tabs are generally tmux sessions with the session name at the start of the title. This change allows for that, or either of the existing options

lanoxx commented 6 years ago

Thank you very much for sending this patch. I am willing to merge this change but I noticed some issues which need to be fixed first.

  1. Due to the fact, that you are changing the configuration option from bool to int all previous configuration files will become invalid. Please change the patch such that the old option is deprecated but not invalid and introduce a different option name (for example 'title_max_length_behavior', or 'title_max_length_option').

  2. I would prefer if you could split the dropdown and the text entry into two separate options each with a corresponding label. For example it could look like this:

    Title behavior: [ <dropdown options> ]
    Title length:   [ <number>           ]

    Feel free to experiment a bit with the positioning of the widgets to save some space. I also just noticed that the code is using gtk_editable_set_editable to disable editing, but I think it would make more sense to set the sensitive value of the GtkWidget to false using gtk_widget_set_sensitive, since that will grey-out the whole widget when its not enabled.

tombriden commented 6 years ago

Thanks for the feedback, I've re-pushed having applied your suggestions

lanoxx commented 6 years ago

Perfect. Good work.