Bug 5474 - Use #ifdef conditionals for added and removed upstream TigerVNC code
Summary: Use #ifdef conditionals for added and removed upstream TigerVNC code
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VNC (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.4.0
Assignee: Peter Åstrand
URL:
Keywords: ossman_tester, prosaic
Depends on:
Blocks: 5475
  Show dependency treegraph
 
Reported: 2015-03-18 09:28 CET by Peter Åstrand
Modified: 2015-04-23 12:23 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2015-03-18 09:28:47 CET
We are doing some tweaks to TigerVNC in ThinLinc compared to the upstream version. This includes both re-brandning as well as some removed and added functionality. This has been tracked using our vendor drop system. In some cases, the "removed" upstream code has been commented out, such as in this case:

   case ID_INFO:
     if (fltk_escape(cc->connectionInfo(), buffer, sizeof(buffer)) < sizeof(buffer)) {
 //      fl_message_title(_("VNC connection info"));
+
       fl_message_title(_("ThinLinc connection info"));
       fl_message("%s", buffer);
     }

This causes problems with the translations, since we are (now) including the preceding comment in the PO file.  

I'm suggesting that we use #ifdef conditionals instead, like this:


  case ID_INFO:
    if (fltk_escape(cc->connectionInfo(), buffer, sizeof(buffer)) < sizeof(buffer)) {
#ifdef THINLINC_UPSTREAM
      fl_message_title(_("VNC connection info"));
#else
      fl_message_title(_("ThinLinc connection info"));
#endif // THINLINC_UPSTREAM
      fl_message("%s", buffer);
    }
Comment 1 Peter Åstrand cendio 2015-03-18 09:38:04 CET
Fixed in r30151.

The tester should check that the diff against upstream is small and relevant:

svn diff svn://svn.lkpg.cendio.se/vendor/tigervnc/current svn://svn.lkpg.cendio.se/trunk/ctc/vnc/tigervnc

Basically, there should be no code changes which are not using the THINLINC_UPSTREAM conditional. Well, the exception is Makefiles etc, where #ifdef cannot be used.
Comment 2 Pierre Ossman cendio 2015-04-23 12:23:35 CEST
Looks good. There were a few unnecessary diffs that was fixed in r30261.

Note You need to log in before you can comment on or make changes to this bug.