Menu

#28 Highlight satellites within range in the list view

1.4
open
5
2013-02-04
2011-02-01
No

Received this from Jaime Robles, EA4TV, requesting a way to highlight the satellites that are within range. Original request was to use a different color; however, using custom colors may not be a good idea since they are likely to break compatibility with desktop themes. We could use bold or emphasized font instead.

Discussion

  • Charles Suprin

    Charles Suprin - 2011-02-01

    Very neat idea. There is the possibility of texture as well. Changing the fill or line type might work. No claims are made regarding the api supporting it.

     
  • Charles Suprin

    Charles Suprin - 2011-11-14

    I have sketched out two implementations on my development machine, one changes the background color. The other changes the alignment. Neither of these are as requested.

    The syntax to change the style of the font is unclear to me, especially if we want to keep it in line with fonts defined in the theme. This font issue is also raising it head in the other issue regarding size. It would be nice to grab the Default font in and then make it bold or larger.

    The other question is that is expected to be optional. First pass would probably be an on/off option with a pick your color/font/other option coming later.

     
  • Charles Suprin

    Charles Suprin - 2011-11-14

    Color Highlight example

     
  • Charles Suprin

    Charles Suprin - 2011-11-14

    Picture now attached.

     
  • Alexandru Csete

    Alexandru Csete - 2011-11-15

    GtkCellRendererText has a property called "weigth" which can be set via g_object_set(), e.g.

    g_object_set(renderer, "weight", PANGO_WEIGHT_BOLD, NULL);
    g_object_set(renderer, "weight", PANGO_WEIGHT_NORMAL, NULL);

    The renderer can be accessed in cell data functions that we already use for some cells.
    I suspect this will add significant amount of processing in the code.

     
  • Charles Suprin

    Charles Suprin - 2011-11-16

    The patch is only around 10 lines of code. As for the processing complexity, only time will tell.

    If the effect is acceptable, I can write the event list version as well and commit it.

    A patch and picture are included for review.

     
  • Charles Suprin

    Charles Suprin - 2011-11-16

    Bold Highlight approach

     
  • Charles Suprin

    Charles Suprin - 2011-11-16

    Patch that uses bold for highlighting.

     
  • Alexandru Csete

    Alexandru Csete - 2011-11-16

    I wasn't worried about complexity - I meant processing cycles, since in the simplest implementation the additional if-then-else will be executed for every cell (rows*columns) in the list many times per second.

    Maybe you have something different in mind. The patch seems to be missing this part of the code. On the other hand the patch contains changes that appear to be from different changeset (decay, alignment)?

    I'm not sure I like the idea of adding a new column for this purpose since it is redundant.

     
  • Charles Suprin

    Charles Suprin - 2011-11-16

    The implementation is a working implementation.

    The "if else if"is taken care of implicitly by adding the "weight" attribute to the gtk_tree_column_new_with_attributes. Then that column is updated as part sat_list_update_sats of the update in To do this is why the need for the new column.

    For references: <http://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View/Columns_and_Renderers#How_to_Make_a_Whole_Row_Bold_or_Coloured>

     
  • Alexandru Csete

    Alexandru Csete - 2011-11-16

    Ok, I understand. Thanks for the clarification.

     
  • Charles Suprin

    Charles Suprin - 2011-11-21

    SVN commit 956 bolds the text in sat lists and event lists when the satellite is above the horizon. If there is another interpretation of "in range" that should be implemented, please advise.

    The alignment comment was from a test done before knowing how to change font weight.

    The decay additions to the list were missing from earlier updates and entered to have the correct spacing for the weight table entries.

    Having used this for a few days, I really like this feature.

     
  • Alexandru Csete

    Alexandru Csete - 2011-12-26
    • assigned_to: nobody --> csete
    • milestone: 1386914 --> 1.4
    • status: open --> open-accepted
     
  • Alexandru Csete

    Alexandru Csete - 2013-02-04
    • Status: open-accepted --> open
     

Log in to post a comment.